Code style and conventions - AgileVentures/rag GitHub Wiki
If it is the case, then:
- Discuss the issue with the author on skype (or by other means)
- Leave a comment in the code for the author, e.g. 'Consider refactoring using helper methods'
- Leave a comment on altered lines in the commit, explaining the reasons for alterations
- Make sure all tests are passing
If it is a refactoring issue, it is better to point out the the issue to the author and let him do it himself or alter code in a pairing session with him.
-
The code should simple enough to be self-explanatory, so you should not comment on HOW the code works
-
Comments can be added to to explain WHY this code is here and is doing what it is doing
-
Comments can also be used to leave a message for other developers, e.g. 'needs refactoring', 'will be replaced', etc.
-
Comments should be done in the following format:
-
# Commentgeneral comment -
#TODO NS Commenta personal todo where NS = NameSurname initials -
Commentanyone's todo - Hardcoded data - when hardcoding test data, e.g. a parameter for a method call ( get :edit, id: 1 ):
- leave a comment in the code, indicating that this hardcoded data is to be replaced.
- this comment is mainly for yourself, but for others too, in case you forget to remove the hardcoded data.
-