And the thing is, bolting in some code that handles a single edge case most likely takes significantly less time and effort than rethinking the whole approach. And, when you're facing only a single small problem to deal with and don't have reasons to expect that more are coming, would it be justified to redesign a big pile of code just because of a minor issue?
Re:-2000 Lines Of Code
by stickfigure on Wednesday May 30, 2012 @04:45AM
(#4041958)
"It depends" :-)
Bolting a tiny bit of code on to deal with an edge case, is an edge case of what I was saying.
Generally the the generalization applies
;)
This is natural, if you think about it. Let's say we have a body of code which fails for an edge case. Without understanding the code too deeply, most programmers can find a way of hacking in special handling for the edge case. This process can repeat for quite some time before a codebase collapses under its own weight.
It takes significantly more brainpower to re-analyze the entire problem and come up with a coherent, elegant solution for the expanded problem definition.