Posts Tagged ‘php’

TF2 servers and Wordpress

Sunday, November 11th, 2007

Ive been playing a lot of Team Fortress 2 with the 9m guys recently and we have decided to enter into some competitive play. All this means we needed a website so in true quick and dirty fashion I knocked up a WP site and modified an existing theme.

Now one thing I thought that would be pretty cool would be a server monitor plug-in, there was nothing currently out there so using my non existent knowledge of widgets I tried my luck… and failed terribly I just couldn’t get the server to query correctly at all. I guessed someone must have done something similar to this in PHP the answer was GameQ. Its a nice little library that wraps everything up nicely and gives us back a lot of really easy arrays using this and my basic understanding of plugins I managed to knock up the server monitor you see on the 9m website

I have plans at some point to improve and hopefully release the widget under GPL when I have a better understanding of how to deal with the configuration side of things, until then its all hard coded configuration. If anyone’s interested at all in the source code drop me a line.

A Change Of Heart

Monday, October 1st, 2007

It was in some respects a long time coming like a lot of people out there I have made the move to word-press and for once actually managed to create a semi-decent (I think) looking theme. I liked Mephisto but I couldn’t do ‘things’ with it. It kind of leads me into what I have been having quite some thought about latley and that is PHP.

I ve had somewhat of a resurgence in my love for PHP, Ive been toying with RoR and done some C# stuff recently at work and I came to miss the pure dirtiness of PHP. The reason I originally had started to hate PHP can probably be pinned on two things; doing maintenance on existing projects and as a result writing increasingly hacky and horrible code. The change of heart came from realising finally that I could write beautiful OO PHP5 that was incredibly rewarding to write if I wanted to. The epiphany was mostly down to the fact that programing in a language like C# made me give up a lot of my bad programing habits. Its quite easy to write bad C# apps but it quickly becomes quite self evident how horrendous it is, while doing something equally bad in PHP like mixing up function with formatting isn’t so obvious until much later when problems start cropping up. By bringing these good habits from C# and RoR to PHP5 I can write much more reliable and readable code thats also fairly agile. This article by Derek Sivers kinda sums things up.