Defying Classification

by Malcolm Tredinnick

Topic: software

Thu 6 Mar 2008

"Taming Effects" -- A Use Of Functional Programming

Posted at 00:24 +1100

I've been overwhelmed a bit by a head cold that sprung into life on Monday and am thinking at the speed of molasses. Turning lemons in lemonade, I spent today catching up on some reading and video watching (interspersed wtih napping). This meant I got around to watching some of the videos from a functional programming seminar given to Ericsson employee's last month, the full list of which are available on Ulf Wiger's blog.

The video I'd like to draw attention to is Simon Peyton Jones' initial talk (he gave two): Taming Effects - The Next Big Challenge. If you've ever wondered why functional programming might be relevant or why there it seems to be gaining more visibility on websites, this talk should provide some food for thought.

Simon is a fantastic speaker, providing you can keep up with somebody who speaks fairly fast. He always conveys a real enthusiasm for what he's talking about, looks very well prepared and manages to present complex things in a very simple fashion. He's one of the people I'm slowly trying to emulate in my own presentations, although I'm miles away at the moment. Simon's best known as one of the authors of Haskell and maintainer of the main Haskell compiler, GHC. However, you don't have to know Haskell to follow this talk; he introduces the necessary terminology as he goes along (that being said, some familiarity with programming is assumed).

One of the things I like in the introduction to this talk is pointing out that functional programming — results driven by data dependencies, rather than execution order — are actually really familiar to us all. It's how a spreadsheet works! This was also brought up in a presentation I referenced last year and I like the analogy a lot. Even when we're using procedural/imperative programming techniques we can benefit from understanding a functional approach to algorithms. This talk expands one aspect of that point: as we work with larger and larger data sets, we need to be more concerned about unintended and even intended side-effects.

Finally, if you're interested in a fairly fast-paced, but excellent introduction to Haskell, I would also recommend Simon's tutorial from last year's OSCON. Part 1 and Part II. It will take a bit of attention, reading of the slides and possibly some rewinding in places, but it's a very nice introduction to the language for programmers who may be familiar with other languages. Plus, who else uses the basics of an X windows manager as their example application?

Topics: technology/algorithms, conferences, software/haskell

Wed 5 Mar 2008

Quality Oversights In Google's Public Services

Posted at 06:34 +1100

It's always annoying to have to examine the teeth of a gift horse, but if somebody is basically dominant in their area, or one of a very few dominant players and you are essentially forced to interact with them, then it's game on. Lately Google's non-search products have been driving me more and more to despair. Perpetual beta is not an excuse for producing poorly behaving services and not having a proper bug reporting system in place.

(Read more...)

Topics: software/design, technology/Google

Mon 3 Mar 2008

Building A Scheme Compiler

Posted at 16:44 +1100

I wanted to bring this article, An Incremental Approach to Compiler Construction, to the attention of anybody who's interested in how compilers get built. Instead of having to do a lot of work up front before anything worked, this paper describes a 24-step program that created a working compiler after each step. Iteratively, they add features until it covers most of the latest Scheme standard. Bootstrapping a compiler is usually a bit tricky, but these guys make it look quite straightforward.

(Originally found via Everything Scheme.)

I've been looking at some very old code I wrote that was a simplistic Scheme interpreter and was reading the updated Scheme specification. Following a few links to try and understand something, I ended up there.

Topics: software/scheme

Sat 1 Mar 2008

Debugging In My Sleep

Posted at 21:57 +1100

Everybody has had experiences where they solved a problem or were able to think something through whilst sleeping. Happens to me quite a lot since my day-to-day life involves a lot of "working in my head", whether that's computer programming, or playing chess, or working on a mathematics problem. The number of times I've played a chess game and then analysed some related position in a dream (after finally falling asleep) is enormous. Or been trying to solve some geometry problem and realised how to redraw the diagram whilst resting.

Last night and today was particularly surreal, though.

(Read more...)

Topics: software/debugging, thinking

Fri 15 Feb 2008

Preparing For The Next Django Sprint

Posted at 23:59 +1100

In a little over four weeks (17 March in the US), Django will have another one of our code sprints. The 'main event' will be in Chicago, USA, where a bunch of people will be taking advantage of the post-PyCon sprint sessions for three days. However, as always, remote participation is possible and encouraged.

Somebody recently asked on django-users what they could to prepare for the sprint, since this was going to be their first time. Jacob has promised to give an introductory tutorial on the day in Chicago, which will help those present in person. For others, here are my thoughts on how to prepare (and why now isn't too early to start if you want to get some real work done).

(Read more...)

Topics: software/django

Tue 12 Feb 2008

Django Tip: Application-level context processors

Posted at 14:53 +1100

Whilst going through my feed reading this morning, I read the application-level context processors were not possible. This came as a bit of a shock, since I've been using them for a while now. :-)

It's not hard and there's an interesting conclusion to be drawn about the power of scoping rules (plus a reprise on my thoughts on why putting everything under the sun into a framework isn't a great idea).

(Read more...)

Topics: software/django/tips

Sat 9 Feb 2008

Don't Overflow the Command Line

Posted at 00:26 +1100

Today's mostly trivial and "well-known except if you haven't seen it before" system administration tip is prompted by one of the recent comments over at James' blog.

Be careful when using shell wildcard patterns as arguments to scripts. There are two ways to mess up and you'll usually forget to test both of them.

(Read more...)

Topics: software/linux, technology/sysadmin

Sat 2 Feb 2008

linux.conf.au ... part 2

Posted at 18:07 +1100

Things that happened at the conference since I last wrote. I flew back from Melbourne last night, missing out on the Open Day today, so this is only notes from the final day and some overall impressions.

Also, the talks are gradually being encoded and put up on the conference website in both video and audio format. I gather there are plugins around to let Windows users play ogg-style video, although I don't have any experience with it. Not sure if it's a case of "not yet" or a blunder that only half of my "stand up and blather" session is available, but it's hardly the most interesting thing there and it's impressive how fast the videos can be made available.

(For those wondering, "most interesting" might be Bdale Garbee's rocket talk, or Jon Corbet's State of Linux talk, or Stormy Peters' keynote or possible one I haven't managed to watch yet.)

(Read more...)

Topics: software/linux, conferences/linux.conf.au

Fri 1 Feb 2008

Networks In Practice

Posted at 18:31 +1100

Melbourne airport's Qantas Club has free wifi, which is nice. However, all is not entirely sane in the network land:

...
Feb  1 18:24:36 lancre dhclient: bound to W.X.Y.Z -- renewal in 59 seconds.
...
Feb  1 18:25:35 lancre dhclient: bound to W.X.Y.Z -- renewal in 55 seconds.
...

and so on (public IP address changed to protect the innocent). Rinse, wash, repeat. I'm all for not tying up the network with unexpired leases that aren't being used, but 60 seconds seems a little eager. I'm just saying.

Topics: software/linux, conferences/linux.conf.au, technology/sysadmin

Thu 31 Jan 2008

linux.conf.au ... part 1

Posted at 15:47 +1100 (edited 2 Feb 2008, 18:41)

[I'm quite behind on a lot this month, due to a bit of unforseen downtime, but I want to get this down whilst it's fresh.]

Currently at linux.conf.au, feeling a bit rushed, but enjoying it now I'm here.

Have my tutorial this morning and it seemed to go reasonably well. I realise as I was writing the slides last week that, as usual, I'd vastly overestimated the amount of stuff I'd be able to cover in 90 minutes. I miss the three hour tutorial slots we used to have at this conference. Still, enough people showed up that they were sitting in the aisles: always a good stroke for the ego.

My talk was nominally about website server performance and I tried to structure things to give people a sense of the problems they have to identify and face. The entire field is pretty large, so I stayed away from too many specifics and concentrate on the attitude and approach that is required to understand and solve problems. Although the slides won't make a lot of sense if you weren't at the talk, they're available online for those who did attend and want to remember which tools I mentioned.

The talk was video taped and they gave me a microphone this year (vast improvement on last year), so it should be available online eventually.

Somebody asked, quite reasonably, if I blogged about the stuff I was talking about and, indeed, I should do more of that stuff. There are a lot of examples of good problem solving, both pre-emptive and after the post facto changes that sites have made, both large and small. I'll try to write some articles about that sort of thing over the coming months. Sharing experiences in the sysadmin/operations arena seems to be a good way to get the knowledge spread around.

The conference generally has been fun, although I only flew down yesterday (missing the mini-conferences on Monday and Tuesday). It was nice to hear Stormy Peters speak at the keynote this morning. Not sure I entirely agree with her conclusions, but her groundwork was sound and it provided food for thought. Val Henderson's talk on her clusterfs project was worthwhile, too. She's a good presenter and filesystem theory and practice is full of interesting algorithms and data structures.

Oh, I was lucky enough to get an OLPC in the giveaway yesterday, so I now have a nice little XO to play with.

More later.

Topics: software/linux, conferences/linux.conf.au