Where there is a Will

Will McGugan's Blog

I am a freelance software engineer living in Glasgow Leicester.

I post mostly about tech (particularly Python) and photography.

Background: A code monkey

It must have been a slow news day in Chester yesterday. Front page on the Chester Chronicle is an article about a painting of Adam and Even hanging in the Cathedral. Apparently some locals were grossly offended at the sight of Eve's buttocks and breast. I'm tempted to get all militant atheist here, but I know its just a handful of stuffy prudes. Personally I think Eve looks quite good, and no cellulite in sight! Judge for yourself...

Last week I started a new job as a full time Python developer. Prior to that I worked for a computer games company called  Evolution Studios. Evos - as it is affectionately known by employees - achieved a great deal of success with its latest game, Motorstorm, and it looks like they are set to keep producing hit games. There are a lot of great things about working for a games company, and being a games programmer gets you a lot of respect amongst certain circles (i.e. game geeks). So why give it up? Well over the last few years I have fallen in love with Python and I use it at every opportunity. Consequently I have been idly keeping an eye on the Python job board for Python related work and came across a job that I was perfectly suited for. It listed requirements for skills that I thought were incidental, and the work I would be been doing is not dissimilar to the type of Python coding I do to amuse myself in my spare time. Not sure if I can tell you about it yet, I would have to clear that with the boss. Did I say 'boss'? I meant client, because now I am now self-employed! continue reading…

It's good to see a few people using my BBCode module. I have since made some small fixes and added a feature. I've added a PygmentsCodeTag that uses the excellent Pygments module to syntax highlight code within a [code][/code] tag. It supports all the languages that Pygments supports, simply specify the language in the tag (i.e. [code python][/code]). You can still use the code tag that generates <pre></pre>, if you have another syntax highlighting solution. continue reading…

In the last few weeks I have been tinkering with a dynamic website created with Turbogears, but that's not what this blog entry is about. The website I have in mind is similar to a forum in that most of the content come from the users (can't tell you exactly what it is just yet). I wanted a way for users to post comments with simple formatting, but I didn't want to let them enter straight html - for all the problems that would cause. No doubt, some wise-guy would figure out that he could enter the <blink> tag! So I decided to implement something like BBCode, which I dubbed 'Post Markup'. continue reading…

I spent most of 2006 working on Motorstorm, one of the first ever PS3 games. Work gave me a free copy of the recently released Japanese version. If only I had a PS3 to play it on!

Congratulations to my colleagues at Evolution Studios for all their hard work.

Today I played chess with my good friend Will. I had fun but after a dozen draws I got bored. It turns out we are quite evenly matched.

In my new job I just don't get the exercise I used to. Sure I can do a little resistance training at home so I don't look too out of shape, but you have to do a little cardio if you want to stay young and pretty for as long as possible. So I decided to resurrect a hobby of mine from my youth and bought a bicycle from a local shop in Chester. It really is true what they say; you never forget how to ride a bike - although my legs did seem to have forgotten they were strong. So I have spent the last 2 weekends cycling about Chester in glorious weather, and enjoyed it immensely.

It has come to my attention that there is a woman on the internet demanding that everyone sends her a postcard. She actually expects us to go out of our way to purchase a postcard and a stamp and send them to her. In return for what? Absolutely nothing! The audacity of this woman, the bare faced cheek!

I expect you are as disgusted with all of this as I am, and I urge you to contact this crazy postcard lady and explain to her in no uncertain terms how inappropriate her behaviour really is. Write your grievances on the back of a postcard and mail it to her. With bit of luck we can block her doorway with cards and bring an end to this nonsense once and for all! You can find her address on www.sendmeapostcard.org.

My cousin Mirren got married recently, and I went to her wedding. I'm not going to bore you with details of people you don't know - this is not one of those blogs. If you are interested though, have a look at the pictures on my flickr page.

A while ago I wrote a chess module for Python. Now this is not a chess-playing module, rather it parses chess moves, stores board positions and works out legal moves. It can also read and write PGN files. I can fairly confidently declare myself as an expert in this kind of thing, having written the PC chess game Chess Commander.

Chess is something that is very well defined, the rules are laid out in black and white, but there are enough juicy problems and gotchas to make it interesting to work on. It was the special case moves such as en passant and castling that were most tricky. I made extensive use of Python's generators extensively which did simplify things a great deal. continue reading…