What is good code?
Well, assuming code is just a means to an end. Sometimes we want to enjoy the code for itself. Most of the time however, the overriding concern is the bottom line. I could almost stop right there, but I feel like I should elaborate. There is the code, and there is the program. Code is read by a human. Programs are interpreted by computers (or virtual machines). Programs have many requirements, most of which are domain specific. Some requirements however are universal: Correctness. The program must not have too many bugs. It would make it worse than useless. Performance. The program must not be too slow. It would waste the users’ time, make them angry, or even behave incorrectly (in the case of real time software). Frugality. The program must not use too much resources. We have plenty of CPU memory… but they still have limits. Use too much resources and your program will drain the battery of your phone, waste your bandwidth, or plain stop working. We don’t always think of these requirem
June 2015 What is good code? Good code is cheap code that meets our needs. The cheaper the better. Well, assuming code is just a means to an end. Sometimes we want to enjoy the code for itself. Most of the time however, the overriding concern is the bottom line . I could almost stop right there, but I feel like I should elaborate. Good (enough) programs There is the code, and there is the program. Code is read by a human. Programs are interpreted by computers (or virtual machines). Programs have many requirements, most of which are domain specific. Some requirements however are universal: Corr
related reading
- What is good code? (part 2)loup-vaillant.fr
- Cognitive load is what mattersminds.md
- Write code that is easy to delete, not easy to... — programming is terribleprogrammingisterrible.com
- Everything I know about good system designseangoedecke.com
- Code is cheap. Show me the talk. - nadh.innadh.in
- Good code is like a love letter to the next developer who will maintain it.addyo.substack.com
- It's hard to write code for computers, but it's even harder to write code for humans · Erik Bernhardssonerikbern.com
- Write less codesvelte.dev
- Code is run more than read | olano.devolano.dev
- Write code that is easy to delete, not easy to... — programming is terribleprogrammingisterrible.com
- What is "good taste" in software engineering?seangoedecke.com
- Repeat yourself, do more than one thing, and... — programming is terribleprogrammingisterrible.com