←back to thread

-2000 Lines of code

(www.folklore.org)
499 points xeonmc | 1 comments | | HN request time: 0.363s | source
Show context
jfengel ◴[] No.44382104[source]
In college I worked for a company whose goal was to prove that their management techniques could get a bunch of freshman to write quality code.

They couldn't. I would go find the code that caused a bug, fix it and discover that the bug was still there. Because previous students had, rather than add a parameter to a function, would make a copy and slightly modify it.

I deleted about 3/4 of their code base (thousands of lines of Turbo Pascal) that fall.

Bonus: the customer was the Department of Energy, and the program managed nuclear material inventory. Sleep tight.

replies(6): >>44382155 #>>44382420 #>>44382634 #>>44382701 #>>44383041 #>>44385840 #
al_borland ◴[] No.44383041[source]
I work with someone who has a habit of code duplication like this. Typically it’s an effort to turn around something quickly for someone who is demanding and loud. Refactoring the shared function to support the end edge case would take more time and testing, so he doesn’t do it. This is a symptom of the core problem.
replies(3): >>44384293 #>>44386685 #>>44390754 #
8n4vidtmkvmk ◴[] No.44384293[source]
I've been getting stricter about not letting that stuff into the codebase. They always say they'll clean it up later but they never do.
replies(1): >>44385348 #
1. Sharlin ◴[] No.44385348[source]
To paraphrase a Python saying, “master is where bad code goes to die”.