June 5, 2008

Cocoa: Converting from nib to xib

Apple introduced new resource file format in Xcode 3.0: .xib.

Xib files are used during development time only and are will be converted to deployment format (compressed .nib) at build time.

The main benefit of .xib is that it is text-based. Text makes it easier to work with .xib files stored in a source control system.

Here is quick way to convert all old .nib files to .xib format:

ls | grep nib | xargs -L1 ibtool --upgrade

March 28, 2008

ack - a better grep

I was searching through with WebKit sources today and was struggling with grep.

The main problem was that, as any other SVN checkout, WebKit directory had a bunch of hidden .svn subfolders and grep included them in the search results making the output completely unreadable and full of junk:

grep_vs_ack

I started playing with grep and find options to try to filter out the unwanted .svn results.

The much better solution however is to simply switch to ack. Not only ack ignores .svn directories, it also produces a much more readable output:

ack_vs_grep

Kudos to Andy Lester for creating this great utility!

February 1, 2008

Quote of the Life

Your time is limited, so don’t waste it living someone else’s life. Don’t be trapped by dogma — which is living with the results of other people’s thinking. Don’t let the noise of others’ opinions drown out your own inner voice. And most important, have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary.

– Steve Jobs

Steve Jobs Stanford Commencement Speech

Commencement Speech Text

December 17, 2007

Quicksilver and Customer Support

Providing customer support for your products can be a lot of fun and a great source of motivation for every developer. Unfortunately it can also be a lot of pain and it appears that pain is killing one of my favourite Mac applications - QuickSilver.

In his recent interview with Lifehacker, Nicholas Jitkoff mentions that

Jitkoff: I’m inclined to encourage users to move over to the more stable and well supported alternatives like LaunchBar. Right now QS 54 (ed: the current build) accomplishes everything that I really need, the problem is stability, which for some reason most people seem to be ignoring.

The conversation continues…

Lifehacker: Right. I guess from my standpoint, the fact that Quicksilver is free (as well as open source, now) is a major part of why it’s so beloved.

Jitkoff: But also why it is so poorly supported. I have to do any work in off-time.

It is very sad that with so many loyal users willing to pay for support and future development this project is going to slowly die. I am not sure if making it open source will help.

November 10, 2007

Compiling libIDL on Leopard

It appears that libIDL is packaged with old config.guess file and when you try to build it on Mac OS X 10.5 (Leopard) you will end up with this error:

configure: error: can not guess host type; you must specify one

An easy fix is to replace the config.guess and config.sub files before running ./configure:

cp /usr/share/automake-1.10/config.* ./

November 7, 2007

Bitstream Vera Sans Mono

James Duncan Davidson recently wrote an article about monospaced fonts on Mac OS X.

He mentioned Bitstream Vera Sans Mono as a great replacement for Monaco — the standard monospaced font packaged with OS X. The blog readers quickly added more fonts: Inconsolata (my favourite now), DejaVu, Panic Sans, Envy Code R and more.

September 11, 2007

iPhone is Unlocked and Running on Canadian Fido Network!

I got my iPhone during the trip to C4[1] conference in Chicago in August.

The girl in the Apple Store asked me for a driver license and after seeing the Canadian license she nicely inquired if I knew that iPhone requires a valid address in USA to activate it. Sure I did, as I knew that the iTunes activation was bypassed just a few days after the "Jesus Phone" was launched. Even without a working cell phone, it made a fantastic iPod, Calendar, Email client, and a Portable Web Browser.

Well, last night it became the ultimate portable device — the free and open source iPhone unlock became available thanks to the folks at The iPhone Dev Wiki and it took less than an hour to update mine to the latest 1.0.2 firmware, activate, jailbreak, add AppTapp installer, and finally unlock and connect to the Fido network ($15/month, taxes included, no data plan).

iPhone_Unlocked.jpg

Update: GUI Unlocker is now available: http://www.freeiphoneunlock.com/unlock/.

The unlocking and the other working done by iPhone Dev Team will probably make a great scenario for a movie. See some more details at Gizmodo.

The best set of unlocking instructions I found so far are here: http://iphone.unlock.no/.

August 17, 2007

Skype Outage

Skype service outage is in the full swing and some people started to speculate that it is caused by adding the wiretapping and spying facilities to Skype server infrastructure.

True or not, it does not change the fact that Skype is down. If you need VOIP or voice chat then you can easily find an alternative, for example, Gizmo.

Gizmo Features