#best-practice #development #golang #reading-list
🔗 Don't write clean code, write CRISP code
I'm sure we're all in favour of "clean code", but it's one of those motherhood-and-apple-pie things that no one can reasonably disagree with. Who wants to write dirty code, unless maybe it's for a porn site?
The problem, of course, is that few of us can agree on what "clean code" means, and how to get there. A rule like "methods should only do one thing", looks great on a T-shirt, but it's not so easy to apply in practice. What counts as "one thing"?
Over a lifetime of programming that began with a ZX81 and hasn't quite ended yet, I've found a few principles enduringly useful. Principles are more flexible than rules, and might be more widely applicable. So here are my five rules for CRISP code in Go: they're not necessarily in order of importance, except for the first one, but it makes a nice backronym.
⚠️ This post links to an external website. ⚠️
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.