Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
As a professional developer I can tell you that code comments are a distraction. We tend to not comment our code, instead we write the code so it’s self documenting. Meaningful variable names and code structure mean more. Also, as the code changes the code comments tend to be left behind so in a years time the comment won’t reflect the code that’s being executed and just gives the developer more things to be concerned with. We add comments where it makes sense, where we have discovered small intricacies that need to be looked out for etc.
If he’s using it as a method for you to understand the syntax and structure of what you are writing the I can partially see the value, but as a practice going forward I wouldn’t adopt it.
Get your teacher to read clean code.
Clean Code: A Handbook of Agile Software Craftsmanship (Robert C. Martin) https://amazon.co.uk/dp/0132350882/...
Clueless52510dI am practicing naming convention as a practice to have a better understanding. But I don't like my classmates to name objects like button1, textfield1... So i consider naming convention as a sign of commenting my code.
@Clueless why use a naming convention. Just name them after their purpose. It may make for long names but at the end of the day they will mean something. You won’t have to explain what a button or data grid is for is if, for example you give a button a name like “OkButton”, “OpenFileDialogButton” it’s self explanatory. Like wise naming a data grid something like “EditableGridOfUserDetails” or a combo box “SelectionListOfUserStates”
Old Hungarian notation had its place 20ish years ago. Make your code readable.