- Is Commenting code a good practice?
- Are design patterns harmful or helpful?
- How many comments should code have?
Is Commenting code a good practice?
A comment would save readers from working it out. Fewer comments often mean more readable code. If somebody sees a comment, they'll know it's incisive and valuable.
Are design patterns harmful or helpful?
o whether you think design patterns are good or bad, there is no negating that they can be useful. They provide a good blueprint for programming and dealing with problems when it comes to code complexity and usability.
How many comments should code have?
A good goal is to have 1 comment for every 1-4 lines of code. Be sure to not only document what your code is doing, but, as you begin writing more advanced code, you should document what was intentionally left out, optimized away, tried and discarded, etc - basically, any design decision you make.