Ubuntu, Erlang and Launchpad

Ubuntu Hardy has an old version of Erlang. Ordinarily this wouldn't be a problem, but it turns out that R12B (the current release) added a few libraries that I use in my Project Euler solutions. Upgrading to Intrepid isn't really something I want to do at the moment (for reasons that I'll happily discuss over a beer) and language interpreters don't get backported.

This left me with two options: Rewrite my code to not use the new regular expression library and the not-quite-an-array data structure that Hardy's version of Ubuntu lacks or build and install a modern Erlang from source. Fortunately, a little investigation turned up a third: Launchpad's Personal Package Archives.

I was surprised at easy it is to rebuild a deb source package and get it into Launchpad's build system. Since I didn't have to make any changes, it was merely a matter of downloading the source files from Intrepid's Launchpad page, adding a changelog entry to get my own version number and email address (for pgp signing) in there and running a couple of commands to build and upload the new source package.

There are a couple of caveats to adding packages to a PPA, though. It's generally a good idea to at least build and test the binaries locally before uploading. Not only is this polite (in that you're less likely to tie up shared build resources with broken code), it also saves time waiting around for builds to be scheduled only to discover that they're broken. In addition, there's a bit of a lag between Launchpad claiming that a build is complete and the binaries actually being available. In particular, it took quite a while for launchpad to make my i386 packages (which includes all the architecture-independent stuff) available despite announcing a successful build in the web interface.

All in all, I'm very impressed with PPAs. In half an afternoon, I have managed to add custom (sort of) versions of several packages to my PPA and install them on my local machine. Not only that, but they're available for anyone who wants to use them with no extra effort on my part.

A month later

The last month has been interesting, mostly in a good way.

The ups and downs have been mostly ups and the downs haven't been nearly as bad as I had feared. Life's better than it has been for a while. I've kicked a few bad habits and picked up a few good ones. I've lost weight. I've become a morning person, which intrigues me. I still don't enjoy domestic tasks, but now I do them instead of worrying about not doing them. I'm also consuming a lot less caffeine, despite not having had any desire to cut down.

I shall now return you to your regularly scheduled internet.

GeekDinner: Karmic Kava

Last night I attended the most recent Cape Town GeekDinner, Karmic Kava. The venue was Adesso, who really went all out to make it a fantastic evening. The food was great, even though none of the choices on the menu were really to my taste.

I was the slideshow karaoke victim presenter this time around, and Vhata provided me with a presentation he stole from found on the internet. While it wasn't ideal karaoke material in that there was way too much verbiage, I knew the subject matter well enough to pick up a couple of keywords and wing it. The subject in question was Reiki, and my treatment of it would certainly have offended any true believers in the audience, but I'd had just enough sponsored wine by that point that I really didn't care. Most people seemed to enjoy it, though. I even mentioned Laser Reiki amongst the more grandiose claims.

After that, I spent the rest of the evening circulating and ended up in a corner discussing programming languages, editors and distributed systems with a guy whose name I either didn't catch or don't remember. Before I knew it, it was after midnight and time to head home and get some sleep. All in all, my best GeekDinner experience yet.

Broken brains and me

Some of you good people may have noticed that I haven't been quite myself these last two weeks. This post serves as an explanation.

WARNING: Some of what follows is pretty personal. If I wasn't OK with it being public it wouldn't be here, but if you're uncomfortable with that kind of thing (or perhaps just don't know me well enough to care) you may want to skip this post.

At the end of October, certain things about me were brought to my attention in a way I could not ignore. These were things that I kind-of knew all along, but not really. The biggest was that I'm not really very good at getting things done or following through on my grand ideas. I also have an abysmal short-term memory.

This impetus finally got me to do something I should have done years ago: see a psychiatrist and figure out if there's a medical problem that can be dealt with or if I'm just lazy and inattentive. I think, given the title of the post, that you can figure out which it was.

I have been diagnosed with Attention Deficit Disorder, which is both medically and psychologically treatable. There is, however, a lot of controversy and misinformation about ADD. I won't attempt to clear all of that up here (there are better resources for that than this blog), but I will describe my particular flavour and how it differs from the popular image.

Hyperactivity is very common, especially in children with ADD. So much so, in fact, that the symptom is right there in the new name, ADHD. Since my version lacks this entirely, I'm sticking to the term ADD.

So, on to what I do have. I am very distractible. In fact, while writing this post, I have spent at least half the amount of time since I started wikidiving (while getting the link above), replacing my mouse pad (because the mouse was a little bit jerky), repeatedly checking my IRC client (no activity) and choosing music (settling on Bach). This is what causes me the most trouble.

Combined with this, I have a frustratingly poor short-term memory. I can literally forget, while spending two seconds switching to another workspace to see if I have email, what I was working on. Combine this with the above, and you start to get a picture of my life.

The flip side is that ADD comes with the ability to "hyperfocus" on occasion. I sometimes (rarely) get stuck into something so completely that an entire day can go by without me noticing. The last time I did this, I was updating the code for my website. (It has yet to be deployed and it doesn't change much on the outside. It's much cleaner and more functional behind the scenes, though.) It's what lets me pick up a new programming language in a day or two, when it happens. Sadly, it doesn't happen as often as I'd like.

Over time, I have developed some tools to deal with a lot of this. I incessantly check that my pockets have the right things in them, which stops me forgetting my wallet, phone or keys. I set alarms and reminders on my phone and tend to leave for things early so that I'm not late.

I mentioned before that ADD is treatable. I'm just starting the process of figuring out the right medication, but I'm already seeing results. I'm currently on Concerta, which is basically 12-hour slow release Ritalin. It makes a huge difference, in that I'm able to concentrate on something for more than a minute or two at a time.

Methylphenidate hydrochloride, which is the active ingredient, has two major side effects that are hitting me. I knew both of these (and some of the other that I'm not seeing) going in.

The first isn't so much a side effect as a primary effect. Since the drug is a central nervous system stimulant, it affects sleep. I've had a little more than my usual trouble falling asleep since I started, but I've also been awake and alert before 06h00 every morning. While three data points isn't really conclusive, it's enough of a difference from my usual routine that I think it's significant. It's nice to be up and functional early, but it means I'm sleeping less. It hasn't been long enough to tell if this is a problem, but I'm cautious.

The other is appetite suppression. While this strikes me as something of a bonus, since I really could stand to lose a few kilos, it does mean I have to be better about eating a proper breakfast than I usually am. A morning meal is even more important when you're not going to be hungry for most of the rest of the day.

Aside from the drugs, there are a bunch of psychological treatments. These basically consists of structure and external tools to help keep track of things that most most people do automatically. Calendars and reminders are a big one, and Google is very helpful in this regard.

Probably the most successful tool I'm using at the moment is the humble daily todo list. Having tried various computer-based things in the past, I've settled (for work stuff, anyway) on a notepad and a pen. Part of the reason is that it sits on my desk between my keyboard and my tea, so is always visible. The other part is that the physical act of drawing a line through a task I have completed produces a surprisingly strong endorphin release.

An important thing to realise (and I like to think I'm less guilty of this than many) is that a reason is not the same as an excuse. I now know why I'm so horrible at getting things done, but it doesn't absolve me of the responsibility to actually get things done. It does, however, give me the understanding necessary to build the support structures that will help me deal with it more effectively.

That's about all I have brainspace for at the moment, and this post is certainly long enough already. It hasn't been an easy couple of weeks, but it has been necessary and long overdue. The future is looking better than it has in quite some time, but the short term adjustment period is likely to be fairly rocky.

I shall leave you with an amusing analogy I keep attributing to the wrong person (it was about him, not by him): The ADD Stove.

NaNoWriMo and me

I have long watched that National Novel Writing Month (affectionately dubbed NaNoWriMo) with interest. Every year I have a mild urge to participate, mostly out of the knowledge that I don't write nearly enough. This year I shall be participating, although not in the traditional way.

I don't have a novel in me at the moment. I also don't think I have the time to write an average of two thousand words a day. I do have several short stories trying to escape my head and I think five thousand words a week is doable. Thus, NaSTWriMo is born. I shall write one story per week in November and actually let people read them (which is a slightly terrifying thought). I won't make them publicly available (because that may be an issue if I ever decide to try to publish one of them) but if you're interested in proofing, editing or criticising, drop me an email (or comment on this entry) and I'll make sure you get whatever I have written at some yet-to-be-determined time.

A reply from Audible about DRM

As mentioned in my post entitled A note to Audible about DRM, I wrote to Audible about the DRM in their audiobooks. I have since received a reply:
Dear Jeremy,

Thank you for contacting Audible.com. On its behalf, I would like to apologize
for any inconvenience and I am most committed to satisfying and resolving your
inquiry to the fullest of my abilities.

As per your email, I can understand how the DRM can cause such an inconvenience
to customers, and that others have found a way to work around the DRM which
seems to be listed online. However to further elaborate on the DRM, it is
important on our end to support it because majority of publishers would prefer
their content to be protected. You see without the DRM we would not be able to
distribute the majority of our 50,000 titles.

Now as for Amazon, I personally have not heard anything about us dropping the
DRM, due to a high volume of complaints. So I do apologize, but since I haven't
heard of anything, I would not honestly be able to comment on this rumor. Again
thank you for contacting us here at Audible and have a great day!!

Here at Audible, we truly value and appreciate your business; if you need
further assistance, please respond to this email or if you wish, please provide
me with a contact number and the best available time to reach you.

For additional questions, how to contact us and hours of operation, please
visit us at: www.audible.com/contactus

Reggie M.
Audible Customer Support

It seems that, as expected, nothing is going to be done about the situation. This is sad, since I would probably spend quite a lot of money there if I were allowed to.

Ah well, there are still wonderful places like Escape Pod, Pseudopod, Podcastle, Variant Frequencies and Podiobooks where I can get high quality audio stories.

The political compass

Recently, there has been a spate of people taking the Political Compass test. Much of this has been spawned by the Political Compass graph generated by Michael Gorven.

More recently, Jonathan mentioned that while the scores are interesting (note particularly the leftist libertarian clustering of most of CLUG) it would be far more interesting to have people display their answers along with their reasoning. Since I had a bit of time on my hands (in short bursts) I have done this.

Collapse )
And now the result:
Economic Left/Right: 0.12
Social Libertarian/Authoritarian: -3.38

Over the last year and a half or so, I have wandered around the graph about a third of the way down the Libertarian axis and partly into the Right. This is the most Liberal I have ever been, though. I blame those hippies I associate with every Tuesday night and often in between. Seriously, I suspect a lot of it depends on my mood at the time and I'm vacillating between normal and strong responses on a couple of issues, mostly around regulation.

Feel free to comment on my answers. I'd also like to see other people do the same thing, so drop me a note if you do.

A note to Audible about DRM

A while ago, I signed up for a subscription with Audible, the internet's leading retailer of audio fiction. Due to DRM issues and my inability to actually listen to their books except under very limited circumstances, I canceled my subscription shortly thereafter. Since then, they have periodically sent me emails with special offers in them to tempt me back. Here is my response to the most recent:
Good day,

I keep receiving special offers from Audible which appear to be designed to
regain me as a customer. I signed up several months ago in response to an
advert in some podcasts I listen to[1] and was very pleased with the audio
quality and production values of the books I purchased.

However, the DRM restrictions placed on the books required me to change
operating systems and listen to the books on my computer rather than my mobile
mp3 player. Since I primarily listen to audiobooks in the car and at gym, this
is a deal-breaker for me and the reason I canceled my subscription.

The fact that DRM doesn't really work is common knowledge. A brief Google
search yields a number of ways to strip Audible DRM protections from
audiobooks, but all of them require more time and effort than I am willing to
expend. This means that the DRM isn't stopping the pirates (since they are
prepared to put in the effort) but it is stopping legitimate customers, such as

I believe an Amazon spokesperson has said that if enough people complain,
Audible will consider removing the DRM on their audiobooks.[2] I would very
much like this to be the case. In their current form, Audible books just aren't
very useful to me.

I intend to post the contents of this email on my blog[3], and would like to
post any response I receive as well, although I will obviously respect your
wishes should you ask me not to.

Thank you,
Jeremy Thurgood

[1] Escape Pod (http://escapepod.org), Pesudopod (http://pseudopod.org)
    and Podcastle (http://podcastle.org)

[2] Via Cory Doctorow on BoingBoing:

[3] http://jerith.livejournal.com/

I don't really expect a useful response, but hopefully something will be done. As mentioned in the letter, I shall post any response I receive unless they ask me not to.

Update: I have received a reply from Audible

A very disturbing newspaper article

... but not necessarily for the reason you think.

Go read this article on IOL entitled "Big Bang experiment marred by suicide" and consider what the most obvious worrying thing in it is.

Done? Good. To me, the following quote did it: "Large Hadron Collider (LHV)" (emphasis mine). Sure, the factual errors and minor dissemination of FUD in the article are a problem. The media fixation on a non-existent doomsday threat is a problem, but the girl mentioned almost certainly had far bigger problems that could have been triggered by anything.

The fact that a major news agency cannot be bothered to properly proofread an article that they're placing before millions of eyes makes me question their competence in everything else they do. I wouldn't care so much if this were a once-off, but it seems to be happening a lot recently.

Update: Looks like they fixed it. See my comment below.

Better late than never

It has come to my attention that it has been far too long since I last wrote in here. Sorry guys, been far too busy living life to write about it.

I hate those all-in-one-post blog entries that just contain point-form activities, so I'll do mine in paragraphs in random order. (Which is only slightly better.)

The jazz band has started up again (first real rehearsal tonight) for a gig on the 12th at Kirstenbosch. I don't have any further details, but it's going to be a good one. I only realised during last week's trombone section rehearsal how much I missed Wednesday night jazz. The Dukes band is fun, but the music isn't as challenging (some of it is downright boring, actually, but we need to do it) and we usually have big gaps where we're missing instruments.

I have been domesticated. I now own a pot and a pan and am actually cooking myself breakfast most mornings. Usually eggs on toast and such, but today I experimented with fried onion as well. I need to tune the herbs I add (basil and thyme were handy, but not that great) and reduce the quantity (a whole onion is too much) but it's an overall win. One of these days I might be able to actually cook some proper food. (Mom, if you're reading this, this paragraph is a lie. I eat muesli and yoghurt for breakfast and cook marvelous and healthy suppers every night.)

In the last month or so, I have watched most of Doctor Who (the new version) and Torchwood. Definitely near the top of my list of things I really want there to be more of.

I have received two emails about my Erlang stuff. One was a wonderful ego-boosting thank-you and the other seemed to be a question in a language my browser refuses to display except as hex-runes.

On browsers: I finally updated to Firefox 3 on my primary machine. Two things had been delaying this. Two extensions I really struggle without (Chromatabs and Tab Mix Plus) didn't have fx3 versions. They both now have beta versions (although in the case of the former it's actually a new extension). Fx3 really struggles with malformed certificates and won't let you add an exception to visit the site anyway. I think this is still the case, but the one site I relied on with a broken cert has finally fixed it. I quite like the new UI. The biggest win has to be that auth windows and plugin loads no longer lock the whole browser, something that had really irritated me in fx2.

Tomorrow morning shall see me giving my flat a much-overdue clean in preparation for the arrival of a houseguest. I should probably finish putting up my last blind, too. (pkeike, if you're reading this, ignore this paragraph. My flat is always spotless and I did nothing special to prepare for your arrival.)

And now, a rant:
Dear Google, please give me a version of Chrome I can actually use. I realise that most of your userbase is quite happy with a Windows-only version, but some of us prefer an OS that isn't actively hostile. At the very least, can we have one that works in wine By alienating a large class of free-software developers you're not buying any favours. Yours, $linux_lad.