Don't reinvent the Wheel

27 Nov 2018

The wheel as we know it

It is believed that the first wheel ever created by man was a rounded stone with a hole in the approximate middle for an axle to pass through. Fast forward to today, wheels for cars are now made of metal alloys instead of stone, and its edges are wrapped in rubber and air for more grip and comfort to suit the modern cars that roll around on them. But at its core, its still round with a hole in the middle, just like the first wheel.

“Reinventing” the wheel

So if modern wheels still have the same basic design, is the modern day counterpart the wheel reinvented? I would argue no, it was improved on greatly, but not reinvented. Why waste time completely reinventing a design that has already been proven? More can be accomplished by taking one that is already proven and building on it. For example, lets say that a car manufacturer wants to add a new vehicle to their current line-up. They intend for it to be unique but affordable. To accomplish this, instead of designing an entirely new car and spending time and money to research and develop a design everyone likes. They can easily and effectively use a common design, the “cookie cutter” mid-size 4 door sedan. 4 doors, 5 seats, 4 wheels and an engine, a great framework to build on, and one that everyone already likes. Why reinvent the wheel? Now, the time that would have been spent figuring out the basics, can be spent finely adjusting and conturing the asthetics to be original.

The Coding Wheel

Just like the wheel, being able to use an existing design as the framework for your own so you don’t have to “reinvent the wheel” makes developing a new app better and faster. This base for which we can build from is called a design pattern. Design patterns are particularly helpful in that it is just a general design, so it can be adapted to suit many different scenarios. A particular example of a design pattern that I use frequently is the Iterator design pattern, which provides a standard way to traverse through a collection or data set. Many of the assignments from this semester required some type of traversal, and having this design pattern made writing the code for the assignment much easier. Which in turn made completing the assignment faster as well. Time and effort saved.

Don’t Reinvent the wheel

Don’t reinvent the wheel if its not necessary. Effectively using a pre-existing design as a base for your code is a great practice. In the long run, it will be better and easier. The time that would have been spent building from the ground up, can instead be put toward fine tuning it to fit your needs.