Sun, 08 Mar 2009
Three New Debian Django Packages
Recently my employer, credativ UK1 have been kind enough to allow me to spend some time working on Debian packaging from some Django apps we've started using internally. Chris Lamb was kind enough to sponsor the upload of these packages.
Django developers, this means that if you are running a Debian GNU/Linux machine2, you can type:
apt-get install python-django-<app name>and you will have it installed for all users on the system. You won't need to mess around with any Python packaging systems, or modify your environment to be able to use them.
So, what are the packages and why are we using them?
django-tinymce
django-tinymce is a Django app providing integration with TinyMCE, a pure JavaScript rich text editor. It provides a widget that can be used within forms, and can also easily be used within views. It integrates with django-filebrowser, which I will mention below.
django-cms integrates with django-tinymce to provide a rich text editor for pages within it. As our website content will have to be maintained by people who may have little or no experience with HTML (or Markdown or anything else that isn't Word), this is obviously desirable.
django-filebrowser
django-filebrowser is a Django app that provides a file management interface within the Django admin interface. It should essentially replace an FTP client, allowing browsing and upload/deletion/editing/renaming of files on the server.
As mentioned above, django-tinymce integrates with django-filebrowser, to allow users to upload content they will be using with the edited text. This saves us from having to teach our potentially technically-illiterate users how to either access the web server remotely or how to use the version control system we're using for the website (bzr, incidentally).
django-contact-form
django-contact-form which provides generic, extensible contact-form functionality for Django. It streamlines the process of displaying a contact form and emailing the contents of it out once the 'Submit' button is clicked.
Our website include a contact form, and django-contact-form saves me from having to worry about a number of issues involved in the implementation, as well as reducing the amount of internally maintained code I'm writing.
1 That website will soon be replaced by a very similar one using Django as the backend. Hopefully I will blog about this once the rollout is complete.
2 Currently just the unstable distribution, but soon to be testing/squeeze. Backports will also be trivially easy.
Posted: Sun, 08 Mar 2009 23:52 | | Comments: 1
Mon, 24 Nov 2008
Backup Broadband
At work last week, we had some unexpected Internet downtime. As both our phone system and access to our customers' machines depends on an Internet connection, this is something we would like to avoid. As such, we're looking for a backup broadband provider, ideally from someone other than our current provider.
This list is currently:
- Virgin Media's Broadband (M) package,
- BT's Total Broadband Option 1 package,
- Be's Value package, and
- the UK Free Software Network's MAX Pay As You Go package.
Should we avoid any of these? Are there any others we should consider? What we're really looking for is low price and reliability. We're not going to be using this a great deal, so line speed and bandwidth caps are secondary concerns.
Posted: Mon, 24 Nov 2008 11:21 | | Comments: 0
Fri, 21 Nov 2008
Christian Focus Weekend Away
I'm going. It'll be great. Posts on Sunday.
Posted: Fri, 21 Nov 2008 16:47 | | Comments: 0
About Time
As I go to work, I walk past the newspapers in the station shop. For the last week, many of them have had 'BABY P' in large letters on the front.
The Times today had, as their main headline, "Four at-risk children die from abuse every week".
Finally, someone noted that there are children other than Baby P who have suffered, and who continue to suffer.
About fucking time.
As tragic as Baby P's death undeniably is, the continuing obsession over it is disgusting. It paints a picture of a country more interested in moral outrage than morality, more interested in calling for action than action itself, more interested in dwelling on the past than trying to improve the future, of a media keen to capitalise and encourage these qualities. I try to avoid being a part of this picture. Who wouldn't?
During the course of the coverage of the Baby P story, another 4 children in the UK will have died in similar circumstances. One hundred and eighty thousand children will have died across the whole world. One hundred and eighty thousand. I haven't seen them in the headlines recently. I couldn't even name a single one of them. Could you?
Turns out I'm part of the picture after all.
Posted: Fri, 21 Nov 2008 01:26 | | Comments: 1
Wed, 19 Nov 2008
Aubrey/Maturin
As a number of people correctly ascertained, my server naming scheme is based on ships commanded by Jack Aubrey in the Patrick O'Brian Aubrey/Maturin saga. I thought I'd take this opportunity to write a little bit about why I chose this naming scheme.
For those of you who don't know, Master and Commander is the first book in the series, which lent its name to Master and Commander: The Far Side of the World. That film is, in fact, based mostly on the events of the 10th book in the series, from which it takes the other half of its name, The Far Side of the World, while taking memorable events from all of the books.
So, I chose these books as my naming schemes because I absolutely adore them. As with anything one loves, it's quite hard to put my finger on exactly why. Nonetheless, I will attempt to do so.
Ever since year 7 (11 years old), I've been interested in the nautical and the naval. This stems from both C.S. Forester's Hornblower books and joining my local sailing club. It's not entirely clear to me which of these motivated the other or, indeed, if they motivated one another at all, but they are very much tied together in my memory. In amongst those two things are Arthur Ransome's Swallows and Amazons books. It is these things that really motivate everything else that makes me interested in the nautical, and so in the Aubrey-Maturin books.
Foremost amongst these motivated actions is the tall ships cruise I went on when I was 16 years old, between Corfu and Cyprus. A tall ship is a sailing ship, roughly in the style of those sailed by Hornblower and Aubrey. The vessel I was in, the Stavros S Niarchos, had two masts with square sails on each of those. Sadly, the cruise was somewhat marred by a lack of wind and by a few shipmates who, for reasons passing understanding, were expecting something more along the lines of a normal cruise ship. By and large though, and there is a nautical expression, I loved it. I haven't had the opportunity or, really, the finances to do it again, but given the chance I would certainly do so.
I had been involved in the sailing club throughout this time, and had also bought my own dinghy, along with a friend, a pea-green Mirror. This was eventually sold on, as I outgrew it, but nonetheless owning my own boat was a great pleasure.
I don't think it was until after 'Master and Commander: The Far Side of the World'; a film, incidentally and unsurprisingly, that I love; that I discovered the Aubrey/Maturin books.
Since then, I have tried a number of times to read through the 20 books that make up the full cycle, but it is only recently, having bought all of them, that I have come anywhere close. I'm currently reading The Yellow Admiral, the 18th book in the series.
Although this has been a highly personal account of why I hold these books so dear, I would definitely recommend that you check them out. The best place to start is at the beginning, with Master and Commander.
Posted: Wed, 19 Nov 2008 23:42 | | Comments: 1
Tue, 18 Nov 2008
EDM 2141 (My Followup)
So, as I have posted about previously, I have contacted both of my MPs about Early Day Motion 2141. They both responded, expressing their support for the motion. Which was nice.
However, I'm not satisfied with just their support for a fairly inconsequential EDM. So, I replied to both of them, thanking them, but also asking them to clarify both their position and the position of their party on free software. I wrote the following to Jim Cunningham, with roughly the same going to Stewart Jackson as well:
Another topic related to the publishing of bills in an accessible format, is the use of open formats within government, central and local. Hand in hand, I believe, with that comes the use of free software, sometimes known as open source software. I believe that our government cannot govern effectively if it has locked itself into proprietary formats and software, provided by companies that could, legally, hold all of the government's data hostage. Indeed, it seems downright irresponsible. As a long-time GNU/Linux user and free software developer, this is something that is very close to my heart.
It would be greatly appreciated if you could inform me of both your and your party's views on this matter. I would also be interested to hear what practical effect this has on the operations of the Labour party, and what practical effect it is having within Government.
I sent those replies yesterday evening, so I should hopefully have responses before the end of the week...
Posted: Tue, 18 Nov 2008 22:01 | | Comments: 0
Mon, 17 Nov 2008
Podcast Timings Metadata
As I mentioned yesterday, one of the podcasts that I listen to regularly is Filmspotting. Now, I've listened to Filmspotting for a long time and, as such, have come to trust their recommendations and reviews. Unfortunately, as they are based in the US, they often review films that I have no way of seeing for some time. Or, perhaps, it's a marathon film that I haven't managed to get a hold of. Either way, if I later catch up with the film, I like to go back and listen to the Filmspotting review again.
Now, this is somewhat irritating. I have to find the episode in which the film was reviewed (which normally involves Google), then download that episode, then scan through looking for the review, then skip on to something else when the review is finished. This is made somewhat easier by the Filmspotting guys, as they publish timings of each show in the show notes. However, it's still more effort than it should be.
On a number of occasions, when trying to conserve space on my MP3 player or something along those lines, I've downloaded the episode in question and then used mp3splt to get only the part of the show I'm interested in.
Having done this a couple of times, it occurred to me that this should be easily automatable, if not done by the podcast provider themself. If each episode in the podcast feed included its timing information as part of its metadata, then this would be much easier. This would presumably imply using Atom rather than RSS, but that's the way things should be moving anyway, as it's a superior format.
So, is this already done? If not, are there good reasons why not?
If it isn't, and there aren't, I think I should look into how I can take this further, because I don't really have enough things to do in my spare time as it is.
Posted: Mon, 17 Nov 2008 20:05 | | Comments: 2
Sun, 16 Nov 2008
Podcasts
Yesterday I posted about the word 'podcast', and today I am going to post about podcasts I listen to.
The podcast I have been listening to for the longest is Filmspotting, which contains, to quote their website, "Movie reviews, interviews and top 5 lists with Adam Kempenaar and Matty Robinson". The typical structure includes two reviews or interviews a week, a listener feedback section and a top 5 to end the show. The reviews are either of new releases, festival films that the hosts have seen, or one of the films in a 'marathon'. From time to time, the co-hosts engage in a 'Filmspotting marathon', in which they review around six films by the same director, or from the same genre, or fitting some sort of theme and then award the films with various awards. The films included in marathons are normally those that Adam and Matty feel that they should have seen but haven't. Recent marathons have included the 'Classic Heist' marathon and the '70s Sci-Fi' marathon.
Dan Carlin's Hardcore History is a podcast I've started listening to very recently. It gives a narrative view on events in history that are sometimes too remote for people to really identify with. Most recently has been a series of three episodes on the Punic wars, entitled "Punic Nightmares". I'm interested in history, though not really in an academic sense, so this podcast is ideal. I'm still on the look-out for other good history podcasts, so if you know of any then let me know.
podictionary is a podcast about words. Every week day, the host, Charles Hodgson, spends about four minutes talking about a word and its origins. As someone who likes words but doesn't really have the time to read a dictionary, this is great.
This Week In Django is, as the name suggests, a weekly podcast about Django. For those of you who don't know, Django is a web framework written in Python. If that hasn't cleared things up, you can read more here. I develop a few things in Django, but don't work with it full-time, so this helps me to keep abreast of what's happening in the Django world.
My name is Daniel Watkins, and I approve these podcasts.
Posted: Sun, 16 Nov 2008 13:37 | | Comments: 1
Sat, 15 Nov 2008
'podcasting' considered harmful?
The terms 'podcast' and 'podcasting', to mean 'an RSS feed with associated audio content' and the process of creating the aforementioned respectively, are massively prevalent in the zeitgeist at the moment. However, the terms do refer to Apple products in their names (if somewhat obliquely), that being where the idea really exploded into the public awareness.
The GNU Project publishes a list of words to avoid. I don't think that 'podcast' and 'podcasting' belong on that particular list, as they don't directly affect GNU software (that I am aware of). But should those terms be included there in spirit?
I'm not sure I really care, but it's something that popped into my head just now, people's responses to which I would be interested to hear.
So, what do you think?
Posted: Sat, 15 Nov 2008 17:27 | | Comments: 1
Fri, 14 Nov 2008
identi.ca: Tags
So, in my first post about identi.ca I mentioned, right at the end, tags. You may be familiar with tags from other Internet things, and tags on identi.ca are essentially the same: they are used for classifying your dents into categories.
What differentiates tags in identi.ca from tags on, say, your blog, is that they are included right there in the text of your dent, simply by prepending a '#' to a word. So, for example, I posted about Debian earlier, here. I included the text '#debian', which makes it automatically show up on the Debian tag page. You can use any word for a tag, and as soon as you do a tag page is created (or added to).
So what?
So, this means that you suddenly have a different aspect on dents. Now you don't just follow people, you can follow dents from anyone about things you're interested in. And there's no real definition to these things, it's very fluid. So, for example, you might be interested in Obama, a free voice-over-IP solution or even just food.
So now you don't just follow your friends, you can chat to people you don't know about stuff that interests you. That's pretty cool, and not something you can easily get with normal blogging.
Posted: Fri, 14 Nov 2008 19:33 | | Comments: 2
Thu, 13 Nov 2008
Identi.Ca
Identi.Ca bills itself as a micro-blogging service. What is micro-blogging? And what's a service?
Micro-blogging is exactly what you think it is. It's like blogging, right, but it's actually much smaller. To be precise, each post, or dent as they are known, is 140 characters long. That's a little less than an SMS message. You don't have much room in which to flex your literary muscle. That sounds like a bad thing, but it actually isn't.
What identi.ca does is it takes your 140 character message and it displays it for all to see. Anyone can read it, just like a blog. But, because it's micro, they can read it in about three seconds. And because it only takes them three seconds to read a dent, they can read a lot of them. So you have a lot of people able to read about a lot of other people. That's awesome!
In order to make reading things easier, you subscribe to other people's dents. So if someone was subscribed to me, they would see a list of all my dents interspersed with all of their other subscriptions, like this. Those are the recent combined dents of all of the people I subscribe to.
Anyhow, to come back to the nub of the thing, having limited-length messages has two big advantages.
Firstly, you can dent 'Going for lunch' and no-one minds. It can be kind of like Facebook statuses in that respect, except it's much easier to track a lot of statuses at once, it's much easier to set your status and you don't have to use Facebook to do any of it.
Secondly, and this is the bit I like the most, is that you can afford to talk about what you're doing all the time so you get talking to other people who are doing similar stuff, which is very, very cool. I'll probably give some examples of this in later posts.
The length also forces you to be concise, which is something all writers apparently strive for. Getting a dent exactly 140 characters long is actually worryingly satisfying.
Anyhow, that's a bit about what Identi.Ca is and why you might want to use it. This really only just scratches the surface. In upcoming blog posts I hope to talk about tags, cool ways you can send and receive dents and why Identi.Ca is better than Twitter. Reading back over this post, I guess what a 'service' is should also come up at some point.
Posted: Thu, 13 Nov 2008 23:32 | | Comments: 3
Wed, 12 Nov 2008
Phrase From Nearest Book
Repeating the meme from Elliot:
- Grab the nearest book.
- Open it to page 56.
- Find the fifth sentence.
- Post the text of the sentence in your journal along with these instructions.
- Don't dig for your favorite book, the cool book, or the intellectual one: pick the CLOSEST.
My result:
"Please give them this note." — The Commodore by Patrick O'Brien
Disappointing, there are much better sentences to be had in the Aubrey/Maturin books.
Posted: Wed, 12 Nov 2008 11:16 | | Comments: 2
Tue, 11 Nov 2008
What's In A Name?
An email over the weekend from Tim reminded me of a post on Planet Debian (I think), about computer naming schemes. Computer naming schemes are a strange window into the owner's mind and interests. I've seen schemes based on Old Testament prophets. The University of Warwick Computing Society uses well-known computer scientists for its on-campus servers and Postman Pat characters for its off-campus servers. I've seen Winnie The Pooh used, and Lord of the Rings.
Anyhow, I think I've come up with a unique scheme, so I thought I'd share it, and see if people can work out from whence its inspiration comes.
I decided on the new scheme fairly recently, when given the opportunity by my laptop's hard drive dying. So far my laptop, as the only computer I'm regularly using, is the only one that has been given a name, which is 'sophie'. The next one I (re)name will probably be my lamby-xen server, which will be called 'surprise'. When I repair and reinstall my desktop, that will be called 'lively', and when I finally get around to using one of the old, decrepid boxen I have sitting around in my bedroom it will be called 'polychrest'.
So, what's my naming scheme?
Posted: Tue, 11 Nov 2008 19:38 | | Comments: 3
Mon, 10 Nov 2008
wnpp-bg 1.1
So, over the weekend I noticed a couple of bugs in wnpp-bg which are worth cutting a new version for. The changelog entries in question are:
* Create an empty background when no WNPP bugs exist. * Fix border defaults.The former changes the behaviour from giving a message on the command-line to silently creating an empty background when there are no WNPP bugs open for the given email address, to make using it in a cron job easier. This does have the side-effect of meaning that if you specify an invalid email address, there's no easy way to detect this, so I plan on adding a '--strict' option at some point in the future.
The latter change means that you don't have to specify the borders even if you want them to all be 0. I accidentally set the default to (0,0) when it should have been (0,0,0,0), so the program would crash out.
The latest code is in the bzr branch, and this release is available as a tarball or as a Debian package.
Posted: Mon, 10 Nov 2008 22:09 | | Comments: 0
Sun, 09 Nov 2008
EDM 2141 (Part 2)
In a previous post I mentioned Early Day Motion 2141, the fact that I wrote to both of my Members of Parliament and the fact that Jim Cunningham MP, my Coventry MP, responded impressively quickly.
Well, I arrived for the family reunion this weekend and my parents had a letter from Stewart Jackson MP who had, as my Peterborough MP, sent his response to my Peterborough address. In this letter, he expresses his support for MySociety and EDM 2141. Needless to say, I'm pleased about this, and am glad that both of my representatives in the House of Commons share my views on what I consider to be an important motion. I'm also reasonably impressed by Stewart Jackson's response time which, while not quite as fast as Jim Cunningham's, was still only two days.
One thing that struck me about Stewart Jackson's letter was that it elaborated his position more than Jim Cunningham's letter did his, though this may be something to do with the response time. Admittedly, Stewart Jackson wrote only a paragraph of what might be stock text, but it was interesting nonetheless.
Another thing that struck me was that Stewart Jackson's letter, in contrast to Jim Cunningham's, mentioned the position of other members of his party (namely David Cameron and Theresa May) whom, needless to say, also support it. I suspect this is something to do with relative positions within their respective parties, though I don't really know enough to be sure. I don't recall whether or not I saw Theresa May and David Cameron's signatures on the EDM, so I'll have to check and possibly follow up with Stewart Jackson.
Another small thing of note is that while Theresa May and Harriet Harman both had 'MP' appended to their name, David Cameron did not. I wonder if this was just a minor oversight or a party marketing line.
Anyhow, I think the next thing I'm going to do is write a letter to both of my representatives asking what their position on free software and open standards is in general, to see whether I can work with either of them to encourage government to use more of it.
Posted: Sun, 09 Nov 2008 20:25 | | Comments: 1
My Job (or, What I'm Doing With My Life)
I recently realised that, whilst people who I see on a regular basis are aware of what I'm doing at the moment, most people don't really have a clue about what I'm up to. As the latter group of people is fairly large, I thought I'd post to make people aware.
So, I'm currently doing an Intercalated Year as part of my Computer Science degree at the University of Warwick. This means that I'm spending a year working in industry (rather than on my degree), and means that I will get a "Computer Science (with Intercalated Year)" degree rather than a "Computer Science" degree, assuming I graduate. That really is the only difference it makes to me, academically.
I've been working since the end of August at an open source consultancy called credativ. credativ is a German company, with about forty staff in their office in Germany, but I work in the UK branch in Rugby, where there are three full-time staff. The company does a combination of systems administration, project work and bespoke coding.
For those of you not on Planet WUGLUG, Planet UWCS or Planet Bazaar (I'm looking at you, Facebook readers), an 'open source consultancy' is an IT consultancy that works primarily with open source software, sometimes known as 'free software'. This is software that is both free as in beer and free as in freedom, essentially meaning that anyone can take it and modify or use it as they wish. The fact that such a company exists is evidence that free software does not mean doom and gloom for software developers (though I won't vouch for those who have been unwise enough to tie them to proprietary systems).
As a consultancy, we, and therefore 'I', do a wide variety of things. So far, I've been involved in writing a presentation player using the OpenOffice API, creating Fedora 8 packages for OpenOffice, setting up monitoring using Nagios and munin, doing some Debian packaging and other general maintenance work.
So, that's what I'm doing with my life at the moment.
Posted: Sun, 09 Nov 2008 20:19 | | Comments: 1
Fri, 07 Nov 2008
Why I Won't Shut Up (For Now)
As the more observant amongst you will have noticed, I've been blogging considerably more often than normal recently. I started off just posting a couple of articles two days in a row, because I had something to write about, but then noticed the postscript to this post on Planet Debian, which lead to me finding the National Blog Posting Month or NaBloPoMo as it is rather niftily known.
So, I've decided to try and write a blog post a day for this month. This is going to be a little tricky over the coming weekend, as I'll be completely away from the internet (*gasp*) and my blogging software doesn't have timed entries. So, assuming that I both write them before the weekend, which seems unlikely, and that I win the 'at' game (which, in fact, I am testing with this post), I'll be posting over the weekend. Failing that, I'll post the two articles when I get back on Sunday, or maybe Monday morning.
NaBloPoMo, I believe, takes its inspiration from the National Novel Writing Month (or NaNoWriMo). Ever since I heard about it, I've been interested in taking part in NaNoWriMo, but I'm not convinced that I have either the interest or the capacity to write fiction on the same topic for an entire month. I'm hoping that this month will either quell my interest in NaNoWriMo, or give me the confidence to give it a try some time.
Anyway, for those of you who've been thinking it, that's why I won't shut up.
Posted: Fri, 07 Nov 2008 12:50 | | Comments: 0
Thu, 06 Nov 2008
wnpp-bg
I'm pleased to announce version 1 of wnpp-bg, a Python script for generating background images listing your currently open wnpp bugs. It is available either from bzr, as a tarball or as a Debian package.
wnpp-bg works by scraping a user's page on qa.debian.org (presumably your own), and finding the bugs listed under 'Owned WNPP bugs'. It pulls out the package names and creates an image from that list. You can pass in the geometry of your screen, as well as how large the blank borders around the image should be (to take account of, for example, gnome-panel).
wnpp-bg was inspired by Tim Retout, with whom I work, who manually generated such an image and had it set as his background. Naturally, I had to do one better, and this is the result. Hopefully people will find it useful. I suggest shoving it in a cron job, though probably not a fortnightly one.
Bug reports or feature requests should be sent to daniel@daniel-watkins.co.uk.
Posted: Thu, 06 Nov 2008 19:50 | | Comments: 0
Wed, 05 Nov 2008
Early Day Motion 2141
Yesterday afternoon, I received an email from Free Our Bills, a campaign run by MySociety to encourage Parliament to publish our laws in a format more amenable to real people looking at, and using, them. This email concerned Early Day Motion 2141. The EDM is very short and readable, so I suggest you look at it yourself. In fact, to make that easier, here it is:
That this House believes it has a duty to publish Bills in such a fashion that they can be accessed as easily and as early as possible by the public; notes that the non-partisan Free Our Bills campaign is urging the House to publish bill texts in a new electronic format to improve accessibility and public scrutiny of legislation; further notes that the changes requested would have no impact on the content of Bills, nor upon the process by which they are currently made; considers that the new format could be delivered cheaply and quickly; acknowledges that the Leader of the House's office did not accept a prior request for new formatting from mySociety, nor provide an explanation of why the changes could be made; and calls on the Leader of House to ask House of Commons Clerks to work with Free Our Bills campaign staff to commence publication of Bills in the new format.
Anyhow, the point of this email was to ask me to write to my representative and ask them to consider signing the Early Day Motion. As a student, I have the privilege of two MPs: Jim Cunningham for Coventry South, and Stewart Jackson in Peterborough. I sent them both a letter, via WriteToThem expressing my opinion on the matter, urging them to sign the EDM.
This morning, I woke up to find a letter from Jim Cunningham, MP waiting for me. He informed me that he agreed with my position, and has put his name on the EDM (as you can see if you look at the list of signatures). Needless to say, I was rather impressed with this one-day turnaround, and am feeling that I have done my part to keep this country from sinking. All I can say is:
Democracy. It works, bitches.
Posted: Wed, 05 Nov 2008 21:47 | | Comments: 1
Tue, 04 Nov 2008
Running cron fortnightly: round-up
It's a few days on from my original post, so I thought I'd give a summary of people's ideas. Just to remind you of the aim of the exercise, it's to get a cron job to run every fortnight, without using the 'date' command.
So, here are the ideas we've had:
- Run on the 1st and 15th of every month: This isn't really a solution to the problem, as it's not truly fortnightly.
- Writing a cronjob that rewrites the crontab each week: This is an interesting one, and didn't occur to me at all. It's also insane and, as John said when he suggested it, probably complex enough that you'd have to do it in each individual script for which you wanted this.
- Touching a file to determine which week we're in: This would work, but has the disadvantage of having to put a file somewhere, when there's not really a well defined place to do it.
Well, in light of the above ideas, my solution might be slightly cheaty.
It depends on a Debian (or, presumably, Ubuntu system), as it takes
advantage of /etc/cron.weekly. Essentially you write a script that live
in /etc/cron.weekly and symlinks other scripts in and out of /etc/cron.weekly.
These scripts could be stored in, for example, /etc/cron.fortnightly. It would
scan through there and symlink in any that weren't in /etc/cron.weekly and
remove existing symlinks to /etc/cron.fortnightly scripts.
This has the advantages of:
- Being fortnightly,
- Not being epic hax,
- Having a well-defined place for all of the files involved to live, and
- Not requiring special setup for each cronjob or script.
Of course, we should all just use 'date'...
EDIT: benji has noted that /etc/cron.weekly is by no means a Debian-specific feature. SUSE has it. Warn your distributor now.
Posted: Tue, 04 Nov 2008 21:56 | | Comments: 4
Mon, 03 Nov 2008
Interesting Involvement In Installing Intrepid Ibex
So I went to visit a school friend over the weekend, in the other Newcastle. An enjoyable but not especially blog-worthy weekend was had by all. So, I hear you ask, why the blog post?
I've been engaged in a campaign over the last few years to convert my friends and, hopefully at some point, my family to using GNU/Linux, free software and open standards. With my school friends I have been pleasingly successful, with two of them now using Ubuntu. Over the weekend, that became three. In itself, that's not an especially interesting occurence. So, I hear you ask, why the blog post?
Well, this blog post isn't so much about having installed Ubuntu, but how disappointingly painful the process was. Once we had burnt a CD that was working (damn you, Woolworths!), we shoved it in the CD drive and the boot menu came up. Now, Nick (the latest convert to the cause) didn't want to try Ubuntu before installing, he just wanted to install it. So, naturally, we chose the 'Install' option from the boot menu.
This was our first mistake.
When we had finally gone through the installation process (which was, in itself, very slick), we rebooted into the Ubuntu installation, as is traditional. Unfortunately, X wouldn't accept input of any sorts. The consoles would, but nothing we could do would fix X. So, we turned to Google. This turned up a similar problem that some people had experienced when upgrading to Intrepid, the solution for which was to purge GDM and reinstall it. So, we did so.
This was our second mistake.
None of the network interfaces were configured, and apt didn't want to use the CD as a source of packages. There was no easy way to install any packages, even those that shipped with Ubuntu. So, at this point Nick was getting impatient, so we booted into the LiveCD so he could piss around on Facebook or something. Once he had finished wasting his life away on Facebook, we decided to try reinstalling. The most convenient way to do this was the Install icon on the desktop, so we used that.
It. Worked. Perfectly.
Nick is now happily using his mostly-free laptop, so we all live happily ever after. My only thoughts are that the LiveCD installer copies the X and network configurations from the LiveCD, whereas the boot menu option can't. But that shouldn't break it as much as it did.
Oh, and, lamby, before you ask: my bug report.
Posted: Mon, 03 Nov 2008 19:06 | | Comments: 0
Fri, 31 Oct 2008
Running cron fortnightly
In the office, we've just been having a discussion about how to run a cron job fortnightly. This is relatively easy to do with an entry like:
03 04 * * 4 expr `date +"%s"` / 604800 % 2 >/dev/null || run_my_script(there are 604800 seconds in a week)
However, I was wondering how to do it without using date, because that's clearly cheating. I have an idea, but want to hear what other people come up with. Go!
NOTE: It must be actually fortnightly, the 1st and the 15th of the month won't do.
Posted: Fri, 31 Oct 2008 16:04 | | Comments: 5
Thu, 25 Sep 2008
Why Python Is More Productive Than C, C++ or Java
Wed, 24 Sep 2008
'Open' Considered Harmful
In the past couple of days, there have been two posts on the programming reddit that have caught my attention:
- OpenGL finally "Open", about OpenGL being licensed as free software, and
- Open Sound System is now open sourced!, about OSS being licensed as free software.
Here we have two codebases that seem obviously free. They are seemingly accepted within the free software ecosystem yet until recently have not been free software. Never having used these from a coder's perspective, I've never had any reason to investigate their licensing thoroughly. However, I've certainly used them as part of my desktop, and still had no idea.
This suggests to me that using the term 'open' to refer to software that is free as in speech is harmful. You will do only one of two things:
- suggest to people who are already sceptical of the term 'open' that your software is not necessarily free, requiring them to investigate more closely, or
- suggest to people who don't know any better that, when used to describe software, 'open' is a synonym for 'free as in speech', which the examples above show to be untrue.
There is no good reason for someone developing free software to want either of these things to happen. The only incentive I can see here is for someone who wants their code to be accepted within the free software community without the supposed disadvantage of licensing their code under a free license.
If you're not convinced, consider Microsoft's latest file format offering, Office Open XML. If that doesn't convince you, you're not even trying.
EDIT: It has been noted in Reddit comments and in #wuglug that these complaints apply to 'free' as well. I should note that:
- I never intended claimed that using the word 'free' in a title was better. I've edited the second bullet to reflect my intended meaning better.
- The use of the term 'free' in a title would, in addition to any implications about 'free as in speech'-ness, also imply 'free as in beer' but this is normally true of 'free' software anyway (whereas 'open' has only one implication, which often should not be implied).
Posted: Wed, 24 Sep 2008 20:05 | | Comments: 0
Tue, 23 Sep 2008
htop
Posted: Tue, 23 Sep 2008 08:42 | | Comments: 0
Sat, 20 Sep 2008
The Updated State of PQM
Patches that have been merged
Patches up for review
These patches are currently in BundleBuggy, waiting for review or merging:- Already approved: Reporting details of successful merges
- Trivial patches: Fixing test stipple, making tests pass, web UI fixes for legacy commands, fix email failures due to a lack of merge base
- Merge directive support: This is largely a reworking of Aaron's previous work on this. It's functional, and reasonably well-tested, but I'm not entirely convinced that it fits the abstraction correctly. I'm not sure that this is the case, but it certainly needs thought.
- Reporting details of successful merges: This is just a cleanup of Tom Haddon's patch on Bug #55717, and is reasonably trivial.
- Reporting of errors caused by unknown branch formats: This is, again, a pretty trivial patch. It fixes Bug #246660, which a couple of people have hit recently.
- Switching the web UI to SimpleTAL: This makes the Web UI code much nicer and easier to modify. It also lays the foundations for further work on the web UI, including RSS feeds. It has received several rounds of review, so should be pretty much there.
- Removed Arch-specific commands: As Robert and I discussed in London, some existing commands shouldn't be needed by any Arch implementation (and certainly aren't required by bzr). This patch removes those commands.
- 'nodebug' command: Adds a nodebug command, so that only specific parts of a given script have to have debug enabled.
- TestCaseWithQueue: Converts the tests to use a TestCaseWithQueue, which abstracts away queue creation. This will allow for testing of several different scenarios, which is especially helpful in testing the UI.
Patches in the wings
These patches are waiting on patches in the above list to be merged:- UI Unicode fixes: Depends on the SimpleTAL changes. Fixes encoding issues with displaying Unicode names in the web UI, fixing Bug #125888.
- New UI tests: New UI tests using the TestCaseWithQueue changes. This improves the test coverage of the UI by a considerable amount.
- RSS feeds: This adds RSS feeds for each PQM project, containing the same information as is given in the Web UI, fixing Bug #133229.
- PatchCommand: This moves the logic for accepting patches from CommandRunner to a separate PatchCommand. This is the first step towards removing CommandRunner entirely.
- XMLRPC: This is a loom containing two threads of work:
- 'xmlrpc': The basic XMLRPC functionality. This includes some email-message-related abstractions, so that both the email and XMLRPC interfaces could use the same functions. This fixes Bug #246845.
- 'xmlrpc-validation': Validation of incoming XMLRPC requests. This takes each command in the incoming script and checks that branches it references are valid and that the submitter has commit access to them. It goes some of the way towards fixing Bug #110433.
Patches in progress
These patches are currently in development:- TagCommand: This branch adds a TagCommand, intended to replace the functionality in CommandRunner. The CommandRunner code is not removed, and there are some issues with 'tag' meaning different things in Arch and bzr.
Posted: Sat, 20 Sep 2008 12:34 | | Comments: 0
Fri, 01 Aug 2008
The State of PQM
Patches up for review
These patches are currently in BundleBuggy, waiting for review or merging:- Already approved: Reporting details of successful merges, fixing backtrace when checking signed emails
- Trivial patches: Fixing test stipple, making tests pass, web UI fixes for legacy commands, fix email failures due to a lack of merge base
- Merge directive support: This is largely a reworking of Aaron's previous work on this. It's functional, and reasonably well-tested, but I'm not entirely convinced that it fits the abstraction correctly. I'm not sure that this is the case, but it certainly needs thought.
- Reporting details of successful merges: This is just a cleanup of Tom Haddon's patch on Bug #55717, and is reasonably trivial.
- Reporting of errors caused by unknown branch formats: This is, again, a pretty trivial patch. It fixes Bug #246660, which a couple of people have hit recently.
- Switching the web UI to SimpleTAL: This makes the Web UI code much nicer and easier to modify. It also lays the foundations for further work on the web UI, including RSS feeds. It has received several rounds of review, so should be pretty much there.
- Removed Arch-specific commands: As Robert and I discussed in London, some existing commands shouldn't be needed by any Arch implementation (and certainly aren't required by bzr). This patch removes those commands.
- 'nodebug' command: Adds a nodebug command, so that only specific parts of a given script have to have debug enabled.
- TestCaseWithQueue: Converts the tests to use a TestCaseWithQueue, which abstracts away queue creation. This will allow for testing of several different scenarios, which is especially helpful in testing the UI.
Patches in the wings
These patches are waiting on patches in the above list to be merged:- UI Unicode fixes: Depends on the SimpleTAL changes. Fixes encoding issues with displaying Unicode names in the web UI, fixing Bug #125888.
- New UI tests: New UI tests using the TestCaseWithQueue changes. This improves the test coverage of the UI by a considerable amount.
- RSS feeds: This adds RSS feeds for each PQM project, containing the same information as is given in the Web UI, fixing Bug #133229.
- PatchCommand: This moves the logic for accepting patches from CommandRunner to a separate PatchCommand. This is the first step towards removing CommandRunner entirely.
Patches in progress
These patches are currently in development:- XMLRPC: This is a loom containing two threads of work:
- 'xmlrpc': The basic XMLRPC functionality. This includes some email-message-related abstractions, so that both the email and XMLRPC interfaces could use the same functions. This fixes Bug #246845.
- 'xmlrpc-validation': Validation of incoming XMLRPC requests. This takes each command in the incoming script and checks that branches it references are valid and that the submitter has commit access to them. It goes some of the way towards fixing Bug #110433.
- TagCommand: This branch adds a TagCommand, intended to replace the functionality in CommandRunner. The CommandRunner code is not removed, and there are some issues with 'tag' meaning different things in Arch and bzr.
Posted: Fri, 01 Aug 2008 05:54 | | Comments: 0
Sun, 27 Jul 2008
Hello, Planet Bazaar!
As far as Bazaar work goes, my contributions to bzr.dev have been mostly UI- or test-related, often just fixing bugs that have been reported on Launchpad. This summer, I'm working for Canonical on Patch Queue Manager (universally known as PQM), to improve the quality of the code, to make it more usable and to make it easier to set up. I'm planning some blog posts on PQM in the near future, so hopefully I will be able to give people who don't know a better idea of what PQM does and why it can be valuable.
Posted: Sun, 27 Jul 2008 01:48 | | Comments: 2
