There's No Excuse for Rolling Your Own

Launching has taught me quite a bit so far when it comes to MVPs, iteration, measurement, and user engagement but the biggest lesson I’ve learned is not to reinvent the wheel. I mean, yeah, we’re all taught that as total newbie programmers but all of us go through a phase of basically rewriting everything there’s a simple solution for in the name of “learning”. I’m hoping to save anyone still in that phase a lot of time and trouble by letting them know that you’re not learning much and you’re probably just frustrating yourself more than anything.

When I was a fresh new student of PHP I rejected using frameworks. Frameworks made you lazy, I thought. I had this idea that using frameworks was cheating and that a good programmer should be able to write all their applications from scratch. Boy was I wrong. Need an example? I began writing my simple todo list, Goalie back when I had this mindset. It took me several weeks to build what I could have built within a couple of days had I used a framework. Or how about the original That thing is a mess of tangled, unmanageable, and horrifyingly insecure code. I’m amazed it’s still operating, to be honest.

How I picked up a framework and learned to love being lazy

When I set out to rebuild the new I had finally come to the point where I knew I was not able to build a robust, secure framework to handle all the things needed to do. So I picked up CodeIgniter and I’m very happy with it. Then a funny thing happened. Instead of becoming a worse programmer (because you see I was using a framework and that wouldn’t teach me anything, right?) I actually became far better and fast. At first it was strange. I had to learn how someone else’s code worked. That was oh so scary and hard. But it only took a few days to figure out how things worked and after that I could whip up just about anything you wanted.

Using a framework didn’t make me a worse programmer and it doesn’t make you lazy. In fact, it takes more discipline to learn the ropes of a framework than it does to roll your own awful framework youself. Trust me, unless you’re a fucking savant you shouldn’t roll your own framework and use it in production. People have spent years perfecting the existing frameworks and your 2 week masterpiece just isn’t going to stack up. Stop violating rule #1 of programming: Don’t reinvent the wheel

Mastering a framework and using other people’s API libraries and wrappers has allowed me to do things that I once thought were black magic. I’m sending myself texts when new users sign up for through Twilio, sending welcome emails to new users, and sending a plethora of other transactional email as well. All automatically. I used to think that kind of functionality was reserved only for the best of the best. Turns out all you need is a couple lines of code and the right library file.

Do yourself a favor and stop reinventing the wheel. You’ll be amazed at the speed with which you improve and get things done.

Next time I’ll be talking about the APIs is using because I’m really excited about them and really want to show some love for the services.

Web app development, Web development

« Hackers, Get Off Your High Horse 3 Awesome APIs Powering »