• 1 Post
  • 679 Comments
Joined 3 years ago
cake
Cake day: June 16th, 2023

help-circle
  • I had a boss who wrote a script to automatically remove all comments from code for pull requests. Since nobody ever added meaningful comments to their commits (or made any contributions at all to the alleged documentation), the code base was a complete mystery to the people who were actually working on it. God knows what it seemed like to new developers added to the project. But hey, comments are a “code smell” (his exact words) so it was all good.

    His primary justification of his “comments bad” philosophy was that if comments aren’t kept up-to-date with the code, they can mislead and confuse future developers. This gets said a lot but it is something that I have literally never seen in 25 years of programming (I’ve witnessed – and participated in – a large number of project failures, and misleading comments have never been the cause of the failure). I pointed out that the same exact thing could be said about method and variable names but nobody ever advocates not using descriptive method and variable names; he had no response to this.









  • I’m currently reviving a personal iOS project that I last worked on almost 10 years ago. At the time, I was working under a (much younger) tech lead who was a firm advocate of the “all comments are bad” philosophy and reported me to management as being technically incompetent because I commented my code. Thank god I’m technically incompetent because there’s no fucking way I could be making any sense of my 10-year-old code without those comments.

    Somebody here is probably going to reply that nobody literally thinks all comments are bad, but I assure that you such people do exist in this profession.









  • I wrote mobile apps for Blackberry back in the day. As part of their security fixation, all library modules you incorporated had to be signed as your app was compiling, even if you were just testing out a single line change. This could make your app take upwards of a whole hour to sign, if the signing servers were even up and running at all; they were often down completely which meant I could go home and get high instead of working. Which is why I never badmouthed Blackberry to my bosses.

    The absurdity of having every module signed meant that I had to think long and hard about whether I wanted to use built-in library functionality or just roll my own code. For one UI I needed to use trigonometry functions. These were located (logically or not) in one of the encryption modules which were especially prone to taking a long time to sign, so I ended up writing my own sin()function (in Java) just to save myself ten minutes of compilation time.