Gamehole! And Why I Suck

PHP Professional Test

I took on the project to see if I was ready to work at coding PHP professionally. When I took on the project it was for free and only projected to take no more than two months. I will do a post-mortem after I’m finished. This is just random collection of what you shouldn’t do to your clients. Most people already know this stuff, I however had to learn the hard way.

Code Base is Crap, Rewrite vs. Refactor

When I took the project on, I looked at the source of the project. I noticed a few things that led me to my conclusion.

  1. Used Register Globals On for variables and didn’t use Super Globals.
  2. Most of the script execution was in one file.
  3. Use PHP 4 mysql_query.

It would be too much work to refactor the variables to use the Super Globals that it would be better to just rewrite the whole thing.

When You Aren’t Paid…

I didn’t accept any money up front, so in my mind it was more like any other hobby project I have ever done. I experimented a little here and there. I also tried to do my other projects. I didn’t take the project seriously because I wasn’t getting any money. How hard are you going to work for someone when you are working for nothing?

The Experiments

I learned a great deal while experimenting and testing different PHP extensions. Most of the six months spent working on the project was experimentation.

My Templating System

I thought, Smarty my ass, I can do one better. Well, I’m sure you can figure the conclusion and how far that went. Not very, I can tell you. Well, that isn’t to say that I didn’t get a working implementation of the Template System, it just wasn’t as good as Smarty. I didn’t even use it after all. That was three weeks that I worked almost full time during the week to get the template system done and didn’t even use it after all. The experience will stay with me but it was time wasted project wise.

Smarty and Template Lite

I did try to use Smarty and Template Lite after all, but that also didn’t go anywhere. Well, not exactly true, it went somewhere, but not fast enough for any real difference to be seen. If I had started with Smarty from the beginning then I might have been finished by now.

Objects For Code Reuse

It was pointless, because most of the objects were project specific and couldn’t be used elsewhere. I also had to refactor a great deal once a new idea or feature came along. The reason I started to do it in the first place was so that I could maybe bring some of the more generic stuff over to my other projects.

Crappy Database Abstraction

Oh god! I still remember this. I created a database abstraction model that would open and close a connection to the database for each query. So something that should only take, I don’t know a few milliseconds, took several minutes. Yeah, I fixed that and noticed a huge jump in optimization. Learned a great deal from that experiment.

“It Takes 20-40 seconds for something that on the live site only takes less than 1 second!!!” Nothing pisses off a client more than going from good live site to poor development site.

Damn PDO

To this day, I still have no idea what went wrong. PDO pissed me off in quite a few areas and I don’t think I’ll be able to forgive PDO so easily after this project. It just stopped working! I thought, “WTF?”

Something that worked only a day ago, just plain stopped working the next day with no tests showing up on the reason why. I’ll probably never pin it down to the exact cause and can only speculate that it had something to do with using mysqli and PDO and opening a connection to the same database.

I won’t use PDO for any time sensitive projects.

Adding to the Project

Whenever I would get a feature working and say, “Hey! I’m done, check this out!” The client would mention how this, this, and this needs to be added. My thoughts on the matter, “You ASS!”

Disappearing Act

I could have just ignored the client, who held the money carrot over my head at times. My conviction wasn’t to him and his project, it is to the professional clients to come. If I couldn’t finish his project, then could I finish another’s? How would I get work, if on my first real client I just up and disappeared with only a half-finish half-assed solution.

If I am ever to accept money for doing PHP professional, then I would need to get my head out of my ass and pull it together. This project is a test for myself to see if I am capable of charging for PHP work. Which at the current time the answer is not positive.

I’m Not Ready for the Professional World

I need to learn a lot more about PHP and dealing with professional client work. I think in another few years that I might be ready to accept paid PHP projects, but I really need to study hard on other areas besides PHP, such as JavaScript and get good at that and other obscure PHP areas that I had no reason to look at.

PHP Security and Security in general is a great area to have on a resume. I’m on the first step but I have a great deal of a way to go before I’m ‘there’.

In The End

I just broke down and I said, I have a month, lets just get this done. I started the refactoring of the code three days ago and I’m on my way to completing it within the deadline. I’m also adding features that I didn’t have completed on the other development site. It is fun now instead of like work.

Possibly Related Posts:


Comments are closed.