Showing posts from April, 2009

Disable Skype's mood message chat

It was driving me nuts!! After installing the latest 2.8 beta for mac I was getting one of those red notifications every time any of my contacts was changing his mood message. Luckily you can disable it in the Preferences->Advanced->Enable Mood Message Chat.

Why debuggers are bad

Debuggers are useful They make you run an application and inspect variables while you a running the real thing They make you debug code and quickly find bugs You set a breakpoint somewhere, you run your application, it stops where you want and let you inspect variables and more. Debuggers are bad They make you debug code instead of writing unit tests They make you debug code instead of writing proper log statements Conclusion: Debuggers are good when you search for bugs and not as a development practice Log statements are there forever and let you for instance trace code in a production environment where a debugger is usually not available. Unit tests are there forever and let you run the same tests that you run in your debugger on and on. Again: Debuggers are useful but don't abuse them.

Respect for JavaScript

Surfing around I found this cool video of Doug Crockford, the man behind JSLint and JSON. He surely is a funny guy

Internet Explorer 6 is still there....

Tonight I was looking at my blogs awstats and realized that IE6 is still the most used browser (at least in Windows). Given the fact that my blog is quite technical and my readers have a tendency to use open source software as Firefox, this is pretty scary!!! Internet Explorer 6 is bad and full of bugs! It makes us programmers to do a lot of unnecessary work to make pages look nice. Please download firefox .... Msie 7.0 No 11703 12.7 % Msie 6.0 No 13168 14.3 % Firefox 3.0.8 No 3450 3.7 % Firefox 3.0.7 No 7044 7.6 % Firefox 3.0.6 No 9078 9.8 % Firefox 3.0.5 No 10922 11.8 %

REST and validation errors

REST advocates to use HTTP for CRUD fully exploiting the verbs defined in the protocol specification: POST to C reate GET to R ead PUT to U pdate DELETE to D elete Nothing strange about that. But how do we handle server-side data validation ? Server-side validation cannot be replaced by client-side but it complements it. Client-side we can f.i. verify if an E-mail address is compliant with the SMTP rules but we cannot verify if the address is already registered in our database. HTTP provides the error codes 4xx to indicate that something has happened: 400 Bad Request The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications. and specifically: 409 Conflict The request could not be completed due to a conflict with the current state of the resource. This code is only allowed in situations where it is expected that the user might be able to resolve the conflict and resubmit the request. The res