Tell Right
Sep 8, 2018 · 1 min read

My two cents: Be sure to comment business logic and strategy implementation. For example, if you have to build a class or method that really does the same thing as the system functions, comment why you had to make it to begin with.

Sample comment: This SelectRecords() method was made to retry a query for 30 seconds if the exception handling detects network error, because we’ve been having trouble with our VPN, but it’s always very brief and intermittent.

If someone else is given the directive to optimize the code they’ll see the comment and think twice about replacing your method with the system method (which is usually faster than something homegrown, but often doesn’t handle the specific situation you made the homegrown method to begin with).