lundi 2 janvier 2017

Code reviews

I have to admit that I made few code reviews in my career. This is bad. Some that I made and some that other dev made on my code focused heavily mainly on the style: comments, ordering of methods, etc. This is worse. You see, lots of bugs cannot be found using unit tests and even performance tests. Examples:

  • hard-coded environnement specific values, like server names.
  • bad usage of external resources, like opening database connexion in a loop.
  • shared connections being closed by users, causing invalidation of open cursors (OK, you can catch thiw one with performance testing).
  • local directory usage on distributed systems. …

I faced all of them recently. They appeared in QA when we were lucky. Some of them have been found by the client in production. All of them could have been caught by a correct code review.

Believe me, I will intensify code reviews. Maybe you should too for 2017.