views:

209

answers:

7

Duplicate of:

What considerations should be made before reinventing the wheel?

I find myself enjoying very much designing infrastructure components like: Source code control, Plugins mechanism, Document management, Application shell and even scripting language (see: www.SceneMax.com). On the other side people in my team say they don't want to invent anything! last month one of them even told me he wants to search in code project/ google for a tree object model! I think that we must let our imagination go free and invent components/standards/protocols/design patterns/framework etc and not just follow the latest "best practice"/elegant framework otherwise there will be no new real inventions and we all become a bunch of robots!!!

What do you say?
Cheers!

Adi Barda

+2  A: 

Good and Bad :

  • For fun and as a learning experience it's great to re-invent the wheel. Generally after that you know what you did wrong, right and what's going on under the hood.
  • In a commercial environment or professional job it's a terrible thing to do invent the wheel
dr. evil
A: 

Jeff Atwood wrote a pretty good blog post on this topic, his bottom line is pretty close to your view. Ideally you don't want to waste your time writing a solution when somebody else has made theirs available to you, but if you never attempt to solve a problem in a better way just because somebody has "solved" it already, everyone may end up with a sub-optimal solution.

Don't Reinvent The Wheel, Unless You Plan on Learning More About Wheels

In a very pragmatic sense, I agree with slough. Usually, your employer would rather you not "waste time" (as they see it) building a solution that you could use an existing library that gets you 90% of the way there.

Brett Bender
Unfortunately that isn't true about all employers. Many employers or at least, managers, have a fear of using anything not in-house and especially of using open-source or free solutions.
Matt Olenik
I suppose it does largely depend on the particular employer you work for. However, in my experience most managers / team leads tend to value results in a (relatively) short amount of time over an in-house solution that would have taken longer. It is important though, before deciding to re-invent or not, to take into account your company's policy.
Brett Bender
A: 

It's good to reinvent the wheel if:

  • You're doing it for fun or for learning.
  • You are inventing a similar but slightly different type of wheel (your solution is slightly different and tailored for some specific purpose).
  • You are inventing a better wheel (you REALLY know what you are doing).

It's rare that you'll actually be able to create something better than existing solutions.

Matt Olenik
A: 

Depends on what you are working on.

If you work in an enterprise environment, reinvinting the whell though enjoyable may not be a good idea since your manager will eat you alive when he notices you munching up the project hours with useless coding. Sometimes you might need to do it, if for some reason you theres is no solution that does everything you need, but this isn't frequent Allways remember, the thing you are reinventing has been object of dedication of alot of developers world wide... so it might nut be very good policy for your company to do so

As a personal hobby Its a good way to learn though, its fun and you get lots out of it.

Nuno Furtado
A: 

Depends on the context. If you enjoy building infrastructure components like the rest of the world seems to enjoy building blogging engines, go ahead.

But at the end of the day, when trying to get a job done, better use the best tools and infrastructure already available. Of course, sometimes after a project is finished I wish I hadn't used a particular piece of infrastructure, but even in that case the learning experience of using it was valuable.

I guess what I'm saying is: you learn and invent new things by re-inventing the wheel, but you learn new things by using stuff others have made as well.

Kurt Schelfthout
+3  A: 

So, you're going to invent your own source control etc. Perhaps your own operating system, compiler, browser etc too?

That means if I ask you to write a small application which should take about a day, you'll be able to come back in about 10 years with an application which:

  • Wouldn't run on any other machine (different operating system)
  • Can't be maintained by anyone else (different language that no-one knows, using a different source control system and different infrastructure)
  • Is probably buggy (compilers are hard to write, for example)
  • Doesn't perform well (can you optimise than the experts?)
  • May well not have a good change log (source control is also hard to write well - how confident are you that you can do a better job than the large teams of people who've thought about this long and hard, and have proved their systems over time?)

Except you won't, because the company will have gone bust long before you produce anything.

There are times when it's worth reinventing some wheels. It sounds like you want to reinvent every wheel you ever come across. Don't. Use the fact that millions of developer hours have gone into creating decent source control systems, content management systems, plugin systems, scripting languages etc. Do you really think you're going to do a better job than those people and save enough time by reinventing the wheel that you'll end up coming out with a product faster than by reusing existing tools?

Of course, if it's just for fun that's a different matter - but the fact that you're talking about a team suggests that you're talking about a commercial environment. Anyone designing their own source control system as part of the task of building a different product is unlikely to be able to make a persuasive case for doing so - with the possible exception of Linus.

Jon Skeet
Yes, inventing my own source code control enable my installation to be much more simple and it was very important for me. please take a look at my task management application: www.intaskpro.com and see for yourself how easy it is to check in/out, label , rollback and view history of a document with out enforcing the user to deal with source control server and installation.what do you say about that?
Adi Barda
I don't see how a *source control* system makes an *installer* simpler. Now if your *business* is to write source control systems, then that's one thing - but to create your own source control system *as a means to writing a very different product* is a different matter.
Jon Skeet
One more thing. Last year i was able to teach 20 students how to make stunning 3d scenes + integrating it to visual studio just because i had such a simple yet strong 3d scripting language (www.scenemax.com).I don't think i could do that with MS HLSL (high laval shader language)
Adi Barda
And you couldn't possibly do it with anything else? Okay, fine - you seem to think you can invent every wheel better than anyone else can, and you don't really want to hear any dissenting opinions. Best of luck on your world domination attempt. I still agree with your team members.
Jon Skeet
No need to be rude pal. Google search wouldn't be as fast as it is without the invention of "Big Table" Database wheel and i also like Eric Nieblers's regular expressions engine wheel which is 7 times faster than ATL etc but searching code project for tree structure...
Adi Barda
Okay, sorry for being rude - but I don't think the examples you've given are relevant. Google didn't invent Big Table on a whim for the sake of being inventive. They did it because they *needed* a database with those properties. It wasn't incidental to the core product (search) - it was a key part of it. The same is *not* generally true of CMS and source control. If you're building a source control product, then find - re-invent the wheel and make it better. Just don't do it *incidentally*.
Jon Skeet
In particular, don't do it (in a commercial setting) just because you like designing infrastructure. That's not what you're getting paid for - you're getting paid to develop the product. Unless you can hand-on-heart say that *all* the time spent developing your own source control system etc will be recouped in terms of time *saved*, you're better off not doing it.
Jon Skeet
Brilliant answer.
lucifer
A: 

In a development project, your goal is to implement the requirements as quickly as possible while maintaining a high quality. You are not being paid to "let our imagination go free".

Reinventing the wheel typically takes much longer and produces much lower quality than using a pre-existing component, that's why it's frowned upon.

That doesn't mean at all that you "become a bunch of robots" - just that you should focus your creativity on solving those problems in your project that have not been already solved by others - unless you have compelling evidence that the existing solutions are not good enough and you can do better (most people vastly overestimate their ability to "do better").

If you want to be more creative than that, do it in your free time, or find a company that actually wants to develop a new, bigger, better X and will pay you to do research. Even Goolge does not let its programmers reinvent wheels in running projects; instead, they give them (paid) time for pet projects that may later turn into "real" projects.

Michael Borgwardt