Reinvent The Wheel

As engineers, one thing we hear over and over again throughout our careers is “Don’t reinvent the wheel”. And it’s with good reason — there are very few good reasons to rebuild something for a production system which has already been built, tested, and put through the paces. I’m not advocating this at all. Setting aside the case where you need to rely upon production quality functionality (or need to quickly build a prototype), you should absolutely reinvent the wheel and here’s why…

First off, not every solution that happens to exist is actually the wheel you need — or a wheel at all. Sometimes it’s an oval in that, it works, but is a bit clumsy. And sometimes, it’s an electro magnetic levitation device that does everything you need and more but it weighs 300 pounds and requires a huge power source. Say for instance you have some piece of JavaScript functionality which has a dependency on ‘fancy-lib.js’ (100 kilobytes). The source code for your custom functionality is 2 kilobytes with the ‘fancy-lib.js’ dependency. If you were to remove the dependency and rewrite (copy?) the needed functionality from ‘fancy-lib.js’ lets say that gets you to 5 kilobytes. Assuming no other dependencies or code, you’ve gone from a 102 kilobytes download to a 5 kilobytes download. I think that’s worth it.

Furthermore, you can learn a lot about a problem if you try to solve it yourself without relying on a third party library. You may not succeed in coming up with a superior solution (or any solution at all) but you WILL walk away with a greater understanding the problem that library set out to solve. Armed with this insight, you’re in a better position to better utilize said library or even optimize it should you feel the need.

Like what you read? Give Johnny Ray Austin a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.