August 21st, 2012 by Jason Walton

So, you want to add an SPF record to your domain.

First, SPF records used to be held in TXT records, but more modern DNS systems hold the SPF data in an actual “SPF” record. If your DNS solution doesn’t support SPF, then use the TXT record instead. Either way, the format is the same. Here’s a very simple example, which only allows mail sent from an IP address listed in one of the MX records for the domain example.com:

example.com. IN SPF "v=spf1 +mx -all"

Read the rest of this entry »

March 5th, 2012 by Jason Walton

A friend of mine wanted to get Reason up and running on his laptop, so he could mix up some mad beats on an airplane. It’s a bit tough to lug a MIDI keyboard about on the plane with you, though. You might learn to play a more compact MIDI instrument, but a better solution is to use a “virtual instrument”.

Read the rest of this entry »

September 6th, 2011 by Jason Walton

If you’ve spent much time doing development work on Linux or Max OS X, and you suddenly find yourself stuck doing development work on a Windows machine, one of the things you’ll quickly learn to hate is the Windows command prompt. You can’t resize the command prompt window, and cut-and-paste is a bit of a pain. You can use Cygwin/X to get yourself a genuine xterm window, but Cygwin is a little heavy weight, and not all Windows console programs will work properly in Cygwin due to differences in the way POSIX handles stdout.

Enter Console 2; a slick Windows command prompt replacement. It’s lightweight, resizable, and with a little bit of configuration, you can make the copy-and-paste behave just like an xterm.

Read the rest of this entry »

January 14th, 2011 by Jason Walton

I am really psyched about the new G1 Garbage Collector. That link is worth a read if you want to learn about it. This is a really a pretty revolutionary re-think of the way garbage is collected in the JVM, and should bring substantial improvements to applications with large heaps that need low pause times.

January 13th, 2011 by Jason Walton

I had to spend some time this week generating a Bind9 configuration file from a database. I decided to learn Python at the same time. :) This is a quick Python module that will let you build Bind9 config files in no time flat:

Read the rest of this entry »

June 6th, 2009 by Jason Walton

What is Deep Packet Inspection?

Suppose you send a postcard to someone. On the left hand side of the post card, you write your return address, you write the address you want the card to be delivered to, and hopefully you remember to add some stamps. On the right hand side, you fill in the message you want to send (”Hey mom! Wish you were here!”). Then you drop your postcard into a mailbox. Your postcard will be picked up by a mail carrier, and go through a sorting process. Postal workers will look at the destination address to decide where to send the postcard, and it will move from postal center to postal center until eventually it arrives in the hands of a postman who delivers it right to the door of your intended recipient.

This is similar to the way the Internet works. Instead of using postcards, the Internet works by sending data in “packets”. A packet has a “header” which has some information about what computer the packet is from and what computer or server the packet is going to, and a body which contains the actual message that is being sent (”Hey mom! Wish you were here!”). When your computer sends a packet out into the Internet, it is passed through a series of “routers”; each router reads the address of the computer the packet is destined for from the header, and either passes it on to another router, or else passes it on to the destination computer.

Or at least, that is how it has worked up until very recently. Routers have been getting smarter, and modern routers use a technology called
“Deep Packet Inspection”, or “DPI”, to decide what to do with their packets.

When you send a postcard, you expect it to be delivered based on what your write on the left hand side, but suppose for a minute that postal workers also read the right hand side of your card, and used that information to decide how to handle its delivery. For example, the post office might decide to give priority to messages it thought were important; if there are too many postcards to deliver in a day, your “Hi mom!” message might have to wait until tomorrow so that a postcard could be delivered today that said “Patient at our hospital needs a new heart. Send transplant right away!” Or, a somewhat more nefarious use; the post office might decide to simply not deliver any postcards that said something bad about the post office. Or what if the post office decided to start keeping a database of all the businesses you sent and received postcards to and from, so that they could sell this information to advertisers?

This is exactly what DPI is all about; DPI enabled routers will route packets based not only on the header of the packet, but also based on the content of the message, and may use the contents of those messages for other purposes as well.

Read the rest of this entry »

June 18th, 2008 by Jason Walton

Firefox 3 is here! While there’s a lot to like about the new Firefox, there’s plenty of things to dislike, too. This is a quick run down of the things that bother me the most, and how to fix them.

Read the rest of this entry »

February 10th, 2008 by Jason Walton

This is a quick tutorial on how to make it easy to support multiple languages in your Java programs.

Read the rest of this entry »

January 3rd, 2008 by Jason Walton

Gallery 2 is a popular web based photo album application. This details how to install Gallery2 on Ubuntu 7.10 (Gutsy Gibbon). These instructions assume you have installed Apache2, PHP, and MySQL (as per an install of Ubuntu Server).

Read the rest of this entry »

January 2nd, 2008 by Jason Walton

I wrote this little Java game a while back. This was actually my first ever Java project. I’d quite forgotten about it, but I just came across it, and thought I would post it here for your enjoyment.