Tag: java

GWT dropdown Fail

A colleague has asked me to post some of my own failures here. For one, because he thought it’s unfair otherwise but for second, because he found a good one. It occured when writing a straight-forward GWT mockup of some GUI which finally was deployed a couple of weeks ago. Here is the code to initialize a dropdown with some…

Read More »

Naming Fail

I’ve no idea what went wrong here. Nice, clean code. Javadoc is present. Completely useless.

Read More »

More Enumeration Fail

I recently came across of some brilliant chunk of WTF-code. The reason was that some swedish users complained about the software not caring about their language settings. First step was to review the method which stored the settings: Second step was the method which fetched the stored settings: It was a famous moment to realize what was happening there. But…

Read More »

Enumeration Fail

The more I dig into some older code lately the more I wonder what my colleague was drinking all the time. Why not. But at least he could have the javadoc fixed.

Read More »

Java Singelton fail

Exciting WTF moments at work (no joke, stuff I’ve seen coded by real Java professionals): So far, so good. Looks like a normal singelton pattern. This seems to be a little odd. But ok, I’ve seen this before for smuggling Mock-Instances during jUnit-Test into the otherwise static-referenced Singleton. Not nice but quite applicable when Unit-Tests are created for code fragments…

Read More »