Tech Posts

10 posts tagged with tech

I've been thinking a lot about ego lately, and how it applies to software development. Writing software – like any other human endeavor – is influenced by the need to be recognized and hopefully praised for our work. I am no different; it is most likely ego that drives me to release open source software and to refine it even when there is no direct benefit to be had for that work. In this respect, ego is beneficial as it compels me to writer better code, but in the context of a day-job work, ego is a liability. continue reading…

Dear video player application writers, there is a simple feature that would improve my movie watching experience greatly. A feature that I have never seen implemented – on Linux or Windows, and that is the ability to remember the position in a video file where I stopped watching. With current video players, if I want to finish watching a movie that I started watching the day before, I have to drag the slider around and to do a mental binary search to find the point where I left off. What I would like the player to do is to remember where I left off and start playing from that point when I open the file again.

Remember these? continue reading…

The new Django blog system I have been working on is virtually finished, I'm just testing it at the moment. Now I know that by writing my own blog system I will miss out on all the capabilities of a full featured and mature system, such as Wordpress; but my new system -- which I call Django Techblog -- has a few features that Wordpress doesn't, but more importantly, it works just the way I want it to.

One of those new features is the ability to insert syntax highlighted code in to comments, which is very useful for a techy blog! I've created a post on the beta site, and I'd like to invite you to pop over and test the commenting system. I'll delete the comments when I'm satisfied it is working nicely and I can replace www.willmcgugan.com. So feel free to play about with it...

Django has pretty good support for caching, which is one of the easiest ways of speeding up a web application. The default is to cache for ten minutes, which means that if you get multiple requests for a page within a ten minute window then Django can serve up a stored copy of the page without hitting the database or rendering the HTML. The caching period can be set per-page and fragments of pages can be cached rather than the whole, but the system rests on the fact that it doesn't matter if the content doesn't change for a period of time. continue reading…

In 2005 I released a fun little puzzle game called Ping Ball. It took me 9 months of spare time to write, and I did all the coding down to the hand tuned assembler code for the blitters, and even render the sprites myself with Povray. It was the first project where I used the sub-pixel sprite technique, that I recently replicated in Python. The resolution is only 640x480, but you would swear it was a lot higher. I thought it was a great game, I enjoyed working on it, and I loved playing it. So I assumed I would do well selling it. I was wrong! It sold very few copies, apparently it was too hard for the casual games market, and didn't appeal to more dedicated gamers. *sigh* Here are a couple of screenshots... continue reading…

sea monkeys. If you are not familiar with sea monkeys - they are a kind of brine shrimp that has been marketed as a kids toy. They come as a little sachet of eggs with a plastic tank. You add water and they hatch within hours. It's the most marvelous, stress-busting executive toy you can buy. I loved my sea monkeys so much, it inspired me to write an artificial life demo (for PC). continue reading…

I use my laptop for instant messaging and picking up my email while I'm working. It's not quite as good as having dual monitors but it means I can easily work and chat / refer to emails without having to shuffle windows about. Occasionally I need to transfer something from the laptop to my main machine - which can be a pain because I have to minimize windows, find the file, drag it on to a shortcut then find it on the other desktop. What I want is to be able to access the clipboard on the laptop from my main work PC, so that all I would have to do to copy a file from my laptop would be to copy it to the clipboard then press, say Shift+Ctrl+V on the other machine to suck it over the network. And I want it to work with text, urls and anything else that can be copied to the clipboard. And I want it to be free. :-)

A recent post on reddit.com sparked a debate on the following snippet of C code.

The denizens of reddit have been musing over the the output of the code; is it 13 or 14? It can be either depending on the compiler used - or something else entirely - as the result is undefined, which another denizen noted. Sometimes I wonder if the C language was designed purely to provide challenging job interview questions.

Even though I was a C/C++ programmer for a lot longer than I have been a Python programmer, the entire concept of a valid language construct being undefined is offensive to me. Seriously. It's like month old milk; makes me screw my face up and turn away in disgust. In contrast, Python smells like a mixture of freshly cut grass and new car smell. continue reading…

I hate it so much. I've had willmcgugan.com for many years, and in the early days I was complacent about posting my email address in newsgroups / BBs etc. Consequently I get an impressive amount of spam. I use SpamBayes, which worked great in the beginning, but now training it seems almost as much effort as deleting the spam manually.

Since I can't nuke the spammers from orbit, I've restricted my email address to . Unfortunately this means that you will no longer be able to email me at studmuffin@willmcgugan.com or youreallyrockmyworldiwanttohaveyourbabies@willmcgugan.com (sorry). I have also enabled SPF on my domain. I'm not exactly clear on what that is, but easydns.com claim it will cut down on spam, so I am giving it a go. continue reading…

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…