It's cool to talk SCMs
It seems everyone is talking SCMs these days, usually touting their favourite option while deriding everyone else's. (I exaggerate for effect.)
Years ago we mostly used CVS and were happy. Some people are still happy with it. I still have a bunch of code in it, though migrating it to something else is on my list. Why? Niceties like being able to rename a file. Or atomic changesets. Things that all the new breeds of options can do. For the tress I manage myself distributed working isn't a big issue, so they'll probably just get migrated to Subversion as the easiest option.
However I'm not really tied to any SCM. I've used at least Arch (tla), BitKeeper, ClearCase, CVS, Monotone, PVCS and Subversion for both checking out and committing files, and handful more to check out files from things I wanted to look at. The only one that is unusable is PVCS. The rest have all been fine for whatever I've used them for.
So, if I don't care about which SCM, why blog about them at all? Because I care about how they get used.
I'm a big fan of small granular commits with descriptive commit messages. Not huge big dumps of code with "check in new code" as the comment. Gah.
Take, for example, the Linux kernel. Commit messages are fairly descriptive there and if you have enough time you can read through the changelog since the last release and really know what's gone on. This is great. Also the changes are granular enough that if you hit a problem it's likely that you can narrow it down to a single commit that doesn't do a lot other than break things for you.
Not all projects I have been part of manage either of these. People often seem to view the SCM as a punishment, using it only under sufferance and as infrequently as possible, leading to large commits of many items at once. Which then means they don't see the advantages of it and are more likely to hit merge problems as the tree has changed under them. Meaning they end up hating it more and avoiding it as much as possible, making it all worse. Not good.
Or, you get people who'll commit alright, but without any sanity testing at all. Like, even a compile. What's the point? I know you can roll it back, but if you're not sure it works and haven't even compiled it, what the hell makes you think it's suitable for committing? Bah.
I can't see that my desired usage is that unreasonable. Am I missing something?
Dubby-Dub-Dublin
Kathy and I had a nice long weekend in Dublin this weekend past, celebrating 10 years of hell together. Was good, except for getting rained on lots on the Friday (solved by buying umbrellas) and Kathy starting the weekend with a cold and me finishing with one. Bah.
I realised it's been about 5 years since I was in Dublin itself, rather than just the airport. Various comments:
- The traffic lights still explode. This is fantastic and I think more places should do it. They sort of beep while waiting to go red (so a pedestrian can cross), then make an exploding noise and tick until going green again.
- It's very expensive. When we arrived we ordered room service as it was late and though the prices quite high. And then discovered that they weren't really that bad when compared against the normal cost of eating out. What gives? I'm sure it didn't used to be so bad. That was pre Euro - is that the difference?
- The Elephant & Castle still do the best chicken wings I've ever had.
- Ryanair are bastards. I'd bought a cup of coffee just before they started boarding and they wouldn't let me take it on. They mumbled some nonsense about turnaround times or something, but given you can buy coffee on the plane I think it's fairly clear they just object to losing the chance to sell you something.
- I'm not convinced Guinness in Dublin is any better than a good pint of Guinness in England. Maybe that's due to the fact it's all brewed in Dublin these days.
Toshiba++
As I've previously said I bought a Toshiba Portégé R200 a few months ago. It's lovely and wonderful and makes my old laptop (a Compaq N200) look tiny, but is still quite small.
However I discovered it wouldn't hold charge. If I unplugged it and used it I'd quite happily get 3-4 hours use off the battery, but if I charged it up while off, then unplugged it (leaving it off) and didn't touch it for a couple of days it wouldn't power on and needed fully charged again. This is a bit of a bummer, but I hadn't got round to sorting it out as I wasn't finding it too inconvenient.
I decided I should really get it dealt with before I go back to my parents' for Christmas, so rang up Toshiba's repair line a few weeks ago. Told them what the problem was and they said they'd ring back in the morning to arrange a pickup time. Except they actually rang back that afternoon. It was too late for collection the next day, but they said they'd pick it up the following day in the afternoon. Also I wasn't to pack it or provide any of the accessories; just the bare laptop. Handy. Lo and behold the nice man from DHL turned up when Toshiba said he would, had a piece of paper with the right reference number on it (though in quite small print) and didn't want the laptop packed up as he had a suitable box already prepared.
Time passed and I heard nothing. I was getting a bit worried, but Tosh say it can take 5 working days and it hadn't been that long (and given the nature of the fault I guessed they'd need to charge and discharge to check). But it was a bit weird that they'd not asked me to do any of the stupid things you're normally asked to do. (Have you rebooted? Reinstalled? Repented?) Plus the laptop only has Linux on it, so I was worried they'd be freaked by that (though they'd been fine when I mentioned it on the phone).
It came to day 5 and I decided I'd ring them the following day. And then the nice man from DHL turned up with a big, well padded, box containing my laptop. At first glance it appeared to only contain my laptop, but when I opened up the laptop there was an A4 sheet saying that the battery had been replaced and the BIOS upgraded.
Since then the laptop has actually held charge, so it looks like they did the job.
So, congrats to Toshiba. More communication would have been nice, but it got fixed, you didn't wipe my Linux install (though I'd backed it up and removed any personal data anyway) and it was done within the period you claimed. I've not had to get a laptop fixed before, but iDunno hasn't had fun with Acer in the past, so I was prepared for the worst.
OpenWRT on the Netgear DG834G
I spent too much time today reading MIPS disassembly of the ADAM2 bootload, as used on the Netgear DG834G. The problem is that the version used on the Netgear performs a checksum over most of the flash device on every boot. This makes the use of JFFS2, as done by OpenWRT, somewhat problematic. In an ideal world I'd try to compile up a newer, less restrictive version of ADAM2 but there's no JTAG on the Netgear that I've found and the thought of frying the bootloader and bricking the device wasn't appealing.
So what I've ended up doing is finding where the checksum is done and changing the branch instruction that aborts the boot to a nop. It's still scary, but it appears to do the job.
PLEASE NOTE THE BELOW COULD PERMANENTLY BREAK YOUR ROUTER
First, obtain your ADAM2 image. This is 128K and is mtd2 from the bootloader
view. It should have an md5sum of 0530bfdf00ec155f4182afd70da028c1
. If it
doesn't, stop. The version I'm talking about is 0.18.01 as distributed by
Netgear.
Assuming you have the right md5sum you want to go to offset 0x3944 where the 4
bytes should be 44 09 00 0C
(representing a jal 0x90002510
during
execution). Replace these 4 bytes with 0 (representing nop
) and you should
end up with a new image with an md5sum of d8a2f4623bf6f64b7427812f0e849aa7
.
You'll then need to do something like
dd if=adam2-fix.bin of=/dev/mtdblock/2
on the device (I don't believe you'll
be able to rewrite the bootloader from the bootloader for some reason...).
After that ADAM2 will still checksum the flash, but will continue to boot it
after printing a checksum error
message. This means you can go off and
build yourself an OpenWRT AR7 based image and install
it on your Netgear. Rock.
X session management
I use evilwm as my window manager. I like it; I mainly end up with a whole bunch of xterms and only a handful of graphical apps (Firefox, Psi, xmms and GKrellM). evilwm's minimal decorations mean I can fit everything nicely on my screen without clutter, and the virtual desktops let me have various separated out bits (eg Firefox gets a full desktop to itself).
What I would like however is some form of session management. I'd like to be able to shutdown down my machine and when I restart it have my X setup look similar to when it was shut down, rather than having to start up a dozen apps and position them as I like them. I know I can do software suspend, but that doesn't cover kernel/library upgrades. I had a play with xsm, but although it could start up my xterms it didn't place them correctly. And didn't seem to restart Firefox, but I didn't poke that hard once I realised the xterms weren't getting placed.
Am I doing something wrong? Do I need some different window manager setup? I think I'd rather live with having to place stuff myself rather than pull in large amounts of GNOME. I've previously used Window Maker and Fluxbox for prolonged periods of time - can either of those do what I want better?
subscribe via RSS