jump to navigation

The Daily WTF February 1, 2007

Posted by gordonwatts in computers.

I stumbled on this web site preparing for my owl shift tonight (i.e. surfing the web while eating Burger King). It is mainly tech related (sadly, not science), but contains suchcoding gems as:

// MUST be set to 1! Params->ParentalLevel = 3;
// QA now insist this is set to 2.

Or the hilarious integer lookup routine. Or the idiot contractor (are there really people like that? And they get paid!?). I also like the site because they don’t always post why the code is stupid and if it isn’t an area that you are familiar with you’ll be left having to puzzle over it: sort of a brain teaser.



1. Carl Brannen - February 1, 2007

Having spent a couple dozen years in industry, mostly in electronics design, I’ve seen more than my share of incompetent design, mostly VHDL or Verilog hardware design code for FPGAs. I admit that electronic hardware design is a subtle art.

It turns out that one of the designs I had to repair was done by an EE grad student at UW. A public company was using the design in a product. It was for a now very obsolete one time programmable Altera CPLD. The company would program a batch of these parts, but only about 25% of them would work.

Of course this sort of disaster is one of those things that the manufacturing technicians never bother to tell the engineers. If they get 25%, that is enough. When I found out, I dived into the code and discovered that the genius who designed it didn’t understand the principle of designing with a unified clock domains, and had built in a race condition. After I cleaned it up, of course it gave 100% yield.

This gets into the difference between getting a lucky prototype to work and having a design that will perform over the wide variation in process speed, temperature and voltage that silicon always is subject to. Big elementary particle experiments are just big enough that careful engineering design can be necessary.

2. gordonwatts - February 1, 2007

Carl — weird, your comment got marked as potential spam. Sorry about that — though I’m happy that the spam filter is set on high — I have to deal with more than 5 comment spams a day.

But you are right. Our hardware has to run 24/7. I’ve seen many cases where I’m sure we had something from that 25%. That means, btw, that it will fail every-now-and-then. We just reset it and it works for another day or two. And we run it for 365 days a year. Though over time we tend to steadily improve or eliminate things. A good thing about our work is that it is a one-off, so you can afford to tinker.

I’m surprised they didn’t have someone review the design. A “code” review is almost always necessary in the real world, I thought.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: