The march of progress
Today I received my lovely new Sony Ericsson C902 couriered straight to my desk. It was very painless: Orange rang, I'm a valued customer, they offer me a new piece of kit and a sexier calling package for less money. I wasn't expecting much, just a new, smaller, shinier phone and it is just that. However, it has one thing that most phones don't and that is a mini-jack connector for the headphones. No need to use the rubbish headphones that come with the phone, I can plug whatever I want into it. Now that is what I call progress...
Popularity: 59% [?]
Flashpaper
Adobe have despatched Flashpaper to the same grave of irrelevant products as FreeHand and ImageReady. Considering Flashpaper was made by Macromedia before their assimilation, it was kind of on the cards due to it's competition with PDF.
From the article the CEO a doomed startup whines:
What about all the websites that have been storing all their documents with Flashpaper? It will be a major job having to transfer all those documents to a new solution
Perhaps if instead of willingly submitting to vendor lock in they stored their documents in a recognised, open standard that's widely implemented by multiple vendors they would not have this problem.
Popularity: 69% [?]
FlashCommand
I found this excellent command line tool to compile Flash movies the other day.
It works like this:
-
flashcommand -p -s /path/to/fla
The -p switch means 'publish' and '-s' specifies the path to the source .fla file. It works by opening Flash CS3 in the background and instructing it to compile the movie, consequently it will respect the publish settings you've defined in the .fla so the generated .swf file will end up in the right directory.
Combining this with Flash CS3's ability to import an external AS3 file to use with each movie means bar the initial .fla file creation you'll never have to use Adobe's painfully bad authoring environment ever again.
Popularity: 66% [?]
UK communications database
The latest krazee plan from the Home Office's policy department seems to be a massive database containing the details of every phone conversation and email sent in the UK.
Assuming it works (it won't) then at least they'll realise just how bad the spam situation is.
Popularity: 83% [?]
Running FMS 3 on Gentoo Linux
I've been trying to install Macromedia Adobe Flash Media Server 3 on my local development box and have run into some problems.
To help out anyone else trying to do the same thing, here's how I did it.
First you need to install nspr
-
emerge -uDv dev-libs/nspr
Add a user/group for it to run under:
-
groupadd fms
-
useradd -g fms -d /dev/null -s /bin/bash fms
Then download and extract the media server as per usual. Before installing it, you need to fiddle the install script so that it will install on your "unsupported" platform. Open installFMS in your favourite text editor and find the line that reads
-
DISTRO=`check_distro`
Change it to something appropriate like
-
DISTRO=redhat-RHEL4-i686
Then start the installation script as normal. Tell it that you don't want it to run as a daemon (as it requires the Red Hat only chkconfig command) and that you don't want it to start the server when done.
After you've installed the server, you'll need to make the bundled libasneu.so.1 library available for use:
-
ln -s /opt/fms/libasneu.so.1 /lib/libasneu.so.1
For some reason the install messed up the configuration files, adding things like the administrative user name twice. Check conf/fms.ini to make sure this hasn't happened to you.
The installer creates init scripts at /etc/init.d but in order to use them you first need to create a file called .autostart in the installation directory:
-
touch .autostart
You should then be able to start and stop the server normally:
-
/etc/init.d/fms start
-
/etc/init.d/fms stop
And use rc-update to have the server start on boot:
-
rc-update add fms default
Good luck.
Popularity: 98% [?]
Vista SP1 sales video
I really hope this is a spoof as it makes me want to stab myself in the eye with a fork.
Popularity: 92% [?]
Prototype String.toQueryParams() weirdness
I just came across this while using Prototype:
-
"section=blo%g&id=45".toQueryParams();
To save you the trouble of running it yourself, I'll tell you what happens - the unescaped percent symbol causes a URI malformed error to be thrown.
Very odd. The Prototype documentation for toQueryParams says:
Parses a URI-like query string and returns an object composed of parameter/value pairs.
Since it's a URI-like query string and not an actual query string (by which I mean one that's been through the browser address bar and as such subject to whatever text munging the browser does), my example above should be a legal use case.
After a little digging around in prototype.js, it seems that the problem is caused by the JavaScript function decodeURIComponent() not enjoying being given a string that contains an unescaped percent symbol. Usually percent symbols are used in conjunction with a number to represent a non-alphanumeric character in a URL - %20 for space, etc, but in the above it's a literal percent symbol.
My first attempt to fix it changed lines 98 and 100 of string.js in the Prototype source to use the built in escape function:
-
var key = decodeURIComponent(pair.shift());
-
...
-
if (value != undefined) value = decodeURIComponent(value);
-
-
to
-
-
var key = decodeURIComponent(escape(pair.shift()));
-
...
-
if (value != undefined) value = decodeURIComponent(escape(value));
This worked for my use case but caused Prototype to fail a different unit test. Changing them to the following worked out okay:
-
var key = unescape(decodeURIComponent(escape(pair.shift())));
-
...
-
if (value != undefined) value = unescape(decodeURIComponent(escape(value)));
Granted the unescape(...(escape(...)) is a little clumsy, but it seems to get the job done.
Adding the following unit test to string.html allows to test for the above:
-
this.assertHashEqual({'key1': 'va%lue1'}, 'key1=va%lue1'.toQueryParams(), 'rogue percent symbol test');
I've created some test pages which demonstrate the problem.
There is also a patch file available. Apply it to /src/string.js in your Prototype source tree.
Update
I've also filed a bug.
Popularity: 100% [?]
Code
I haven't posted here for a while, mainly due to the time sink that is Facebook, but I have been writing code in my spare time, honest. I thought I'd have a little skim through what's on my machine and share a few choice nuggets.
Recently I've been trying to get into programming applications for Mac OS X - I use it on a day to day basis so thought it would be best to get involved. I've put some new things on the Stuff page for your perusal. They are:
Backgrounderer
A little app to download desktop wallpapers from veer.com. If you wish to build from source, you'll need to install RegexKit first.
Mail RSS Exporter
An application that exports your RSS feeds from Apple Mail and stores them in either OPML format or Safari Bookmarks.
TouchMe
A program to run AppleScripts on a computer on your local network from your iPhone or iPod Touch - I use this to control a Mac mini attached to a projector. The projector is not always switched on so Front Row was insufficient. It also allows you to force quit applications that have hung.
SimpleHTTPd
A Cocoa native web server packaged as a framework so you can use it in your own projects. Based on Jurgen Schwiezer's SimpleHTTPServer.
All of the above require OS X 10.5 Leopard as coming from a Java/PHP background I have a strange fetish for garbage collectors and consequently find manual memory management tedious.
They are all BSD licensed and source is included with each program so go crazy.
I'll get round to posting about each one in more depth in the near future.
Popularity: 92% [?]