JavaScript Performance Wars
by Jim Myhrberg – tags: , , ,

Is the difference between Chrome's V8 engine, and WebKit's SquirrelFish Extreme (SFX for short) significant enough that we need to care if we use Chrome or Safari/WebKit?

After some quick Googling for recent posts and comparisons of V8 and SFX, it seems nobody has bothered doing any comparisons after late 2008. Maybe I'm just completely outta the game, and the performance of the two engines is now common knowledge. If that's the case, it's knowledge I sure don't have.

I set out to do a quick (and unscientific) performance test between the latest released beta/development build of Chrome, and the latest WebKit nightly. I decided to use SunSpider as it's still highly respected from what I know, and a test only takes 2-4 minutes instead of 15 minutes with Dromaeo. For good measure I also threw in the latest alpha build of Opera, and the latest shipping versions of Safari and Firefox.

The Results

SunSpider Results

I don't know about you, but a 4.6 ms difference between Chrome and WebKit is something I really don't care about. I don't even care about the 54.6 ms difference between Chrome and the latest shipping version of Safari. Specially not since I've been using WebKit nightlies the past 8 months with no more or less issues and/or crashes than with the standard Safari release.

Something that did grab my attention however was how well Opera 10.50 Alpha did with it's new Carakan JavaScript engine. With that said, Carakan was eating about 80-90% CPU time during the tests, while all other browsers only used about 30%. Firefox's TraceMonkey engine was unsurprisingly the slowest.

I'm looking forward to see what Opera does over the next couple of years with their desktop browser. Both in terms of performance, and in terms of page rendering. If you're following me on Twitter, you may know that from a web designer's point of view, I've had more issues and headaches with Firefox 3 lately than with Opera 10.

Detailed Results

I ran all tests with a freshly relaunched browser, with no pages open aside from SunSpider. The test system was my 2007 MacBook Pro with a 2.4GHz Core 2 Duo processor and 4GB Ram running Mac OS X 10.6.2.

Below is a list of the specific browser versions I used, and the detailed SunSpider results.

Don't take my findings too seriously however, cause I didn't have time to do multiple repetitive tests, rebooting the system between tests, or really much of anything to properly ensure the tests are 100% accurate. If you need seriously accurate numbers, run the tests yourself.

Comments

To Caffeinate, Or Not To Caffeinate?
by Jim Myhrberg – tags: ,

I used to be a caffeine junkie. My caffeinated poison of choice was Coke, the legal kind, not the illegal one.

When I say I was a junkie, I don't use those words lightly. At most, I was drinking about 3-4 liters per day. I kid you not. On average though it was around 1.5 liters per day, seven days a week, 365 days a year. The recommended liquid intake per day for adults is 2 liters (of water). This had been going on roughly since I was 16 or 17 years old, or 7-8 years ago.

Why Caffeinate?

I drank Coke for two reasons. Firstly cause I loved the taste of it. Secondly, and most importantly, cause the caffeine and sugar gave me energy. Being a developer, I spend all my time on the computer thinking a gazillion different thoughts at the same time all day long. Thanks to this, my brain eats up enormous amounts of glucose (sugar), and Coke is the perfect counter agent for this, as it contains both sugar and caffeine.

Also, I never really sleep a full night's sleep, so I'm always tired throughout the day. If I didn't have any Coke in the morning though, or there was a too long gap between one glass and the next, I'd get extremely tired, to the point of almost dosing off and not being able to get much work done. So I'd have another glass of Coke to counter these deep swings in my alertness.

Going Cold Turkey

So let's jump to last spring, April 16th 2009 to be exact. While on a road trip, I decided to stop drinking Coke, cold turkey style. Originally I wanted to do it over the weekend just to see how I'd feel without any caffeine in my system. Which was something I hadn't experienced for years. I was honestly a little surprised that after being a bit more tired than normal the first day, I was fine the second day.

The Withdrawal

After the weekend ended, I kept away from caffeine, and around day three or four, I started getting light headaches multiple times per day, everyday. And I never have headaches, except for when I'm dead sick with some flu so I can hardly stand on my own two feet. So I figured that the headaches were from caffeine withdrawal. According to Wikipedia, withdrawal symptoms can last for one to five days. My headaches didn't let up for about two weeks.

The Aftermath

I didn't drink a single drop of caffeine of any form for the next two months. And since then, it's a rare event which generally only happens when I go to the cinema and buy popcorn and Coke for the movie. I generally feel better, I think. I'm still generally tired throughout the day cause I don't get enough sleep, but I never get the deep end energy swings I used to get if I didn't have any Coke for a while.

My wallet is also feeling healthier. I used to spend between 50 to 100 EUR on Coke every month, now that money is going to paying my cell phone bill instead.

Conclusion

I don't need caffeine. I wanted to quit drinking caffeine cause I was curious. I knew it couldn't be that good for me to keep drinking as much Coke as I was, and it was kinda expensive as well.

If you do consume a lot of caffeine, I'd suggest you try quitting cold turkey style for a week – or even just a weekend – to see how you feel without it. Cause chances are, that you can at the very least save a decent pile of cash over the course of a year or so, without feeling any worse than we all naturally do in our fragile human condition.

P.S.

I bought a bottle of Coke the other day, cause I felt like having some. After half a glass, I realized that I don't really like the taste of it anymore. So this bottle will probably sit in my fridge indefinitely, and might be the last bottle I ever buy for myself.

Ten months after quitting Coca Cola, I don't like the taste anymore. It's lame, but for me it's a pretty big event, as I used to consider Coke the best tasting thing on the planet in liquid form.

Comments

Was I Really “That” Social?
by Jim Myhrberg – tags: , ,

As some of you might have noticed the last couple of days, I haven't been online much on IM networks. I'm not sure what originally kept me from launching Adium the other day, but along the way I've come to a realization.

The Problem

I realized that IM has been taking up way too much of my time, and constantly distracting me from both work and personal matters. You just can't hide from the tsunami of Growl notifications, bouncing and flashing Dock icons, plinging sounds, and more that almost all IM clients spew out in one form or another whenever you receive a message.

A friend of mine gave up on IM networks almost a year ago, for pretty much same reasons. — Yes, I'm linking to Sugarenia again. She always seems to have the same opinions as me, just days/months before me. Dammit!

The Solution

Unfortunately I couldn't bring myself to completely disconnect from IM networks, so I took a slightly different approach than Sugarenia. I've gone out of my way to make sure my IM client — Adium of course — doesn't notify me via Growl, Dock icon, sound, telepathy, or even alien abduction. This means, I'm online, I can chat, but unless I manually switch to the space/virtual-desktop where my IM client sets up camp, I don't even know if I have any new messages.

After a couple of days, I have to say it's a quite nice change. I only get distracted when I choose to check if there are any IM messages to respond to.

So now you know why it might take me 8 hours to respond to a chat message. I simply didn't want to check for new messages, or I completely forgot cause I was hopefully working along all excited on my next attempt at building an awesome online service which will hopefully pay my rent, and maybe even food.

Comments

About That “Pad” Thing
by Jim Myhrberg – tags: , ,

So I was gonna write a post with my opinions about the iPad, but a cup of tea and staring at wall of wet paint is almost more tempting. If you don't get why the iPad is important, and why it will succeed, I'm not even gonna try convincing you otherwise, time will just prove you wrong and make you feel stupid.

By this point you're then thinking “What the fuck is this post about then?”. Sugarenia just wrote up a quick rant regarding her opinions on the iPad, which pretty much sums up my own opinions to the letter. Only she's written and explained herself much better than I most likely would have.

The iPad is not made for you and me, fellow geek. It’s primarily targeted to people that are still afraid of interacting with PCs, those that don’t have a clue about drivers and web apps and Wi-Fi setup. And this is exactly the kind of people that won’t buy a Linux netbook, dear Open Source zealots – because as much as Ubuntu has made Linux user-friendly, there’s still much filling that shows between the seams.

Read the full article, please.

Update: I just noticed a post by another friend of mine which is also good:

I think the main reason why self-described geeks are throwing a fit over the iPad is that it's a shiny new toy that's not meant for them.

Read the full article.

Update 2: Seems using Jekyll can have some downsides. I accidentally named the file for this post 2010-05-06-[...].md without noticing that it was labeled as posted “06 May”. I've corrected it, but the permalink to this post has changed. *facepalm*

Comments

New Avatar, Same Old Fugly Face
by Jim Myhrberg – tags:

Today marks the day I update my online avatar/profile picture. I've had the same sepia colored half-face avatar for 4 or 5 years now. So it was about time for a change. However, the biggest reason I changed it, was cause I cut my hair short in November, after having long hair for about 10 years.

But why the heck am I blogging about it? Cause I wanted to have an excuse to add Fancybox to my newly redesigned site. And the previous post was looking lonely after two days in solitary here.

So without further ado, I present my old and my new avatar in complete Fancybox glory with fading animations and all. If you're reading this in a feed reader, click here (if you're really bored).

Old Avatar: jimeh 1.0 (2005) New Avatar: jimeh 2.0 (2010)

Because I'm a perfectionist and decent bit insane, here's the 50x50 pixel versions too, so you can see how they both look in really small sizes, which is the most common size they appear in on different sites anyway.

Old Avatar: jimeh 1.0 (2005) New Avatar: jimeh 2.0 (2010)

And incase you're wondering, I'm 18 or 19 in the old photo, and 24 in the new one. If I shave though I can easily fool people into believing that I'm 17. In fact, some people think I am 17 :P... I guess I'll appreciate it more when I'm 30-40 and people think I'm 26, hehe.

Comments

Automated Profile Picture Update Service?
by Jim Myhrberg – tags: , ,

After I updated my profile picture today, a friend of mine responded with:

Build a service that changes your profile picture in all social networks!

He also didn't like the new profile picture, but that's his problem. My first response was fuck off “Gravatar?”. Obviously he didn't mean Gravatar, I just mentioned it to annoy him.

A service which automagically just updates your Facebook, Twitter, Flickr, YouTube, Vimeo, Gravatar, ... profile pictures would be quite cool. Thinking about it a bit more, there are three problems with building such a service:

  • A lot of these sites you will need to crawl programmatically using some kind of web-crawler library. It will be a pain to write, and even bigger pain whenever they change anything in the HTML layout of their pages.
  • Some sites have specific and/or strange restrictions for image dimensions, file size, and even file format.
  • Will people actually trust such a service with passwords for all of their online social networking accounts?

The later problem, trust, is definitely the biggest one. And I'm not sure you could overcome it unless the service is officially sponsored and/or operated by Google or somebody. I do think it could be a fun project to undertake, but I think it's pretty doomed right from the start unfortunately. Although if I updated my profile pictures more than once every 4-5 years, I might just build a prototype for myself at least.

Comments

New Site and Blog Powered by Dr. Jekyll
by Jim Myhrberg – tags: , , , , , , ,

I finally found some time to rebuild my site, and add a blog. I'm also working on a portfolio, which I will probably be putting up on heartb.it. I haven't really decided how I'm gonna make the split between my personal site and work portfolio yet though.

For archival reasons I've made the previous versions of my site available for anybody who might be curious.

On an unrelated note, it happens to be my 24th birthday today, I haven't decided yet if that's a good or a bad thing. But at least I found time to push up my new site today, so I guess that's a good start at least :)

Powered by Dr. Jekyll?

My personal site has always been a very simple site. In the past it's just been a single HTML page which I've coded by hand and uploaded via SFTP. It's a simple process, and decently straight forward. This time however, I wanted to incorporate a blog as well. My first choice was WordPress, as I've used it on my previous blog. But it's overkill for what I need, and keept getting hacked all the fucking time even when I was keeping WordPress decently up to date.

So I'm using Jekyll this time around. Jekyll is a small website framework written in Ruby which generates static HTML files. It was created by one of GitHub's founders, and is used on GitHub Pages. Part of what makes it nice is that it's more intended to be a quick and elegant blogging engine, rather than just a static site generator. It let's you write blog posts in pure HTML, Markdown, or Textile. Meaning I'm writing this post in TextMate, which always puts a smile on my face.

I'll soon write a more in-depth article about Jekyll and how I'm using it.

Comments with Disqus

Since I'm using static HTML files, I'm left with only a few — but awesome — solutions to have a commenting feature on the blog. Both Disqus and Intense Debate have great Javascript-based commenting systems which work for static HTML sites. My favorite of the two is Disqus.

Deployment with Rake+Rsync

I've also opted for a much easier way to deploy to the live server once I'm done with changes locally. Namely, Ruby's Make program, Rake.

I've written a couple of custom rake tasks which run Jekyll to build the static HTML files, and to rsync said HTML files to the remote server. So instead of using a SFTP client, or something like Coda to upload and update the remote site, I simply run rake deploy from a terminal.

I get butterflies in my stomach whenever I think about how neat it is.

Source Code Management with Git

After being an avid user of Subversion for about 5 years, I switched permanently to Git last August when I spent 4 hours reading a PDF I had with me on holiday. So I'm obviously using Git for this site, and the source code is available on GitHub in all it's glory.

Design

I really focused on minimalism, to the point I'm not using a single image, but rather only text on a white background. This is a first for me, as I generally like to have nice rounded corners, or drop shadows, or something, but still simple and elegant looking.

Since the design in highly text-focussed, good typography was a must right from the start. I wanted to stray away from the standard web-safe fonts, to create a truly unique and elegant looking site in terms of it's typography. To do this, I needed to embed fonts, and I used the @font-face technique for it.

The two fonts I'm using are Colaborate for body text, and DejaVu Sans Mono for fixed width text and code examples. I got both from Font Squirrel's excellent @font-face fontkit page which has hundreds of free and ready to use kits.

The End

{insert yo mamma joke here}. Have a nice day.

Comments

newer → archive
rss