Thursday, February 19th, 2009

how not to estimate time

typedef double (*TDLLEstimateTime)(int,int,int,int,int);

TDLLEstimateTime DLLEstimateTime;

DLLEstimateTime = (TDLLEstimateTime)GetProcAddress(PsiDLLHI, “EstimateTime”);

double EstimateTime(int rep, int n1, int n2, int n3, int n4) {
if (SetupDLL()==1) return DLLEstimateTime(rep,n1,n2,n3,n4);
return 0;

Thursday, February 21st, 2008

A Telephone Call (2008 edition)

   function onIdle;

   global selfesteem address

   at_wits_end = -1; deluded = 0; elated = 1;
   state = deluded;
   while state == deluded;
     state = at_wits_end;
     for i = 0:5:500,
       m = getmessages;
       if ~isempty(find(m.sender==address)),
         state = elated;
       qualms = rand(1);
       if qualms < i/1000,
         state = deluded;


   selfesteem = selfesteem + state;
Friday, July 28th, 2006

Neal Stephenson – Snow Crash (1)

snowcrash.jpg A very inventive story and cool story, with the same weakness Stephenson’s other books have in my opinion, a forced ending. Creating complexity, just to then shoehorn it into some resolution so readers can feel better is not something I approve of. Otherwise it’s quite flawless, though. It’s also quite interesting to see how Stephenson obviously churned on the themes he scratched upon in this novel for the later Diamond Age, and then took them into more realistic contemporary fiction with the Cryptonomicon.

Saturday, May 27th, 2006

a.k.a. sucker

Two months ago, the attempt to add a new harddrive to our old home PC backfired gloriously, with first the harddrive not being recognized, and then the onboard controller dying in the fray. Reluctantly I decided to upgrade the main system components, and so I bought a mainboard, processor and memory from Tiger Direct, completing the simple harddrive upgrade, and left with essentially a completely new system. The decision was eased by a substantial rebate offered by Tiger on two of those components.
When it came to claiming these, however, I found that after collecting several documents and tediously typing in information on a rather complex online page, I still had to send in quite a bit of paperwork, so that I then might receive a check in the mail six to eight weeks later. If prepared the letters, put them in my jacket to take to the post office and forgot them there.
Six weeks later I stumble across them, finally send them off, only to then learn that of course the rebate can’t be honored any more, because the time window closed. I write them a friendly email asking for mercy, and receive a cut and paste decline.
Valued customer, that’s me.

Tuesday, March 7th, 2006

hardware meditation


I post this so others don’t have to go through hours of painful hardware research, not because I think it is a particularly interesting story. If you just bought a new, large harddrive which is running inexplicably slow in windows, this story is for you. If you didn’t, it’s not.

The players in this particular story are a 250GB Seagate drive, a K7AMA ECS motherboard with an ALi chipset on it. The problem is, the harddrive runs extremely slow. And I mean extremely, about 15 times slower than the old, small one it was meant to replace.

Whenever you try to solve a simple hardware problem, like a harddrive running slowly, you invariably learn more about hardware than you wanted to know. You even learn more than your brain is capable of learning. It’s a mystery.

In this case, what I learned is that there are numerous operating modes for harddrives under windows. THere are several DMA and Ultra DMA modes, conveniently numbered for easy reference, and something dreadful called PIO. You don’t want PIO. But whenever something goes wrong with your harddrive, windows reduces the number of your DMA mode by one, and if enough things have gone wrong, and there are no more DMAs left to take away, to PIO you go. This is pretty much the only thing that comes up on first google searches of the problem, but unfortunately this has nothing to do with the problem. There should be a name for the particular feeling you get when you tracked down a solution for a nasty problem and realize it doesn’t work; that quick, thorough switch from elation to dread. I’ll call it Metus Repens, because latin sounds cool.
Just for the record: if your drive is ever stuck in PIO because of past errors, uninstalling the IDE channel it’s on will probably fix it. Or it might not. Good luck.

But fortunately we’re dealing with something else here. Upon booting, the BIOS properly reported the drive as UDMA 5 capable, and S.M.A.R.T., both of which Windows proved W.R.O.N.G.. But there was a small hint indicating that this was not a problem specific to windows. When autodetecting the drive in the BIOS setup, it was identified as a 137GB drive, which is a magical limit for some reason or another. If the BIOS didn’t properly recognize the drive, maybe there is some hardware issue windows is struggling with.

So now I did a Google search on K7AMA, PIO and hard drive, and indeed found about a dozen other people stuck with the same problem. There should be a name for that feeling, as well: the realization that your problem is common and does not have a solution. Its about the same feeling people must get when they are told they have an incurable disease. Horror Fatui. I’m not sure that’s even proper Latin, but it sounds good, so it’ll do.

What it came down to is that the cheapass chipset that ECS chose to put on the K7AMA motherboard does not, when run with its original drivers, like large disks. While both IDE channels should be fully capable of UDMA 5, they actually are not. And since the chipset is cheapass, there are no updated drivers to be found, anywhere. Not on ECS’s website, which has everything but the IDE drivers, not on ALi’s, which inexplicably doesn’t offer any downloads at all, but still has a few references to a drivers section strewn through the pages, all dead links, of course. Bastards.

At that stage I discovered this page, just because I had been searching for hours. Tracking it down again for linking to it just cost me fifteen minutes, in spite the fact that I knew it existed and remembered many keywords and that it was on a .edu server. This site had the ALi integrated IDE driver in a version compatible with my ALi chipset. I don’t know where the author got it from, and I don’t know why it changed both my IDE channels to SCSI, but I don’t care much either, since installing it fixed the speed problems.

I’m glad I got that off my chest. Aren’t you, too?

PS Sorry to add this, but after a few days of operationality, the PC died the true death. I suspect something in the mainboards IDE bridge circutiry was fried, but I can’t be sure. I’ve replaced the mainboard, reinstalled Windows, and everything’s fine now. So was it all for naught? Yes.

Wednesday, February 23rd, 2000

Die Rettung des Filzhuts

Der Schreck fährt unserem tapferen Programmierer eisig in alle Glieder, als er sieht, daß die stundenlang am Vortag ermessenen Augenbewegungsdaten aussehen wie der reine Zufallsmüll. Noch erwägt er – es wäre ja der siebte gescheiterte Versuchsversuch – das fotogene Zerbeißen eines Filzhutes, als ihm einfällt, daß das Testen eines bestimmten Unterprogrammes es nötig machte, statt tatsächlicher Meßdaten Zufallsmüll ans Hauptprogramm zu geben. Der Programmierer entfernt lachend die entsprechenden Zeilen, dann stoppt er in der Bewegung und der Abspann flimmert vorbei. Sowas gibts eben nur im Fernsehen!