What is good code? (part 2)
In part 1, I defined good code in the obvious way: first, it has to meet our needs (that is, satisfy the requirements, be they explicit or unspoken, domain-specific or computer-specific); and it must be cheap. Cheap to write in the first place, cheap to maintain… Simply put, good code is cheap code. After a little bit of thinking I concluded that the only way to make cheap code is to keep it short, modular, and not too dependent on huge dependencies or fancy concepts. This part will focus on how language mechanisms relate to good code. Basically, how they help us write shorter, more modular code. I will mostly cover the mainstream ones, and omit those I don’t know well enough —someone else will have to discuss them. Also called subroutines, procedures, methods… Functions are the abstraction mechanism for applicative languages (that is, almost all languages in existence). At its core, a function is a reusable, parametrised piece of code. Obviously, it helps you write much less code. It
July 2015 What is good code? (part 2) In part 1 , I defined good code in the obvious way: first, it has to meet our needs (that is, satisfy the requirements, be they explicit or unspoken, domain-specific or computer-specific); and it must be cheap. Cheap to write in the first place, cheap to maintain… Simply put, good code is cheap code. After a little bit of thinking I concluded that the only way to make cheap code is to keep it short, modular, and not too dependent on huge dependencies or fancy concepts. This part will focus on how language mechanisms relate to good code. Basically, how they
related reading
- how I think when I think about programming - alice mazalicemaz.com
- Write code that is easy to delete, not easy to... — programming is terribleprogrammingisterrible.com
- Essays on programming I think about a lot | benkuhn.netbenkuhn.net
- What is good code?loup-vaillant.fr
- Repeat yourself, do more than one thing, and... — programming is terribleprogrammingisterrible.com
- Write code that is easy to delete, not easy to... — programming is terribleprogrammingisterrible.com
- Critically Conscious Computing: Methods for Secondary Educationcriticallyconsciouscomputing.org
- lecture02web.stanford.edu
- How a Government Think Tank Trained The First Generation of US Software Developersconstruction-physics.com
- Code is cheap. Show me the talk. - nadh.innadh.in
- Function Lengthmartinfowler.com
- artima - Josh Bloch on Designartima.com