Javascript Performance: Google Chrome, Firefox & Safari
September 3rd, 2008
Today I’ve been playing with Google’s new web browser, Google Chrome. So far I have to admit I’m very impressed. Specially about the new JavaScript engine called V8, as it even leaves WebKit’s new erbium doped fiber amplifierSquirrelFish JS engine eating dust.
Here’s the results from my most likely very-unscientific JS performance tests using Dromaeo. All tests were done within minutes of each other, during equal system loads on a 1.8 GHz Core 2 Duo machine running XP SP2 (work machine, as I only have Macs myself).

Here’s the detailed test results:
http://dromaeo.com/?id=31749,31679,31717,31597,31599
Google Chrome registers as “Safari/525.13″ since they both use the WebKit rendering engine.
Best Dromaeo results I’ve seen with Google Chrome is 180ms on a friend’s 2.66 GHz Core 2 Quad system.
P.S. Yes, that chart was created using MS Office, rather than Keynote or something, as my MacBook Pro is still in the UK getting repaired. But more on that later 
Fix for the never-ending Apple logo during iPhone boot problem
August 30th, 2008
So, the last few days, I’ve had a quite weird issue with my iPhone. It locks up, and after a force reset, it never does anything else than showing the Apple logo. However, it does connect to Wifi for about 5 minutes so i can SSH into the phone.
So far, I’ve been resetting the phone from scratch, but with help from eric in #iphone on irc.saurik.com I managed to figure out a solution.
For now I’m just gonna write up the steps required to fix it. I’ll update the post later with details of why and how this happens.
The Fix
First of all, your phone still has to connect to your wifi network so you get SSH access, even tho it’s still only displaying the Apple logo. It will probably disable wifi after about 5 minutes, so you gotta move faster than a snail at least.
Don’t try this if you don’t know what you’re doing. Also, this is for the 2.0/2.1 iPhone software, but might also work on 1.x.
- SSH into the phone as root, cd to /System/Library/SystemConfiguration/ and rename mobilewatchdog.bundle to mobilewatchdog.bundle_x.
- cd to /private/var/mobile/Library/Caches/ and remove any files which names begin with “com.apple.mobile.installation”.
- Reboot the phone, and like magic it should start up like normal, in 2-15 minutes depending on how many apps you have installed.
- SSH in again and rename the mobilewatchdog.bundle_x folder back to mobilewatchdog.bundle in /System/Library/SystemConfiguration/, and reboot.
The Cause
The problem’s root is a combination of how App Store apps are stored on the phone, and a safety process called mobilewatchdog which ensures that the Springboard doesn’t lock up.
Myself, I’ve mainly had it triggered by installing an app with Cydia which has a Springboard icon. As you surely have noticed, Cydia on iPhone software 2.0.x doesn’t need to restart the Springboard anymore for new applications to show. It seems to use a similar method as the App Store to dynamically create new application icons.
The problem is that sometimes when Cydia adds an application icon, the Springboard flips out and looses it’s cached list of installed applications. That list is required cause the App Store apps are stored in they’re own little sandbox protected folders, which means that it’s a bit more complicated than just getting a directory listing to see which applications are installed. And it takes some time to scan for all installed applications.
And that’s where the problem starts. There’s a background daemon called mobilewatchdog, who’s sole purpose is to make sure that the Springboard does not crash or lock up. In the event of the Springboard locking up or crashing, mobilewatchdog will force quit and relaunch it. Sounds good right? Right, as long as the Springboard doesn’t have to rescan for installed applications.
As it seems, when the Springboard scans for applications, it’s too busy to respond to mobilewatchdog’s checks. And mobilewatchdog being very impatient, only waits 2 seconds for an answer from Springboard. So if it doesn’t get a response within 2 seconds, it force quits the Springboard and relaunches it. At this point, Springboard just starts rescanning for installed applications again and gets to busy to respond to mobilewatchdog again, and the circule continues for all eternity.
So the solution was pretty obvious. Disable mobilewatchdog temporarily so Springboard get’s time to find all installed applications. I originally tried some plist configurations as was suggested by syslog dumps from the mobilewatchdog daemon itself, they didn’t work tho. So being desperate, and crazy, I simply renamed the mobilewatchdog bundle rendering it unusable, hoping that its launched simply based on file name, and nothing else fails due to it referencing it. Luckily enough, it works.
Springboard was given enough time to find all my installed applications and launch like normal. It had however missed a few apps, so I went looking for the cached list of installed apps, which was where I expected it to be. In /private/var/mobile/Library/Caches/. Removing the cache files forces Springboard to scan for apps again, and with mobilewatchdog out of the picture, it works perfectly.
I’ve only tested this on 2.0.2, but should be exactly the same for all 2.0.x software. I’ve tested this on both 2.0.2 and 2.1 with success. I have had the same issue on 1.1.4 tho when using Installer. However, I don’t know if its the same issue or not. If this happens to work for the same issue on 1.x, please let me know
It was thanks to eric in #iphone on irc.saurik.com that i figured out this solution. He had previously had this issue, and worked with saurik to figure out what was going on. Without being pointed in the right direction, I wouldn’t have had a clue of where to start, and just ended up swearing my head off and resetting my iPhone yet again.
SJF gives the finger to IE6
August 26th, 2008
Dave, the co-creator of our Steve Jobs Facts project has just launched IE Death March.
“Internet Explorer 6 will be SEVEN years old on August 27th. It came out a few weeks before the Twin Towers fell. It came out before the Nintendo GameCube. It came out before the first iPod.
It’s time to put a deadline on dropping IE6, and I say that time is now, and the deadline should be soon… say like, March 2009. That’s roughly a little more than 6 months.”
So, we’ve officially stopped supporting IE6 regarding SJF. From this point on we wont be testing any changes to the site in IE6. Not that it ever worked properly in IE6, but it does (for now) work at least.
Both me and Dave are, like IE Death March states, planning on halting all support for IE6 in our development efforts by March 2009. Hopefully IE Death March catches on and inspires more developers, and front line web-services to also halt supporting IE6, and encouraging more users to update to IE7 or switch to a better more modern browser.
IE6 has for many years a been filter of creativity with web development for me, and many others, here’s me hoping it wont be so in six months time.
More Twitter, Less Blogging
July 22nd, 2008
Has anyone else noticed that they tend to blog less since becoming a Twitter addict? I sure have…
I’m planning on fixing this by first of all including my Twitter feed on the blog one way or another. And then of course, to also focus more on blogging itself.
It’s just so quick and easy to get your thoughts out using Twitter. You’re limited to 160 characters, so there’s no point or need to write a draft, then review and/or edit it before you post your +500 word rant/review/news/whatever to the world.
Also, in my case, I’ve got an iPhone, which just makes Twitter even more addictive cause you’ve always got access to it 24/7 no matter where you are.
But now I’ve also got quick and easy access to my blog here thanks to the iPhone native WordPress app. Which means I don’t have to worry about how much GPRS is gonna cost to load up my blog in Safari to post something.
I think I’m gonna start blogging more along the Twitter style, like this post I’m writing now on my iPhone using the WordPress app. So please excuse any spelling and/or grammatical errors 
WordPress for iPhone
July 22nd, 2008
I just installed the WordPress app for the iPhone. And I have to admit it’s pretty damn nice, but could use some polish and feature additions. But hey, it’s the initial release, and I’m looking forward to seeing what will become of this app in the future
Also, nevermind the post where I announce Pwnage Tool 2.0 has gone wild, and my successfull pwning. I’ll post about that later…
Oh and by the way, I’m writing this on my iPhone
Steve Jobs Facts
June 7th, 2008
Yepp, its what it sounds like, its stevejobsfacts.com.
And with that I’m ending my six months of silence. It’s been a crazy, tiring and exhausting six months. But I’m not gonna go for months again without a word here.
Anyway, to get back on topic. Steve Jobs Facts is pretty much what it sounds like. It’s a satirical fact index about Steve Jobs. You vote on your favorite facts, and submit your own. Think of it as the bastard child of Chuck Norris Facts and bash.org with fancy sexiness sprinkled on top like fairy dust.
SJF is a project me and Dave (@sxtxixtxcxh) started last summer. Yes, I did say last summer. But due to circumstances, hiccups, and laziness, we never got the project ready for a launch. But this week we both decided to get SJF live before WWDC even if it killed us (not really, but sounds better than “if we fail, we suck!”, or “you suck” like Dave said it… lol).
The project is still very much beta/alpha though. We didn’t implement user registrations till 2 hours after we launched the site. Right now its very simple, but very usable at the same time.
We’ll be adding more features over the next few days, and some code cleanup behind the scenes to make things runs slightly faster and smoother. Not that anyone will notice the speed improvements though unless we get slashdotted or something *keeps fingers crossed and makes cute puppy eyes* 
00110010 00110000 00110000 00111000
January 1st, 2008
01001000 01100001 01110000 01110000 01111001 00100000 01001110 01100101 01110111 00100000 01011001 01100101 01100001 01110010 00100001 00001101 00001010 00001101 00001010 01001001 01100110 00100000 01111001 01101111 01110101 00100111 01110010 01100101 00100000 01110111 01101111 01101110 01100100 01100101 01110010 01101001 01101110 01100111 00100000 01110111 01110100 01100110 00100111 01110011 00100000 01110100 01101000 01100101 00100000 01100100 01100101 01100001 01101100 00100000 01110111 01101001 01110100 01101000 00100000 01110100 01101000 01101001 01110011 00100000 01100010 01101001 01101110 01100001 01110010 01111001 00100000 01110011 01101000 01101001 01110100 00101100 00100000 01110100 01101111 01100100 01100001 01111001 00100000 01101001 01110011 00100000 01001010 01100001 01101110 00100000 00110001 01110011 01110100 00101100 00100000 01101111 01110010 00100000 00110000 00110001 00101111 00110000 00110001 00100000 00111010 00101001 00001101 00001010 00001101 00001010 00101110 00101110 00101110 01100001 01101110 01100100 00100000 01111001 01100101 01110011 00101100 00100000 01001001 00100000 01110111 01100001 01110011 00100000 01100110 01100101 01100101 01101100 01101001 01101110 01100111 00100000 01110001 01110101 01101001 01110100 01100101 00100000 01100010 01101111 01110010 01100101 01100100 00100000 01110111 01101000 01100101 01101110 00100000 01101001 00100000 01110000 01101111 01110011 01110100 01100101 01100100 00100000 01110100 01101000 01101001 01110011 00100000 01011110 01011111 01011110.
LiteMySQL — A quick and simple MySQL class for PHP5
December 13th, 2007
Today I released a small and quick side-project called LiteMySQL. It’s basically a PHP5 class which is designed to automate the boring repetitive tasks of opening and managing database connections, looping through the query result resource to get an array and so on.
I created this for a small project I’m working on which basically needs database access on less than a handful of pages. And so I’d have a ready to use MySQL solution other small projects in the future.
And sorry for the lack of information on the project page as of now, but I gotta finish off the original project which motivated me to create LiteMySQL. Once done I’ll update the project page with relevant information
Example Usage:
# general usage
$sql = new litemysql('host', 'username', 'password', 'database', 'table');
$rows = $sql->find_all();
# conditions
# - the following three uses of the find
# function all produce identical results
$result = $sql->find(3);
$result = $sql->find(array('id' => 3));
$result = $sql->find('`id` = 3');
# insert a single row
$sql->insert(
array(
'title' => 'hello world',
'body' => 'my first blog post :D',
'author' => 'John Doe'
)
);
Intuitive WebKit based IM client coming to Windows
December 6th, 2007
Last night I was contacted by one of the developers from a new multi-protocol IM client called Digsby.
If you’re an avid reader of my blog (for reasons that are beyond me… lol), you probably already know why they contacted me. They asked to bundle my Modern Bubbling message style I created for Adium along with a few other of they’re favorites.
Here’s where things start to get interesting. Modern Bubbling wont need to be ported to they’re client, as they’re using the WebKit HTML rendering engine to power their message view.
Incase you’re not an avid geek, WebKit is Apple’s rendering engine developed for Safari a few years back. WebKit was originally based on KDE’s KHTML engine. It’s the rendering engine that powers Safari, Mail, Dashboard, Adium’s message styles, and much more on Mac OS X.
So thanks to the open-source, cross-platform wonder that is WebKit, and some hard work from the development team, Digsby will support all current Adium message styles without any modifications.
Digsby’s goal is to create an intuitive IM client for Windows. They’re seemingly huge fans of Adium, and how well its UI is designed. And not to offend anybody, but personally I have to say no IM client for Windows which I’ve tried so far comes close to being as good and as much of a pleasure to use as Adium is on Mac OS X. And this seems to be the very problem the Digsby team seem determined to fix.
I’m eagerly awaiting to get my hands on the first beta to see if I wont have to be in pain anymore when using an IM client on Windows.
Head over to www.digsby.com and signup for the beta mailing list.
Shamelessly reposted from Fraeon.info
December 5th, 2007
Safari doesn’t always like bz2 compressed DMG files
December 3rd, 2007
I noticed something weird this morning about the recent SimpleDock project I released last night. The DMG is compressed using bz2 rather than the default zlib compression used by default when creating compressed disk images.
Turns out Safari gets confused and guesses wrong a lot of the time with bz2 compressed disk images, and renames the downloaded file to file.dmg.bz2 when the server doesn’t give a DMG specific MIME type. The end result is that you have to remove the .bz2 extension at the end or the file will be unusable. For that you actually have to know of this issue tho, which not all end-users do.
This problem is easily fixed however if you use Apache by simply adding the following to your .htaccess file:
AddType application/x-apple-diskimage .dmg
With this fixed, i still decided to upload a new copy of SimpleDock which is compressed with zlib instead of bz2, simply cause the size difference was 14.23 KB, and Safari doesn’t have any problems with zlib compressed disk images regardless of MIME types. And also cause I wanted to make a minor change to the uninstall info file
The only strange thing though is that the SimpleDock download worked fine last night when i tested it, but this morning when I was testing some other stuff, I noticed it didn’t work properly anymore.
But oh well, it’s all fixed and working now, and I don’t feel like doing any P.I. work today… lol
SimpleDock 1.0 — a Leopard Dock modification
December 3rd, 2007
Do you not like the new default dock style of Leopard? Do you think the 3D style attracts to much attention and distracts your eye-line by not really fitting into any and almost all wallpapers? Do you find the white line around the flat style insanely annoying and ugly?
Myself I answered yes to all of these questions, which was what got me started on SimpleDock a few weeks ago.
From the beginning it was just supposed to replace the flat dock style, but along the way I came across Rev. Mitchz‘ Dark Glass mod for the 3D style which I fell in love with. So thanks to Mitchz’ permission, I included Dark Glass in SimpleDock
Finally tonight I decided to finish and release this project instead of getting a few hours of more than needed sleep. I’d had SimpleDock collecting dust for the past 10-14 days.
I’ve created an Installer and Uninstaller to make the process as smooth as possible for everyone.
Enjoy
Download SimpleDock
What Leopard’s folder icons should have looked like
December 2nd, 2007
I don’t know about your story, but my story of the first time I the new Leopard folder icons goes something like this; “Wait, what? Is this a joke? am I dreaming? WTF?!”.
In the end though when Leopard shipped, these new (from a lot aspects uglier) icons kinda grew on me and I didn’t really mind them that much after about a week. The old Aqua folders unfortunately look horrible as well in Leopard next to the rest of the UI.
Today I stumbled upon Jonas Rask’s latest work, Maji.
Jonas has done an amazing job with Maji (formally known as “QuickLook”) , and i’ve fallen in love with the icon set. It’s the icons Leopard should have shipped with in my opinion.
My only wish for Maji is that Jonas makes more icons for the set, and if I could have a wish, hard drive icons inspired/based on those found in the Agua icon set.
You can download Maji from here. Also check out CandyBar if you haven’t already, makes your life easy when it comes to installing replacement system icons.
Modern Bubbling: +40,000 Downloads
November 13th, 2007
I noticed today that my Modern Bubbling message style for Adium had passed 40,000 downloads (40,419 as of now). To say the least, I’m really happy and excited about how well Modern Bubbling has been received by the Adium community
I’d also like to say that an update for Modern Bubbling is probably overdue *whistles innocently*. I’ve just been really strung on time pretty much the whole year till recently. So I’ve been getting on top of things the last few weeks, and I’ll soon be getting around to seeing what I can do with Modern Bubbling.
Also, I’m at least planning to create an open-source PHP script for testing message styles without having to use Adium itself. If I get that far soon tho, I can’t say.
Leopard: Spaces Puzzle
November 7th, 2007
What happens when you’re a Leopard user and still awake at 2-3am writing code at the brim of sanity with your eyes almost closed from tiredness? You will shortly find yourself violating the pride of some Leopard features intended for usefulness by turning them into an old classic game.
What I started with:
It only took a few minutes to solve, but it was still fun
And yes, incase you’re wondering, I actually do use 9 spaces *whistles innocently* 




