Trains Suck

I predict that the JCN talk on Monday will be excellent. So excellent in fact, I’d make the trip up to Cambridge to hear it and to catch up on what the SRCF has been doing since the end, just under a year ago, of my three-year involvement with the society.

Sadly, British Rail 1 have other ideas. 🙁 With two sets of tracks leading from London to Cambridge, you would think someone would have to be pretty careless for them both to be out of operation on the same bank holiday, but no, the incompetence of British Rail knows no bounds and a bus is the only option. If I hadn’t been to Cambridge for some time I might attempt it, but as I went last weekend, and rail-replacement bus services meant I spent 6 hours travelling for only 5 hours of leisure time in Cambridge, I think I might be forced to miss the talk. 🙁

<rant>Will all those people who whine that cars ought to be banned/taxed out of existence, please shut up and make trains a viable alternative? ‘kthxbye</rant>

Talk Details

— A day in the life of an SRCF sysadmin —

Fear and loathing in the CUSU server room.

The SRCF is a University society that is run by students and for students.

Ross Church, one of the system administrators, will talk about some of the
challenges involved in running a computer with over 2000 users and relate
some of the more entertaining incidents from the last few years, …

Monday 1st May, 7.30pm, Coleridge Room (above the bar). All welcome!

  1. Or, perhaps the organisation formerly-known-as-British-Rail[]

Automatic apt-ing in Debian

Recently I wanted to schedule some routine apt operations on our server. I discovered there is already an “apt” entry in /etc/cron.daily, but sadly it seemed that the documentation on how to configure it was less clear than it should have been. Hopefully this will aide another Debian user in the future!

In /etc/apt/apt.conf
# Perform a daily apt-get update
APT::Periodic::Update-Package-Lists 1;
# Download any upgradeable packages
APT::Periodic::Download-Upgradeable-Packages 1;
# Run apt-get autoclean every 7 days
APT::Periodic::AutocleanInterval 7;

Python v Ruby

Although I have not read this comparison paper[pdf] in detail, I found looking at their example code side-by-side to be most illuminating. Ruby’s pureness (mainly in object-orientation) may give it a theoretically superior (“cleaner”) syntax, but from a practitioner’s point of view, the Python’s syntax appears to be refreshingly uncluntered and easy to use. Whether you come from an imperative or functional background, Python appears familiar—and with computing, conquering the fear of the unknown is half the battle!

An example:

Ruby Python

p = proc do |x|
       print "Hello ",x ,"\n" 
    end "Fred!"

p = lambda x:
         print "Hello ", x

Ruby’s pure object syntax leads to the ugly ... while Python’s p("...") looks pleasing to the imperative and functional camps. Object-orientation is a great paradigm, but as anyone who has tried to “knock-up” a quick program in Java will know, trying to shoe horn objects into a small program is a waste of effort.

The paper concludes:

Overall there is not much different between Ruby and Python, though Ruby offers some cleaner syntax due to its object oriented model. […] The disadvantage of Ruby is the fact that it is very poorly documented. Our advice is that you choose Ruby, if you are new to both the languages, otherwise weigh the option of continuing with language you are using.

So, in other words, Ruby has little to offer over Python except its theoretically purer syntax, and at the same time it is poorly documented which is likely to mean that the learning curve is a steep and painful climb. My advice: choose Python [1].

[1] This discussion has been entirely free of Rails. I haven’t used it and the paper I am responding to here doesn’t mention it—but I hear it’s a strong contender in the web app arena.