The diary and photos of Chris Beach. I'm into windsurfing, coding, badminton, drawing and composing music using computers and synths.

Let's start with a quote:
"I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours" Stephen Roberts

email: password:

last journal entries (total: 105) RSS Feed

the iphone as a universal remote control (using the thinkflood redeye wifi-ir bridge)

What follows is a quick video demo of the new RedEye device, which bridges wifi to infrared. Controls any number of household appliances using iPhones and iPod Touches.

The system has just come out of beta and the iPhone app is buggy, but free-of-charge. The RedEye device itself is $188 plus taxes and VAT ($220/£135). Ordered on Thursday; arrived today (Monday) in the UK. Setup is fiddly and takes a while, but once done, all iPhones in the house sync automatically with the configured button layout. Swipe gestures and accelerometer are configurable options. Response times on button presses are good, and the app loads reasonably quickly (~2s on an iPhone 3GS). Several updates have already hit the app store and more in the pipeline. More info here:

written by Chris Beach
11/01/10 11:45pm
(8 years, 4 months ago)
comment 3 comments

photoadd photo

using your existing domain name with gmail and decluttering the web ui

Email server maintenance sucks. Last week, a botched upgrade of my VPS killed spam-filtering and rendered Plesk (control panel) useless. Days of chasing tickets with Interhost drove me to distraction. High time to consider alternative mail hosting.

Within its Apps framework, Google offers an email service which can be linked to your existing domain name and email address. The process is as follows:

  1. Create a Google apps account
  2. Verify your domain (by placing a Google-provided file in the root)
  3. Create email accounts using "Users and groups" tab
  4. Edit your DNS settings (instructions for various hosts here) to use the Google MX records. If you have direct access to DNS settings, these are the MX records:
PriorityMail Server

Once that's done, after 24 hours or so, the DNS update will have propogated through the web and email will start flowing into your Google Apps Gmail inbox. Enable IMAP within Gmail settings in order to access mail from desktop clients. Then set up Google Sync to get email/calendars/contacts pushed to your iPhone.

Gmail's web interface is horribly cluttered so I have created custom CSS to remove the ads, dim some extraneous details and shrink the UI to the bare minimum. This can be downloaded and activated here:

written by Chris Beach
15/12/09 3:00pm
(8 years, 5 months ago)
comment add comment

photos (total: 2) RSS Feed

photoadd photo

the web app "scene" is dying

Last week I reluctantly passed on FOWA (Future of Web Apps conference). A smaller venue than previous years; a less compelling lineup. An event hit by the crunch but priced at a wallet-busting £385. No startup discounts, either.

Afterwards, tweets and blogs gushed praise onto the organiser, Ryan Carson and he replied personally to every one. Sounded like FOWA '09 was a hit, and I was sad to have missed it. However, Adam Charnock's blog post relieved the stinging sensation.

Adam discusses the new "sobriety" in the tech scene at FOWA, and his point about the maturing of the web app industry is spot on. It was only a few years ago that we lacked a Facebook, Wikipedia, Flickr, Twitter, Digg, IMDb, LinkedIn, TripAdvisor, and This was a time when the big problems hadn't yet been solved. The novelty and passion in the grassroots tech community was strong back then. I'm fond of those memories, and disappointed to see a progression to something more glitzy and artificial. Fluffy attention seekers and pretty posers swan around "covering" events in the scene (Not referring to anyone in particular.. ahem!). Social web "gurus." Usability "experts." Sycophants that follow them. The Twitterati. All these things that bewitch, seduce and leech the last of the "juice" from the web tech scene. It now seems more important to acquire 2000 followers on Twitter than to actually create a web application.

The freshness and excitement of the web app world has faded.

It hasn't expired completely, though. It's moving elsewhere. Devices like the iPhone have game-changed the market for developers. It's enticing to build an app that runs in millions of hands and is able to exploit a touchscreen, camera, compass, GPS/GSM/3G/bluetooth radio, accelerometers, 3D hardware acceleration, microphone and speakers. Very cool indeed.

A technologist is foolish, maybe, to write off web apps and covet the new and shiny. There are still interesting challenges on the web. Migrating monolithic apps to the cloud, for example, or monetisation.

For me, though, mobile development is where it's at. Real-world problems can be solved here. There's a learning curve, immature APIs, eclectic new hardware, UX challenges and frameworks to build. Many, many possibilities.

Oh, and venture capital and profit.. if you like that kinda thing.

So.. the future. I await a "Future of Mobile Apps" conference that is organised impeccably, like the FOWAs of old, and creates the same teched-out bliss. Somewhere where we can sit with our Macbook Pros and iPhones and talk about the cutting edge once again. Creating something new. Sounds like fun, eh? smilie face

written by Chris Beach
04/10/09 1:37am
(8 years, 7 months ago)
comment add comment

photoadd photo

making outlook's task view more useful

Outlook's Task view is handy for keeping track of day-to-day work tasks. I keep it open in a separate window and use various formatting and filters to show the data I want. In particular there's a "DASL" filter to show a combination of all open tasks, and those completed within the last two weeks:

To set the DASL filter:

  1. Click View->Arrange By->Current View->Customize Current View
  2. Click Filter
  3. Click the SQL tab
  4. Click "Edit these criteria directly"
  5. Enter the following:
("{00062003-0000-0000-C000-000000000046}/811c000b" = 0 OR 
"{00062003-0000-0000-C000-000000000046}/810f0040" >= today(-1209600))

written by Chris Beach
16/11/07 4:26pm
(10 years, 6 months ago)
comment 2 comments

photoadd photo

setting up an ethernet modem with a wireless router

I was suckered in by the new Belkin N1 Vision (with its lovely built-in screen), only to find out it's only a wireless router and doesn't include an ADSL modem. What an arse!

The real pain came trying to set the thing up. I tried getting my old Netgear ADSL router to work in modem-only mode. This was fruitless, so I ordered a dedicated ethernet modem (A Linksys AM200). When this came along I spent a LOT of time fiddling with various settings (DHCP, DMZ etc). This is the combination that works for me, on Virgin broadband:

Modem (Linksys AM200)

  • Mode: Bridge Only (note: this turns the modem into a simple non-routing device and the web interface will no longer function
  • VCI: 38
  • VPI: 0
  • IP:
  • DHCP: disabled

Router (Belkin N1 Vision)

  • Connection Type: PPPoE
  • Username:
  • Password: As selected when registering with Virgin
  • Service Name: [blank]
  • MTU: 1452 (default)

..and finally it works!

written by Chris Beach
16/11/07 12:34am
(10 years, 6 months ago)
comment add comment

photoadd photo - a zero-maintenance website

The idea behind my new site Caption Competition is simple - pull an interesting photo from Flickr every day and let people add captions which can be voted on. Photos can be browsed with their best captions, and there is a "top captioneers" list, showing the users who've added the best captions.

I already have some scripts for handling photo uploads but I have deliberately avoided using them. Using Flickr gives two important advantages:

  • I don't have to concern myself with accepting uploaded photos, which would require some form of manual moderation. Instead I've set up a group on Flickr which is moderated by Flickr users (and Flickr's own system which blocks porn, politically incorrect images etc). An automated job on my webserver loads the most interesting new photo from the group every day. To do this, it sorts the photos using Flickr's "interestingness" algorithm, which works surprisingly well.
  • The Flickr API allows me to serve the images on from Flickr's own webservers. All I'm serving is the HTML and CSS, which are negligible in size. If my server was serving images, the bandwidth usage would be orders of magnitude greater, and very costly as the site grows.

I have also written a script that posts a comment back on the photo within Flickr to say the photo has been featured on, with a link to the relevant page (a shameless advert for the site!). The script waits until several good captions have been added to the photo before posting. To work this out, it takes an aggregate of the vote score, and posts a comment when this score exceeds a set threshold. Without this check, a Flickr comment could be posted and bring visitors to to see a page of bad captions.

As of today, there are 128 photos, 548 captions and 50 signed-up "captioneers" (users). The site is growing, and is now the number one result in Google for a search on "caption competition." It's satisfying to reach a conclusion on a website project, such that the site can now run itself.... though I will undoubtedly be tinkering with it for some time smilie face

written by Chris Beach
16/09/07 1:56pm
(10 years, 8 months ago)
comment 6 comments

photoadd photo

interhost technical support seems to have gone on holiday

Update [20/12/09]: Telephone support has been discontinued without explanation, and staff answering tickets seem overworked. However, uptime has been good.

Update [29/07/08]: Ten months later and Interhost are back on track as a great, responsive host with negligible downtime

Update [27/09/07]: Today Interhost have moved me onto a new host and my quota is now a healthy 50GB.

Update [10/09/07]: Interhost have responded to my ticket suggesting a move to a new VPS. I have asked them to confirm that I'll be getting the quota and bandwidth allowance that corresponds to what I'm paying.

I just posted my eighth ticket (see below) on a single request for support from my hosting company, Interhost UK. They have a problem with my (and probably other customers') filesystem quota.

Twice so far this year my webserver, a virtual private server (virtualised Linux host) has crashed because available space has mysteriously reduced to zero, despite me being well under-quota. Twice I have had lengthy, frustrating exchanges with Interhost technical support. They've run "fixquotas" but not explained what exactly why this is necessary. They've not proposed any long-term solution. They've not offered any promise that they'll pick up on this problem when it next occurs to save me the hassle of chasing them to fix it. And worst of all, they are now being evasive about contacting me at all. I have called three times in the last couple of weeks after my tickets went unanswered for a couple of days or more. On the other end of the phone - a non-technical person who attempts to call the technical support department but this goes straight to voicemail. I'm promised a call-back. It doesn't come.

I once recommended Interhost, but not any more.

Further to my unanswered post on Monday:

Over the last two days my filesystem availability has dropped from 2.1GB (on Monday) to 1.7GB today, despite no increase in usage from my VPS. If the mysterious drain on space continues at this rate my VPS and websites will be crashing by the weekend.

My total available space is now apparently a measly 6.7GB, and I have had to cancel backups and delete data to fit within this. I'm paying for a 50GB allowance. I'm being charged double the cost of a 10GB allowance, but getting less than 10GB!

Where is the explanation of the problem? Where is the proposed long-term solution? Where is Mark? Where is Interhost technical support?

I used to be really impressed with Interhost, but recently it seems all I get on the phone is blank, un-technical people that promise callbacks that never materialise, and several tickets I have raised have sat unacknowledged for days or even weeks (as is the case with my ticket regarding domain registration).

Update [27/09/07]: Interhost have moved me onto a new host and my quota is now a healthy 50GB.

Update [29/07/08]: Ten months later and Interhost are back on track as a great, responsive host with negligible downtime

Update [20/12/09]: Telephone support has been discontinued without explanation, and staff answering tickets seem overworked. However, uptime has been good.

written by Chris Beach
05/09/07 3:17pm
(10 years, 8 months ago)
comment 11 comments

photoadd photo

fixing phlickr's internal php references so it can be used from scripts throughout a filesystem

Phlickr is the PHP5 API for the excellent photo-sharing website Flickr. It works well from what I've seen so far.

One problem though - the various PHP files within the Phlickr API reference each other using relative links i.e. require_once 'Phlickr/API.php', which means that all scripts that use the Phlickr API must be in the directory that contains the Phlickr directory. For me this proved inflexible as I nest my PHP scripts within various directories.

Therefore, I needed to run a substitution on the Phlickr API files in order to make the referenced paths absolute. Here we can use PHP's global $_SERVER['DOCUMENT_ROOT'] variable, which provides the physical filesystem path to the root directory serving up the PHP files. Here's a substitution command I came up with, which should be run within the Phlickr API directory:

find . -name "*.php" | xargs sed -i "s/'Phlickr\\//\$_SERVER['DOCUMENT_ROOT'] . '\\/Phlickr\\//g"

Note: this command works for me in bash - I haven't tried it in other shells.

After the substitution, the Phlickr API should be placed in this root directory, but other scripts that need to access it can be placed in subdirectories

written by Chris Beach
04/09/07 11:31pm
(10 years, 8 months ago)
comment add comment

photoadd photo

auctioning and

I've decided to auction off a couple of domain names that I'm not using at the moment: [visit auction] [visit auction]

They're both starting at £0.99 and have no reserve. If you know anyone who might be interested, please let them know!

I also have a few more "spare" domains but I'm curious to see the response to these auctions before I give the others a shot.

Does anyone know of any good places to promote these sales? I will be hitting as soon as I get home, of course!

written by Chris Beach
20/06/07 11:44am
(10 years, 11 months ago)
comment add comment

photoadd photo

automating spam assassin's learning process on plesk

Update [22/11/07]: I have updated the script to make it more generic

Amongst other techniques, Spam Assassin uses a bayesian filter to judge the probability that a mail is spam. The bayesian filter works on the probability that certain words in the mail identify it as spam or non spam. In order for this to be effective, the filter needs to be taught - and this can be automated to a degree.

It took a fair amount of Googling to work out this solution, so hopefully it will save you some time if you have a similar setup to mine (Linux, Plesk, Qmail, Spam Assassin). You may need to substitute your Spam, Learn and Trash folder names if they differ from mine:

1. Inside your Spam mail folder, create a folder named Learn.
2. If a spam mail is not caught by Spam Assassin, get in the habit of moving it manually to your Spam/Learn folder (do this in your mail client).
3. Create a script /var/scripts/dailyMailJobs as follows:



# learnAndFlush args are the following directories: MAIL SPAM SPAM.LEARN TRASH
function learnAndFlush {
echo -e "\n\nLearning new Bayesian data from spam for $1 on" `date`
sa-learn --dbpath ${MAILNAMES_PATH}/$1/.spamassassin --spam ${MAILNAMES_PATH}/$1/Maildir/$3/cur/
# Flush Spam.Learn
flush $1 $3
# Flush Spam
flush $1 $2 ${SPAM_LIFETIME_DAYS}
# Flush Trash
flush $1 $4 ${TRASH_LIFETIME_DAYS}
echo -e "\nLearning new Bayesian data from the last 24hrs of non-spam for $1"
find ${MAILNAMES_PATH}/$1/Maildir -mtime -1 -type d -name cur -not -path "*$2*" -not -path "*$4*" -not -path "*/Maildir/cur" -print -exec sa-learn --dbpath ${MAILNAMES_PATH}/$1/.spamassassin --ham {} \;

function flush {
echo -e "\nCleaning $2 from ${MAILNAMES_PATH}/$1"
if [ "$3" ]
echo "Only deleting mail older than $3 days"
mtimeArg="-mtime +$3"
find ${MAILNAMES_PATH}/$1/Maildir/$2/cur $mtimeArg -type f -exec rm {} \;

su popuser
# Substitute your mail directory here:
learnAndFlush .Spam .Spam.Learn .Trash

4. Place this in your crontab so it runs every day (e.g. at 00:15):

15 0 * * * /var/scripts/dailyMailJobs >> /var/cronjobs/logs/dailyMailJobs.log

This script will teach Spam Assassin that the mails in the Spam/Learn folder are spam, and the mails elsewhere are non-spam. It will also perform some housekeeping, deleting the Spam/Learn mails that have been learnt, and deleting old mails from Trash (5 days or older) and Spam (3 days or older).

written by Chris Beach
01/02/07 8:12pm
(11 years, 3 months ago)
comment one comment

photoadd photo

more journal entries