• 0 Posts
  • 61 Comments
Joined 1 year ago
cake
Cake day: June 16th, 2023

help-circle



  • ChickenLadyLovesLife@lemmy.worldtoProgrammer Humor@lemmy.mlComenting code
    link
    fedilink
    English
    arrow-up
    6
    arrow-down
    2
    ·
    edit-2
    1 month ago

    if the code changes and the comment isn’t updated accordingly, it can be ambiguous.

    People always cite this as a reason comments are bad. In 30+ years as a developer I have seen (and participated in) a lot of failed software projects, but not once has a mismatch between comments and code been the actual cause of the failure. Moreover, the same logic could be applied to the names of methods and variables (“if the code changes and the method and variable names aren’t updated accordingly, it can be ambiguous”) but nobody ever suggests getting rid of that. At the end of the day, comments are useful for imparting information about the code to future developers (or yourself) that is too complicated to be adequately communicated by a method name.







  • I learned it while at the same time learning (or really enhancing my previous knowledge of) javascript, thanks to an insane mostly-Finnish app development platform known as Qt Creator, which for no rational reason uses C++ for the under-hood-stuff and javascript for the UI front end. Just an absolutely horrible mismatch of mental states. For bonus points, the company that I worked for that used this monstrosity for its suite of apps got purchased by a huge west coast company and the apps were shut down and everybody was fired, after two years of my working on this shit.




  • Years ago I got a copy of MSDN which had apparently been put together by developers who all had giant monitors. On a normal laptop screen none of the text wrapped properly so every article had a horizontal scrollbar which you had to work left and right to read every fucking line. I eventually had to start copying the contents into a Notepad instance just to be able to read the damn things normally.

    This is why I think developers should always have to work on 10-year-old laptops with 800x600 screens.