Windows on the (developer) world

25 May 2007

My desktop whilst trying to write a device driver this week:

That’s a whole load of editor windows and terminals I was using, with connections to remote machines with carefully constructed environments set up for building/running things as I test my device driver. The windows are a selection of my source files and other source files that I’m trying to understand (most are this latter case – documentation isn’t open source software’s greatest strength). A lot of the files are on remote file systems that I’ve mounted locally. And this is just the “work” screen on my laptop – the other screen is full of other stuff – mail, IM sessions, other terminals/editor windows.

All this adds up to a lot of state that I don’t want to lose. This lead to my MacBook laptop being tethered to my desk at work for the last fortnight; I didn’t want to have to lose this carefully constructed environment when I left to go home and then have to invest time the next day setting it all up again and trying to remember where I was. As a result, my portable machine became unportable as the dynamic state was too precious to lose. Mac OS X supports hibernation of laptops much better than any other OS I’ve used, but that doesn’t help when I have ssh sessions into other machines and remote file systems mounted.

I guess what I need is something like screen, but more encompassing. You run screen on a remote machine, and it lets you disconnect and restore a terminal session, so you can disconnect from the remove machine and reconnect later and find your terminal session just as you stored it. Having something like this built into the terminal application itself so it was seamless would be ideal. MacFusion will let me disconnect and reconnect when my mac is asleep, but I get into problems when it wakes up and things aren’t there – MacFusion won’t reconnect then all the files I have open glue up the system as applications try and touch the files that have gone. A screen for filesystems would be nice. I’m fairly sure such caching file systems exist, but it’s getting them into a seamless way that I want.

It’s almost the case for a separate OS session for development that I can suspend when I’m at home. A virtual machine (VM) perhaps that contains my development work and a VM that’s the rest of my stuff. The development VM I could leave suspended when not at work, and then I could wake up when I’m back at my desk. It would still need screen/caching file system functionality as TCP based network sessions would have timed out and need to be re-established. It’s all doable, but getting it all to work nicely, now that’s the hard bit. Which is why my portable computer is tethered to my desk in the name of efficiency.