Do you like surprises?
Tony Robbins asked his audience in a TED talk if they like surprises. He received a resounding "YEAH", but he continued with the comment: "BULL****, people like only the surprises they expect". Let me tell you about two developer's surprises from yesterday (I guess, I didn't like those much):
Javascript Surprise: In a ASP.NET project I had to implement a client-side filtering of table rows. I registered a javascript array with values to be compared. Since it was very slow I decided to sort the array server-side and use binary search client-side. The script ran much faster, but in some cases it didn't work as expected. The surprise factor turned out to be that .NET and javascript did string comparison in different way, so the array was not sorted correctly ("A" < "b" in .NET but"A" > "b" in Javascript).
Oracle Surprise: I use tnsnames.ora to connect to Oracle and tnsping.exe tells me to what service I am currently connected to. It turned out that this is not always reliable if you have multiple tnsnames.ora. So, I have been working for quite a long time on a database that was not the one I expected. More info on the topic here and here.
The developer's job is not short of surprises, so better approach them with eagerness or join a club like this one.


