
Ask HN: Reinventing the wheel, good or bad? - vsakos
I frequently find myself in a situation when there is an existing library, framework or something that can do the work I need with a few lines of code, but instead of using existing and well tested tools, I&#x27;m creating everything from zero.<p>Is this a good or a bad thing?
======
misframer
Whether it is good or bad depends on the context. If your employer, team, or
clients need something done but reinventing the wheel is consuming
disproportionate resources, it's probably a bad thing.

On the other hand, if you're working on something as a hobby or something
where you don't have the same constraints, then reinventing the wheel is a
_great_ way of learning. You can learn about things, how they work, and how
they're designed, but unless you try to do it yourself, it's much harder to
grasp why things are the way they are and not some other way.

Regardless of the context, it's important to make sure you limit the number of
things you reinvent. Otherwise, you'll keep reinventing and never make any
progress beyond what has already been done.

------
viraptor
As usual - it depends. A few guiding questions:

\- does anyone wait for and pays for the result, or are you just practising /
learning?

\- can you list at least one thing which is not correct/optimal in the
existing project?

\- can you explain how the existing project work?

\- can you say before starting how/why will you do better than the existing
project?

If you just practice - do what you want. If you do real work, better prepare
answers for the other questions. Both for your justification and for when
you're asked why it takes extra time and why are you not using X.

------
danielvf
"Go not to the elves for counsel, for the will tell you both yea and nay." \-
Tokien

It's impossible to say if it's a good thing or a bad thing, since so much of
it depends on the programmers, the business, and the libraries you are
replacing.

Fun side project, maybe write your own. You are Solo or tiny team, maybe write
your own You know why exsisting libraries have problems, write your own. You
have plenty of customers, and need to scale beyond what other people are
doing, maybe write your own.

------
nickm12
As everyone else said, the correct answer here is very situational.

Adding dependencies to your program should not be taken lightly. Rewriting
something that you can get in "a few lines of code" from an existing framework
should also not be taken lightly.

In general, I lean towards using existing code where possible because it lets
you spend your time writing new functionality for your own code, whatever it
is. However, I never want to pull in a dependency just for one function---
dependencies have their cost so I want to be sure I'm getting a lot of value
as a result.

------
LarryMade2
It's inevitable.

Technology keeps reinventing itself and usually needs a different model wheel
than the ones produced earlier. Sometimes it could be an old forgotten wheel
re-imagined on the new technology or maybe some slick shiny wheel that starts
a fad.

Until we have technology more universally stable (processor, platform, etc) we
will be reinventing wheels.

For your case, did you try the other methods? did they work? can yours do
better? If you can prove progress/advancement its good, if you just want to do
it, might not be so good (at least while at work).

------
joshuapants
The way you describe it, it definitely sounds bad. If you can build a better
wheel, by all means start from scratch, but that probably won't be the case in
every last situation you find yourself in so you'll probably end up having
wasted a lot of time.

------
M8
Maybe the wheel was invented when someone tried to reinvent the drag harrow.

