Sunday, August 17, 2014

Speaking about software productivity, does your team write effective code?

Speaking about software productivity, does your team write effective code?

Most people think about efficiency when it comes to productivity. This is only logical as most people think tactically in order to resolve specific problems. These are our "problem solvers". However as a reminder Productivity is not just about Efficiency but firstly about Effectiveness. Thinking strategically *as well* will bring to the team the maximum level of productivity. These, effective programmers are "solutions providers" What can we do to be effective programmers?

Dr. Axel Rauschmayer in his book Speaking Javascript, Chapter 26 explains, IMO, what the effective software development team should do. This applies to any programming language BTW. This is what I take from his statements. This is what I support based on my own experience as a programmer:
  1. Define your code style and follow it. Be consistent.
  2. Use descriptive and meaningful identifiers: "redBalloon is easier to read than rdBlln"
  3. Break up long functions/methods into smaller ones. This will make the code *almost* self documented
  4. Use comments only to complement the code meaning to explain the *why* and not the how
  5. Use documentation only to complement the comments meaning provide the big picture, how to get started and a glossary of probably unknown terms
  6. Write the simplest possible code which means code for a sustainable future. In the words of Brian Kernighan "Everyone knows that debugging is twice as hard as writing a program in the first place. So if you are as clever as you can be when you write it, how will you ever debug it?"
The effective programmer works as a "solutions provider" and not just as "problem solver".

No comments: