Changes between Version 19 and Version 20 of HowtoGoodProgrammingTechniques
- Timestamp:
- Apr 22, 2014, 6:27:41 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
HowtoGoodProgrammingTechniques
v19 v20 43 43 44 44 You don't have genius memory, you won't remember exactly "what this code does" or "why is this thing there", a good way to avoid this is by adding comments but sometimes you forget to do that or the comments you made are not sufficient enough, in most cases you think that you don't need it in this part of the code or that the element of the code is old and not-needed-anymore or similar things. What I personally do to accelerate the development process and to not think about it at the moment is to add on this step a function name "step_requires_fixme message", which is ran at the prompt/shell if I come to this state of the code it will asking me what im doing here or to verify something. 45 46 === Visual Readability === 47 Readability is very important, but is not only a matter of using good names, it also depends of the visual appearance of the elements, for example: 48 * If you have an '''else''' 40 lines away of its '''if''', do not use ''else'' but instead close it and start a new ''if'' in the place, is more easy to read 49 * Align vertical blocks of similar elements by its columns 50 * Whitespaces improves readability a lot, use them, if you combine them with foldings in your editor you will not suffer the side-effect of removing contents visually 45 51 46 52