

The pyramid of code quality (Part II), the 3 different types of codes. - albertoG
http://makinggoodsoftware.com/2009/05/10/the-pyramid-of-code-quality-part-ii-the-3-different-types-of-codes/

======
swombat
I'm sorry, but this sounds like a very contrived analogy that oversimplifies
reality for the purpose of explaining what is really a simple concept.

In addition, this analogy is wrong. Over-engineered code is as much in need of
a refactoring as under-engineered code.

~~~
warfangle
Over-engineering tends to happen when people plan out the entire structure of
an application or codebase before starting.

Under-engineering happens when deadlines pile up and there is no time to
refactor to known and useful design patterns. Or, in the worst-case scenario,
the developer has no idea about design patterns. Most code out there is bad
due to the latter two reasons, not the former one.

Over-engineered code, yes, is often denser than it needs to be. But oftentimes
it's a lot easier to come in and understand it than, say, a 16000 line PHP
file with no functions or objects - just a bunch of nested if/else... I'd
argue that the former is possible to refactor, while you're better off just
dousing the Gordian Knot code in kerosene and tossing a match on it.

~~~
swombat
Hah, so what you're saying is the "code that needs to be refactored" is
actually "code that needs to be thrown away"... :-)

~~~
warfangle
Sometimes, but not always! Often over-engineered code can simply be
reorganized to something simpler and more intuitive (and oftentimes, more
efficient). The same is usually not true of spaghetti code...

------
gengstrand
I think that the point is that the ratio of framework to functionality code is
a relevant indicator when evaluating overall code quality in an application or
system.

------
callmeed
Interesting topic, but hard to read ... is there a pyramid of good
writing/grammar?

~~~
albertoG
Hi callmeed and any other eventual reader, please accept my apologies for my
bad writing in English, I hope you will understand it's not my native language
and that I do my best, anyway, going forward I will try to get my articles
reviewed from some native speaker guy before publishing them. Thanks for your
comment!!!

