The coolest way yet to “clean” a hard drive

We finally decided that the only sure way to thwart data recovery was to melt down all the aluminum contained in the platters. Slagging the drive would have two effects on the medium. First off it would convert it from a readable disk to any shape we decided to pour it into. Secondly it would nullify the magnetic properties of the coated aluminum.

via Slashdot comments.

Manually cleaning an Intel (or other TRIM-able) SSD with hdparm

Figured this might be a useful snippet of perl for other folks. When I rebuild my system last Nov, I wiped the drive with the following:
my $a = 0;
while ($a < 312581808) { my $b = 60000; if (($a + 60000) >= 312581808) { $b = ($a % 60000) - 1; }
print "\n$a: ";
`hdparm --trim-sector-ranges $a:$b --please-destroy-my-drive /dev/sdh`;
$a = $a + 60000;

To use, mount your SSD on another system (or use a system rescue CD or LiveCD with a new enough version of hdparm) and replace “312581808” with your actual number of sectors (check with fdisk -l or similar) and /dev/sdh with your actual drive.

The tricky parts were:
(1) Figuring out the syntax, although I suspect that it’s better documented now.
(2) Figuring out the 60,000 sector limit (actually 64k/65,536? Dunno. 60,000 exactly worked.) I’m not sure if this is an hdparm limit or an Intel X25M limit.

Manually installing JDKs on Gentoo

In case it’s useful for anyone else, if you run the ___.bin installer and see this:

bin/java -version
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object

Check if rt.jar exists in the unpacked directory. If it does not, check if rt.pack exists. If it does, it means that the installer is missing a step.

Rerunning with the command-line options:

"____.bin --accept-license --unpack"

…will fix what ails you by making it unpack those files. If you no longer have the installer, google indicates that there is a program out there called “unpack200” to unpack the .pack files to .jar, but I have not had a chance to try it.

Recovering deleted/truncated files on ext4

Due to a bit of stupidity I spent a lot of time looking into how to recover deleted files on ext3/4 and I thought it would be useful to other folks to pass on the following points after the break.
Continue reading “Recovering deleted/truncated files on ext4”

Commodore Nostalgia

via Slashdot, Programming Books, part 3: Programming the Commodore 64
Prologue about the book itself is worth reading, but the following really resonated for me:

Now I know that there is already plenty of old-fart nostalgia on this blog — a lot of people have interpreted Whatever happened to programming? as a yearning for the days when you had to do everything from first principles, which wasn’t really what I meant. But I do, I really do, miss the days when it was possible to understand the whole computer.

I’m not claiming that I ever had the level of mastery that people like West and Butterfield had. I was never really a big machine-code programmer, for one thing — I wrote routines to be called from BASIC, but no complete programs in 6502/6510. And I’ve never been a hardware hacker at more than the most trivial swap-the-video-cards level. But I did have a huge amount of Commodore 64 lore internalised. I knew which memory location always held the scan-code of the key that was pressed at that time; and where the screen memory-map began; and which locations to POKE to play different pitches on the various channels of sound, or to change the screen or border colours. I knew hundreds or thousands of those little bits of information, as well as being completely familiar with the horrible BASIC dialect that was in one of the ROMs. In short, I knew the machine in a way that I don’t even begin to hope to know any of my computers today; in a way that, I am guessing, no-one anywhere in the world knows their machines.

I miss that.

I know exactly what he means.

Long, nostalgic ramble after the break. Consider yourself warned.
Continue reading “Commodore Nostalgia”


A couple of years ago, links this article went round the office as an example of how bad Vista was, and how not to design software. It didn’t sit well with me.

Anyway, I ran into it today and re-read it, and this particular point stood out:

So now we’ve got exactly one log off button left. Call it “b’bye”. When you click b’bye, the screen is locked and any RAM that hasn’t already been copied out to flash is written. You can log back on, or anyone else can log on and get their own session, or you can unplug the whole computer.

…as the culmination of his whole argument. To me, in context, it just reads as a “reductio ad absurdum” against the very showing why Microsoft did the RIGHT thing in making a flexible UI.

Then again, I am at least a sigma, and maybe two, into the “control, customizability and flexibility freak” side of things when it comes to computers. I run Gentoo Linux on my server, and if I pitched Windows on my day to day machines, it would be for Gentoo (or some other very customizable Linux distro) and not for something more out of the box like Fedora or SuSE (let alone the MacOS!)

The REALLY interesting question, to my mind, is how do you design an interface that scales in depth – to be accessible enough for someone newly sitting down at a system to be able to use it while at the same time allowing an experienced user to optimize his or her own processes – for one trivial example, I don’t want to have to pull the battery in order to get a “real” shutdown or hibernate of my laptop before a flight or a long day away from it: how long it’s going to be before I need it again is something that the software isn’t going to know, but I’ll usually have a pretty good guess of when I shut down.

As these things go, I’ve found Microsoft’s “big” products (Windows and Office) to be some of the better software out there in that respect, although I haven’t needed to play around nearly as much with Office customization since I moved to Office 2007. Vista and Windows 7 were (IMO) HUGE UI improvements over 2000/XP in my view.

Server upgrade

I doubt many folks are still reading it, as I know my handful of old friends who read regularly are all on Facebook now and seeing my updates there. Nevertheless, my file/web server has been down for a week or two and is only back up. It’s pretty much been totally replaced, hardware-wise.

Specs (aka Geek porn) after the break. Photo (at Aveek’s request) to be provided in a forthcoming update.
Continue reading “Server upgrade”

For the record.

I do not now, and I have never owned an iPod or Zune.

I’ve owned three MP3 players:
* the first was a POS $200+ hard disk based one I bought 4-5 years ago, of which the less is said the better.
* The favorite of my current pair is an off-brand (Truly, maybe?) player-in-a-memory stick which cost under $20. It takes an AAA battery and just plays MP3s in file name order without any fuss or bother.
* My less favored, but more frequently-used one, is a little Creative has (~$90 for 4gb a bit over a year ago, cheaper now)… it has a 2.5″ screen for video, FM radio and a rechargeable battery which are big pluses… but it is much more trouble to put music onto or to play anything in a desired order. It’s also got a non-replaceable battery, which pisses me off.

I keep hoping that battery life on my PDA/phones will improve to the point where it will not be necessary to have a separate MP3 player. Sadly, I see little improvement there, and my present phone (a new HTC Touch Pro) is something of a step backwards for music player use as they went from a semi-proprietary small headset plug to an entirely proprietary USB+sound+etc plug.

(Lest the basic reference not make sense)

“It’s an honor just to be mentioned.”

I tried Cuil today, and was generally unimpressed – Google still does a much better job of finding the relevant pages, whatever the index size. Further, in the absolutely critical job of ego-googling myself, Google has a lot more of my personal web pages indexed… as opposed to LinkedIn or various index sites referencing my pair of grad school papers, or the one annoying of all, sites mirroring various USENET groups and old mailing lists I post or posted on.

The one very amusing thing that Cuil DID find was a recent LJ/blog post critiquing a graph in the first of my two grad school papers: Your Graph is Bad and You Should Feel Bad

As an aside, there is a rather lame blogmeme sitting in my lifejournal (cubicle_hermit) which will probably be erased, but for those interested, you might look now.

Hello Skynet!

Slashdot: “Killer Military Robot Arms Race Underway?”
(citing NetworkWorld):

We are beginning to see the first steps towards an international robot arms race and it may not be long before robots become a standard terrorist weapon to replace the suicide bomber, according to professor Noel Sharkey, from the Royal United Services Institute Department of Computer Science. […] Currently there is always a human in the loop to decide on the use of lethal force. However, this is set to change with the US giving priority to autonomous weapons – robots that will decide on where, when and who to kill, according to the professor.

I want my solar-powered Zeppelin!

Solar Energy Cheaper than Coal?

That new technique involves using a device very much like an ink-jet printer to lay down the components of a photovoltaic cell onto a thin sheet of aluminum. The cells are much thinner, lighter, and much less fragile than older silicon cells. The result is solar energy that is expected to cost around $1 a watt for the raw panels, and $2 a watt for an installed system. At that price, solar power is directly competitive with the cheapest and most polluting of fossil fuels.

Cheap is great news for the environment. “Much thinner, lighter and much less fragile” is even better. I’m wondering how thin and light these have to get for solar powered aviation to be possible…?

%d bloggers like this: