• 0 Posts
  • 123 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
    7
    arrow-down
    2
    ·
    edit-2
    1 day 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.


  • I used to take my cat to an old country horse vet. On one visit she had to get a pill of some sort and I told the vet that my cat hated pills and it wouldn’t be possible to get one down her throat. He said “son, I’ve been a vet for over 50 years and I’ve never had a cat that I couldn’t pill.” He couldn’t get the pill down her throat and had to give her a shot instead. I’ve never been so proud. RIP Martha, miss you girl.