Saturday, March 25, 2006

No More Retail Electronics Stores

So, to wrap up the hardware saga I posted in the last few weeks, my memory chips finally arrived yesterday (after being delayed in Oregon for three days by "inclement weather"). I swapped them for the bad ones in about ten minutes, turned the computer on, and it worked. After I played a couple missions in Homeworld 2, I rebooted and let the memory test run all night, just to be totally sure. No problems :-).

Sadly, we seem to have lost the receipt from when we returned the first bad batch of RAM, so Fry's may get to keep Kate's money. Regardless, they've certainly managed to lose one or two customers, at least when it comes to computer hardware.

Saturday, March 18, 2006

Memcheck good; Fry's not so good

So, after finding a CD that had memcheck on it, I ran a memory test on the new system I had assembled but couldn't get working. Unsurprisingly, it produced a bunch of errors, especially in test 8. I tested the memory modules one at a time, and confirmed that one of them reliably failed test 8 with, while the other survived multiple passes of memcheck's whole arsenal of tests without skipping a beat.

OK, no biggie; I got a bad RAM chip, I'll return it. So we take it back to Fry's, I explain that I ran a memory checker on one of the chips and it came up bad (I even helpfully gave them a note indicating which of the two seemed to be the problem), and asked to exchange it for a new chip. The customer service guy vanishes, then comes back a while later with a different chip in a box. As we're preparing to leave, Kate notices that the "new" box is opened. "Why's that?" she asks. "Oh, testing," the customer service guy says.

Testing. That's good, right? So we shop a little, take the chips back, and I plug them in. I figure, hey, never hurts to be too careful, and boot up memcheck. BAM! Within half a second the screen turns red with errors. In comparison, with the first set of chips I had to run the tester for up to fifteen minutes before I got a test failure. Trying the chips individually, I discover that 300MB on one is just (as far as I could tell) gone. It fails every single test. The other one survives the first few checks, but fails test 8 just like the other bad chip I had. [UPDATE: it's actually not that bad; it does seem to have problems, but it doesn't fail on every single run of test 8, and it was able to run the Kororaa live CD]

Now, as I see it, we have the following possibilities:

(a) My luck sucks and I just got three bad chips in a row.

Possible, but I've bought at least a half dozen memory chips in the past (not counting ones that came in preassembled systems) and I'm pretty sure this is the first, maybe second time I've seen a bad one. Three in a row? That's ridiculous.

(b) I screwed up and blew out the chips while installing them.

Unlikely for the same reason as (a). I may be shaky on some hardware stuff, but I know how to install DIMM chips. Killing one might be in the realm of possibility; killing three out of four? Don't think so.

(c) The chips aren't compatible with my motherboard.

The chips are listed as being DDR400, which ought to be perfectly compatible with the motherboard. They are installed in the proper configuration (according to the motherboard's manual); besides, one memory chip worked just fine.


Assume that (b) and (c) are indeed false: the chips are really bad and I didn't destroy them. This, combined with the fact that Fry's "testing" didn't catch the blatantly obvious problems with one of the new chips, make me wonder if

(d) Fry's decided to save costs by handing me a pair (maybe even two pairs) of chips that another customer had returned, on the theory that returns are on average spurious.

The main problem with this theory is that I don't see why they wouldn't have resealed the package; maybe they just suck at testing memory or didn't bother to. On the other hand, I have seen a number of complaints online about Fry's and other big retailers engaging in this practice. (e.g., Google for "Fry's restock")

Either way, whether it's deceptive practices or just plain incompetence, I'm afraid this hasn't left a particularly good taste in my mouth about Fry's, and I'll probably just try to get a refund and buy the memory elsewhere. The only downside is that "elsewhere" more or less means "online", which means no instant gratification. However, since "instant gratification" in this case has been more like "instant non-gratification", I'm willing to live with that.

Windows stupidities

As I've had to use Windows on a daily basis, I've found that I am no longer able to maintain my air of detached tolerance for the foibles of the system. In fact, I'm starting to get really infuriated with the utter boneheadedness of so many facets of it. Not so much things that are broken, as things that are done badly, and done so in the face of widespread examples of how to do it right.

Here are two simple examples that are emblematic of what Windows users have to suffer through.

(a) Mandatory file locks.

On Windows, every access to a file, by default, acquires a mandatory lock on it. Want to recompile the program you're working on? Sorry, you have to track down and kill all its running instances. Want to read that file on the network server? Sorry, you'll have to run around the office and ask all the people using it to close it.

Last week I got an email asking me to unlock a directory on our local fileserver so it could be renamed. It turned out that I was running an acroread process to view a PDF file...and that locked the directory from being renamed. Because, of course, the universe would implode if someone were to rename a file I had already loaded into memory. This is, however, better than how shared libraries are treated; trying to register a new version of a shared library with the system (the Windows version of ldconfig) will silently fail if programs have the old version mapped into memory. WTF? No, really, WTF?

Windows users get around this by having tools to find out which processes have a file open so they can terminate them with extreme prejudice. This is considered normal and acceptable behavior for a computer in the Windows universe. After all, in the real world two people can't use the same document at once, so why should they be able to do so on a computer?

(b) C# events.

They've been invented many times. Signals, events, hooks, whatever you want to call them, they're collections of function objects that are invoked when some particular condition occurs. It's a great way to make it easy to connect together objects that don't know about each other, they're simple enough that your average CS sophomore could implement them in a half hour, and the concept is so obvious (besides having dozens of examples of working and deployed implementations) that there's no way to screw it up, right?

Wrong.

Now, C# is generally a somewhat clunky language, but this is nothing to do with that (I am not, for instance, surprised that it's cumbersome to bind extra parameters to an event in a language that has little support for higher-order programming anyway). No, this is one of those utter idiocies that just make you scratch your head and go what the *@&# were they on when they did that? You see, when you call an event with no attached listeners, C# throws an exception. Just, you know, as a friendly way of letting you know that you didn't connect to that event.

But wait! It gets better! In order to test whether the event has any connected delegates (the Microsoft term for a function object), you ... compare it to the null pointer. Yes, that's right. Every time you call an event, you have to do this:

if(Event != null)
    Event();


...because, of course, an empty collection of events is clearly the same thing as a nonexistant object.

I really wish I could be a fly on the wall at the meeting where this was decided. My imagination supplies a scene along these lines:


Scene: A smoke-free office somewhere deep in the sterile labyrinth of the Microsoft campus

Programmer 1: "...and we call this bold new innovation 'events'! It's a way for you to perform method calls without knowing which method you're calling. We've found that it's amazingly useful when doing UI programming. I'm sure that introducing this new idea to the world will be yet another chapter in the Microsoft story of advancing technology!"

Programmer 2: "Have you checked the corner cases? What happens if there is no method available to call?"

Programmer 1: "Oh, of course! In that case, the list of methods is null, so we throw a NullPointerException. We thought about adding an IsEmpty property, but who would want to look up properties on the null pointer? Besides, hardly anyone will ever want to create an event that might not get connected to."

Programmer 2: "Uhhh, sure, that makes sense to me."


...!!!?!?!?!

Friday, March 17, 2006

So close, yet so far away...

So, thanks to Marc's helpful advice yesterday, I took another look at my power supply, and lo and behold, there was a second four-pin power cord that I hadn't seen!

Allow me to explain. In my previous post, I mentioned that I had been doing something "wrong" with the power cable. You see, the case we picked out (an Antec Sonata) has a 24-pin power cable of which 4 pins can detach for older systems. At first, I misread the manual and thought this was for newer systems, so I detached it and plugged it into the handy 4-pin plug next to the CPU. Doh. Having corrected that (without the extra 4 pins in the main plug, not even the fans turned on), I was under the further mistaken impression that the 4-pin plug on the motherboard was the backwards-compatibility plug. I did actually check for an extra 4-pin PSU connector, but I must have overlooked the one that existed.

In my defense, here's what the manual states about the power connector:


This motherboard provides two power connectors to connect ATX12V power supplier.

NOTE: This 24-pin power connector "ATXPWR1" is compliant to the former 20-pin type. Pay attention to the orientation when attaching the power cord. (Pin-11, 12, 23, and 24 should be left un-connected).

Note: It is recommended to connect to a power with 350W, 20A +5VDC capacity at least for heavily loaded system, and a 2A +5VSB capacity for supporting wake-up features.


Not exactly crystal-clear on what needs to be connected under what circumstances. The case manual is at least correct if you follow along carefully, and they even found someone who can speak the language. Unfortunately, this section is phrased in a way that's highly prone to misunderstandings, particularly if you have an incorrect idea lodged in your head to start with:

Connect the 24-pin Main Power Connector and the 4-pin +12V connector to your motherboard as needed. If your motherboard uses a 20-pin connector, detach the 4-pin attachment on the 24-pin power connector.


You have to read that quite closely to realize that there are two 4-pin connectors involved!


Anyway, so I can actually get the machine to post and boot. Unfortunately, it's highly unstable once it does boot. It runs for up to several minutes, but then exhibits various sorts of erratic behavior: freezing, spontaneous reboots, random error messages, that sort of thing. I've made sure all the cords are plugged in tightly and reseated a couple components (particularly the memory); about the only thing I haven't checked is the CPU+heatsink mess, which would be a real pain to disassemble and re-assemble.

Still, it's nice to make some progress. Maybe tomorrow I'll discover some other cable I forgot to plug in that will make everything work (hey, I can dream).

Thursday, March 16, 2006

I Hate Hardware Redux

After my last experience, you'd think I'd have learned. But nope, when my girlfriend needed a new desktop system, I enthusiastically offered to build one for her. Hey, this time it's desktop hardware, and I know desktop hardware, right? I built my last machine myself, and I've replaced a couple motherboards and done various other work on computers since then.

Well, it seems there were a few changes since my last computer. First of all, there's the whole business of heatsinks. I don't remember spending any time on the heatsink last time around. I suppose this is because it was pre-attached to the chip or because the assembly process was "place the heatsink on top of the CPU", but I don't remember which. For the Athlon 64s, the heatsinks are so ginormous that you couldn't place the CPU into its slot if it was attached to the heatsink. So there's no option but for them to ship the two separately and have the user assemble them.

Problems? Well, consider the documentation. The store sold us a supposedly complete CPU box packaged by AMD which, when I opened it, contained a stern warning not to attach the heatsink without first applying a thermal material. Contradicting this, though, was the fact that there was something that looked suspiciously like thermal material already on the heatsink, and after quite a bit of research I decided that the warning was for people who want to overclock their systems or replace the stock thermal compound. Nowhere in the documentation does it say whether the heatsink comes pre-treated with thermal compound, though, and since I have no desire to let the magic smoke out, I wasted a lot of time checking up on this.

A second problem with the documentation is that it suffers from severe Lowest Common Denominator syndrome: the installation instructions are entirely word-free. For simple purposes this might suffice, but it took me a lot of squinting and several incorrect tries to figure out WTF the diagrams were telling me to do; in fact, I didn't really figure out what to do until I found an annotated version online with actual words. AMD, there's a reason we quit using cave paintings and invented written language. Please use the stuff, it'll make the rest of us much happier.

On to the practical problems: it's apparently necessary to attach the heatsink so tightly that you need a latching mechanism the size of Wyoming to hold it onto the motherboard, and actually activating it seems to take several metric tons of force. OK, I exaggerate, but just this step (attaching the heatsink assembly to the CPU) took me at least an hour of prying at the latch mechanism to lock it down. In fact, I didn't finish until I finally gave up using my fingers and used a screwdriver to apply a good portion of my weight. Predictably, of course, the screwdriver slipped as I secured the latch, bouncing off the motherboard. More on that in a moment.

The motherboard (an Abit K8N) had better documentation than the CPU, but not by much (this is apparently a pattern with computer components that most consumers never mess with). I had to make educated guesses about the orientation of several connectors, especially some of the case connectors, and it took me at least a dozen reads to understand what I was doing wrong with the power cable.

Once I got all my initial stupidity worked out, I flipped the switch and watched some of the fans turn on and the hard drive spin up...and that was it. Nothing. Nada. No beeps. No POST. Not even a blank video signal (although the video card's fan runs just fine).

So, my best guess is that I killed the motherboard dead with my screwdriver, which means I get to go buy a replacement and install it. And, of course, disassemble all the stuff I carefully assembled already. Including the CPU assembly. And the thermal material on that probably won't be good any more, so I'll have to replace it with what's left over from when I rebuilt my laptop. And there's always the possibility that it's actually the CPU that's dead (although I can't imagine why)...in which case I could waste a lot of time and effort replacing the motherboard needlessly. Blah.

I begin to think that it might be worthwhile to pay the store to install the critical components for me, or even just buy from a real PC vendor. At least then I'd avoid wasting my time and (presumably) get my money back if they screwed up.