Posts

Worst travel experience ever

Friday I was suppose to go to Montreal, the usual route over London Heathrow. Slightly concerned with the recent mishaps of the new Terminal 5, I actually managed to get to the good old Terminal 4 without much trouble. Little did I know, my trouble were just about to start. Canceled flight Yup, just 1 min. after entering Terminal 4 I learned that BA95 to Montreal was canceled. Inquiring at the help desk I experienced the deja-vu of being told that I had to go fetch my luggage, contact the ticket office and expect a layover. I had experienced another layover about 2 years ago so I pretty much knew what has coming... or so I though anyway. Heathrow, JFK or Newark My luggage was nowhere to be found, so I proceeded to the ticket counter and when it was my time to be served I was presented with the option og taking the same flight tomorrow, go to JFK in New York and a very short layover involving an early flight or go to Newark in New York and a longer layover involving a later flight. I t...

Know thy acronyms

Maybe it's caused by the passing of time, maybe it's because of its open nature or maybe it's simply because people like to make them up. In any event, few technologies in computing are as littered with acronyms as Java is. Just for fun, while eating lunch (yeah I know it's bad habit) I compiled a list off the top of my head of what an average developer might be subjected to, when tracking technologies in the Java space. AWT - Abstract Window Toolkit (UI) BGGA - Gilad Bracha, Neal Gafter, James Gosling, and Peter von der Ahe (Closures) CICE - Concise Instance Creation Expressions (Closures) EAR - Enterprise ARchive (Packaging) EDT - Event Dispatching Thread (Lingo) EJB - Enterprice Java Beans (Packaging/technology) FCM - First Class Methods (Closures) JAR - Java ARchive (Packaging) JAX-RPC - Java API for Xml-based Remote Procedure Call JAX-RS - The Java API for RESTful Web Services JAX-WS - Java API for Xml-based Web Services JAXB - Java Archtecture for Xml Binding JAXP...

C# type inference

While I work mainly in a Java shop, I continue to be impressed by what Anders Hejlsberg, chief architect of C#, brings to the table to a language which in my mind has always represented Java done right. I do wonder however, how come they did not take the concept of type inference just a little bit further. Local variable type inference This feature of C# 3.0 basically allows you to omit the declaration which, especially when generics is involved, causes a lot of repetition and long lines of code: Dictionary<int, IEnumerable<decimal>> myCollection = new Dictionary<int, IEnumerable<decimal>>(); Which can be reduced to this: var myCollection = new Dictionary<int, IEnumerable<decimal>>(); No late binding is taking place, the compiler simply infers the actual type and substitutes var with it. No method return type inference? Some languages operates with the concept of tuples, a way of returning multiple values without having to wrap them in an arr...

Java Puzzler: How low can you go?

Any seasoned Java developer would know of the seminal books Effective Java and Java Puzzlers by Joshua Bloch. The latter covering pitfalls and corner cases of the Java language, listing some 95 different examples of traps to watch out for in your daily work. Java puzzlers While a great read for toilet visits, unlike Effective Java, I don't consider Java Puzzlers particularly essential material to know as a developer. Not because there isn't anything to learn, but because there are many other pitfalls of the language not mentioned which you are just as likely to encounter before many of the exotic ones mentioned in the book. I recently ran into another one of this kind, which I will now describe. How low can you go? Take a look at the following snippet, which is a more flexible version of Math.max() which tries to find the largest Double in an array: System.out.println( max(0.0, -1.0, -2.0) ); public static double max(double... candidates) { assert(candidates.length > ...

Gee... Another one?

Hey everyone and no one! Like so many others, I've decided to start my own blog. Up until now I've just been an avid participant in various forums, blogs and communities with all the problems associated with that. It's my desire with this blog to be able to write my opinions without having to conform to established or expected perspectives which sometimes gets me into trouble. I will also use the blog as a personal wiki, an institutional memory and a communication medium, which may or may not be of interest to others. The content will probably revolve mostly around software engineering and associated technical issues, but I reserve the right to use it as a venting space for whatever comes to mind.