Programming Tests: Useless waste of time, or massive insult?

I just had to take another one of those stupid “BrainBench” programming tests for a job I’m applying for. (I’m not planning on leaving the place I’m working now, but as a contractor you always have to be ready to jump ship.) These tests are a complete and utter crock of shit. They don’t test if you can program, all they test is if you’ve memorized every obscure and complicated part of the literally millions of lines of Java API documentation out there. A typical question will show you four snippets of code, and ask you which is the correct one. And they’re not localized down into one part of the API that might be relevant to a particular job, either.

One of the questions was about how to set up a cookie handler on a persistent URLConnection. Another was on how to set the line width in a Graphics2D line. And another was on setting up a pipe between a sender and receiver. You know, if I’d needed to do any of those things in my 12+ years of programming in Java, I might have bothered to memorize that page of the API documentation. But I haven’t, so I haven’t. Instead, I’ve wasted my time learning useless things like how to write code so that when you or somebody else comes to add some functionality a few years from now, they can figure out why you did it the way you did it, and can add their stuff without breaking what you’ve got there. And how to debug an obscure exception that only happens after the program has been running for 45 days. And how to structure a program so that it’s fast, reliable, does what it’s supposed to do and doesn’t crash. You know, frivolous stuff like that.

Evidently I’m not alone in my hatred and disgust for these stupid tests. According to The Register, Ken Thompson, co-inventor of Unix and of the C programming language, isn’t allowed to check code in at Google because he refuses to take their stupid C language test. How stupid do you have to be to insult the man who invented the language by asking him to take some test that was probably written by some 24 year old “language lawyer” straight out of school who has memorized every obscure part of the language without being able to use any of it well?

So I’m guessing that I probably did horribly on that test, and that I’m probably not going to get an interview there, and that’s perfectly fine with me because I don’t want to work with people who were chosen because they’re good at memorizing language documents. They probably write horrible code, but think they’re great because they don’t have to stop and think and look things up.

Maybe VPS or cloud *is* the way to go, after all.

More problems setting up the new colo box:

  • I shut down with all three domUs running, and when it came back up, xend wasn’t running so they wouldn’t start up again. Further investigation showed that I hadn’t made my root partition big enough to handle when it saved the current xen state to /var/lib/xend. So I made a new lvm partition for /var/lib and mounted that instead. So far, so good.
  • While I was investigating this, I noticed my software raid was running in degraded state, because it had lost /dev/sda3. I re-added it and it started to rebuild it.
  • While it was rebuilding, I noticed that xen1, my first domU wasn’t running any more. When I tried to recreate it, it told me I couldn’t recreate it because its main disk, /dev/xen-space/xen1-space, was mounted in a guest domain. Oh oh.
  • Then I got a kernel panic. Double oh oh.
  • I rebooted, and tried to rebuild the raid without xend running, but I got another kernel panic.

This is supposed to be easy and fun, right?

I’m currently booted with the rescue disk, and I’m trying to rebuild the raid again. If that dies, it might be time to cut my losses.

What to do, what to do….?

Back around the beginning of March, the box this blog (and lots of other things) is hosted on failed, and I got it back up by removing one of the CPUs. Since that time, I bought some replacement hardware, and have had it 90% set up for about a month here. But I haven’t quite figured out how to make the transition to the state where everything is running on the new box without another week of downtime. Ideally I’d like to have both boxes on a rack somewhere so I can shut down the domU (guest domains) on the first box, rsync everything over, and bring them up on the new host, and then change the DNS entries.

One of the reasons I’m holding off on doing this is that my hosting site charged me $105 just for the privilege of taking my box off the rack and putting it back, and both operations took them *hours* to accomplish, mostly because their business office is the other side of town from where the rack is. And they don’t let you visit the rack yourself.

There is a second hosting company in town, and they advertise lower prices than I’m paying at my current host, and they say “If you want a site tour, let us know”. They also seem to have their rack space in the same building as their business office, so I have hopes that they wouldn’t be able to rack the box in less than 12 hours. So I’ve let them know that I want a tour. Twice. The first time, they ignored me. The second time, somebody contacted me to say he was out of town the next week, but he’d have somebody else contact me, and that person never did. So I’m pretty much ready to give up on them. Which is too bad, because that would be ideal – I’d rack the box, do the rsyncs, move the DNS entries over, and when it appeared everything was working, cancel my contract with the old place.

So now I guess my option is to ask the old guys how much they’d charge me for a couple of weeks of having two machines on the rack with 4 more IPs. I’m betting it’s more than the $105 they charged me to unrack and rack my box last time.

Earthlink sucks, film at 11.

Earthlink is blocking email from my colo box (which is on a static IP, has never sent spam, and isn’t on any known block list in the world). I jumped through their hoops to report this fact, and got two emails within a few seconds of each other:

  • One claiming that I’m not blocked, so why am I claiming I am?
  • One claiming that they’re removed the block that they just finished claiming wasn’t there.

And of course, email is still bouncing. Of course they did caution that removing the non-existant block will take 2-24 hours.

Don’t you just love consistency?

In the last hour, I’ve been told

  • Don’t use SYSDATE in inserts/updates because although it’s bog standard SQL (I’m not sure if it’s ANSI standard, but it’s pretty common), it’s not supported by all Microsoft databases (even though we only use Oracle in this project)
  • Do use VARCHAR2 instead of VARCHAR, because although VARCHAR2 is only supported by Oracle, and in the current release it’s just a synonym for VARCHAR, some day it’s going to have different comparison semantics than VARCHAR and Oracle says to use it, so we have to use it.

I’ve also been told that these two tables, which I have to populate by hand using manually taking the rows and columns of a spreadsheet and writing “INSERT…VALUES(‘row’,’column’,’value’)” statements several hundred times, can’t use semantic primary keys because they want to use UUIDs. So instead of looking at the spreadsheet and seeing that in the row labelled “Insurance” and the column labelled “Security” that the value is “V” and converting that to “INSERT … VALUES(‘insurance’,’security’,’V’)”, I’ve got too look up the uuid for the Insurance row and the uuid for the Security column, and change that to “INSERT … VALUES(‘6BAC51EC-C636-4C31-9E95-367062AC23F7′,’C78BF79B-3178-4F07-ACD3-92DF2742C932′,’V’)”. And I’ve got to do that several hundred times. Yes, that seems *much* less error prone that using keys I can actually tell what they mean and easily tell if I’ve got the wrong one. Oh, and even better, the code that uses the information in this table will have to hit the database to look up these uuids so that they can find the value of the “insurance” versus “security” instead of just coding those values directly.