Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Quality code is simple code, simple code does not provide job security nor does it pad CVs, its not only a top down conspiracy but a bottom up one as well


There's more to quality code is simple code.

Some things or situations are inherently complex to handle and you may still want software for them (especially because they are complex). Simple code won't usually handle complex stuff, and you may still need quality.

Now you should reach for simplicity. Which may itself be complex to define.


I agree, and to add on to that sometimes there's irreducible complexity to a problem, requiring complex code.

But never complicated code: crufty fixes upon fixes, too many layers of indirection, templates templating templates; you won't need that to solve complex problems.


“Three” seems to be a good number, that shows up a lot. Arithmetic is functions with “3” cardinality (operator, data, data).

Three levels seems good: a solid foundation of high-quality library code; working application code on top of that; dirty workarounds on top of that.

As you say, the problem comes when you stack workarounds on top of workarounds.


> Simple code won't usually handle complex stuff

I think you are confused about what simple code means.


Enlighten me with your definitive and universal definition of simple code then :-)

(but I'm totally happy with isoprophlex's answer actually)


Well, yes, +1 for "uncomplicated", I just wouldn't say the term is related to complexity.

Most any software can be broken down in a modular way so that the units could be understood by a junior and you'd rarely need to think about more than one cluster of interactions at once. Maybe this is naive, but up until now found it to be true - that said, I never worked in rocket science.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: