Grow your CSS skills. Land your dream job.

#80: Regarding Wheel Invention

A couple needs a photo gallery for their wedding, where everyone can browse and upload their own photos from the wedding. Beginner developer: I know of some great software we can use, give me a couple of days. Skilled developer: I'll write something up from scratch for you, it will be perfect, give me a couple of weeks. Wise developer: Let's just use a Flickr group, give me a couple of minutes.

"Reinventing the wheel" on the web means doing something from scratch vs. using a pre-existing solution, especially referring to solutions that already work particularly well. On the "reinventing" side, you benefit from complete control and learning from the process. On the other side, you benefit from speed, reliability, and familiarity. Also often at odds are time spent and cost.

This screencast takes a look at a few examples that have come up for me recently. The answer, I propose, is like most things in life: somewhere in the middle.

Links from Video:

Comments

  1. Permalink to comment#

    Some interesting points here Chris, I reckon that for smaller tasks such as a poll system for example it’s perfectly okay to reinvent the wheel, it certainly gives you a load more control over what you want to do and if the project allows it then fair play. But for bigger projects I think that unless a client specifically wants a bespoke solution then it’s much better to go with something premade that has been planned carefully and built to a high standard and adapt that to your needs. I certainly wouldn’t want to remake something like WordPress or Magento!

  2. Great webcast… I love how the web is moving towards outsourcing like this. It means you can get the best of everything, and concentrate on your core content or functionality.

  3. Floris Hoogland
    Permalink to comment#

    Don’t reinvent the wheel, since it’s already been invented. You could build upon it, that’s always a good idea. I’m not saying it because i’m lazy (wich i am), but also because i like to stay practical: Projects of more than a year bore me to death.
    The only use for inventing a wheel is to invent one when there’s no wheel.

    • Permalink to comment#

      Nice to hear that I am not the only one who is willing to admit that sometimes it comes down to being practically lazy :D

      If a new widget interests me and I think I will be using it often down the road I am much more willing to spend the time learning it.

  4. finger
    Permalink to comment#

    Not really interesting.

  5. c.
    Permalink to comment#

    I don’t think that “reinventing the wheel” is necessarily a bad thing, and in no way should anyone b chided for doing so. When you’re working on a larger site that requires things like a forum, a wiki, a shopping cart, and/or a news section in addition to a highly specialized custom CMS, you’re potentially looking at a lot of closed systems that don’t play nicely with each other. Your choices become either force your users to register with each and every component they will need permissions for and login for each one every time they need to access it, or make some hacked up solution that transparently handles it all. Trying to force each one to use the same “users” table is almost always an exercise in futility because most developers hardcode the table names.

    It’s worse when the solutions you’re looking at use different databases or require different PHP configurations or all want to have a table named “users” and no concept of namespaces. I worked on a highly customized system a while back using PHP/PostgreSQL where the client decided they needed a live chat to provide support for their customers. So, we downloaded a few different ones and picked the least terrible one. It was PHP/MySQL. I wrote my system to require registerd_globals to be off, this one required registered_globals to be on.

    For your wedding example, sure, simple solutions like Flickr can be the best choice. Just because dog food might be cheaper or more conveniently packaged, that doesn’t mean you should feed it to your cat. They are different animals with very different dietary needs.

    • For your wedding example, sure, simple solutions like Flickr can be the best choice. Just because dog food might be cheaper or more conveniently packaged, that doesn’t mean you should feed it to your cat. They are different animals with very different dietary needs.

      That’s how I feel too. It’s all about assessing those “dietary needs” and choosing a solution that fits best. Sometimes that’s recreating something that’s already been done, sometimes it’s not.

    • Ralf Hundertmark
      Permalink to comment#

      Regarding the single-sign-on issue, I have, in the past, used SymmetricDS in some projects and that worked (after some learning) really well.

      Check out http://symmetricds.codehaus.org/ – its Open Source.

  6. Permalink to comment#

    If you google “jquery tooltip” or “jquery slider” there are more than 5 000 000 results. There are many post like “40 Super Useful jQuery Slider” or “25 Useful jQuery Tooltip Plugins” That is Reinventing the wheel :)

  7. Russell
    Permalink to comment#

    I think this is an extremely interesting topic, so I think that its good to discuss. Its an important thing to keep in mind, because creative types tend to have a compulsion to do something “their” way. That’s sort of what it means to be creative.

    On the other hand, I think that this particular discussion was a little shallow. All of the examples really seem to point to an off the shelf solution being the right answer. While I think most of the time that is true, depending on your project, a much more interesting discussion is when is it appropriate to build from scratch. After all, you don’t use the same design for every site. The gray area is much more interesting than the black or the white.

    • The gray area is much more interesting than the black or the white.

      I think this entire website sits in that gray area. One one hand, I often teach techniques. “Here is how to build such and such.” – which is often reinventing something that has already been done. On the other hand, you could come hear, snag the download, integrate it into a site and hence nothing has been reinvented.

      Here is one we could discuss that I briefly mentioned in the video: You need a system for clients to send you files. What do you do? FTP? Box.net? Build a system from scratch? Doesn’t it depend on the particular circumstances? What are those circumstances?

    • Russell
      Permalink to comment#

      All coding problems sit on a spectrum of invention/reuse/reinvention. All coding problems also have measure of how important something is, as well as how challenging. Many of the the things I see here are less about how to reinvent a complete feature than they are about specific techniques or knowledge on a topic. If the example reinvents something, then who cares, its not about the example, its about the knowledge conveyed using the example.

      The snippets are a little different, but they’re snippets, not features. In some cases it’s “reinventing” but most are so small that it would be hard to even turn it into a reusable part. Other snippets are already in reusable form in things like JS libs, but in cases where one isn’t being used, this is a way of reuse through copy/paste.

      The gray area I’m talking about are the really hard choices; larger scale projects with bigger features. The chat and file upload examples are both good ones. There is no one right answer as you’ve said yourself, but that’s the interesting part. What are the factors that would go into such a decision? What are some experiences where rolling your own has succeeded instead of failed?

      There are people out there who want to write everything from scratch because they want the control or have the hubris to think they could do it better and still fit in the time constraints. And I think that you pegged it in terms of skill level. But thats an impulse control issue. When you come down to the business man bottom line its obvious – get the best result with the least amount of effort. Obviously, reuse as much as possible. When you’ve gotten to that point, then you can have the gray area discussion. When you’re talking about challenging problems, you have to measure at all points – if I build from scratch, how long will it take. If I don’t, what’s available, how hard is it to integrate, how hard is it to make it suit my needs. There are major pitfalls from both sides. Integration can sometimes take a lot longer than building from scratch, or at least building from libraries with a layer of glue. And one of the most dangerous problems is getting majorly invested down either path and realizing you have to go the other way.

      I believe I once heard Joel Spolsky say something along the lines of: If it’s core to your business, do it from scratch, otherwise, use something off the shelf as much as possible.

    • Permalink to comment#

      or dropbox

  8. Russell
    Permalink to comment#

    Also – what Jason said.

  9. I think your FTP example was a bit weak. I’m not sure what the ‘client’s demographic, but I think for most people FTP is very geeky, and the amount of time saved in using FTP over a small PHP file (even easier using a premade class, etc.) would be lost in the amount of support time needed to help clients upload the files.

    • Probably true for a lot of cases. But for example, at our design studio we deal with sending files to printers all the time. The majority of them just have FTP logins that we use and it works fine.

      But for argument, let’s say FTP is out, too geeky. Your job is to get a solution in place for having these files be sent. The files that need to be transferred are let’s say typically in the 30-100 MB range. What do you do now?

    • Just for clarification …

      Sent to who? To one person or to be shared?

      I think it would depend on the media being transferred aswell.

      At the moment, I’m thinking Google Docs. To begin with, uploading and viewing can go straight there. In the future, there is room to expand and provide a nicer experience (still with Google Docs backend) through the Google Document API’s which allow for retrieval, search and upload.

    • Imagine it’s a design studio and it’s for their clients to send them whatever source files they have.

      Google Docs is cool, but I’m thinking it’s just as geeky as FTP. “Go here, sign up for a Google Account, now go here here here attach your files, now go to “share this document” and type in my email address so I can see it…”

    • Permalink to comment#

      FTP is good for some people like printers but not so great for others.

      Something like Yousendit is great. I know you can brand pro accounts but some clients want to control everything. So you get called in to make a bespoke solution that essentially does the same thing.

    • My mum can use Google Docs without a hitch at computers without Word (or Pages). I suppose the process is streamlined a bit, as both she and I already have Google accounts.

    • Permalink to comment#

      box.net easy, super simple, cheap

  10. TheDoc
    Permalink to comment#

    Lol @ “Aaaand apparently he’s a big dick head”

    The chat idea is great. Happy that you left it live, too. Might be a way we can quickly fix some problems that people are posting in the forums.

  11. silvers
    Permalink to comment#

    hi,

    yeah it was a pretty interesting screencast. something i have been thinking about a lot recently is having a pic gallery on my site. i have never really found a good solution.

    something you said, Chris, was that Flikr had an API and maybe you could do something with that? surely that would be the best of both worlds. you could easily slam ya pics in that and then it would show on your own website?! is that right? i personally don’t have enough knowledge, but from a client’s perspective it would mean that they could put whatever pics they wanted up and have a lot of control, AND it would be on their own website?

    that would be awesome wouldn’t it?

  12. Permalink to comment#

    Beginner Businessman – Sure I’ll use flickr it’ll be cheap and quick.
    Advanced Businessman – Sure I know a great wordpress plugin. Give me a couple of days a $200.
    Wise Businessman – I’ll write something from scratch. It’ll really set your wedding photographs off perfectly. Give me a week and $2000.

    • Permalink to comment#

      Poor Dentist – Brush and floss your teeth more than once a day.
      Advanced Dentist – Eat what you want and you really don’t need to floss.
      Wise Dentist – Here are some sugary snacks, and you really don’t need to brush your teeth. After all cats don’t brush their teeth and they don’t have problems…

      Poor Patient – Listens to the advice of the advanced or wise dentist.
      Wise Patient – Finds a poor dentist.

      Moral of the story: find the solution that best meets your client’s needs, not the solution that best fits your needs.

      Two more thoughts: You can shear a sheep many times, but you can only skin it once. Secondly it is not better to build a concrete driveway thick enough to last 100 years when the house will only last 50 years, in fact it is worse.

  13. Matt
    Permalink to comment#

    I’m on the side of not reinventing the wheel. If I can use a pre-canned solution with success, I’ll do it.

    Though, I’ve built many things. I even learned assembler. I’ve never used assembler for anything useful. When somebody asks me why I took all that time to learn assembler (well) “Damnit, I wanted to know!” I’m with not taking a huge amount of effort to reinventing the wheel, but rebuilding the wheel to learn how it works. It makes me feel all fuzzy inside.

    • David Riveroll
      Permalink to comment#

      Yeah! This is nice!

      I see coding and webdev as I saw puzzles as I child.

      I’d spend the whole month doing large puzzles… and the day I finished them, I waited for my dad to come and after dinner I’d just unassemble them right away. Sometimes you can afford to do it just for fun

  14. Permalink to comment#

    it’s all about the balance…

  15. Permalink to comment#

    Why use Jquery and not raw java script!?
    Or even better,let’s write our own script language!

    Why use cars to get from A to B why not Horses?
    Or even better, let’s walk .

    Why use an Airplane to fly from EU to US why not go there on a ship?
    Or even better, let’s swim.

  16. Mike Robertson
    Permalink to comment#

    I’m one of those “older folks” who has come from a long career in traditional IT development – Mainframe solutions right through to web solutions.

    On looking back over those many years and innumerable projects it seems to me that there exists a similarity between the topic being discussed here and my days at “school”.

    In the “school” environment we are taught things from first principles – in other words reinventing the wheel so we have a solid basis for using the techniques and solutions being passed on to us. We then move on to using that knowledge to discover when to use those techniques and solutions to solve problems in life and in our jobs.

    However, there are many times when a challenge presents itself which doesn’t have a solution catered for by our carefully accumulated knowledge and we need to find a solution that lets us overcome that challenge. Often, we are under tight deadlines which prevent us from using the “school” technique to develop a solution and this is where we turn to a packaged solution. What we learn quickly (and sometimes not so quickly) is how to effectively use the packaged solution. This is still adding to our bank of knowledge but not at the same level of understanding that we may desire.

    Other times, we are not under time pressure and can afford to start from first principles and develop a solution even though a packaged solution may be available. We get enormous satisfaction from this process, we learn new things and fully understand what the solution does and how it does it.

    More often than not, we are driven in one of those two directions by time pressure. In either case we still add to our knowledge bank.

    I guess my point is that compromise is necessary in some circumstances and not necessary in others.

    I personally turned to web development simply to keep my mind active and to continue attending the “University of Life”. My methods these days tend to lean towards using packaged solutions up front and then pulling them apart to gain detailed understanding of what they do and how they do it. Sometimes I then “reinvent the wheel” to make sure my understanding is sound.

    Naturally, I am not under any sort of time pressure so I can choose how I want to proceed. People in the workforce, either in a company or independently, rarely have that luxury so packaged solutions are a popular and convenient way to solve problems. That’s life – which is always sprinkled with compromises.

    Incidentally, I was surprised at the mention of David Mark. I subscribed to the javascript newsgroup (which he haunts) so that I could get a better appreciation of what javascript programming is like. Similar to many others I like jQuery and use it frequently. I was astounded by the vitriol and arrogance that Mark displayed in that newsgroup. Eventually I unsubscribed because most of the posts were related in some way to Mark and his opinions – totally useless for my purposes.

    • Matt
      Permalink to comment#

      Incidentally, I was surprised at the mention of David Mark. I subscribed to the javascript newsgroup (which he haunts) so that I could get a better appreciation of what javascript programming is like. Similar to many others I like jQuery and use it frequently. I was astounded by the vitriol and arrogance that Mark displayed in that newsgroup. Eventually I unsubscribed because most of the posts were related in some way to Mark and his opinions – totally useless for my purposes.

      I did the same thing. It only takes one bad egg to ruin the breakfast.

    • Hahaha! Like that kid that threw his appedix at someone on the street so now no one is allowed to keep theirs after surgery.

      @Mike Robertson – yes, I TOTALLY agree.

  17. Really interesting debate Chris. I have always tried to stay somewhere in the middle in this issue. It seems even the best wheels out there can fall short once in a while though. So I think sometimes there is no other option but to reinvent the wheel.

    Otherwise, as you said, if you have something you want to get going tomorrow, you just won’t have to time to build your own perfect wheel.

    One more issue I though of is customization. A lot of the prepackaged products out there don’t really allow much of that. WordPress on the other hand lets you customize, control and extend as needed, which is why I think WordPress has been so successful.

    Interestingly enough I just came across this opportunity to work for a big, well-established company and let’s just say they have invented their own wheels, and it seems that’s where the real deal is at for them. So, we’ll see how I feel about the subject in a few months.

    (By the way, do you have an ETA for the new print-outs of your book?)

    Cheers!

  18. David Riveroll
    Permalink to comment#

    I’m such a non reinventing the wheel guy. I also enjoy sometimes research deeply on how the wheel got invented to learn, but to keep things running at the pace I need to I’m so grateful of a lot of pre-built accesible options out there. I love how knowing the guts of your field (as you do) gives you always the choice of customizing those solutions with very simple hacks. Using API’s is a very good resource.

    Outsourcing some webdev projects on eLance I’ve found a lot of hardcore do it from scratch coders that will resist using WordPress even when explicitly asked for. Usually their code is terrible, and it’s hard to understand for someone else to update later. Sharing solutions and open-source standards and communities is awesome and lets the whole thing grow.

    I’ll always try to implement the pre-made solution first. I’ve found that nowadays there’s almost always a couple of solutions for anything you want to do on the web, although you may want or need something else still, and it’s so good to know you can!

  19. Permalink to comment#

    Looking forward to watch your screencast…
    But Chris pls can you add it on itunes…
    Thanks

  20. Permalink to comment#

    I totally understand the concept the you’re trying to get across in this video. And its a good one. But the examples you gave don’t really sell the whole idea. Especially to a developer. The majority of the time what we’re asked to deliver is not as simple and trivial as wedding pictures.

    There’s also the flipside to the story where you start out with a canned solution and end up hacking it to death to do what the client needs or wants. Then you get into a situation where upgrades are very difficult.

    You did make a good point about the “learning” aspect of building things from scratch. If a client asks “Why isn’t this working?” its always much more comforting to know how the internals work so you can address the problem.

    Anyhow, good screencast and keep up the good work Chris.

  21. Permalink to comment#

    Good show. I feel like this all the time with WordPress and Plugins. Most of the time I probably could provide a better fitting solution writing the stuff myself and putting it into the funtions.php file but end up using an existing Plugin anyway.

  22. Mads
    Permalink to comment#

    I think the key here is to examine your options. What solutions exist. From experience, I have a couple of times reinvented the wheel, where I later found far better solutions that was already done, and being kept up to date. (like when I first tried wordpress!!!)

    For me it is important to be able to spend as much time on the things I think are fun and I earn money on, rather than fiddle around with something that someone else is much better at and think is fun.

    Boiled down: If I got the time and I get paid, sure I’ll build something from scratch, but only so I can learn something new! Otherwise I’ll google!

  23. Permalink to comment#

    Reinventing the wheel??

    Just because you can, doesn’t mean you should.

  24. Reinvent it if you want to learn and understand it, and perhaps build upon it to create something totally new.

    Otherwise, use what’s available. You would be stupid not to. That’s all there is to it.

    • Permalink to comment#

      I fully agree. Being a student, I force myself to do whatever I can from scratch, even down to graphics, illustration, photography (soon, fonts) etc. Sure, I learn a lot in the process, but I also waste great amounts of time which I couldn’t afford in real projects.

      Then again, a small part of my lizard brain enjoys the control I have over code I wrote myself, and that certainly scales (no pun intended) to big projects. This used to be about feature creep, but that really isn’t such a big deal today. Compatibility is, though, and if the best that’s out there is a bad compromise, rolling your own is always an option.

      It should be your last, however, so make sure to keep an eye on what’s available.

  25. I am constantly arguing with coders on “reinventing the wheel” there is no good reason to make something like this from scratch if it has been done, plus if you develop something you will forever need to modify it or upgrade it. I have interacted with a few different designers who want to create their own CMS system, I always ask why they just don’t use WordPress or Drupal, these standards have teams of people perfecting it, all you have to do is install it.

  26. Ralf Hundertmark
    Permalink to comment#

    Great Topic – Great comments.
    I feel very encouraged that there is no single best solution. Most likely this will be a case-by-case decision.

  27. Richard R
    Permalink to comment#

    Totally agree with you Chris. What I tend to notice on people re-inventing the wheel (and I don’t understand why) is the amount of people still building their own blogs into a single website ignoring the fantastic tools available like WordPress and Joomla. Each of these tool (as you obviously know) are completly customisable to the point where our own imagination is our only limits. Even so, people still go to all the hard work of building there own easy admin area blog which ultimatly isn’t as good as the tools mentioned but hey, what the hell…Guess it looks better on their invoices.

    In regards to JQuery being a reinvention of the wheel, I wouldn’t say so. I consider it an evolution of javascript, making it easier so I would say JQuery is like adding a tyre to the wheel.

    • KK
      Permalink to comment#

      Problem is that to the wheel you add more tyres, later cover it with sth. else and you forgot how wheel looks like.
      You have to keep in middle, if you are rely too much on upper level layers you may find problems with undestanding and doing more complicated jobs, better you will forgot about principles ! and you start building wheel on wheel.

  28. The book Get Back in the Box by Ruskoff talks about understanding systems from the inside out vs using wizards. He has cool Frontline documentaries too. Thanks for the screencasts, keep them up! Looking forward to using your book in my class soon.

  29. Craig..
    Permalink to comment#

    This really should have been a written article. Why did it need video? *scratches head*

  30. I totally agree with you..

    As a web designer, and developer, I think in many situations, starting from scratch is a bad idea, for the following reasons:

    1) My goal always is to save my clients money.
    More time = More Money
    so starting from scratch could be a very expensive.

    2) I always try to evaluate my clients requirements and needs and look for an already ready solution. Now if that solution that currently exists, doesn’t fulfill what the client wants, they hell yeah you have to start from scratch… But if it does 90% or solves 90% of the problem, then building on top of those plaforms, will be a time savior.

    3) Your feedback on Jquery is right on the money.. Jquery made my life easier.. And I wont go back to javascript if Jquery does what I want to do, with less code, and less time

    4) Client problem solving is my ultimate goal, and if for example, flickr doesnt do what they want, or there is a requirement that flickr doesn’t fulfill or do, my solution will be the following. I will try to look through its API and see if that can be accomplished, if not, then…. may be I will proceed and start developing the solution from scratch, that is considering time and effort.

    Great screencast, and I totally agree with you 100%…

  31. Permalink to comment#

    That’s why personal projects are so important for me. They allow me to reinvent the wheel and learn new skills.
    I wouldn’t do that on a client project, I’ll just take whatever is easiest/ most efficient for the task at hand.
    So yes, there’s a place for both.

  32. Walter
    Permalink to comment#

    Re-inventing the wheel just takes more time and eats into an otherwise profitable project. As the saying goes: “Time is money” and unless you need to build something that’s 110% new and unique – it’s probably been done before by someone more efficient than you. Stand on the shoulders of giants who have gone before you. And be able to leave at 5:30.

  33. jacob
    Permalink to comment#

    Great food for thought, as usual! I feel like I’m right in the middle of this with a number of clients right now.
    On the one hand, I can use a pre-packaged wordpress theme, make a few customizations and call it a day. On the other hand, how am I supposed to learn/master any skill unless I practice, and practice on clients projects, as well. I feel like the cost will be about the same (I only charge a portion of my rates if I’m learning a new skill) either way.

    However, you are totally right. In some cases it makes way more sense to use a ‘trusted’, ready-to-use solution, like for the wedding. For some projects, I’m not going to ‘re-invent the wheel’. For others, it’s the only way I’m going to push my skills to the next level.

    -Jacob

  34. Permalink to comment#

    For my study we got the oppertunity to develop something that we were really wanted to learn. This since in a few years we will be working and there are less changes.

    Me and and a friend thought yeah lets develop a new look on CMS design. Sure we have to learn all the ins and outs about php and MVC but hell we learn a lot right? But the teacher didn’t aprove , we should focus on new technologies that are just starting like augmented reality or papervision etc.

    But why do that while i’ m pretty sure that in the near future i’m not going to develop in this platform or learn as much since there is hardly any resources. Sometimes re-invent the wheel with a focus on adding something new to it isn’t that bad. If it fails at least you learnt a lot. And if it works out you really produced something useful.

    That my experience in this topic that i liked to share with you. Not sure if it is exactly what you were aiming for.

  35. Dim
    Permalink to comment#

    How do you make progress if you don’t try it yourself. If you use only pre made solutions you will be lagging behind. And it’s because of those people who reinvet the wheel we have faster cars, bigger boats etc. I think you have to know how things work before you use them. I don’t mean to be an expert but to know the basics. I don’t speak just of jQuery… I mean EVERYTHING from your TV to your car. Otherwise you can’t use them fully or properly. For example 80% of the people who use jQuery and don’t know a thing of JavaScript make ugly or not user friendly apps!

  36. John tanedo
    Permalink to comment#

    got the book, read the articles, big fan of your work…
    my favorite book, my favorite website, my favorite web designer… dig-wp, css-tricks, Chris Coyier! someday ill be as good as you…

  37. Permalink to comment#

    But really, no one makes a better wheel than me.

Leave a Comment

Posting Code

  • Use Markdown, and it will escape the code for you, like `<div class="cool">`.
  • Use triple-backticks for blocks of code.
    ``` 
    <div>
      <h1>multi-line block of code</h1>
      <span>be cool yo.</span>
    </div>
    ```
  • Otherwise, escape your code, like <code>&lt;div class="cool"&gt;</code>. Markdown is just easier though.

Current ye@r *

*May or may not contain any actual "CSS" or "Tricks".