Planet Linux Australia
Zoe woke up early this morning, but mid-breakfast decided to go back to bed for a bit. I don't think she actually went back to sleep. Not sure what that was all about.
After breakfast, we drove over to the Chattahoochee Nature Centre to check it out.
Alongside the Chattahoochee River, the place was beautiful. The main thing we saw was the butterfly garden and a butterfly enclosure in a large screened tent with some flowers. Everyone was given a sugar-water drenched sponge on a stick, and the kids had a great time trying to entice butterflies onto the sticks.
There were also a few birds of prey in cages we took a look at, and then we walked around the lake, stopping to have lunch, before we headed back. It was a lovely morning out.
When we got home, the girls played in the wading pool in the backyard and generally around the house until dinner time. I used the time to try and pack as best I could.
I found a place that did Chicago-style deep dish pizza, so I ordered a pizza from them and Chris picked it up on the way home. It was delicious. I think I need to figure out how to make deep dish pizza myself.
Tomorrow morning, we head off to Austin. It's been a lovely time in Decatur, Georgia.
I had a broken night's sleep for some reason. Zoe woke up at one point and ended up in bed with me. She slept quite late, and I ended up needing to wake her up so that we could get away on time. Even as it was, we left 30 minutes later than planned.
We spent the morning at the Georgia Aquarium. It's a pretty impressive facility. I've never been that impressed by the Monterey Bay Aquarium, but this one is certainly good. Zoe had a good time checking out everything, but it was a bit of a challenge herding four kids in the same direction at various times.
All the busy days may have been taking a bit of a toll on her, because she had a couple of minor meltdowns at the aquarium today, but recovered quickly and seemed okay otherwise.
After lunch and a little more looking around, we headed back home so James could take his nap. Briana ducked out and ran a few errands, and I held the fort down. The girls mostly disbanded and played on their own, and I finally got on top of all the photos I've been taking.
Clara had a piano lesson at 4:30pm, so we dropped her off for that, just around the corner, and went for a walk in the woods nearby. It was a beautiful little loop, that reminded me of the woods in Zurich a little bit. Unfortunately Lucy got stung by something while we were there.
I managed to get Zoe down for bed pretty early again tonight, and we don't have any tight time constraints in the morning, so I should be able to let her sleep in for as long as she likes tomorrow morning.
I just made an account on yet another web service. On the suggestion of my password manager, I attempted to use the password “W:9[$X*F”. It was rejected because “Password must contain at least one non-alphabet character, one lowercase letter, one uppercase letter”. OK, how about “Passw0rd”? Yep, that’s fine.
Anyone want to guess which of those two passwords is going to fall victim to a brute-force attack first? Go on, don’t be shy, take a wild shot in the dark!
It appears that Andrew Lee has finished the Zerg Campaign in Starcraft. Amusement follows.
Overmind: Greetings underlings. I’m so cool I shit ice-cream. And I’ve got a new toy - this super important mega-death weapon thing that’s currently breeding in a Chrysalis. It’s a big big secret what’s inside but when she pops out, she’ll lay the smackdown on everything! I’m not telling anyone what’s inside the chrysalis so it’ll be a total surprise when she awakens. Also, since hot babe Kerrigan just died in Chapter 1, it can’t possibly be her. And if it is her (which it’s not), it’ll be such a cunning plot twist that you’ll wet yourself.
It’s like totally important that this Chrysalis thing is protected. So, amongst all my legions of creatures, I am going to choose… my most young and inexperienced Cerebrate to protect it.
All the other Cerebrates: Erm… boss… you sure about that?
Overmind: Of course I’m sure! I’m the Overmind! Okay… so little young cutie teacher’s pet newbie Cerebrate, there’s a few things you need to know before you begin your life as protector of the chrysalis… are you ready?
Newbie Cerebrate: Yes boss.
Overmind: Ok. This… is a drone.
All the other Cerebrates: Oh for fuck’s sake.
Overmind: And when you have enough minerals, you can build a Pwning Spool.
Newbie Cerebrate: Minerals… Pwning Spool… Got it.
Cerebrate Daggoth: Things sure are dull now that Overmind is cuddling Newbie over there. Hey Zasz, can I ask you something?
Cerebrate Zasz: Sure Daggoth.
Daggoth: So, we’re like masters of evolution right?
Daggoth: So we can evolve from little larvae things to become anything at all right?
Daggoth: So, we could look like… I dunno… Jessica Alba… or the Asian chick from Battlestar Gallactica… but instead we look like pulsating grey pieces of shit.
Zasz: Sucks dunnit. Anyway, that’s why Overmind nabbed Kerrigan. He’s been totally getting into Japanese tentantacle porn…
Overmind: And then you right click and build a Hydralisk Den. That let’s you build Hydralisks. That’s why it’s called a Hydralisk Den.
Newbie: Hey boss. I’m grateful that you’re taking the time to explain all this to me. But it’s been like 15 levels now and I think I’m ready to do a bit more. How about we push the storyline a bit.
Overmind: Ok. Go kill Terrans.
Newbie: (Kills Terrans)
Overmind: Go kill Protoss.
Newbie: (Kills Protoss)
Overmind: Go kill renegade Zerg.
Newbie: (Kills renegade Zerg) Script writers took a break on this chapter huh?
Overmind: yeah. Go kill more stuff till the Chrysalis thing hatches.
Raynor: Hey, I’ve been having these wacky dreams… as if Kerrigan were calling out to me. But I know that’s impossible because she died in Chapter 1.
Zerg Kerrigan: Hi everyone! I’m back. It was me in the Chrysalis. How cool and unexpected was that!
Everyone with IQ over 7: Shit me a brick! We all just wet ourselves!
Raynor: Oh my God. Sarah! What have they done to you?
Zerg Kerrigan: I’m a Zerg now. (wins Most Obvious Statement award)
Raynor: Well, I’ve still got a hard-on for you. So…are we going to bonk or are you going to kill me?
Zerg Kerrigan: Well, I want to kill you. But some strange lingering emotion inside me compels me to let you go. Some emotion stronger than any Zerg power over me. I… I don’t know what it could be. Leave Jimmy. Leave now.. before it’s too late. Must… control… (but how about we get together in the expansion set)
Raynor: Ok. Bye.
Zeratul: I’m an invisible Dark Templar Protoss. No one can see me and I’ve got this cool Jedi Lightsabre! I’m hunting Cerebrates… Charrge! (kills Zasz)
Zasz: Arrrggh (dies)
Overmind: Shame about Zasz. But when Zertaul shoved his light sabre up Zasz’s ass, I connected with Zertaul’s mind and now I know where the Protoss Homeworld is! Suck that Zeratul.
Zertaul: Bugger. (runs away)
Overmind: Cool, let’s go invade the Protoss Homeworld. The most important thing there is the Khaldarin Crystals, the source of all power!!! Since this is the most important thing ever after protecting the Chrysalis, I’m going to pick the Newbie Cerebrate again to take control of all my forces. Newbie, go to the Protoss Homeworld, steal the crystals and then kill all the Protoss there.
Newbie: Hey big boss, can I ask you a few questions?
Overmind: Of course my little cupcake:
Newbie: Well firstly, in Chapter 1, Mensk and Kerrigan turned on that one Psi-emitter rubics cube and “Zerg from across the galaxy” were lured to it. So how is it that the Protoss Homeworld, filled with 10 billion Psychic Protoss, is completely invisible to us?
Newbie: And then there’s this thing about the Khaldarin Crystals. We only just found out about the Protoss Homeworld five minutes ago when Zeratul shoved his sabre up Zasz’s ass and you looked into his mind…so how is it that we know all about the Crystals and exactly where they are, so much so that we’ve set up a big friggin’ Neon Lit beacon over the beacon saying “BRING DRONE HERE”. But the Protoss, who have lived on the planet since forever AND who have a special upgrade called “Khaldarin Amulet”, don’t have a clue about the Crystals?
Overmind: Shut the fuck up. Now, go steal the crystals. Just look for the beacon.
Newbie: Yes boss. (steals the Crystals)
Overmind: Now do the Crystal Thing… and I can plant my fat ass down on the Protoss Homeworld. YEAH!
[Sorry if you get this post twice—let’s say that our internal builds of RapidWeaver 4.0 are still a little buggy, and I needed to re-post this ;)]
Xcode, Apple’s IDE for Mac OS X, has this neat ability to perform distributed compilations across multiple computers. The goal, of course, is to cut down on the build time. If you’re sitting at a desktop on a local network and have a Mac or two to spare, distributed builds obviously make a lot of sense: there’s a lot of untapped power that could be harnessed to speed up your build. However, there’s another scenario where distributed builds can help, and that’s if you work mainly off a laptop and occasionally join a network that has a few other Macs around. When your laptop’s offline, you can perform a distributed build with just your laptop; when your laptop’s connected to a few other Macs, they can join in the build and speed it up.
There’s one problem with idea, though, which is that distributed builds add overhead. I had a strong suspicion that a distributed build with only the local machine was a significant amount slower than a simple individual build. Since it’s all talk unless you have benchmarks, lo and behold, a few benchmarks later, I proved my suspicion right.
- Individual build: 4:50.6 (first run), 4:51.7 (second run)
- Shared network build with local machine only: 6:16.3 (first run), 6:16.3 (second run)
This was a realistic benchmark: it was a full build of RapidWeaver including all its sub-project dependencies and core plugins. The host machine is a 2GHz MacBook with 2GB of RAM. The build process includes a typical number of non-compilation phases, such running a shell script or two (which takes a few seconds), copying files to the final application bundle, etc. So, for a typical Mac desktop application project like RapidWeaver, turning on shared network builds without any extra hosts evokes a pretty hefty speed penalty: ~30% in my case. Ouch. You don’t want to leave shared network builds on when your laptop disconnects from the network. To add to the punishment, Xcode will recompile everything from scratch if you switch from individual builds to distributed builds (and vice versa), so flipping the switch when you disconnect from a network or reconnect to it is going to require a full rebuild.
Of course, there’s no point to using distributed builds if there’s only one machine participating. So, what happens when we add a 2.4GHz 20” Aluminium Intel iMac with 2GB of RAM, via Gigabit Ethernet? Unfortunately, not much:
- Individual build: 4:50.6 (first run), 4:51.7 (second run)
- Shared network build with local machine + 2.4GHz iMac: 4:46.6 (first run), 4:46.6 (second run)
You shave an entire four seconds off the build time by getting a 2.4GHz iMac to help out a 2GHz MacBook. A 1% speed increase isn’t very close to the 40% build time reduction that you’re probably hoping for. Sure, a 2.4GHz iMac is not exactly a build farm, but you’d hope for something a little better than a 1% speed improvement by doubling the horsepower, no? Gustafson’s Law strikes again: parallelism is hard, news at 11.
I also timed Xcode’s dedicated network builds (which are a little different from its shared network builds), but buggered if I know where I put the results for that. I vaguely remember that dedicated network builds was very similar to shared network builds with my two hosts, but my memory’s hazy.
So, lesson #1: there’s no point using distributed builds unless there’s usually at least one machine available to help out, otherwise your builds are just going to slow down. Lesson #2: you need to add a significant amount more CPUs to save a significant amount of time with distributed builds. A single 2.4GHz iMac doesn’t appear to help much. I’m guessing that adding a quad-core or eight-core Mac Pro to the build will help. Maybe 10 × 2GHz Intel Mac minis will help, but I’d run some benchmarks on that setup before buying a cute Mac mini build farm — perhaps the overhead of distributing the build to ten other machines is going to nullify any timing advantage you’d get from throwing another 20GHz of processors into the mix.
- Meet new people (✓),
- Catch up with fellow Aussies I haven’t seen in years (✓),
- Go to parties (✓),
- Behave appropriately at said parties (✓),
- Use the phrase “Inconceivable!” inappropriately (✓),
- Work on inspiring new code (✓),
- Keep up with Interblag news (✗),
- Keep up with RSS feeds (✗),
- Keep up with personal email (✗),
- Keep up with work email (✗),
- Installed Leopard beta (✓),
- Port code to work on Leopard (✗),
- Successfully avoid Apple Store, Virgin, Banana Republic et al in downtown San Francisco (✓),
- Keep family and friends at home updated (✓),
- Mention the words “Erlang”, “Haskell” and “higher-order messaging” to puny humansfellow Objective-C programmers (✓),
- Write up HoPL III report (✗),
- Find and beat whoever wrote NSTokenField with a large dildo (✗),
- Get food poisoning again (✗),
- Sleep (✗),
- Actually attend sessions at the conference (✓ ✗).
- Me: “Can I have myself an André discount at all?”
- Manager: “Hmmm… well, normally I would, but I can’t do that today. How about I throw in a free copy of World of Warcraft? Yes, that sounds like an excellent idea…”
Nooooooooooooooooooooo! Tom, I officially hate you. Do you know how long I’ve been trying to avoid playing this frigtard game? Goodbye sunshine, it’s been nice knowing you. If I don’t reply to any emails from now on, I’m either dead, or I’m playing this bloody MMORPG that I’ve been avoiding so successfully up until now. Bye all!
If you have a VPN at your workplace, chances are good that it’s one of those Cisco 3000 VPN Concentrator things, which seem to be an industry standard for VPN equipment. Chances are also good that you’ve likely been forced to use the evil, evil proprietary Cisco VPN client, which has been known to be a source of angsta majora for Mac OS X and Linux users. (And if you think Windows users have it good, think again: the Cisco VPN client completely hosed a friend’s 64-bit Windows XP system to the point where it wouldn’t even boot.)
Enter vpnc, an open-source VPN client that works just fine on both Mac OS X and Linux. Linux people, I assume that you know what you’re doing — all you should need is a TUN/TAP kernel driver and you’re good to go. Mac OS X folks, you’ll need to be comfortable with the UNIX terminal to use it; unfortunately no GUI has been written for it yet. If you’re a Terminal geek, here’s a small guide for you:
- Download and install a tun/tap driver for Mac OS X.
- Download and install libgcrypt. If you have DarwinPorts (neé MacPorts) installed, simply do “port install libgcrypt”. Otherwise, grab it from the libgcrypt FTP site and install it manually.
- You’ll need to check out the latest version of the vpnc code from its Subversion repository: “svn checkout http://svn.unix-ag.uni-kl.de/vpnc/”. The latest official release (0.3.3, as of this writing) will not compile properly on Mac OS X, which is why you need the code from the Subversion trunk.
- After doing the standard “make && make install” mantra, run your Cisco VPN .pcf profile through the pcf2vpnc tool and save the resulting .vpnc file in /etc/vpnc.
- ./vpnc YourProfile.vpnc, and that should be it. While you’re debugging it, the --nodetach and --debug 1 options may be useful.
Muchas gracias to Mario Maceratini at Rising Sun Pictures for hunting down vpnc for me.
This is a Public Service Announcement for Australians: if you’re looking for mobile broadband access for your laptop (and what geek isn’t?), Vodafone are doing a pretty spectacular deal at the moment for ‘net access via their 3G/HSDPA network.
For $39/month, you get 5GB of data; no time limits; no speed caps; and fallback from 3G to GPRS in regional areas where HSDPA isn’t available yet. It’s a fantastic deal for people who live in metropolitan areas and work on the road a lot.
The main catch is that it’s a 24-month contract, so is a somewhat long time to be locked in to a plan. However, I have a feeling that no other mobile Internet offering is going to be competitive with 5GB for $40/month within the next two years. (Hell, $39/month for decent mobile Internet access is competitive with even some fixed-line ADSL2 providers.) One other small catch is that you also can’t use multiple devices on the plan: it’s tied to the single SIM card that you purchase with the plan. So, all you cool kids with 3G/GPRS-capable mobile phones, you can’t include that device on part of the bundle (looks sadly at iPhone). Other than that, it’s really a pretty bloody good deal.
To compare this with other plans:
- Vodafone themselves offer a craptacular 100MB for $29/month, which is barely enough to just check email these days. (And that doesn’t include the modem, which is another $200). A mere 1GB of data is $59/month, or $99 per month with no contract!
- Telstra are even worse (this is my surprised face): $59 for 200MB. I’ll say that again: $59 per month for 200MB. 1GB is $89.
- Bigpond (who are different from Telstra1) offer vaguely competitive plans if you’re OK with a 10-hour-per-month time limit: that goes for $35/month. (This translates to around 30 minutes per business day, which may be OK if you just hop online occasionally to check email.) The $35 plan is the only timed plan, though: other than that, it’s $55 for 200MB (puke), or $85 for 1GB.
- I can’t even find out whether Optus have mobile broadband plans available. Comments?
- Virgin Mobile Broadband used to be pretty spectacular at $10/month for 1GB, and is still somewhat OK at $80/month for the same 1GB if it’s bundled with a phone plan. Considering that Vodafone’s $39/month for 5GB, you can still pair their deal with a phone plan of your choice and have 5GB instead of 1GB, though.
- Three (or 3, or whatever) just launched the next best alternative with their new X-Series plans. Their Gold plan is $30/month for 1GB, and their Platinum plan is $40/month for 2GB. Interestingly, the X-Series plans give you a ton of free Skype minutes (2000 minutes on the 1GB plan and 4000 minutes on the 2GB plan), so if you’re a really heavy Skype person and chat about 130 hours per month, the Three deal may be better than Vodafone’s.
The 3G modem they use is a Huawei E220, which looks like it’s the same modem used by Virgin and Three. There appears to be Linux support for it, and I can confirm that Mac supports works fine on Mac OS X 10.5 (Leopard) thanks to an alternative driver.
So, if you’re interested, visit the Vodafone 5GB webpage. You can sign up through the Internet on the spot. However, you can also sign up over the phone, and if you do, you have a 30-day “cooling off” period where you can opt out of your contract if you’re not happy with the service. (Stupidly enough, you can’t get the 30-day cooling off period if you pop into a Vodafone store, because phone service has different conditions to face-to-face service. Ja, whatever man.) Hurry though: the deal expires on December 31, 2007. Get it as a late Christmas present for yourself, I guess!
1 Telstra Mobility Broadband is a completely separate service from Bigpond Broadband, and Telstra and Bigpond are separate entities. I found this out the hard way, when I was on a 10-hour-per-month CDMA/EVDO plan with Telstra, and couldn’t upgrade to the 10-hour-per-month 3G plan with Bigpond, because Telstra and Bigpond are separate things. Ahuh. (I couldn’t upgrade to a 10h plan on Telstra, because Telstra doesn’t even offer hourly plans anymore.) Way to go for rewarding all your mobile Internet early adopters that braved EVDO, you frigtards.
Parallels Desktop for Mac was the first kid on the block to support virtualisation of other PC operating systems on Mac OS X. However, in the past fortnight, I’ve found out that:
- Parallels allocates just a tad too many unnecessary Quartz windows1, which causes the Mac OS X WindowServer to start going bonkers on larger monitors. I’ve personally seen the right half of a TextEdit window disappear, and Safari not being able to create a new window while Parallels is running, even with no VM running. (I’ve started a discussion about this on the Parallels forums.)
- Parallels does evil things with your Windows XP Boot Camp partition, such as replace your ntoskrnl.exe and hal.dll file and rewriting the crucial boot.ini file. This causes some rather hard-to-diagnose problems with some low-level software, such as MacDrive, a fine product that’s pretty much essential for my Boot Camp use. Personally, I’d rather not use a virtualisation program that decides to screw around with my operating system kernel, hardware abstraction layer, and boot settings, thank you very much.
VMware Fusion does none of these dumbass things, and provides the same, simple drag’n’drop support and shared folders to share files between Windows XP and Mac OS X. I concur with stuffonfire about VMware Fusion Beta 3: even in beta, it’s a lot better than Parallels so far. Far better host operating system performance, better network support, hard disk snapshots (albeit not with Boot Camp), and DirectX 8.1 support to boot. (A good friend o’ mine reckons that 3D Studio runs faster in VMware Fusion on his Core 2 Duo MacBook Pro than it does natively on his dedicated Athlon 64 Windows machine. Nice.) The only major feature missing from VMware Fusion is Coherence, and I can live without that. It’s very cool, but hardly necessary.
Oh yeah, and since VMWare Fusion in beta right now, it’s free as well. Go get it.
1 Strictly speaking, allocating a ton of Quartz windows is Qt’s fault, not Parallels’s fault. Google Earth has the same problem. However, I don’t really care if it’s Qt’s fault, considering that it simply means running Parallels at all (even with no VM open) renders my machine unstable.
You know that Which Operating System Are You quiz?
Well, they’re gonna have to expand it to include all six versions of Windows Vista, whenever that decides to be unleashed unto the world. Hello, six versions? With the starter edition only being able to use 256MB of RAM and run three applications at once? Even eWeek says that “you would be better off running Windows 98”. You know what, instead of choosing between Vista Starter, Vista Home Basic, Vista Home Premium, Vista Business, Vista Enterprise or Vista Ultimate, how about I just run Mac OS X or Linux instead, you stupid tossers?
Jesus, the excellent lads over at Microsoft Research (who produce some truly world-class work) must be just cringing when they hear their big brother company do totally insane stuff like this.
Whoops, those of you who had problems downloading Vimacs will find that the download links work properly now. (What the hell, people besides me actually use Vimacs?)
One of the features of the new video iPod (the “Generation 5.5” one) is that it handles videos bigger than 640×480 just fine. This shouldn’t be surprising for geeks who own the older video iPod that plays 320×240 video, since the alpha geeks will know that the older video iPods could play some videos bigger than 320×240 just fine.
A nice side-effect of this is that if you are ripping DVDs to MPEG-4, you can very likely rip them at native resolution: I had zero problems playing Season 2 of Battlestar Galactica on a new video iPod, and it had a native resolution of 704×400. (Note: This is with a standard MPEG-4 video profile, not H.264 baseline low-complexity.) This is pretty cool, since you can now hook up a little video iPod direct to a big-ass TV and know that video resolution is no longer a differentiating factor between DVDs and MPEG-4 video. Now if only the iPod had component video connectors available…
Where’s André in June?
- June 7-10: San Diego (for the History of Programming Languages III conference.)
- June 11-20: San Francisco (for Apple’s WWDC 2007 bash)
- June 20-28: Las Vegas
- June 24-28: Los Angeles
If you’ll be in town on any of those dates or going to HoPL or WWDC, drop me an email!
As an aside, HoPL III looks incredible: Waldemar Celes (Lua), Joe Armstrong (Erlang), Bjarne (C++), David Ungar (Self), and the awesome foursome from Haskell: Paul Hudak, John Hughes, Simon Peyton Jones and Phil Wadler. (Not to mention William Cook’s great paper on AppleScript, which I’ve blogged about before.) Soooo looking forward to it.
I always used to get confused between UCS-2 and UTF-16. Which one’s the fixed-width encoding and which one’s the variable-length encoding that supports surrogate pairs?
Then, I learnt this simple little mnemonic: you know that UTF-8 is variable-length encoded1. UTF = variable-length. Therefore UTF-16 is variable-length encoded, and therefore UCS-2 is fixed-length encoded. (Just don’t extend this mnemonic to UTF-32.)
Just thought I’d pass that trick on.
1 I’m assuming you know what UTF-8 is, anyway. If you don’t, and you’re a programmer, you should probably learn sometime…
I’m not too sure that I can go much farther
I’m really not sure things are even getting better
I’m so tired of the me that has to disagree
I’m so tired of the me that’s in control
I woke up to see the…
Sun shining all around me
How could it shine down on me?
You think that it would notice that I can’t take any more
Had to ask myself,
… what’s it really for?
Everything I tried to do, it didn’t matter
Now I might be better off just rolling over
‘cos you know I try so hard but couldn’t change a thing
And it hurts so much I might as well let go
I can’t really take the…
Sun shining all around me
Why would it shine down on me?
You think that it would notice that I no longer believe
Can’t help telling myself
… it don’t mean a thing.
I woke up to see the…
Sun shining all around me
How could it shine down on me?
Sun shining all its beauty
Why would it shine down on me?
You think that it would notice that I can’t take any more
Just had to ask myself,
… what’s it really for?
—Yoko Kanno and Emily Curtis, What’s It For
Trust in love to save, baby. Bring on 2007!
First, fuel costs are down:
Second, I actually finished an entire tube of Blistex before I lost the stupid thing. I believe this is the second time in my life that this has happened:
Fourth, my personal inbox looks like this right now:
Zero messages, baby. Yeah! (Well, OK, my work inboxes still have a ton of messages… but zero personal mails left is really pretty nice.)
Plus, this is being published from Auckland airport, on the way to San Francisco. Not a bad day at all.
If you haven’t had much experience with the wonderful world of multithreading and don’t yet believe that threads are evil1, Edward A. Lee has an excellent essay named “The Problem with Threads”, which challenges you to solve a simple problem: write a thread-safe Observer design pattern in Java. Good luck. (Non-Java users who scoff at Java will often fare even worse, since Java is one of the few languages with some measure of in-built concurrency control primitives—even if those primitives still suck.)
His paper’s one of the best introductory essays I’ve read about the problems with shared state concurrency. (I call it an essay since it really reads a lot more like an essay than a research paper. If you’re afraid of academia and its usual jargon and formal style, don’t be: this paper’s an easy read.) For those who aren’t afraid of a bit of formal theory and maths, he presents a simple, convincing explanation of why multithreading is an inherently complex problem, using the good ol’ explanation of computational interleavings of sets of states.
His essay covers far more than just the problem of inherent complexity, however: Lee then discusses how bad threading actually is in practice, along with some software engineering improvements such as OpenMP, Tony Hoare’s idea of Communicating Sequential Processes2, Software Transactional Memory, and Actor-style languages such as Erlang. Most interestingly, he discusses why programming languages aimed at concurrency, such as Erlang, won’t succeed in the main marketplace.
Of course, how can you refuse to read a paper that has quotes such as these?
- “… a folk definition of insanity is to do the same thing over and over again and to expect the results to be different. By this definition, we in fact require that programmers of multithreaded systems be insane. Were they sane, they could not understand their programs.”
- “I conjecture that most multi-threaded general-purpose applications are, in fact, so full of concurrency bugs that as multi-core architectures become commonplace, these bugs will begin to show up as system failures. This scenario is bleak for computer vendors: their next generation of machines will become widely known as the ones on which many programs crash.”
- “Syntactically, threads are either a minor extension to these languages (as in Java) or just an external library. Semantically, of course, they rhoroughly disrupt the essential determinism of the languages. Regrettably, programmers seem to be more guided by syntax than semantics.”
- “… non-trivial multi-threaded programs are incomprehensible to humans. It is true that the programming model can be improved through the use of design patterns, better granularity of atomicity (e.g. transactions), improved languages, and formal methods. However, these techniques merely chip away at the unnecessarily enormous non-determinism of the threading model. The model remains intrinsically intractable.” (Does that “intractable” word remind you of anyone else?)
- “… adherents to… [a programming] language are viewed as traitors if they succumb to the use of another language. Language wars are religious wars, and few of these religions are polytheistic.”
If you’re a programmer and aren’t convinced yet that shared-state concurrency is evil, please, read the paper. Please? Think of the future. Think of your children.
1 Of course, any non-trivial exposure to multithreading automatically implies that you understand they are evil, so the latter part of that expression is somewhat superfluous.
2 Yep, that Tony Hoare—you know, the guy who invented Quicksort?