::::: : the wood : davidrobins.net

Hi Mom, I'm on the TheDailyWTF

News ·Monday October 9, 2006 @ 21:47 EDT (link)

So this morning I was reading The Daily WTF as I often do, a site that exhibits bad code, bad management, or both, and I came across the latest smorgasboard, and lo and behold I saw some perl code referring to a $gst which is Hiltonese for guest, and a record, thus:
P. C. apparently inherited code originally written by an evil genius from deep inside his volcano headquarters.
@{$gst}{keys %{$rec}} = values %{$rec}; # muhahahaha
The code immediately looked familiar, as did the comment. I did some checking, and sure enough, it's part of the User.Notify transaction in the gpm::user::User (sic.) module. Many that read the article didn't think the code itself was worthy of a "WTF?!", even with the comment. In fact the first thing I thought was, as another commenter noted, that it had unnecessary braces, although I might have left them in for clarity. As I recall, that line replaced a lot of messy code, and was (and still is) an eminently compact solution. Yes, I'd do it again—but with less braces: @$gst{keys %$rec} = values %$rec. I dropped Peter a line thanking him for the mention, but our mail server was slow (those twits down in Exchange think it's funny to run their beta code on our production systems periodically), so a few hours later I got a note from Bob about my recent eminence.

This Saturday we went looking for garage sales, since Indian summer is extending so beautifully; I was specifically looking for bookcases, and I wasn't disappointed. For $35 (down from $55.50), we picked up two small (4-shelf) bookcases (one new, $5 and another a little more worn but larger, $7, both down from $10), a small table ($10, down from $20), Honey got an (unused) purse ($5, down from $7), Remember the Titans ($3), and six books: The Blind Assassin ($1), To Kill a Mockingbird, The Red Badge of Courage, Of Mice and Men, A Farewell to Arms ($1; $0.25 each), and Our Dumb Century (a compilation from the Onion, free with the DVD). A pretty decent haul, all-told, and now our remaining stacks of books have homes.

Finished Police Quest 3 yesterday. Not much of an accomplishment since I already beat it back about 10 years. If you're counting, we're at King's Quest V and Space Quest IV (not started yet), and Leisure Suit Larry 2 (not on the boat yet, but won the lottery and trip). I loaned them to BB at work since he wanted to see how well they ran under XP (very well, Vivendi did a good job packaging them, using the open source DOSBox; no configuration required or possible). I watched The Manchurian Candidate—not bad for a black and white, interesting idea, and we saw the new Fast and the Furious, Tokyo Drift; standard but decent action flick, but it froze at 00:00 and we had to skip a track and rewind, so I'll be returning it for a new copy.

Some Joel test scores (all out of 12): Microsoft, 12, athenahealth, 9, Hilton, 10, and a job in I was talking to a guy in Kentucky about on EFnet today, 4 (ouch, but apparently it's up from 2 due to a clueful senior VP). The Joel test is a quick way to assess programming shops.

A few hundred years ago some chaps had the novel idea that people (well, white, male, land-owning people, but it's the principle of the thing!) should be able to choose their leaders, and those people should represent them. It was a good idea, so what went wrong, and why is it now that the richest people, through their corporations and something called "lobbying", primarily because "corruption" and "votebuying" was already taken, now speak for us all? Can this be fixed?

How about direct democracy, with the representative vote as a fallback? We didn't have the technology when this nation was founded, but we surely do now (Diebold nonwithstanding). People would vote using set-top boxes or telephones or The Internet, or boxes at the corner store, or something accessible enough that your dog can do it, because anything more would be discriminatory, but that's another rant for another time. If people aren't interested in an issue, their elected representative's vote is taken instead. If you didn't vote for anyone, you don't get to vote directly, either; wait another 2/4/6 years and remember to take a few minutes out of your busy day this time. So, most of the time the majority cheerfully goes about their business and lets their representative, well, represent, but when something near and dear to them comes up, and they're worried that he'll be lured from the straight and narrow by greenbacks, well, they can step in and press a button. It'd also be nice if a sufficient number of interested people could propose bills, too (I think they can now, but it's really hard for the common man, which makes it effectively impossible).

A variant is to let people vote for whoever they want, and winner doesn't take all; the person you pick gets to case your vote, but only if they're among the top n in the nation do they get an office in Washington.

It has to be in a politician's best interest not to accept lobbying funds. If it's forbidden, it'll happen anyway. If you vote with the people that gave you money, and not the voters, we'll take your vote away and vote ourselves, and now we don't trust you, and maybe we'll pick someone else next election. Do we even need politicians at all? A few, sure; I think the senate level is an important balance, but the house of representatives could be dumped entirely (so now the default is no vote at all, so only those that care to vote on an issue are heard). What can go wrong with that? Mob rule? That mob is the majority, and that mob elects people, so why not let them make the decisions in things that affect them and things they care about? I lean libertarian anyway, and I think people should be responsible for their own, which mainly means my property taxes should be cut by two thirds because I don't have any sprogs in school. (Is school a common good? Perhaps, so cut said taxes by only half; parents should be responsible for their children's upbringing, and if they can't afford it, don't let them loose hooligans on us all, just take the kids away and sterilize them to prevent it happening again.)