“The King’s Speech”

What a spectacular movie. Simple, precise and focused. A great story delivered by an impressive array of prominent actors.

Highly recommend this movie. Watch it if you can.

Tumblr, get your act together!

Tumblr, get your act together!

Java @Override annotation usage

Since the start of using annotations I was not a big fan of using @Override annotation. It seemed to have happened overnight, where after a new version of Eclipse was installed I was presented with 400+ warnings telling me to put in the dreaded overrides.

I do think that this seems unnecessary since it clutters the code a lot. But having lots of unresolved warnings in your IDE is even worse. Yes, I know that the compiler warnings can be fined tuned, but there might be a reason this warning comes on by default. So what is it?

As it turns out there are a few benefits. One is that the compiler will perform the check for you if you’ve specified the @Override annotation and will ensure that you are in fact overriding a method. This means that you no longer will have errors in your code where you’ve mistyped method name or have a slightly different signature. This is quite a benefit, since finding some of these errors can turn out to be quite time consuming.

The second benefit is that it will indicate to a fellow developer that this method indeed overrides (or implements) another method.

Well, there you have it. I am changing my stance on this subject and am willing to give the @Override a try. 

“Failed to load JavaHL Library”

One may get the following error message when running Subclipse plugin in Eclipse on a Mac OS X.

Failed to load JavaHL Library.
These are the errors that were encountered:
no libsvnjavahl-1 in java.library.path
no svnjavahl-1 in java.library.path
no svnjavahl in java.library.path
java.library.path = .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java

SVN will still work by some sort of magic, but the official reason for you getting this error is that Eclipse can not find the JavaHL library (under /Library/Java/Extensions). JavaHL is the Java language binding for the Subversion API.

The most painless option is to re-install Subversion as part of the binary package from CollabNet. This will also install JavaHL.

Unfortunately this download requires a registration. This registration is rather painful as well.

Notice that the link for “Snow Leopard” is not the first one. This is a surprising choice, since that is the most recent version of the OS to date.

Make sure to update your .profile file with the following line. Otherwise we will still be using the old version of Subversion.

#!/bin/sh
export PATH=/opt/subversion/bin:$PATH

After you’ve updated your .profile file, close your Terminal and open a new one. Make sure that you are using the latest version.

sturgeon-2:~ dmitry$ which svn
/opt/subversion/bin/svn
sturgeon-2:~ dmitry$ svn --version
svn, version 1.6.15 (r1038135)
   compiled Nov 29 2010, 16:11:54

Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.apache.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - with Cyrus SASL authentication
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
  - handles 'http' scheme
  - handles 'https' scheme

Restart your Eclipse and you are done. No more warnings. You can verify that you’ve got the right version of JavaHL installed by going into Preferences->Team->SVN. Under “SVN Interface” you will see the version of JavaHL that you are using.

“The Last Airbender”

With all my respect for Mr. Knight Shyamalan I can’t fathom the fact of him coming out with such an atrocious movie. “The Last Airbender” is simply unwatchable and I can’t easily think of any other movies for which the same argument applies.

How does one manage to screw up a story peppered with so many great visuals. The acting is horrible, I’ve tried watching this movie a few times but just could not make myself care about any of their heroes. 

Definitely not worth watching or owning. Mr. Knight should stick to the movies of a lesser budget and better story.

New Balance 1080

New Balance 1080

New shoe model numbering for New Balance

New Balance has quite a few running shoes out. And although they are great at making them, their model numbering does seem a bit confusing. 

In the past the model numbers would increase from year to year, so a 2008 model of a 1063 shoe would become 1064 in 2009.

Now it seems that there’s a new model numbering scheme in place, the new numbers are here to stay.

The higher the number, the more “premium” (read - expensive) the shoe model will be.

They will all be ending with 0s (890, 860, 1080, etc).

And best of all, the last two digits of the number would indicate what type of a shoe this is:

  • x60 - stability (860, 1260)
  • x70 - mild stability (870)
  • x80 - neutral, neutral cushioning (880, 1080)
  • x90 - lightweight or modern (890)
  • x00 - spikes and racing flats

For example, this years model 1080 (which replaces last years popular 1064) is a high-end neutral cushioning running shoe.

Get well, Steve!

Upgrading Ruby to 1.9.2

Get the latest Ruby

curl ftp://ftp.ruby-lang.org:21//pub/ruby/1.9/ruby-1.9.2-p136.tar.gz -o ruby-1.9.2-p136.tar.gz
tar -xvf ruby-1.9.2-p136.tar.gz

This will create a directory

cd ruby-1.9.2-p136
autoconf
./configure --program-suffix=19 --enable-shared --with-readline-dir=/usr/local
make
sudo make install

And we are done

Auto-generated code by Xcode puts the opening brace on the same line by default.

To change that you would have to overwrite the default template. Run this in the Terminal:

defaults write com.apple.Xcode XCCodeSenseFormattingOptions '{ "BlockSeparator" = "\n" ; }'
1 2 3 4 5