DEV Community

Sam Jarman 👨🏼‍💻
Sam Jarman 👨🏼‍💻

Posted on

100 Bytes Of Wisdom: Day 41

Alt Text

A trap a lot of developers fall into is trying to write really DRY, generic code the first time. This is often a more costly exercise as it takes longer to do so. This comes back a little to an earlier Byte of Wisdom where I spoke about being pragmatic. Being a good engineer is being an engineer that writes the code for the task at hand, not some imaginary future tasks.
That being said, if you do have opportunities for reuse coming up in your task list or roadmap, then you may take more time now if your time is okay with that.

It's totally also okay to ask the person running your team/product about future tasks you think your current one might be generic enough to cover it as well. Once again, it's an art and you'll get better at it over time.

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/

Top comments (0)