DEV Community

1

When you see great code, ask yourself why it is great and can you replicate it? (100 Bytes Of Wisdom: Day 71)

When you see great code, ask yourself why it is great and can you replicate it?

About two years ago now I had a colleague who wrote some truly lovely JavaScript. Annoyed at myself for not being able to write it so nicely, I chose a reasonably new approach for me and decided to study their code instead. I looked carefully at the choices they'd made for structure and syntax and even asked them how they thought of doing things the way they did. Eventually, I was able to write code in the style that I grew to admire of theirs and I was super happy.

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/

Image of Datadog

How to Diagram Your Cloud Architecture

Cloud architecture diagrams provide critical visibility into the resources in your environment and how they’re connected. In our latest eBook, AWS Solution Architects Jason Mimick and James Wenzel walk through best practices on how to build effective and professional diagrams.

Download the Free eBook

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