something i like to do sometimes Show more
take a non-critical piece of code you wrote that has comments
now. re-write it so you don't need comments. add more variables / constants / lines, re-structure it as you need
you'll know you've succeeded if the comments literally sound redundant, as in:# Collect the crankscollect(cranks)
now rememberyou can do this 90% of the time
@cosine something nice is that this kinda 'makes room' for more important comments, like those that briefly describe the underlying algorithm or reasoning
@cosine
I love doing this. I try to make most of my code legible like that.
@cosine Comments are still useful to explain why you want to collect cranks. Business logic can sometimes be strange.
@ihabunek yeah, the follow up which i didn't explicitly mention is this: https://witches.town/@notwa/99389627813608594
something i like to do sometimes Show more
@cosine something nice is that this kinda 'makes room' for more important comments, like those that briefly describe the underlying algorithm or reasoning