Post AD0WQdkEkPiMPdNmk4 by wolf480pl@mstdn.io
 (DIR) More posts by wolf480pl@mstdn.io
 (DIR) Post #AD0VcGJJbLY1FllghM by splatt9990@fosstodon.org
       2021-11-02T14:58:37Z
       
       1 likes, 3 repeats
       
       PSA: If you're writing comments in your code, the comments which explain the why's of the problem are 10x more useful for comprehension than comments that just explain the how's. Explaining what a complicated loop is doing is of limited utility. Explaining why it's doing what it's doing and why you chose to write it that way is very useful, especially to future you (a few weeks later) when you re-read your code and think to yourself "Was I drunk when I wrote this?"
       
 (DIR) Post #AD0WQdkEkPiMPdNmk4 by wolf480pl@mstdn.io
       2021-11-03T00:43:25Z
       
       1 likes, 0 repeats
       
       @splatt9990 also, rants make excelleny "why" comments/** You'd think we could just frobnicate * the barbinator here. But due to some*  cheap barbinators coming with flux*  capacitors instead of proper MFSUs,*  that'd lead to a race condition. In that*  case, we need to fooinate * the barbinator instead.* Unfortunatrly there's no way to tell* a proper barbinator from a cheap one,* so we need to apply this horrible* workaround to all barbinators*/fooinate(barbinator)
       
 (DIR) Post #AD0WXML9r6QaSbr92u by omnipotens@linuxrocks.online
       2021-11-03T00:44:24Z
       
       0 likes, 0 repeats
       
       @splatt9990 what about comments bitching about someone else or the odd dad joke? Or like I did once and hide a puzzle inside the comments lol. Oh those were the days.
       
 (DIR) Post #AD0szOoiRFaPF3SPOS by dmbaturin@mastodon.social
       2021-11-03T04:56:11Z
       
       0 likes, 0 repeats
       
       @wolf480pl @splatt9990 I don't think a "why" comment that isn't a rant is a logical possibility.Non-rant-inducing why's are usually as self-evident as well-implemented "how's". ;)
       
 (DIR) Post #AD11ojgDQhN0LhTI0G by wolf480pl@mstdn.io
       2021-11-03T06:35:07Z
       
       0 likes, 0 repeats
       
       @dmbaturin @splatt9990 well there are also "this looks like it should have an if for $specialcase,  but it's not needed, since the general case code happens to do the right thing even in that special case (oh I was so clever), so please don't break that when refactoring"
       
 (DIR) Post #AD122ECNGzpYlWwmC8 by dmbaturin@mastodon.social
       2021-11-03T06:37:33Z
       
       0 likes, 0 repeats
       
       @wolf480pl @splatt9990 It's a borderline why/how case. I definitely do have a few of those in my code...
       
 (DIR) Post #AD1MnejYQq1DkyMLho by sheetposter@kiwifarms.cc
       2021-11-03T10:30:16.717027Z
       
       0 likes, 0 repeats
       
       @splatt9990 most of my comments read like// im drunk wtf am I writing lmfao