
Bad Code
1 year ago
-
Vimeo: About / Blog / Developers / Jobs /
Community Guidelines /
Help Center / Video School / Music Store / Site Map
/ Vimeo
or
-
Legal: TM + ©2012 Vimeo, LLC. All rights reserved. / Terms of Service / Privacy Statement / Copyright

Prev week
(And where is it from?)
public static void main(){ two big = new two(); }
HA!
Subject: Bug triage override
Hi,
You have been assigned to investigate and fix a number of crash bugs in our online stock exchange system going live on Monday. The bugs manifest infrequently and randomly. The developers haven't been able to pinpoint the issues or the circumstances they occur in. The QA team hasn't been able to reproduce them reliably. Expert help is called for. The developers suggest you start with two.java since it's the easiest to follow. One and three may be tricky. Good luck! Let's talk about any weekend compensation after you've solved the problem.
Thanks,
The Management
Even without being able to read, I can see a bunch of WTFs and anti-patterns.
- Highlander Pattern: all the logic is part of one single package and class.
- Megazord Pattern: a method that accomplishes 20 different tasks and is some 400 lines long. A bunch is just copy 'n paste from other "if" blocks.
- Import hell: Hundreds of unnecessary imports in one single module, increasing VM load times to infinite. Impossible to refactor with certainty.
- Robot comments: IDE-generated comments for each method that just replicate the method argument signature. Totally useless.
- Robot methods: IDE-generated getters/setters and stubs. Just add cruft.
- Coal-train Pattern: one liners that concatenate around 100 different method calls.
- Polka-dot Pattern: magic numbers are everywhere. the programmer liked the colorful code and decided to not refactor hardcoded values into settings.
Notepad rocks....