November 03, 2007

Twice the fun!


Twice the fun!, originally uploaded by sudarkoff.

I doubled the distance of my Saturday's "long" ride today.
Sent via BlackBerry by AT&T

Installing SCons on Leopard

In case you were wondering, here's how you would install SCons on Mac OS X 10.5 (Leopard):


$ su -
$ curl -O http://prdownloads.sourceforge.net/scons/scons-0.97.tar.gz
$ tar zxvf scons-0.97.tar.gz
$ cd scons-0.97
$ python setup.py install --prefix=/System/Library/Frameworks/Python.framework/Versions/Current
$ for i in /System/Library/Frameworks/Python.framework/Versions/Current/bin/scons*; do ln -s $i /usr/local/bin/`basename $i`; done
$ exit

October 29, 2007

Bluetooth stereo headphones in Leopard

For me, one of the nice features in Leopard is the support for Bluetooth stereo headphones (A2DP). As much as I love the simplicity and reliability of the basic iPod ear bugs, you just can't beat the feeling of freedom that wireless headphones give you!

I am using Motorola HT820 headphones. They are not the most comfortable headphones (I have a truckload of headphones of all shapes and price points in my possession and I find iPod ear buds to be most comfortable for prolonged usage), but the sound quality is quite acceptable for anything from talking on the phone to listening to music. Play/Pause, Skip, Rewind and Volume buttons are also supported.

October 26, 2007

ADC Membership


ADC membership
Will you be extending your ADC membership?
No, it's a scam!
No, the benefits are not worth the price.
I don't know, I haven't decided yet.
Yes, it provides some value.
Yes, it is essential to my business.








October 18, 2007

At night, after (most) developers went home, our campus is occupied by other creatures.

George

October 17, 2007

Ron Paul and iPhone


IMG_1245, originally uploaded by ronpaul2008.

September 17, 2007

Build numbers

Wincent Colaiuta in his blog post "Build numbers in a Git-based development cycle" is trying to come up with the build numbering scheme. His requirements are that the build number (1) uniquely identifies  the revision of the source code used in the build and (2) provides a clear distinction between earlier and later builds (i.e. is sequential). Git is a distributed system and as such instead of a sequential revision number it uses sha1 to uniquely identify individual commits. The problem is, sha1 is quite long (even its abbreviated form is seven characters) and absolutely non-sequential.

I myself just converted all my repositories to git. But my build numbering scheme accommodates new environment just fine, so I wanted to share. First of all, why do you want the build number to be sequential? So that your users could tell which build they have installed on their system and whether or not it is the latest one. Second, why do you want the build number to uniquely identify the sources? So that you (the developer) could pinpoint the sources that were used to make the build (in order to find the change that introduces the bug, for example).

This divides the problem into two distinct parts and I decided to address them separately. That is, my build number has two components: a sequential number for the user and a unique source code identifier for myself. The former is just a number automatically incremented by the build infrastructure while the latter is the abbreviated sha1 of the latest commit in the repository used by the infrastructure to produce the build. Theoretically, I can have two builds made from the same revision, but in reality my build infrastructure is smart enough to avoid doing unnecessary work. That means, that although the full build number might look quite intimidating (e.g.: 4ef.7e93fcd) the first part of the number is always sufficient to uniquely identify the build. And in fact, the second part is almost never directly communicated to the user.

Additionally, I never number my developer's builds (builds created from my working tree). It is not only unnecessary, but actually quite undesirable. The reason? It would be a bad idea to distribute a build made from uncommitted changes and I want to make sure that the developer's builds are easily recognizable as such (e.g.: 0.0000000). All this makes it very easy to implement a script that automatically increments the sequential part of the build number and stick the abbreviated sha1 to it to form the complete build number.

September 13, 2007

Bye-bye svn! Hello there, you sexy git!

I can't believe I am doing it! But after playing with git for a couple of weeks (including using it on top of Perforce at work) I am converting all my svn repositories to git. It is a completely different experience. It takes some getting used to, but when you finally do, it's like finding a Jesus. The feeling is very similar to what I experienced after switching to Mac. The stuff just works!

August 21, 2007

CD turned 25

A few days ago CD turned 25. It's hard to believe that it was around for that long! I bought my first audio CD in early 90s -- good ten years after the media debut on August 17, 1982. It was "Morrison Hotel" by The Doors. I couldn't listen to it for a good couple of months because I didn't have a player. Then I got a CD ROM drive for my PC. The drive was insanely expensive and had a feel of something that came from outer space.

Fast forward fifteen years -- I ripped everything I had to my hard drive and I listen to it on the iPod. I don't buy music on CDs anymore either. And finally six months ago, when I was moving from Los Angeles to San Francisco I gave a few hundred of my audio CDs -- everything I owned -- to a friend of mine. So, RIP CD. It was the glorious 25 years and we will remember you kindly!

July 13, 2007

Fast Vista penetration

It just hit me -- fast adoption of Vista by Windows users is probably a good thing for the Mac market share (and Linux as a cheaper alternative, of course). I know it sounds ridiculous, but listen to me for a second. A whole bunch of folks will upgrade either by purchasing a new PC with Vista pre-installed or worse yet by buying the ridiculously overpriced upgrade and installing it on their outdated hardware. And the stuff will break: microphones will stop working, printers will stop printing, apps will start crashing, annoying dialog boxes will start popping up everywhere, etc... and suddenly the prospect of switching to a completely different OS all their geekier friends can't stop raving about will become less scary! What do you think?