On the other hand, maybe I *can* have too much screen real estate

Well, after working with the two screen setup for a couple of days, I’ve started to get a terribly sore neck. A bit of self-evaluation shows that when I’m looking at the laptop screen, I’m craning forward and down, which is ruining all the good effort that my chiropractor and the stretching exercises he gave me over the last three weeks have done.

So I’m now running with the laptop screen closed, using the KVM to use the big screen for both laptop and desktop use.

Unfortunately when I came in this morning, my desktop was totally unresponsive. I couldn’t get it to wake up when I switched to it on the KVM, and I couldn’t ssh to it from my laptop. So I power cycled it. That required manually fsck’ing the disk, and then when it did come up for real, the mouse went nuts and started opening programs and moving stuff around on my screen like it was being driven by a demented ghost. It had also booted the wrong kernel (one that didn’t support MVFS). So I booted it with the proper kernel and it was ok. Except that as always, vmplayer complains that I haven’t run /usr/bin/vmware-config.pl, so I ran it again. Don’t know why that never “sticks”.

Better, better…

I discovered a new monitor mode for the 24″ CRT that gives me even more screen real-estate. That’s nice.

I also managed to borrow a KVM from the lab downstairs so I can occasionally look in on my Linux box to see if I’ve got any new Lotus Notes “mail”. That’s nice.

Unfortunately the PS2 KVM doesn’t work well with my USB mouse – I have a USB to PS2 adaptor that I was using at one point, with the USB mouse going into the PS2 mouse adaptor, which was then going into my PS2 to USB adaptor. That was mostly a proof of concept (to make sure I could take the output of a PS2 KVM and plug it into my USB-only laptop), and also it made it easier to switch the PS2 keyboard and the USB mouse between my USB-only laptop and my PS2-and-USB Linux box. But plugging a USB mouse into a PS2 adaptor into a PS2 KVM didn’t work so well for the mouse. Every time I switched the KVM I had to reset the mouse by unplugging it and plugging it back in. Not good. So in the meantime I’m using the PS2 mouse that came with the computer instead of the USB mouse I brought from home, and it sucks. No wheel, and it uses a ball rather than optical. Oh, and it’s a Belkin, so it will probably fail in 5 minutes.

Oops

I’ve mentioned before that in order to help defray the costs of putting my stuff on a colo box, I partitioned the box in 3 Xen virtual machines, and rent two of them out. Well, yesterday one of the renters, Terry, asked for a bit of help with his Apache set up. Not knowing his root password, I mounted his hard drive in the “dom0” Xen controller, using “mount /dev/xen-space/xen2-disk /mnt” and started poking around. Well, evidently that managed to confuse ext2 because a few hours later he emailed me to say that his disk had gone “read-only”, and when he tried to reboot it didn’t come up.

Looking at my munin graphs, it appears that when he rebooted, it took down the whole box. I had to email the owner of the rack to power cycle my box, which he can do remotely. When it came back, 2 of the 3 virtual machines came up fine, but Terry’s was asking for a root password to run fsck. I shut down his virtual machine and did a fsck from within the dom0, and it found several things out of whack. But after those were fixed, I was able to restart Terry’s virtual machine.

So lesson learned. I’m not sure if things would have been happier if I’d mounted it read-only, but in the future if I need to mount one of the partitions in /dev/xen-space I’ll shut down the xen virtual machine instance first.

You can never be too rich, too thin, or have too much screen real-estate

Below the cut is a highly illegal picture of my 17″ Powerbook G4 (1440×900 screen resolution) at work, connected up to my 24″ SGI/Sony GDM-90W11 CRT monitor (1600×1200 screen resolution), with the big screen being used for Eclipse, and the small screen showing my web browser open to Sun’s Java API documents, as well as a couple of convenient Terminal windows including one dedicated to pgsql.

The Safetype keyboard and mouse are also plugged into the Powerbook. All I really need now to make my work environment complete is a KVM so I can actually switch over to Linux and check my Lotus Notes and build in the dynamic vob.

So this is what I do now – I bring my laptop into work, hook it into the corporate network, and rsync my laptop’s /vob to my snapshot view on the Linux box. I run clearviewupdate on the snapshot view to get everything I’ve changed overnight checked into the vob, and then rsync it back so that everything that got checked in gets turned back to read-only. At that point, I’m good to go and I can plug the keyboard, video and mouse into the laptop and work. When I’m ready to leave at night, I unplug the laptop from the monitor and put the keyboard and mouse back on the Linux box, and run the same procedure all over again.

I also have a dynamic view of the same development stream, so I can build the bits of code that are actually working. (I can’t build in the snapshot view because you can’t make a snapshot view anchored at /vob, and far too many Makefiles have hard coded full paths instead of relative paths).

It’s all pretty sweet so far.

Continue reading “You can never be too rich, too thin, or have too much screen real-estate”

WTF?

I’m busy re-writing vast swaths of my low-level code in order to support a new database schema. One of the classes that I wrote that got used all over the place is called “Playlist”, and its various subclasses. Playlist has an abstract clone() method. I almost never write clone() methods, so somebody must have asked for it. And I think I know who now.

As part of this re-write, I using Eclipse’s “Find References” function a lot to see if some method needs to be re-written or can just be deleted. While doing that, I found an interesting bit of code in an obscure part of the system that I’ve never looked at before:


private Playlist doClonePlaylist(Playlist playlist) {
Playlist clonePlaylist = null;
 
// need a special clone
// as the playlist cone function
// doesn't copy the playlist
// external id which we really need
if (playlist != null) {
clonePlaylist = (Playlist)playlist.clone();
clonePlaylist.setExternalID(playlist.getExternalID());
}
 
return clonePlaylist;
}

If the guy who’d written this bit of cruft still worked here, I’d want to ask him why the fuck he didn’t just tell me that I’d left one parameter out of my clone() method, or even better, fix it himself? Ideally, I’d want to ask him while dangling him over the edge of a multistory building, but that isn’t going to happen.