Search Results: "cas"

19 October 2005

Scott James Remnant: Parallel Peer Programming

Here at Canonical Towers we have several staff who worship at the altar of Extreme Programming, and as such many of the methodologies and rituals prescribed by that religion find their way into our day-to-day working practices. A few of these came together in an interesting way a few weeks ago, and it was suggested by a cow-orker that I blog about it so he could give the URL to people. The first ritual is that of the sprint, I don’t think this is orthodox XP but rather something inspired from it that we picked up from the Python community. With all of the Canonical developers scattered across the globe mostly working from their own homes, it’s become a useful tool; particularly for the Launchpad team. The basic idea for those that haven’t heard of it is simple, and perhaps obvious; you get a selection of the team together in one place, sit them around the same table with particular goals to complete. In effect it’s highly compressed facetime and high bandwidth interaction to nail those tasks that need it, before you head off again and work at a more sedate pace. The second is directly from XP doctrine and is that peculiar observance known as pair programming, something that is often coupled with sprints. For anybody who hasn’t encountered this before, it’s something I’ve always found rather odd. You get two programmers together, both itching to code, and you take one of them’s laptop away; and you don’t just force them to fight over the keyboard either, the laptop-less soul isn’t allowed to touch it. The theory here is that it frees the deprived individual of the hassle of coding and allows them to direct the programmer in ways that may not be immediately obbious, or alternately think about the next bit of work that needs doing. Another interesting side-effect is it can be an interesting way to learn code you’ve not worked with before, if you’re the one doing the coding and you’re being guided what to do by a sage who already knows it. I have a funny story here, so I’m going to digress from the main stream for a moment to tell it. A few months ago I was working in the London office, Mark had been up all night coding and had then given me responsibility to get his changes landed onto the Launchpad mainline. I’m not that hot on quite a bit of Launchpad, and fade to utterly clueless the nearer the code gets to the web application itself; and when trying to merge the two there were conflicts which I needed Mark’s help to resolve. Now as anybody who’s met Mark knows, he’s a pretty good example of a Type-A personality, yet he suggested that we do a spot of pair programming to get the code in and I’d be the one with the laptop as it’d help me get to grips with the affected parts. This hilighted something I’ve always seen as a problem with pair programming, dealing with it when the a person with the keyboard has a totally different way of working to you. In particular, I’m an emacs user, whereas Mark is a die-hard vim user; but also right down to the working directory I would work from, how I test results, etc. When you’re the one without the laptop, this can be quite infuriating, as you know exactly how to solve a problem and the idiot with the keyboard is dithering about doing things you don’t understand just to get there. If you’re a Type-A personality, you generally snatch the laptop away at this point and do it yourself; or at least you would, if you could drive the strange editor the other person uses. I swear Mark was sulking as he gave the laptop back and let me do it. Anyway, there is some relevance to that and we’ll come to it in a moment. The third and final methodology is the concept of unit tests and more specifically test driven development. For anyone who hasn’t come across this before, I highly recommend it; I was suspicious too when Robert Collins took it upon himself to teach me the true way, but now I’m sold. Simply the idea is that if you have any code that doesn’t have another piece of code in a test suite that checks that it’s working correctly, that code is broken. More particularly unit testing involves checking just one feature or requirement at a time, and stacking them together to test all of the code paths. I’ve actually found that this improves the APIs I design, as I write the code in small blocks and functions to make them easier to test. Test driven development takes it even further, you write the unit tests first, before you write the code they’re supposed to test; usually one or two at a time. Obviously these tests will fail at first, it’s then your job to write as little code as possible to make them pass. If your code isn’t right, you add a unit test that will fail, and modify the code to make it pass. This really comes into its own when you’re fixing bugs later, once you’ve identified the bug you write a test case or two that cause the problem; these will of course fail. You can then modify the code to make them pass, and at the same time be sure you’ve not broken other functionality because of the existing test suite. I’ve also found it really useful for particularly complicated or tricky pieces of code, especially those intricate algorithms that do particularly heavy lifting. So onto the event itself, this was a sprint in our London office to indoctrinate Gustavo Niemeyer with the various projects he’d be working on. The goal for this sprint was decided to start the conversion of HCT to Bazaar-NG, and to do this Gustavo and I would pair program. Now my last experience of pair programming had been that story with Mark (see, it had some relevance) and I knew I’d be just as bad if I wasn’t allowed to have the keyboard. I was also acutely aware that if Gustavo was just sitting by and watching, he wouldn’t get much benefit from it either, so he needed to be actively involved in the coding so he could learn the things he’d be working on. I came to what I thought was a pretty neat, and obvious, solution to these problems. We set up my laptop with the code we’d be working on, and on my display were two side-by-side terminals both running screen sessions. Gustavo then set up two same-sized terminals on his, ssh’d into my laptop from both of them and joined the screen sessions. In the left-hand one he ran vi, and in the right-hand one I ran emacs. Thus we both had keyboards, and both had editors, yet could see each other working and even steal the keyboard without danger of violence. We didn’t just sit side-by-side and code on different things though, that’s not pair programming and is just ordinary programming with a bit of a voyeuristic twist. What we did was: in my terminal I started writing the test cases for the code we needed, it was Gustavo’s job to write the code that would make them pass. We actually added a third terminal in which we could run the test cases themselves; so I could run them when I’d added something that would fail, and Gustavo could run them when he thought he’d made them pass again. This turned out to be a rather fun way to work, and at one point I was almost able to try and convince myself that the code was writing itself to pass the test cases I was writing. It also got me thinking that it’d be really neat to use genetic algorithms to breed code to pass test cases.

Robert McQueen: Comments

Just a quick post to reply to the comments I’ve had on some previous posts. On Missing entropy on my server box, I received lots of comments on how to feed random other stuff into the entropy pool or make it bigger or other hacks, but Alexander Reelsen pointed me to the real cause — a kernel bug in older 2.4 kernels which causes the entropy pool to deadlock on SMP systems, and never get refilled. There is a patch from RedHat which backports the fix from 2.6, and is included in recent 2.4 kernels. On the topic of kernels, now I’ve upgraded from 2.4.29-rc1 to 2.4.32-rc1 I get lots of errors like hw tcp v4 csum failed in my syslog. I’m using the e100 driver which as far as I can see hasn’t changed between versions, but there have been some changes to TCP checksumming code which I havn’t quite been able to grok. Google finds mailing list posts with other people asking what the cause is, but nobody answering. Anyone know what’s going on there? On Windows accessibility, many people seem to not listened to the first couple of minutes of the tasteless song I linked to, and hence taken my comment completely seriously. Thanks to everyone who told me about sticky keys etc in comments, but I did already know about the existence of Windows accessibility support (warning: mjg59 in furious anger mode). :D On the topic of blog comments, how do I cut down on the comment spam I have to moderate without requiring people to go through a completely unaccessible captcha image thing, or the annoyance of registering and acknowledging an e-mail? Would prohibiting comments and URIs containing words like ‘mortgage’, ‘casino’ and ‘ringtone’ ever cause false positives?

Benjamin Mako Hill: Ubuntu Talk at BLU

Last night, I decided to check out the Boston Linux Unix webpage to find out when the next meeting would be and what the talk would be on. To my surprise, the talk is tomorrow and is slated to be given by none other than Benjamin Mako Hill. Hmmm. I vaguely remember agreeing to give a talk like this in general sense but don't remember ever agreeing to a specific day. In any case, I'm not one to disappoint and am working on my slides. If you're interested in some post-Breezy action in Boston, please show up! If you can't make it, I'm trying to arrange a proper release party for some point after I receive my Breezy CDs (a week or two I guess). I'm sorry for the short notice. Of course, I'm giving the talk on short notice so I'm not too sorry. Additionally, I am missing both a class and a Media Lab sponsors dinner that I was already double booked for. You should be able to cancel up to one of your prior engagements to attend. Information on the talk is on the BLU website. The talk will be held at MIT in E51-315.

18 October 2005

Steinar H. Gunderson: Broken machine

Due to a combination of unlucky circumstances, my workstation decided to fry its own CPU the other day, so I'm without one for the time being. After trying to replace it and breaking the heatsink in the process (the screws were not very durable!), I've more or less given up the project, so I'll probably have to order something new. In any case, I might be a bit less responsive with regard to answering e-mail for a while (reading mail without your usual .procmailrc and .muttrc is... not very comfortable), but I should still be able to at least keep track of my RC bugs :-)

Steinar H. Gunderson: amaroK

I think amaroK could become a really good music player (I rarely use any KDE stuff, but it's quite appealing), but it's still missing a few bits and pieces: I like it, though, even though it has everything and the kitchen sink. I wouldn't really be surprised if suddenly a P2P client was integrated into this. :-)

Uwe Hermann: I ordered the new video iPod today

Yes, that's right. I have ordered one of those shiny new video iPods today. I was never impressed too much by all this Apple hype going on all around me. In fact, I have never owned any Apple product (no iPod photo nano shuffle * , no powerBook, no iBook, no iMac, no Mac mini). Until now. I simply couldn't resist to replace my 256 MB noname MP3 player with the full-blown 30 GB of the iPod (the 60 GB version costs way too much for my taste). See the specs for more technical details on the new iPod. Apart from the usual iPod features you all know, this one's supposed to be thinner, can display photos and (the major improvement) videos. Yes, it's only 320x240, but it's videos. This thing will initiate a huge video blogging / videocasting wave, and those vlogs will soon become as popular as podcasts are today, I'm sure. I hope to get my hands on that thingy in a bit more than a week (shipping takes a few days, it seems). I already have a lot of things on my mind, which I'm gonna do with it: If you have any suggestions for more geeky things I could be (ab)using it for (think john the ripper on iPod and similar things), don't hesitate to write a comment! Hm, I might port bb to the iPod if nobody beats me to it...

17 October 2005

Joey Hess: thoughts (less random than expected)

This time of year it's great to curl up in the evening with a feather comforter and a good text file. I recently read all of Andy Hertzfeld's stories about the origin of the mac on folklore.org, pretty much straight through in chronological order during one long night. Only at the last story did I find out that he'd turned the website into a book. Reading a whole book in one sitting online is not a novel experience for me, though it seems to be for many, but doing it by accident is. My enjoyment of quantities of text online does sometimes come out in my own weblog postings, which are probably long enough, if not good enough, to be their own book. This weblog at least occasionally violates 8 of Nielsen's 10 weblog usability guidelines. The only one I think I should fix is point 5. Another book I read online recently is Karl Fogel's Producing Open Source Software. The contrasts between how Karl suggests doing some things and how projects I'm involved in work are sometimes large (he suggests voting on technical issues for example), sometimes due to differences in technology (the debbugs bug tracker makes conversations and other email-based use of a bug tracking system work much differently than the BTSes he describes using), and sometimes pointed to things that could be improved. More often though, he seemed spot on in extrcting and highlighting best practices. For example, he does a great job in pointing out that simple, consistent naming conventions, like #404093 for a bug report and r1021 for a repository revision, are more important than they appear. I also enjoyed reading some reviews of Katamari Damacy, which sounds like a truely unique and fun game. I'm looking forward to playing it (probably under emulation) one of these years.

16 October 2005

Steinar H. Gunderson: Multi-terabyte arrays

What's a good way of getting a few terabyte of cheap (ie. SATA) disk these days? Our backup box will increase to 3TB in a few days, and after that it's just getting too painful to continue as we do today: 12 300GB disks (400/500GB is a lot more expensive); some older PATA, the rest SATA, all in RAID-5 plus one hotspare and a system disk. It has grown from 240GB two years ago, and if this is going to continue we'll have a real problem in a few years. I read about this unusually cheap SATA SAN from IBM the other day, and it was $5k even without disks... way outside our league. :-) Of course, disk is going to be even cheaper then, so 500GB disks will be viable, but we'll still be needing too many disks to fit in one internal rack-mounted case. We don't need extreme performance or hardware RAID; all we want is raw block devices we can access from Linux and use for a few RAID-5 devices we can LVM together.

Next.

Previous.