3 ms·
The pyramid of code quality (Part II), the 3 different types of codes.
- callmeed 17y agoInteresting topic, but hard to read ... is there a pyramid of good writing/grammar?
- albertoG 17y agoHi 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!!!
- swombat 17y agoI'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.
- albertoG 17y agoHi swombat, thanks for your comment, I actually completely agree on what you say: "Over-engineered code is as much in need of a refactoring as under-engineered code" I should have also mention that on the original article. Good observation, thanks!!!!
- warfangle 17y agoOver-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 17y agoHah, so what you're saying is the "code that needs to be refactored" is actually "code that needs to be thrown away"... :-)
- warfangle 17y agoSometimes, 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 17y agoI 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.