DEV Community

100 Bytes Of Wisdom: Day 25

Alt Text

I find that when I'm working on a particularly tricky bit of code, my first instinct is to leave a comment explaining what it is and what it does. I stop my self and then ask myself, cool. I figured out the hard bit of code to write. But the problem is only half solved. Huh? Yup, the next problem to solve is to make sure the next developer (or future me) can understand what I've done. Comments are one way to achieve this, but ultimately, your code should do the talking - and it should talk very clearly. So write the code again, this time with readability in mind. And for a third time, if you have to.

Heads up: As with any terse bit of advice, there will be exceptions of course, and subtleties and nuance that can't possibly be captured in a Byte of Wisdom. This has been what I've experienced, I'd love to hear yours in the comments too!

You can catch up with all the other bytes at http://bytesofwisdom.com/

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Sentry image

See why 4M developers consider Sentry, β€œnot bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay