Conversation
Notices
-
Amolith (amolith@nixnet.social)'s status on Saturday, 25-Dec-2021 20:19:29 UTC Amolith I've always been told it's better to write comments describing the *why* rather than the *what*. This was for a couple of reasons but the primary one was that if you can't understand what the code does by reading it, you shouldn't be messing with it. That makes perfect sense to me.
However, Jon Calhoun from the Go Time podcast recently interviewed a (nearly) blind developer, Dominic St-Pierre, who had a very interesting take on this. He said that describing the *what* actually makes code more accessible; it saves those using screen readers from having to sit through a whole code block to figure out what could have been described in a comment in just a few words.
Those of us without any vision impairment can skim through and understand a whole page of code in just a few minutes while it might take half an hour with a screen reader.
Good comments can save a ton of time :flan_thumbs:
https://changelog.com/gotime/209