• 0 Posts
  • 1.77K 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
    2 days 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 spent my 30s feeling like a retiree, but then I bought a bicycle at age 39 and started riding 25-50 miles a day. Now I’m approaching my 60s and I’m in the best shape of my life. Barring catastrophic and permanent injuries, I think the main problem with aging is that being sedentary causes your body to decay and the older you are the more time you’ve had to be sedentary. Get up off your dead asses, people, and don’t tell me you don’t have the time for exercise. You have plenty of time to watch TV and scroll through your phones, turn some of that time into something useful.









  • I visited India 30 years ago and (in the southern part of the country at least) the major highways between cities had a single paved lane in the middle and then just dirt and gravel on the steeply-sloped sides. So on bus trips the drivers would stick to the middle until the last possible second and then veer off so that just the right wheels were on the pavement as they passed each other while tipping crazily to each side. I made the huge mistake on my first trip of sitting in the front seat; I later corrected my mistake by always taking the fucking train, which didn’t have this problem.