Reinventing The Wheel Is Good, Actually
Disclaimer: I’m writing this from the perspective of a programmer who’s just recently dropped the beginner label; your mileage in other fields and experience levels may vary. Don’t think of this as advice.
“Don’t reinvent the wheel”—a classic piece of well-intentioned advice you’ll get from everyone you know. After some reflection, I’ve concluded that this is terrible advice for beginners. I walked around with this idea in my head for a long time, and it almost certainly hindered my rate of growth as a programmer. I took many things for granted because I never bothered to look under the hood. I was smashing keys together like a monkey. Only after I started looking at the inner workings of the tools I used daily did I notice my growth rate improve.
Why Do People Say This?
People don’t give out this advice to be malicious. They honestly do believe it, probably because it worked out for them. Their reasons for giving you this advice may include the following.
- Writing your own solution is a waste of time.
- Using a prebuilt solution lets you focus on other things.
- You’re more likely to introduce bugs if you write your own solution.
Popular solutions have large communities that use them, so you’ll have a lot of support.
These are all true, and I agree with them in the context of writing software at work or for a business—a situation that beginner programmers are unlikely to find themselves in. Still, it is very pragmatic advice. It’s just not fun.
Why You Shouldn’t Take The Advice
First of all, building something from scratch is the best way to learn anything. Good educational material recognizes this. In one of my Computer Science classes, we had to implement malloc (a simplified version with some boilerplate and help), but it did wonders for my understanding of memory management. I haven’t touched C in a while, and I don’t think I could redo the assignment right now without any refreshers, but I do remember most of how malloc works. If I’d never had to implement it, I’d have zero clue.
Reinventing the wheel is also a great way to exercise your problem-solving muscles. When you’re out there forging your own path, you don’t really have any safety nets to fall onto, so when you run into problems, you’ll have to solve them yourself. And you will run into problems, lots of them. Grappling with these problems over and over will make you a better problem solver. You’ll also be able to look at existing solutions to the problems and weigh their pros and cons based on the issues that those solutions might have. Nothing’s perfect, and running into problems with your own solutions helps you recognize the issues in others.
My favorite thing about reinventing the wheel is how fun it is. I love building stuff, and when I’m lacking in ideas for personal projects, it’s easy to fall back to “reimplement X.” If you’re someone who really enjoys building things, then you should try to reinvent the wheel every so often. You’ll learn new things, have a blast, and you might even come up with a solution you like better than the one you were using.
Why You Should Take The Advice
If you’re still very new to programming, then it’s probably best to stay away from reinventing any complex wheels. Start out with some more straightforward tasks and work your way up. I’m being vague here because it has a lot to do with how comfortable you feel with writing code and solving problems. The more comfortable you are, the more challenging problems you can tackle.
If you’re not interested in learning the thought process of existing solutions or are not excited about solving problems, then you should just use wheels that already exist. There’s no shame in this. People enjoy different things. For some, it’s the nitty gritty; for others, it’s the bigger picture. I like the validation I get when I solve a complicated problem. Narcissistic? Sure, but it’s just the way I’m wired.
Even if you don’t think you’d gain something from reinventing the wheel, I encourage you to sit on the idea for a while. At the very least, you should take some time to think about how you would reinvent the wheel, even if you don’t end up pulling out your caveman tools to do so.