A bit of clean code

· by CosmicBagel · Read in about 2 min · (414 Words)

So I’ve recently come across this goldmine of coding wisdom [Clean Coders]. I’ve purchased, watched, and have taken some simple notes on the first episode. I really must say this is fantastic content, kind of makes me think of Bill Nye The Science Guy, but for programmers. I highly recomend it, if you’re reading this you should go over there, pay the one dollar, and watch the first episode.

These notes are mostly for my own memorization and ease of accesibility, but if you find them useful all the better. Again, I highly recomend going over to Clean Coders and watching it for yourself.


A system is rigid when we have to change many places when we need to fix a bug or add a feature. The system resists change.


A fragile system is a system that malfunctions in many unpredictable ways when a single simple change is made. It’s broken easily.


An inseparable system is a system in which those parts that may be profitably used in another system can not be seperated out from the first system. The parts can not be independently reused in another system. Inseparable systems are unpredictable, you can not reliably estimate the ability to reuse code. Bottom line: you can’t just take the bits that you want.


Is the tendancy of a system to be so ineptly structured that no ammount of effort can be applied to divine the author’s original intent. A system is opaque when reading the code tells us little nothing about what the system does or the way it works.

Code Rot

Code rots because we rush, and don’t take care of it. When you say can always go back and clean it later, that you’re never going to go back and clean it. When you rush, you make a mess. Fast is slow, and slow is fast.

What is clean code?

Clean code is elegant (does a lot in one line), is effiecient (runs in as few cpu cycles as possible), and only does one job.

- Bjarne Stroustrup

Clean code is simple, direct, and it reads like well written prose.

- Grady Booch

Clean code always looks like it was written by someone who cares.

- Michael Feathers

You know you are reading clean code when every routine you read is pretty much what you expect.

- Ward Cunningham

####Follow the boy’s scouts rule: >Leave the world a little better than you found it.

- Robert Baden-Powell