A developer is, above all, an artist, and like any good artist, they love to create. However, the problem is that they can quickly find themselves struggling to recreate things that already exist and are ready to use. Hence the programming concept that says:
Don't reinvent the wheel.
What Does Reinventing the Wheel Mean?
Reinventing the wheel means creating a solution for a problem that has already been solved—in other words, writing code for a feature that already exists.
Why not reinvent the wheel?
As is often said, a developer is a big lazybones.
Use what others have already done; it’s tested and maintained for you.
This will allow you to:
- Save time: By reusing existing code, you can quickly progress in your project and focus on more important tasks, especially if the project is lengthy.
- Reduce costs: Reusing existing code can cut down development and maintenance costs.
- Ensure code maintenance: Many existing solutions are well-maintained and regularly updated.
How to approach it?
It’s admirable to want to do things yourself. But picture this: you have a project to deliver within two months. Will you end up writing code that you can easily find on the internet? Of course not!
Always think in terms of time savings.
Here are a few tips to practice...
- Do some research: Before starting a project, ensure there isn’t already a solution or feature that addresses your needs.
- Make use of libraries and frameworks: Need an accordion for your FAQ? Or a pre-styled button to avoid writing too many Tailwind classes? Head over to Shadcn/ui.
- Engage in developer communities: Developer communities can exchange valuable knowledge and experiences.
- Reuse your code: If you already have a feature in one of your projects, just copy and paste it.
Conclusion
Don’t waste time rewriting code that’s already available. Use ready-made solutions that you can tailor to fit your needs, helping you save time.
Good luck 😉!