It all started with the last version of 9rules. I stripped all of the old code away and started from scratch. Now usually this is a recipe for disaster, but the old code had become so convuluted and I was jumping through hoops just to make a small change that I figured it would be best to start anew. Besides, so much of the code wasn’t used due to it being based off of WordPress that it was top heavy. Sure it was usable and I could get things done, but it wasn’t code that I was confident in saying I knew 100%.
When I sat down and thought about how the code for the new 9rules was going to be laid out I was suprised at how simple it really was compared to the old code. What previously took days/weeks to code was done in a couple of hours. WordPress was great before, but starting from scratch with code that I knew because I was creating it went so much faster. This example shows a huge problem that I am starting to see on the web today.
With so many open source solutions and frameworks out there, many web developers are getting away with using code that is created by others to complete projects. Now I am not saying you shouldn’t use a solution that is already coded for you, but many times you will see that projects are pieced together from solutions found all over the web. The only reason the new 9rules was developed so quickly was because I used SimplePie for my RSS needs. Coding that myself would’ve made the development time at least 5x longer.
When I begin a project I can easily think of ways that I could use WordPress or some other open source tool and twist it around enough to get what I want, but that isn’t always the best way. Developers love Ruby on Rails because it is great at what it does, but how many of these developers are truly proficient at Ruby?
If there comes a time where I use CakePHP on a project I am confident in doing so because I believe I know my way around PHP. I just don’t like working with code that I don’t understand. Before I mentioned using SimplePie, but just because I used it that didn’t mean I didn’t take the time to study the code to get a basic understanding of how it worked. Hell, I even found a bug in a previous version that I had to fix. Can’t trust everything you download you know.
All my projects use the database connection class found in WordPress and bbPress because I would hate to have to code that stuff up every single time I start something. I know the class inside out though and because of that I can make changes if I feel the need. When searching for a contact form script for BullieBoard! I came across a great one that intrigued me, but I spent so much time fiddling around with it trying to make it work the way I wanted to that I gave up and quickly coded up my own.
I guess you have to sit down and look at the time difference it takes to learn pre-written code or a framework versus simply doing it on your own. I just feel more comfortable with the knowledge that I know the code inside out so when it comes time to fix it or refactor I can simply dive right in. By no means am I discouraging the use of frameworks. I plan to take the time myself to learn one of the popular PHP frameworks out there today, but I don’t think developers should be doing so without knowledge of the language they are working in.