Murray-Mint.co.uk

</html>

I’m back from a very busy 2 days at the UK PHP Conference organised by PHP London. There were over 34 talks across the two days, as well as an unconference. The talks ranged from PHP profiling and internals through to the psychology of programming and techniques for improving your analytical and programming skills.

There seemed to be a huge focus on scaling PHP and performance with some great talks by Helgi Þorbjörnsson on using Gearman and techniques for distributing processing across multiple commodity-spec servers, Nikolay Bachiyski on scaling to a thousand+ servers and by Andy ‘Bob’ Brockhurst from the BBC on how they have scaled their monitoring and profiling to cope with over 630 separate web applications running on just 70 servers.

One of the keynote talks was from the founder of PHP, Rasmus Lerdorf, on where he sees PHP on 2012. The keynote was interesting as it highlighted some of the new and upcoming features in PHP 5.4 (later covered in a talk by Davey Shafik) as well as a look back at where PHP came from with some code samples from PHP 1. Some of the major things in PHP 5.4 are:

Array dereferencing

Traits – compiler assisted copy and paste

20% increase in performance versus PHP 5.3 in synthetic benchmarks

Built-in web server for debugging/unit testing

Removal of some deprecated functionality like register_globals and magic_quotes

I’ll be posting some links to some of the videos of the talks when they’ve been uploaded along with my thoughts on those talks and what I took away from it. Overall, it was a great couple of days and it was interesting to see where PHP appears to be heading and ways I can take some of the ideas presented at the conference and put them to use with my work at Fasthosts and epic.LAN.

I develop a number of PHP console applications and it was annoying me that ANSI colour (or color) and other escape codes don’t work in the Windows console. I like to use colours in console output for automated test scripts and other things as it’s really helpful.

Luckily, Jason Hood has written an application that enables ANSI escaping in the Windows console. It can be found at his site. Just download it, extract the x64 or x86 directory as you require and run ansicon -i. You will now have a new environment variable called ‘ANSICON’ and ANSI escapes will work!

I’ve had my HTC Desire for almost a year now and I think it’s an excellent phone and still one of the best Android phones on the market.

I have had one problem with it though. It’s been using data at a rediculous rate – over 40MB a day and was costing me an extra £10 a month in data. The first step was to find out what was using all the data.

I downloaded TrafficStats Lite from the Android Marketplace which was able to display the usage on a per-app basis, but this didn’t help much.It was unable to separate out all the SenseUI apps, which was a huge selection, including:

Flickr

Calendar Storage

Friend Stream

com.htc.provider.

HTC Location Service

Calendar

This list continued for about another 20 items, so not much help but it gave me an idea of where to look. I next decided to look at the account synchronisation settings and turned them off one-by-one, clearing the stats in TrafficStats and seeing how much data was being used.

This led me to the culprit – Facebook for HTC Sense. This downloads profile photos and status updates for all your contacts, as well as adding your Facebook contacts to your phone contacts.

Stopping it from syncing the live feed and syncing contacts immediately stopped the data usage. The phone now uses around 2.5MB a day which is slightly cheaper!

This year I’m aiming to release more open source software, as part of that I’ve just finished my first mini-project.

It’s a PHP class library that logs into Lloyds TSB online personal banking and is able to retrieve information on the accounts. It is able to return the balances, available balances, overdraft limits and allowances for may different types of account. It’s very easy to use:

As usual, I’ve been very slack in updating this site. This is more of a general catchup post detailing what’s happened between the last post and now.

epic.LAN

With 5 larger events, including our first with over 200 attendees, and 5 smaller events under our belts, epic.LAN is going great and is getting better each time. at epic.FIVE we brought back competitive tournaments with £2,000 prize money on offer.

It was the first outing of the epic.Tournament system which manages almost every aspect of running a tournament. There were some minor problems but overall it worked well. The next event is epic.SIX which has even more money on offer and should be a great summer event!

Work

I’m still working in the Web Development team at Fasthosts, bringing some great products to market. Some of the projects I’ve worked on include Virtual Servers, updated Broadband offering, hosted networks and I’m currently working on a large project that will take me through to the Summer. It’s great place to work with excellent co-workers, fully outfitted break rooms with soft drinks on-tap and a proper coffee machine.

Most of the time I’m writing PHP with the large codebase that makes up our Control Panel being my primary focus. There’s some other internal systems that are PHP based and plenty of Python used as well, so lots of opportunity to learn new things.

Web Development

The past two years have been hectic with epic.LAN taking up most of my own personal time, with the bulk of the development work done for now, I’m looking into getting involved in some open-source projects and some interesting web development for my own amusement. I’ve been paying a lot of attention to the likes of BarCamp London 8 and HackCamp and aim to attend a few of these events this year. In the meantime, I’ve set up a projects website for any small and random projects I decide to write.

I’ve also updated my GPS tracking website for the third time in about 5 years. This takes GPS data from an Android phone and plots it on a map alongside Google Latitude and also draws a trail of my position. There’s more details on the website for it.

Upcoming Events

It’s looking to be a busy summer for events, with the following already lined up:

Twitter

As with everyone else in the world, I can be found on Twitter @MurrayMintUK. I tend to tweet irregularly as I’m not partial to blogging or micro-blogging. Feel free to follow and I’ll probably reciprocate.

I’m currently finding Twitter most useful for SMS alerts. Anytime anyone pays for an epic.LAN event, the website automatically tweets to a private Twitter account followed by myself and other members of the epic.TEAM. It’s a really cheap way of mass notifications and was a great place to test Twitter API integration.

That’s it for this post, but stay tuned for I have some good content lined up including some analysis of web development in the year 2011, a defence of PHP against critics and some articles covering the technical side of epic.LAN and what goes on behind the scenes.

I’ve previously posted here about Fringe, a great TV series from the mastermind of JJ Abrams. It’s due to return for a new season along with most other shows next month, in the meantime I’ve been passing my time by watching Warehouse 13. It’s a little bit X-Files, little bit Fringe and a healthy dose of comedy in there as well.

The storyline is based around 2 Secret Service agents who get sent to work for the eponymous Warehouse 13, a government warehouse not unlike the one from Raiders of the Lost Ark. The warehouse contains various artifacts and objects from around the world, each of which having some sort of power or ability. From swords that make the wielder invisible to wish-granting kettle and even Pandora’s Box (empty of course). The official blurb is:

After saving the life of the President, two Secret Service agents find themselves abruptly transferred to Warehouse 13 – a massive, top-secret storage facility in windswept South Dakota that houses every strange artifact, mysterious relic, fantastical object and supernatural souvenir ever collected by the U.S. government.

The Warehouse’s caretaker Artie charges Pete and Myka with chasing down reports of supernatural and paranormal activity in search of new objects to cache at the Warehouse, as well as helping him to control the warehouse, itself.

Aside from the wordy description and terrible punctuation within, the show itself is brilliant. The characters are entertaining and engaging. Saul Rubinek as Artie pulls off a great acting job giving depth and believability to his character. Eddie McClintock (Pete) and Joanna Kelly (Myka) have a great chemistry together and the writers have done a good job fleshing out the characters and making them more than just stereotypical clichés.

A great introduction in the fourth episode to the regular team is Allison Scagliotti as Claudia Donovan, a young ‘techno-wiz’ who breaks into the Warehouse to find Artie. The only character seeming out of place and redundant is Leena (played by Geena Williams) who seems at odds with the rest of the cast, bringing it a slightly mystical type presence to the show which seems at odds even with the weirdness of the objects in the Warehouse.

The story-lines and plot are excellent, there’s not so many lingering questions as with Lost and Fringe however they are setting up various elements of a season-long story-arc with a rogue ex-Warehouse agent, the mysterious head of Warehouse 13, Mrs Frederick and Artie’s treasonous past. This show is definitely one to watch and is very highly recommended.

Popcap, purveyors of digital crack have unleashed their latest game: Plants vs. Zombies. It’s basically tower defence where the creeps are zombies and the towers are plants. The game is a great mix of addictive gameplay, great visuals and some absolute comedic moments with Crazy Dave (He’s CRAZY!).

The game isn’t without its flaws however. One of the biggest ones is that there are no hotkeys, you have to move your mouse to the top of the screen to select new plants. There is a solution to this – AutoIt, the Windows automation tool that has been helping me in MMOs since Star Wars Galaxies. It is able to simulate any input (mouse movements, keyboard presses) and has basic support for hotkeys.

I’ve put together a script for AutoIt 3 that will set up hotkeys on the top number keys to correspond to the 10 seed slots. You can view the script here.

Edit: Gir489 from the Steam Forums has taken the script and improved it beyond all recognition. It now features windowed support, an update checker and numerous other changes. You can find details on the Steam Forums.

In my spare time, I’m the technical manager for epic.LAN. It’s a small (50-100 player) LAN Party based in the Stoke/Crewe area. With an aim of getting back to the core fun of LAN parties and bringing a party-like social atmosphere inspired by LANs like DreamHack, it’s a great event.

As technical manager, I’m pretty much in charge of making sure the LAN side of it works. This includes servers, network, wireless and all the websites (written by ChicagoTed) and supporting systems. Admittedly it’s not an impressive a job as doing a similar task for the UK’s largest LAN Party or DreamHack but it’s still a nice challenge.

With our first event over and done with, it’s good to finally sit back and relax and now go into some detail and analysis of what we did, where we went wrong, what we got right and how we’re going to improve.

If you’ve tried using VoIP phones (hardware or software phones like X-Lite or Eyebeam) then you’ll know the pain of the phone intermittently not working. It was plagueing us here at work until we finally found the fix.

It turns out that the Speedtouch routers have some settings built in for handling SIP which is great until you try and use another SIP phone on your network. The fix is to disable whatever it is trying to do and it turns out, this is easy!

Use telnet to connect to your router. If running Vista, you’ll need to install Telnet through Add/Remove Programs otherwise, you can use Putty.

Type in the following commands

connection unbind application=SIP port=5060
saveall

Change the configuration on your VoIP PBX so the phone is configured to be behind NAT

The phone should now just start working. This was tested with a Speedtouch 585. Polycom IP501 VoIP phone and the VoIP PBX is Asterisk provided by Voxhub.

Red Alert 2 is one of the best RTS games that has ever existed with some of the craziest most fun multiplayer I’ve seen. We used to play it a lot at LAN Parties until last year when everyone started moving to Windows Vista. It is one of the few games that uses IPX for network games and Windows Vista does not have IPX available.

We thought that this was it and Red Alert 2 was dead, however, Scorpio9a has released a patch. The patch makes Red Alert 2 use IP instead of IPX and I’ve tested it and it’s working under Vista! How to get it working?

Edit ra2.ini and change the ‘NetCard’ setting in the [Network] section to 0 (If you have more than 1 network card, you may need to try different values)

Run Red Alert 2 and choose ‘Network’ and you should end up in the lobby!

Some common problems you might come across are:

Network button doesn’t do anything and just returns to the main menu
You haven’t selected the right network card, just edit ra2.ini in the Red Alert 2 directory and change the NetCard setting in the [Network] section.

You can’t see any games or connect to someone else’s game
Make sure you’ve allowed Red Alert 2 on any firewall like Windows Firewall or Zonealarm. Also make sure everyone is running this patch regardless of operating system, otherwise they might be hosting an IPX game which your IP broadcast can’t see!

If you find this post helpful or have more problems/solutions, then please post a comment and let me know and if Scorpio9a reads this – if you come to a UK LAN Party, let me know and I’ll buy you a drink!