Clean Code

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

Software is meant to be soft – changeable, malleable. Well architected code is easy to change. Not every change takes 6 months.

Software is about two things: behavior and structure. Behavior is about the business requirements. Structure is about architecture. People tend to emphasize the wrong variable (behavior). If we have code that works today but is so complex that any change is impossible then the software is useless as requirements will change. However, if we have code that does not work but can be easily changed, we can always rework it to fit the business requirements.

Framework authors have their best interests in mind. Whenever you use a framework, you are making a big commitment to it. What if later on the framework does not address some requirement? Or what if it has a bug that you need urgently fixed and is getting in your way? You have to balance the cost vs. benefit. Choosing a framework is a build vs. buy decision.

Good architecture defers decision making. He gives example of using flat-files in Fitnesse and ultimately never using any database.

Agile process is about two things: measuring team velocity and burn down chart iteratively and using them to keep stakeholders updated of any project delays in timely manner.

TDD or unit tests give us confidence to make changes to the code as we can run the tests and be sure we haven’t broken anything.

Test the behavior not the implementation.

If you cannot meet the schedule, one of the following would have to be compromised:

  • the schedule itself
  • quality (don’t do this)
  • staff (add more; doesn’t always work; only works when you are short staffed)
  • scope (requirements have to be cut)

Moving from CEO back to IC

other inspirational quotes:

Though he held the title of presidentBrockman didn’t formally manage any employees, and instead spent much of his time writing software [1]

Brockman, 34, has no direct reports, freeing him of the usual drudgeries of management. Instead, he spends about 80% of his time coding, [1]

This entry was posted in Computers, programming, Software. Bookmark the permalink.

Leave a comment