I honestly have no clue what my programming teacher is teaching his students. We currently are in an early state (e.g. Arrays) in learning PowerShell even though we have his lessons for a couple of months now.
One of the most annoying things is his obsession with commenting, like, it's kind of his favorite thing to see every line being commented and really don't see the use in doing that many comments.
After seeing the code of one of my fellow studets i was shocked that he did the same thing with it.
I never even thought that comments could ruin readability, but he somehow achieved it.

  • 2
    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/...
  • 1
    @bluescreen documentation on the other hand, is important.
  • 0
    @iSwimInTheC yes, totally agree. The thing you are building should be fully documented, unit tested and regression tested.
  • 0
    I 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.
  • 0
    @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.
Your Job Suck?
Get a Better Job
Add Comment