Search Results: "uli"

3 October 2006

Julien Danjou: Blah

Today I spent some time to create my first quick and dirty irssi script. This is a beautiful script which do the following:
<jd> hi
<luser> jd you suck
<jd> sure ?
/ignore luser
<luser-blah> blah blah blah
<jd> what did you say ?
<luser-blah> blah blah blah
<luser-blah> blah blah blah
<jd> mouahahah
Yes, it replaces all text said by ignored people with 'blah'. This is a big step in the Internet communication field. Script is available here.

Julien Danjou: Pushing kexec support forward

General freeze is getting closer, so it was time for me to push things a little forward. I have uploaded a NMU of kexec-tools yesterday to delayed/5 which add support of init scripts. That means that you will just have to edit /etc/default/kexec, change USE_KEXEC=0 to 1 and reboot will use kexec. :-) Furthermore, this upload was acknowledged by the maintainer of kexec-tools, Khalid Aziz, so this is really good, thanks to him.

Joey Hess: coming home with a stone&#44; stapped onto my back

I was thinking late last night and it became clear to me that over the past 9 or 10 years, I had fallen into a nomadic outlook, even when I wasn't being particularly nomadic in my way of life all the time. Between moving around the Bay Area 1.5 times a year, shipping everything cross-country by UPS, hauling all my worldly goods back in a pickup, and then falling into a longterm already-established-but-clearly-not-permanent place at the farm, dashing off to places like Honduras and Brazil for months at a time, and going around with a camper, I experienced the kind of pressure that selects for keeping posessions limited, appreciating things that pack a lot of different uses into a small space (like a laptop with gigs and gigs of carefully organised information). The things I aquired, valued, and kept were either very portable and useful -- tools, laptop, tents, vehicles, cookware -- or portable and luxurious -- comforters, good sheets, a rug. (I had my pick of nearly anything in my Grandmother's house, and I chose a rug.) The real luxury items were put up with only grudgingly and spent a lot of time in storage. Mostly books, and this is why unlike most people, I prefer my books on the computer. For lots of other categories of stuff, I tended to assume that I wasn't going to keep it long, and bought/borrowed accordingly -- and ended up giving away couches on Craigslist. Recently I saw some stuff about Mongolian nomads in the Gobi packing their yurts onto their camels, and I can relate to that, there's a real beauty to it. So it's been weird over the past week to put together all the large furniture that I need in my house, like a fridge, etc. A bit hard to accept it. Only with time will I find out how long this stop along the way will last..

2 October 2006

Julien Danjou: DeFuBu contest #3

Bug Welcome to this 3rd issue of the DeFuBu contest, the monthly championship of the funniest bug reported to the Debian BTS. The challengers How the vote has been done Four Debian related people voted for these bugs: Pierre Machard, Pierre Habouzit, Florent Bayle and Mohammed Adn ne Trojette.
Samuel Hocevar did not vote because he was not paid for it. Full ranking Bugs Challengers The winners Notes To participate, simply drop me an email with a bug number. About DeFuBu

30 September 2006

Edd Dumbill: Rails deployment tip for Debian systems and Apache

I deploy my Rails applications with Capistrano to an Ubuntu machine, which uses the excellent Debian style layout of Apache 2 configuration files. To keep things tidy, I like to place the Apache configuration file inside the config directory of the Rails project, along with the rest of the configuration for the Rails application and Mongrel. With the help of a couple of Capistrano rules I can then ensure that, on deployment, the latest Apache configuration file is also sent to the server:
# after setup, do a one-time link in
task :after_setup do
  sudo "ln -nfs # current_path /config/# application         
     /etc/apache2/sites-available/"
end
# cause apache2 to re-read. you probably have this rule anyway
task :restart do
  # if you're running mongrel_cluster, uncomment the following line
  # restart_mongrel_cluster
  sudo "/usr/sbin/apache2ctl graceful"
end
The first time round you'll probably want to do a2ensite yourapp manually, but this could easily be added into the after_setup rule. Not rocket science, but a pleasing bit of configuration that keeps things tidy.

29 September 2006

Edd Dumbill: A deployment pattern for Rails and bzr

I can't get enough of the bzr revision control system, and I'm quite fond of Rails too. So, I thought I'd share my deployment setup for Rails applications using Capistrano and bzr. Capistrano works on the assumption that you're deploying from a revision control system. Secondly, it requires that your deployment server is aware of how to access this system. This leaves you with various options, the most obvious of which are:
  1. Host your source repository on your deployment server
  2. Have your deployment server equipped with remote access to your source repository
  3. Mirror your repository to your deployment server
Of these, option 1 is out for all but somewhat casual projects, option 2 either opens up your source repository more than I like, or needs fiddly tunnelling of SSH which I don't think Capistrano is up to yet (I only like to use key-based access with SSH, rather than password based access, which seems at the moment complicate life where Capistrano is concerned.) I've opted for option 3. The pattern I use is this. On setting up the deployment server, I push a copy of the bzr repository to a private directory. Then, on deployment I first update that repository securely from the master repository inside my network, then export the new release locally on the server. Here are the relevant bits of my Capistrano configuration:
set :repository, "/opt/repo_mirror/# application "

…

set :scm, :bzr
set :checkout, "branch"

…

task :before_update_code do
bzr push sftp://deploy.example.org/opt/repo_mirror/# application
end
One big advantage of this over option 2, a remote source repository, is that only the changes are sent up to the server, and the bandwidth-intensive application checkout happens locally on the deployment machine. The final bit of improvement this could stand is to have the bzr checkout use export and not branch, but I think I'll have to alter the Capistrano's bzr plugin in order to do this.

Edd Dumbill: Locking down portmap on Debian

Most sensible people are very wary of NFS and its potential for security holes. If you can at all help it, it's a good idea not to run NFS and portmap on a network interface with direct internet connectivity. However, this isn't always convenient. As I needed to have NFS sharing on a host exposed to the internet, I set about finding the various places I needed to firewall. The tools I typically use to verify I've done the right things are netstat -nap on the machine concerned, to check for listening processes, and nmap from remote hosts to sniff for open ports. Portmap and its associated programs mostly use 'tcpwrappers' for controlling access. The first step you ought to take in securing portmap is to ensure that your hosts.allow and hosts.deny files are set up to control access properly. In /etc/hosts.deny, deny access to allcomers:
mountd: ALL
statd: ALL
portmap: ALL
rquotad: ALL
Then in /etc/hosts.allow, let the good guys through (adjust for your network):
mountd: 192.168.0.
statd: 192.168.0.
portmap: 192.168.0.
rquotad: 192.168.0.
On top of this, however, you should firewall off the ports that these programs use. As I found out, this is not as easy as it sounds. Portmap assigns random ports for some of the services it starts. You can run rpcinfo -p to see the ports in use. An example run on one of my machines looks like this:
program vers proto   port
 100000    2   tcp    111  portmapper
 100000    2   udp    111  portmapper
 100003    2   udp   2049  nfs
 100003    3   udp   2049  nfs
 100003    4   udp   2049  nfs
 100003    2   tcp   2049  nfs
 100003    3   tcp   2049  nfs
 100003    4   tcp   2049  nfs
 100021    1   udp  32770  nlockmgr
 100021    3   udp  32770  nlockmgr
 100021    4   udp  32770  nlockmgr
 100021    1   tcp  32788  nlockmgr
 100021    3   tcp  32788  nlockmgr
 100021    4   tcp  32788  nlockmgr
 100005    1   udp   1005  mountd
 100005    1   tcp   1008  mountd
 100005    2   udp   1005  mountd
 100005    2   tcp   1008  mountd
 100005    3   udp   1005  mountd
 100005    3   tcp   1008  mountd
 100024    1   udp    863  status
 100024    1   tcp    866  status
Of these, nfs and portmapper always use the same ports, 2049 and 111, so ensure you block off these. What about the rest? Happily, there's a way to configure them to use constant ports so we can reliably firewall them. Life would be too easy if all this configuration was in the one place, so here's how to find the different places you need to change. Finally, if you're running quotas, be sure to do something similar with RPCRQUOTADOPTS in /etc/default/quota. See also: Finally, I ought to note that I've written this up in case it helps anybody else. As with everything I write here, I make no warranty about its accuracy. Security is hard and obscure (but that's no reason not make our best efforts!)

28 September 2006

Biella Coleman: The Silence of Failure in Silicon Valley

After about 6 months of initial research in the Bay Area, I had to make a choice over the future direction of my more directed fieldwork. Would my project be on Silicon Valley, its religious fervor for the exuberant technology start-up, with the geek entrepreneur (probably with some affiliation with Standford) at its center stage, or would it be more broadly about free software and the culture of geekdom? I chose the later, for various reasons, but I think I wanted to write a dissertation that did not bleed with cynicism but instead flowed and flowered with a lot more joy than could have been possible if I had stayed within the grasp of the start-up and the venture capitalist. That said, I learned a lot about SV, took a lot of notes, and read most anything I could get my hands on whether the work of San Jose Anthropologist,Jan English-Lueck or published in magazines like Mother Jones, Harpers, and even the National Geographic. One of the luminaries that writes about SV from a cultural perspective is Paulina Borsook. And she is fine writer who admittedly has ticked me of on occasion (to be precise because she collapsed too much of geek culture into that of the specific SV world in Cyberselfish, which at the time I found almost personally offensive, probably more than it should have). Today I just came across a short, older but very illuminating piece of hers The Disappeared of Silicon Valley (or why I couldn’t write that piece) which is as much about the limits of historical representation in general as it specifically about the failings of start-ups in SV at the end of the recent boom and bust cycle. So her goal was simple enough: To find people involved in starting new high-tech whose companies had died.. and to find them to get a more visceral and cultural window into this experience. But it was a near to impossible task. Despite her impeccable record with confidentiality and a far flung social network, she could not get anyone talk about these ostensible failures. There has been a good amount of writing on the limits of historical representation because the archive or what comes to be the archive is a function of power and it is usually the powerless who are left out, as the work of Michel-Rolph Trouillot has so eloquently shown. But while it is true that some CEO of a dethroned corporation may be powerless in some sense of the word, it is not what we associate with the word. But in fact, the power of stigma of failure in a region that magnifies an already well-develiped cultural fetish of success (especially, I imagine, among male graduates, of places like Stanford Buisiness School), is enormous, so much so, that it seems one can only write about the experience, as Barsook has done so well, through the reality of a lack, through silence.

26 September 2006

Evan Prodromou: 3 Vend miaire CCXV

We had a busy day today. Our friend John Usher, an ebullient genius from the bubbly town of wt:Beer in wt:Devon has spent the last few years on a Ph.D. in Music (sound recording) at McGill University here in Montreal. He finished his thesis last spring, but due to scheduling conflicts with his board of advisors he couldn't defend the darn thing for several months. So he's been bopping around different parts of the world -- Chile, Beer (of course), France and such -- and has been crashing in our extra room for the last week or so now that he's back in town. He defended his thesis today, so Maj and I went to see the presentation. I'd never been to a thesis defense before, and it was different than I expected. I was picturing something along the lines of a parole hearing, with perhaps some fraternity hazing thrown in, but it was actually a very public lecture about his research. There were maybe 30 people in attendance -- friends, board, and curious department members -- and John gave a great lecture about his work. As one of his panel members from the Psychology department said, "You've done a good job making this really complicated issue clear enough that I could almost understand it." It's pretty great when you see someone you like and respect really shine in what they do best, and John absolutely shone today. His thesis is on the abstruse subject of audio-spatial imaging -- how we can tell where the source of a sound is -- but he made it clear enough that I could follow along -- almost. tags:

22 September 2006

Scott James Remnant: Upstart in Universe

upstart is a replacement for the init daemon, the process spawned by the kernel that is responsible for starting, supervising and stopping all other processes on the system. The existing daemon is based on the one found in UNIX System V, and is thus known as sysvinit. It separates jobs into different “run levels” and can either run a job when particular run levels are entered (e.g. /etc/init.d/rc 2) or continually during a particular run level (e.g. /sbin/getty). The /etc/init.d/rc script is also based on the System V one (and is in the sysv-rc package), it simply executes the stop then start scripts found in /etc/rcN.d (where N is the run level) in numerical order. Why change it? Running a fixed set of scripts, one after the other, in a particular order has served us reasonably well until now. However as Linux has got better and better at dealing with modern computing (arguably Linux’s removable device support is better than Windows’ now) this approach has begun to have problems. The old approach works as long as you can guarantee when in the boot sequence things are available, so you can place your init script after that point and know that it will work. Typical ordering requirements are: This worked ten years ago, why doesn’t it work now? The simple answer is that our computer has become far more flexible: We’ve been able to hack the existing system to make much of this possible, however the result is chock-full of race conditions and bugs. It was time to design a new system that can cope with all of these things without any problems. What we needed was an init system that could dynamically order the start up sequence based on the configuration and hardware found as it went along. Design of upstart upstart is an event-based init daemon; events generated by the system cause jobs to be started and running jobs to be stopped. Events can include things such as: In fact, any process on the system may send events to the init daemon over its control socket (subject to security restrictions, of course) so there is no limit. Each job has a life-cycle which is shown in the graph below: The two states shown in red (“waiting” and “running”) are rest states, normally we expect the job to remain in these states until an event comes in, at which point we need to take actual to get the job into the next state. The other states are temporary states; these allow a job to run shell script to prepare for the job itself to be run (“starting”) and clean up afterwards (“stopping”). For services that should be respawned if they terminate before an event that stops them is received, they may run shell script before the process is started again (“respawning”). Jobs leave a state because the process associated with them terminates (or gets killed) and move to the next appropriate state, following the green arrow if the job is to be started or the red arrow if it is to be stopped. When a script returns a non-zero exit status, or is killed, the job will always be stoped. When the main process terminates and the job should not be respawned, the job will also always be stopped. As already covered, events generated by the init daemon or received from other processes cause jobs to be started or stopped; also manual requests to start or stop a job may be received. The communication between the init daemon and other processes is bi-directional, so the status of jobs may be queries and even changes of state to all jobs be received. How does it differ from launchd? launchd is the replacement init system used in MacOS X developed as an “Open Source” project by Apple. For much of its life so far, the licence has actually been entirely non-free and thus it has only become recently interesting with the licence change. Much of the goal of both systems appears initially to be the same; they both start jobs based on system events, however the launchd system severly limits the events to only the following: Therefore it does not actually allow us to directly solve the problems we currently have; we couldn’t mount filesystems once the “filesystem checked” event has been recived, we couldn’t check filesystems when the block device is added and we certainly couldn’t start daemons once the complete filesystem (as described by /etc/fstab) is available and writable. The launchd model expects the job to “sit and wait” if it is unable to start, rather than provide a mechanism for the job to only be started when it doesn’t need to wait. Jobs that need /usr to be mounted would need to spin in a loop waiting for /usr to be available before continuing (or use a file in a tmpfs to indicate it’s available, and use that modification as the event). This is not especially surprising given that Apple have a high degree of control over both their hardware and the actual underlying operating system; they don’t need to deal with the wide array of different configurations that we have in the Linux world. Had the licence been sufficiently free at the point we began development of our own system, we would probably have extended launchd rather than implement our own. At the point Apple changed the licence, our own system was already more suitable for our purposes. How does it differ from initng? Initng by Jimmy Wennlund is another replacement init daemon intended to replace the sysvinit system used by Linux. It is a dependency-based system, where upstart is an event-based system. The notion of a dependency-based system is interesting to talk about at this point. Jobs declare dependencies on other jobs that need to happen before the job itself can be started. Starting the job causes its dependencies to be started first, and their dependencies, and so on. When jobs are stopped, if running jobs have no dependencies, they themselves can be stopped. It’s a neat solution to the problem of ordering a fixed boot sequence and the problem of keeping the number of running processes to a minimum needed. However this means that you need to have goals in mind when you boot the system, you need to have decided that you want gdm to be started in order for it, and its dependencies, to be started. Initng uses run levels to ensure this happens, where a run level is a list of goal jobs that should be running in that run level. It’s also not clear how the dependencies interact with the different types of job, a dependency on Apache would need the daemon to be running where a dependency on “checkroot” would need the script to have finished running. Upstart handles this by using different events (“apache running” vs. “checkroot stopping”). Again while interesting, Initng does not solve the problems that we wanted to solve. It can reorder a fixed set of jobs, but cannot dynamically determine the set of jobs needed for that particular boot. A typical example would be that if the only dependency on the job that configures networking is the mount network filesystems job, then should that job fail or notbe a goal (e.g. because there are no network filesystems to be mounted) the result is that network devices themselves will not be configured. You could make everything a goal, and just use the dependencies to determine the order, however this is less efficient than just ordering the existing sysv-rc scripts (which can be done at install time). Another example is that often you simply don’t know whether something is a dependency or not without reading other configuration, for example the mount network filesystems may be a dependency of everything under /usr or may just be a dependency of anything allowing the user to login if it just mounts /home. The difference in model can be summed up as “initng starts with a list of goals and works out how to get there, upstart starts with nothing and finds out where it gets to.” How does it differ from Solaris SMF? SMF is another approach to replacing init developed by Sun for the Solaris operating system. Like initng it’s a dependency-based system, so see above for the differences between those systems and upstart. SMF’s main focus is serive management; making sure that once services are running, they stay running, and allowing the system administrator to query and modify the states of jobs on the system. Upstart provides the same set of functionality in this regard, services are respawned when they fail and system administrators can at any time query the state of running services and adjust the state to their liking. Will it replace cron, inetd, etc? The goal of upstart is to replace those daemons, so that there is only one place (/etc/event.d) where system administrators need to configure when and how jobs should be run. In fact, the goal is that upstart should also replace the “run event scripts” functionality of any daemon on the system. Daemons such as acpid, apmd and Network Manager would send events to init instead of running scripts themselves with their own perculiar configuration and semantics. A system administrator who only wanted a particular daemon to be run while the computer was on AC power would simply need to edit /etc/event.d/daemon and change “on startup” to “on ac power”. What about compatibility? There’s a lot of systems administrators out there who have learned how Linux works already and will not want to learn again immediately, there’s also a large number of books that cover the existing software and won’t cover upstart for at least a couple of years. For this reason, compatibility is very important. upstart will continue to run the existing scripts for the forseeable future so that packages will not need to be updated until the author wants. Compatibility command-line tools that behave like their existing equivalents will also be implemented, a system administrator would never need to know that crontab -e is actually changing upstart jobs. Does it use D-BUS?
“To D-BUS people, every problem seems like a D-BUS problem.” —Erik Troan
The UNIX philosophy is that something should do just one job, and do it very well. upstart’s one job is starting, supervising and stopping other jobs; D-BUS’s one job is passing messages between other jobs. D-BUS does provide a mechanism for services to be activated when the first message is sent to them, thereby starting other jobs. Some people have taken this idea and extended it to suggest that all a replacement init system need do is register jobs with D-BUS and turn booting into a simple matter of message parsing. This seems wrong to me, D-BUS would need to be extended to supervise these services, provide means for them to be restarted and stopped; as well as deal with being process #1 which means cleaning up after children whose parent’s have died, etc. It seems far simpler to arrange for D-BUS to send an event to init when it needs a service to be started, and focus on being a very good message passing system. The IPC mechanism used by upstart is not currently D-BUS because of various problems, however it’s always been expected that even if init itself doesn’t communicate with D-BUS directly, there would be a D-BUS proxy that would ensure messages about all init jobs and events would be given to D-BUS and D-BUS clients could send messages to init to query and change the state of jobs. What is the implementation plan? Because this is process #1 we are changing, we want to make sure that we get it right. Therefore instead of releasing a fully-featured daemon and configuration to the world, we’re developing it in the following stages:
  1. Principal development; at the end of this stage the daemon has been implemented and can manage jobs as described.
  2. Replacement of /sbin/init while running the existing sysv-rc scripts. This is the shake-down test of the daemon, can it perform the same job as the existing sysvinit daemon without any regressions?
  3. /etc/rcS.d scripts replaced by upstart jobs. These consitute the majority of tasks for booting the system into at least single-user mode, and contain many of the current ordering problems and race conditions. If the daemon solves the problems here, it will be a success.
  4. Other daemon’s scripts replaced by upstart jobs on a package-by-package basis; this will be an ongoing effort during which upstart will continue running the existing sysv-rc scripts as well as its own jobs. During this time the event system may be tweaked to ensure it truly solves the problems we need.
  5. Replcement of cron, atd, anacron and inetd. This will happen alongside the above and result in a single place to configure system jobs.
  6. Modification of other daemons and processes to send events to init instead of trying to run things themselves.
The current plan is that we will be at least part of the way into stage #3 by the time edgy is released, with that release shipping with upstart as the init daemon and the most critical rcS scripts being run by it to correct the major problems For edgy+1 we hope to have completed stage #5 and be at least part of the way into the implementation of stage #6. From the start of development of edgy+2, no new packages will be accepted unless they provide upstart jobs instead of init scripts and init scripts will be considered deprecated. What state is it in now? The init daemon has been written and is able to manage jobs as described above, receiving events on the control socket to start and stop them. This has now been uploaded to the Ubuntu universe component in the upstart package for testing before it becomes the init daemon. We welcome any experienced users who want to help test this; install the package and follow the instructions in /usr/share/doc/upstart/README.Debian to add a boot option that will use upstart instead of init. If your system boots and shut downs normally (other than a slightly more verbose boot without usplash running) then it is working correctly. Other types of events will be added as required during development and testing. Currently only a basic client tool (initctl) has been written, compatibility tools such as shutdown will be written over the next week or two before it replaces our sysvinit package.

Scott James Remnant: Having Left Debian

It’s been over a year now since my last proper upload to Debian, and nine months since I announced my intent to put aside working on Debian for a while. With Matthew Garrett’s resignation from Debian, several people have compared it to my own “resignation” from Debian. It has got my thinking about whether I currently intend to ever end my “Sabbatical” and return as an active Debian Developer. I think that the end of my love-affair with Debian started at Debconf last year where several developers treated those of us who also worked on Ubuntu quite rudely. Someone was attacked for wearing an Ubuntu t-shirt at the conference, while someone else was applauded for wearing a “Fuck Ubuntu” t-shirt. That’s where I realised that maybe I didn’t have as much in common with these people as I thought I did. I still don’t understand why Debian singles Ubuntu out for this kind of treatment, we’re still the only derviative distribution that makes all of our patches to Debian available, yet Ubuntu is claimed to not do anything at all. Another example is that Ubuntu is being asked to change the Maintainer field of every package, something no other derivative is being asked to do or has ever been asked to do. Martin Krafft has had some interesting things to say about this strange relationship in the past. If that was the start of my falling out with Debian, I think that Debian considering removing documentation and firmware from the distribution, especially the documentation, was another point I started wondering whether I shared anything in common with the project anymore. Call me strange, but I think that one of the fundamental purposes of a Linux distribution is to be useful to its users. If nobody can use the distribution because it doesn’t support their hardware, and even if it did, all the documentation has been stripped out; I started to wonder what it’s aims are. It became increasingly apparent that the only users Debian was considering a priority were its own developer. And the third thing is simply a matter of Fun. Fun for me, at the moment at least, has been to build a system that fits together extremely nicely with each component doing the right thing. For Ubuntu this has meant being a driving force for it being Linux 2.6 only, with reliance on udev for hardware, etc. Upstart is just a continuation of these goals, getting a system which all “just works”, even if it means throwing out a few things people were previously fond of. All of these things would have been impossible to do in Debian itself. Getting upstart installable required changes to twelve different packages, including sysvinit itself; at a worst case, this would have required the agreement of twelve different maintainers in Debian. It’s often exhausting just persuading one of the reason for the change, persuading a dozen would have been a herculian effort. Perhaps Matthew is right, what Debian lacks is a single leadership. There’s nobody in Debian I could have gone to for approval over the changes I wanted to make, whose decision developers cannot overrule. Ubuntu has such people (the Technical Board and sabdfl), which gives the project an obvious direction instead of a couple of hundred people all pulling in different directions. In a way, I don’t feel that I’ve left Debian. I feel like I was happily going along, only to realise the mob had gone in a different direction and with no easy way of rejoining the group.

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.

Enrico Zini: gr

Lots of happy GRs! It's GR season, and everyone is rushing to produce a nice GR that would make Debian oh so much better than it already is. But some of us either lack the fantasy, or the grammatical competence, or just the time to contribute to this important effort. For those people, I prepared a handy polygen grammar that they can use. Here is today's GR:
  1. After the release, the Donors widly do not take the Community in order to overruling this resolution in the interest of the Debian Release Managers for the purpose of promoting more prompt action.
  2. The Debian Project Leader has the support of Debian for apologising the funds as seems subsidiary and reasonable for the purpose of promoting cooperation between Debian and the Debian Release Managers.
  3. The Delegates broadly fund the swift funds for funding the Debian FTP Masters for the duration of the mandate for the purpose of the RMs.
  4. For the purpose of being 100% Free Software, the Debian Project subsidiaryly can overrule the core proprietary drivers in main in order to apologising the needed funds for the Cabal promptly in the benefit of having a more harmful Project.
  5. As seems harmful and experimental, the Debian Release Managers are devalued by the Debian FTP Masters in order to disbursing the copyright holder for the duration of the mandate for the purpose of Debian.
  6. The Leader lets it be known that the Developers are approved by the Donors to reasonably revoking the Developers-controlled plan during the forthcoming release in the benefit of promoting more potential action.
  7. Promptly, the Debian FTP Masters can be approved by the Delegates to establishing the reasonable Developers following internal discussion in the interest of our users and Free Software.
  8. Effectively, the Delegates have the reasonable support of the Developers for neededly cooperating with the firmware in main with immediate effect, during the forthcoming release of Debian for the purpose of Everyone.
  9. Debian reasonably funds the Community for broadly revoking the donations in the interest of Everyone for the purpose of having a more appropriate Debian Secretary.
  10. In the interest of promoting more needed action, Everyone is of the core opinion that the Developers cannot be authorised by the Delegates to establishing the Developers-controlled Debian Release Managers as seems reasonable and needed for the purpose of reducing the delays of the New Maintainer queue.
I wish this GR generator helps to satisfy all our GR needs, and will finally free some time for people to work on making etch a really great distribution for all of us to run and love.

20 September 2006

Edd Dumbill: Quick! Get a discount on XTech WebDev London

There are just three days left to get discount registration for XTech WebDev London: our new one-day training event on Rails, Ajax, REST and web application design and development. It will be held in London on 31 October 2006. It's a great opportunity to get yourself and your team up to date with the latest web development technologies. Our speakers are real world practitioners who will tell you about the pitfalls as well as the promises. You will hear: Additionally, everybody gets a copy of Cal Henderson's Building Scalable Web Sites, a buffet lunch and plenty of time to talk with the speakers and other attendees. We start at a developer-friendly time of 10am, which also gives plenty of time for those coming from further than London. There'll also be social events in the evening where you can continue networking and learning in more relaxed surroundings. Register now to attend at the cheaper price of 275.

Julien Danjou: My way to have etch released on time

It seems that I have found another way. I'm so sorry.

19 September 2006

Edd Dumbill: EuroFoo reflections

I got an enormous amount out of the just-finished European FooCamp, with lots of thoughts sparking off and interesting things to consider. Jon Mountjoy proposed a theory to me that Web 2.0 and the enterprise weren't in fact as far apart as a naive observe might imagine. He reckons that mashups, tagging and the like do happen within the enterprise, and in fact are often solving harder problems than found in the wilds of the web. There is a lot in common between Web 2.0 and SOA (even aside from buzzword compliance factors). This is a theme I'd like to follow through. Who are the hackers on the inside of companies, and what stories do they have to tell? Gavin Starks from Global Cool really opened our eyes again to the problem of the environment, and introduced the interesting position that Global Cool are taking. If you want to do anything real right now to avoid catastrophic consequences, it's too late to wait for government initiatives to bear fruit. Private citizens must act too. And that's the aim of Global Cool: educating and lobbying the individual, not the government. I was struck, as were others, by the unfortunate irony that conferences have a big environmental cost in the travel involved, as we sat there among people from many countries. I want to now investigate how XTech could be better in this regard, through carbon offsetting and similar schemes. I guess being in Paris is already a good start, as trains are apparently only 25% as polluting as planes, though this still seems like a lot! Claus Dahl led an interesting and wide-ranging discussion about Second Life as a prototyping space for real life invention. Too many themes there to summarise neatly, but we did have an entertaining side discussion about Second Life's potential environmental impact due to CPU consumption and data centers. One suggestion was that objects and activities could be annotated in-world with their environmental cost. Simon Willison energetically explained OpenID, a decentralized identity system proposed by SixApart and already live in systems such as LiveJournal. It attempts to solve the problem of a username and password pair for every site you visit, without the controversy of centralisation suffered by projects such as Microsoft's passport. Simon demonstrated a proof of concept that I think will be a very neat answer to site providers who ask "why should I support OpenID?" (Sneak preview: because if you don't, it's going to be astonishingly easy for a middleman to provide it, and you wouldn't want that.) I also took time to learn about something I'd been interested in but not known much about, 3D printing and "fabbing". Simon Wardley led a great overview of current systems for 3D printing and their various attributes, and indicated where the current trends were going. It doesn't seem so unrealistic that there'll soon be affordable 3D printing bureaux similar to walk-in reprographic facilities like Kinkos. Plenty more went on that I've not got time to transcribe, but I think will flavour my thinking over the months to come. I was fortunate to be among some incredibly intelligent and welcoming people. My thanks to O'Reilly for putting this on, and to everyone else who went for being inspiring companions. Oh, one more thing. Belgians are excellent at confectionery.

17 September 2006

Axel Beckert: Software Freedom Day 2006

Today, well, yesterday was Software Freedom Day and the Chaostreff Zürich organised an information booth with support of the Linux User Group Switzerland at the Orell-Füssli Bookstore at Zurich and giving out Ubuntu CDs — and only Ubuntu. (Ok, and also Kubuntu CDs, but that doesn’t make a big difference.) After writing a Symlink article about the Software Freedom Day, I went to Orell-Füssl, of course equipped with my 10 years old Pentium-I-ThinkPad bijou which is though running Debian Sarge and the latest Linux kernels, namely 2.6.17.13 and 2.4.33.3, both only about one week old. Onsite, I tried to get access to the WLAN, but it didn’t work. Asking the network responsible guy from the Chaostreff, the reason was found quickly: The WLAN was WPA secured and older WLAN cards don’t work with that. No problem that far, but what I found very inappropriate was that this guy then told to put away that old computer since we only want to demonstrate on recent hardware. First I still can’t understand why such intolerance happens even on a day having the word “Freedom” in its name and secondly I think that especially the ability to give old computers a second (or third) life is notable feature of Free and Open Source Software, Windows can’t offer at all. So I did not feel like explaining someone the advantages of Free Software or Linux, since I’m not allowed to show some of it nicest features. I started folding some flyers which just had been printed. I accidently also started reading them and I found two grave errors in the content, especially in the context of a day about “Software Freedom” and not about “Open Source” or “Linux”:
  1. Free Software and Open Source Software were declared as being the same thing.
  2. Only the Open Source concept was explained.
So I used the rest of the event to chat with some of the SheGeeks I knew and a few people like Fabrizio who I just knew from mails and never met in real life before. I also had no guilty conscience to leave the event earlier since I didn’t like it — even if it probably was a huge success and I met there many people I like. The late afternoon I helped a friend of mine moving. Well, actually I helped him transporting all the new furnitures he bought at IKEA to his new home with my CX Break. And after returning home, I had to read on Symlink, that Rob Levin aka lilo from Freenode died yesterday after being hit by car while riding on his bike on Tuesday. May he rest in peace. So somehow the Software Freedom Day 2006 was quite a sad day to me. :-(

Now playing (from compact cassette :-): David Hasselhoff — Looking For Freedom

16 September 2006

Edd Dumbill: Euro(star FOO OSCON)

Today I'm travelling to Belgium to take my part in the orgy of elitist conspiracy that is O'Reilly's European Foo Camp and open source convention. I've elected to undertake the journey by train.It is difficult to overemphasize how magnificent a thing the Eurostar service is. Were it left to our drab and utilitarian government alone, such a thing would never exist.Instead, in two and a half hours of clean, comfortable carriages and more than tolerable coffee I will be in Brussels, just a short tram ride away from my hotel. With the increasing difficulty and odiousness of air travel, things could hardly be more of a contrast.The price seems to me insanely cheap. My journey to Brussels and back costs under £60, less than my journey down to London from York in the first place.It almost makes you wish for the heady days of the Major government's flirtation with Europe. Life seemed simpler then. (We even had a prime minister who understood cricket, but that's another story.)EuroFOOFoo Camp is an event where O'Reilly Media invite a bunch of people to create an ad-hoc conference. For O'Reilly, it's a great way to take the pulse of earlier-than-thou early adopters and mad inventors, which in turn feeds their business. For the invitees, it's a great way to meet others, put your ideas out there, and get your mind expanded. For those outside the fold, exclusion has taken on an importance far out of proportion to its actual significance, which appears sadly inevitable.Although I was present at the US Foo a few weeks ago, illness meant I missed the bulk of it while recovering in a darkened room. So, I'm looking forward this time to playing a bigger part.One of the themes I'm seeing developing, and for which we intend to focus on at XTech 2007, is that of the increasing connectivity and blurring of distinction between the web and the world. Things to watch include Second Life, Thinglink, mobile, geotagging, ubiquitous computing.I'm also looking forward to hearing the low-down on Railsconf Europe from those who went. Sadly pressure of time meant I couldn't go, but the write-ups I've been seeing make it sound like an excellent event, and a great progression from the Chicago one.

15 September 2006

Julien Danjou: kexec support in initscripts

Yesterday I took a look to kexec, a Linux kernel feature integrated since 2.6.13. It allows to reboot to a new kernel without having the initial BIOS setup launched. So this morning, I wrote a little patch to initscripts in order to use this new cool feature. With this patch you just have to edit /etc/default/reboot and change REBOOT=reboot to REBOOT=kexec, and it should work ! The patch has been sent to the BTS, see #387599.

Julien Danjou: Dust in the box

I really should clean my workstation case more often.
abydos kernel: CPU0: Temperature above threshold
I agree that 50 C idle / 68 C full load is too hot. I cleaned it (arrgh so dusty), change the CPU fan. Back to 30 C idle!
But I did not plug back the case fan.
abydos kernel: end_request: I/O error, dev hdc, sector 43940535
[...]
Err, 58 C for an hard disk is too hot :( God bless RAID 1.
* jd is going to buy some hard drives

Next.

Previous.