July 13, 2008

Code Cuts

Code Cuts — this is what Thsrs came up with when I tried to shorten Software Trenches.

Thsrs is special kind of thesaurus that suggests shorter words. Might be very useful when you try to cram your full message into a Twitter post.

Via Daring Fireball.

localhost.com annoyance

If you are developing with Ruby on Rails then I am sure you had this happened more than once — type http://localhost:3000 in your browser and after a short delay it goes to http://www.localhost.com because your local server didn't start successfully.

To get rid of this annoyance, change /etc/hosts file and add

127.0.0.1 localhost.com

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.