Mistakes Were Made

by Remy Porter in CodeSOD on 2015-07-01

As a general rule, “dead code” should never be commented out, but instead, should be replaced. If you ever need to review the history, source control contains that information.

But sometimes, the “I’ll just comment it out” lets us see the moment of realization, when a developer discovers that they’ve done the absolute wrong thing. Clara sends us this:

40 Comments - Last Comment @ 07:03

We All Float Down Here…

by Dan J. in CodeSOD on 2015-06-29

When Maarten first saw the utility function below, he couldn’t imagine why converting a number from float to double required a string intermediate. Fortunately, whoever wrote this code followed best practices: their comment not only explained what the code is doing, it also explained why.

Pennywise in the sewer

90 Comments - Last Comment @ 2015-06-30

What, What?

by Mark Bowytz in Error'd on 2015-06-26

"Ah...it looks like someone is testing in Production as every link on Cleveland.com starts with this helpful alert," James writes.

97 Comments - Last Comment @ 2015-07-01

Practical ValiDATEion

by Maciej Stachowski in CodeSOD on 2015-06-25

Hampton Court Astrological Clock

Handling dates is difficult.

60 Comments - Last Comment @ 2015-06-30

A Convoluted Time Machine

by Jane Bailey in CodeSOD on 2015-06-23

Backward Clock - geograph.org.uk - 548623

The web team and the JDE development team rarely see eye-to-eye in Cho's company. Cho, the JDE developer, worked in a world full of Oracle databases and important financial records. Andrew, a web developer, worked in a world full of MS-SQL and sales appointments. So when Andrew asked Cho to put together a job that would remove debt records older than six years so they'd stop showing up in his sales reports, he figured she had things well in hand.

96 Comments - Last Comment @ 2015-06-26
View Article Archives »