Wednesday, April 29, 2009

Tabs vs Spaces - Code Formatting

Do you format code with tabs or spaces? It is not an a question of what is pretty. There is more to the story. I would like to quote from[1]

"On defaultly-configured Unix systems, and on ancient dumb terminals and teletypes, the tradition has been for the TAB character to mean move to the right until the current column is a multiple of 8. This is also the default in the two most popular Unix editors, Emacs and vi.

In many Windows and Mac editors, the default interpretation is the same, except that multiples of 4 are used instead of multiples of 8."

The code formatted on Windows using tabs look hideous on Unix, while if you use spaces it will be uniform on all operating systems.

[1] http://www.codinghorror.com/blog/archives/001254.html

Monday, April 20, 2009

Ubuntu - Firefox back/forward buttons not working

If you are on Ubuntu and back/forward buttons of Firefox suddenly stopped woking here is what to do.

Go to .mozilla/firefox folder and delete the following file.

./rew45azr.default/places.sqlite

Axis2 REST - IllegalArgumentException

If you are trying to invoke a web service deployed in Axis2 using REST and get the " IllegalArgumentException", the most probable cause is that parameter names given in the URL does not match with the argument names of the method. To verify the equality view the WSDL of the service and use the parameter names given in the WSDL.