Found the following in a unit test:
private static final String HDP_MESSAGES = "0000000000000000000000000000";
When I added a value to an enumeration that represented possible messages to be displayed to the user, I had to add a zero to the string in the unit test for it to pass.
Thursday, July 17, 2014
Tuesday, June 17, 2014
Found some interesting code comments today:
try {
params.put("bed", propertyInfo.getAttributes().getBedrooms().toString());
} catch (Exception eignore) {
/* who cares */
}
try {
params.put("bath", propertyInfo.getAttributes().getBathrooms().toString());
} catch (Exception eignore) {
/* not me */
}
try {
params.put("price", propertyInfo.getPostingInfo().getForSalePrice().toString());
} catch (Exception eignore) {
/* really it's fine if these don't get set*/
}
try {
params.put("bed", propertyInfo.getAttributes().getBedrooms().toString());
} catch (Exception eignore) {
/* who cares */
}
try {
params.put("bath", propertyInfo.getAttributes().getBathrooms().toString());
} catch (Exception eignore) {
/* not me */
}
try {
params.put("price", propertyInfo.getPostingInfo().getForSalePrice().toString());
} catch (Exception eignore) {
/* really it's fine if these don't get set*/
}
Friday, May 30, 2014
Monday, April 28, 2014
Friday, April 11, 2014
Thursday, January 23, 2014
Found the following code comment today:
"There is so much duplication in this code with other files in the mobile directory that it hurts my head. We need to fix this at some point! I mean, what the *bleep*! Can you really just keep re-writing the SAME EXACT CODE OVER AND OVER AGAIN AND NOT FAIL SO SHAME!!!"
"There is so much duplication in this code with other files in the mobile directory that it hurts my head. We need to fix this at some point! I mean, what the *bleep*! Can you really just keep re-writing the SAME EXACT CODE OVER AND OVER AGAIN AND NOT FAIL SO SHAME!!!"
Friday, December 20, 2013
While investigating a bug, I discovered that the problem was caused by tightly coupled code under assumptions that no longer hold. When I found the offending function, I saw the comment, "This whole method exhibits terrible separation of concerns." So Coder Zero knew that he was writing garbage code, but was bothered only enough to leave a note saying so instead of fixing it.
Saturday, December 14, 2013
Who is Coder Zero?
In pretty much every software company, there is an existing codebase. And the daily job of the programmers in these companies is to build upon the existing codebase. And in pretty much all instances, the codebase is undocumented, tightly coupled together under narrow assumptions that no longer hold, brittle to the point that any small change will have an unforseen ripple effect in some dark corner of the code, and is generally a giant piece of garbage.
All day long, these programmers battle their way through the mountain of manure, simply trying to add some useless feature that some program manager thinks is important. All day long, they swear incessantly at the idiot who originally wrote the code. But they have no idea who this idiot is. Most probably, the idiot has long left the company, having moved on to build another codebase that will cause future programmers to think about jumping out the window. To most programmers, the author of the codebase is just some mythical figure that seems almost inhuman to them.
So who is this mysterious author of the world's legacy code? Who is this person that infects the codebase of every company across the globe? Nobody really knows. This person is known only as Coder Zero.
All day long, these programmers battle their way through the mountain of manure, simply trying to add some useless feature that some program manager thinks is important. All day long, they swear incessantly at the idiot who originally wrote the code. But they have no idea who this idiot is. Most probably, the idiot has long left the company, having moved on to build another codebase that will cause future programmers to think about jumping out the window. To most programmers, the author of the codebase is just some mythical figure that seems almost inhuman to them.
So who is this mysterious author of the world's legacy code? Who is this person that infects the codebase of every company across the globe? Nobody really knows. This person is known only as Coder Zero.
Friday, December 13, 2013
Thursday, December 12, 2013
Subscribe to:
Posts (Atom)