Reinventing the Wheel

A while back I was working on a Rails site that needed authentication. Devise is a well-known gem that does just that. I pulled up the documentation and came across this:

If you are building your first Rails application, we recommend you to not use Devise. Devise requires a good understanding of the Rails Framework. In such cases, we advise you to start a simple authentication system from scratch, today we have two resources: […]

Once you have solidified your understanding of Rails and authentication mechanisms, we assure you Devise will be very pleasant to work with. :)

This is awesome. I had never implemented authentication before, so I opened up the tutorials and got to work. It took slightly longer but I learned much more than I would have by simply dropping in the gem.

I think this is a great attitude. I’ve always been a fan of reinventing the wheel for one’s own education. I used to get strange looks when I told people that I wrote my blog from scratch. They would say, “that’s silly, just use Wordpress.” But the blog experiment allowed me to learn quite a bit. I made many mistakes, but I came away a better developer.

Recently I’ve been working through The Elements of Computing Systems. It’s about low-level hardware design. In the book you build an entire computer in a hardware simulator from simple logic gates. It has been immensely educational because even though I work with computers every day, I still don’t know how they work at a low level. I’m not going to build my own computer from physical hardware, but at the end of the book I’ll be able to. I think that’s really cool.

The body of knowledge in Computer Science is huge, and growing exponentially. This is fantastic, but unfortunately it means that everything that came before The Next Big Thing becomes a black box with an interface that you just trust. If you’re just in the game to make a living, I suppose it’s okay to not know or care how the lower-level stuff works. But for me curiosity is the primary motivation and reinventing the wheel from time to time is incredibly satisfying.

π