sorted by: new top controversial old
[-] Archive@lemmy.world 7 points 9 months ago

If a block of code needs a comment, then you can easily move that block into a function and summarise the comment into a name for that function. If you can not easily move a block of code into a function, then you may need to rethink your design.

This isn’t always true of course, but it’s a good mindset to have.

[-] Archive@lemmy.world 3 points 1 year ago

Are you telling me you don’t like reading lines like:

if !is_expired: refresh()

It reads super well

Archive

joined 1 year ago