#books/tech
We want the reading of code to be easy, even if it makes the writing harder.
Quality vs. Business Pressure -> Managers may defend the schedule and requirements with passion; but that's their job. It's your job to defend the code with equal passion.
Memorize this analogy and use it frequently:
What if you were a doctor and had a patient who demanded that you stop all the silly hand-washing in preparation for surgery because it was taking too much time? Clearly the patient is the boss; and yet the doctor should absolutely refuse to comply. Why? Because the doctor knows more than the patient about the risks of disease and infection. It would be unprofessional (never mind criminal) for the doctor to comply with the patient.
get/fetch/retrieve
)addressState
is better than state
Some rules for functions:
Anything that forces you to check the function signature is equivalent to a double-take. It's a cognitive break and should be avoided.
https://github.com/JuanCrg90/Clean-Code-Notes