The Clean Coder: Three Takeaways

Cesar Aguirre - Jun 15 '20 - - Dev Community

The Clean Coder is the second book on the Clean Code trilogy. It should be a mandatory reading for any professional programmer. This book isn't about programming in itself. It's about the professional practice of programming. It covers from what is professionalism to testing strategies, pressure and time management.

Professionalism

Your career is your responsibility, not your employer's

Professionalism is all about taking responsibility.

  • Do not harm: Do not release code, you aren't certain about. If QA or an user finds a bug, you should be surprised. Make sure to take steps to prevent it to happen in the future.
  • Know how it works: Every line of code should be tested. Professional developers test their code.
  • Know your domain: It's unprofessional to code your spec without any knowledge of the domain.
  • Practice: It’s what you do when you aren’t getting paid so you will be paid well.
  • Be calm and decisive under pressure: Enjoy your career, don’t do it under pressure. Avoid situations that cause stress. For example, commit to deadlines.
  • Meetings are necessary and costly. It’s unprofessional to attend to so many meetings. When the meetings get boring, be polite and ask if your presence is still needed.

Say No/Say Yes

Say. Mean. Do

Professionals have courage to say no to their managers. Also, as professional, you don’t have to say yes to everything. But you should find a creative way to make a yes possible.

  • There is no “trying”. Say no and offer a trade-off. “Try” is taken as yes and outcomes are expected accordingly
  • You can’t commit to things you don’t control. But, you can commit to some actions. For example, if you need somebody else to finish a dependency, create an interface and meet with the responsible guy.
  • Raise the flag. If you don’t tell someone you have a problem as soon as possible, you won’t have someone to help you on time.
  • Saying yes to drop out professionalism is not the way to solve problems.

Coding

It could be consider unprofessional not to use TDD

  • If you are tired or distracted, do not code. Coding requires concentration. And you will end up rewriting your work.
  • Be polite! Remember you will be the next one interrupting someone else. Use a failing test to let you know where you were after an interruption.
  • Debugging time is as expensive as coding time. Reduce your debugging time to almost 0. Use TDD, instead.
  • When you are late, raise the flag and be honest. It isn’t ok to say up to the end you’re fine and not to deliver your task.
  • Be honest about finishing your work. The worst attitude is when you say you’re done when you actually aren’t.
  • Ask for help. It’s unprofessional to remain stuck when there is help available.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player