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
Explore this link on the map →related reading
- how I think when I think about programming - alice mazalicemaz.com
- 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
- Write code that is easy to delete, not easy to... — programming is terribleprogrammingisterrible.com
- Function Lengthmartinfowler.com
- artima - Josh Bloch on Designartima.com
- Reading 4: Code Reviewweb.mit.edu
- What’s so great about functional programming anyway?jrsinclair.com
- Modules :: Eloquent JavaScripteloquentjavascript.net
- Things unlearnedscattered-thoughts.net
- Michael Feathers - 10 Papers Every Developer Should Readmichaelfeathers.silvrback.com