Clean code is simple and direct

[et_pb_section][et_pb_row][et_pb_column type=”4_4″][et_pb_text]

image from Jeff Atwood’s Coding Horror blog

Clean code is simple and direct. Clean code reads like well-written prose. Clean code never obscures the designer’s intent but rather is full of crisp abstractions and straightforward lines of control.

Grady Booch author of Object
Oriented Analysis and Design with

I could list all of the qualities that I notice in clean code, but there is one overarching quality that leads to all of them. Clean code always looks like it was written by someone who cares. There is nothing obvious that you can do to make it better. All of those things were thought about by the code’s author, and if you try to imagine improvements, you’re led back to where you are, sitting in appreciation of the code someone left for you—code left by someone who cares deeply about the craft.

Robert C. Martin, Clean Code: A Handbook of Agile Software


Code Reviews

code reviews are meant to uphold an agreed upon standard

it is not an avenue to project your personal coding style to others.

1. build a standard
2. apply the standard via reviews
3. repeat step 1.

code reviews should have goals like
1. syntax
2. formatting
3. tests completeness (path coverage)
4. design adherence (oop, principles)
5. security (looking for insecure functions, known bad patterns, misuse of code,etc)
6. achieve consistency over cleverness
7. make the code look as if it was written by a single person
8. uphold project health

most of things listed above can be automated.

it is not meant to validate if another person’s way of coding matches yours

i’ve lead teams before, all of them were successful thanks to my cooperative teammates who helps me grow and uphold the standards via an objective process

to all aspiring tech leads, i hope this helps you the way it has helped me.