News for hackers. Stuff that matters.
Re:-2000 Lines Of Code by malux85 on Wednesday May 30, 2012 @01:42AM (#4041561)
In software I have noticed that the best coders spend a lot of time removing code and the worst coders keep piling crud on top of crud on top of crud.

CSS seems to be really bad for this, but that might be because the frontend coders I have met are crappy. Rather than decrease the padding they'll ADD more css to move all of the elements, then they end up with !important rules everywhere.

I've been doing frontend web coding for more than 5 years now, and I have only had to use !important probably 3 or 4 times, and only them it was to overwrite things in stylesheets that we had no control over.

Re:-2000 Lines Of Code by stickfigure on Wednesday May 30, 2012 @02:28AM (#4041664)
In software I have noticed that the best coders spend a lot of time removing code and the worst coders keep piling crud on top of crud on top of crud.

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.

Re:-2000 Lines Of Code by TeMPOraL on Wednesday May 30, 2012 @04:27AM (#4041925)
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" :-)
Re:-2000 Lines Of Code by malux85 on Friday June 01, 2012 @04:45AM (#4052556)
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

;)

Re:-2000 Lines Of Code by gouranga on Wednesday May 30, 2012 @04:27AM (#4041923)
...which inevitably doesn't happen and cost increases exponentially...

"Technical debt" is a major product killer.

Re:-2000 Lines Of Code by catch23 on Wednesday May 30, 2012 @06:04AM (#4042133)
CSS is a bad example of this, it's not like typical language code because you could have bits of css in many different files that all affect a single element. CSS is kind of like a language where mixins, monkey-patching, & aspect oriented programming are used to the extreme. Everyone who codes in this language would never go back to the main source function to modify behavior; they would instead write an aspect to patch it. Eventually nobody would know where the "main" code is anymore, all the code would be peppered in different files stomping on each other's toes.

Essentially, you could be a great developer and you could still output low quality css simply due to the way css was designed.