Lotto

There’s a convenience store attached to the building my office is in, so I tend to stop in for breakfast, lunch, or a snack. Yesterday I noticed that the Mass Millions was up to $150 million or so, so I bought a ticket.

What I find interesting about the lottery is that I know it’s a losing proposition. My odds of winning, by definition, have to be way less than 1 in 150 million. They’re so low that you’re pretty much guaranteed to not win. Basically, you’re throwing your money into a huge pile. A bunch of states will then take half of it out of the pool, and award the pile to someone who’s always in a state you forgot existed.

And yet, if I’m paying $3.50 for some chocolate milk and a croissant, I might as well pay $4.50 instead for a 1:300,000,000 shot at $150 million.

If I win, maybe I can afford a little condo near work. But with Charlestown prices, I’m not too sure about that.

vim Color Highlighting

Since every time I set up a new system I try to remember how to do this… vim supports colored syntax highlighting of myriad programming languages. It’s quite helpful. (Some website I happened across claimed that it increased productivity between 200 and 300%.)

It’s actually much simpler than I thought. Enter :syntax on to enable it. (I bet you can figure out how to disable it.) Or just pop that (sans the :) into your ~/.vimrc file.

Recruiters

I have a phone at work. I couldn’t tell you my extension, nor the company’s main number. Several of the people with desks near me have been with the company for years, and none of them know the number or their extension, either.

Starting yesterday, though, some recruiting company beat me to figuring out my own phone number, and has been calling me repeatedly trying to place candidates with me. They don’t seem to care at all that we’re not a .NET shop, not hiring*, that even if we were, calling my department wouldn’t make any sense, or that I wouldn’t be involved in the hiring process at all even if the Systems department decided to hire programmers.

The first time I was trying to help the caller, thinking it was maybe an important call or something. Only when I realized the call was going nowhere did I start to get annoyed. And then he asked if I would mind if he put me on hold. Before I could say that I did, in fact, mind, I was on hold. So I hung up, and then discovered from my coworkers that recruiters rank somewhere in between spammers and rapists on the totem pole.

So I got another call this morning, and today I was a little more curt. After reiterating—repeatedly—that I have nothing to do with the hiring process, and that we weren’t even hiring for the position she was talking about, I said something like “I’m sorry, but I really don’t have the time to talk about this any further.”

“Oh, did I catch you in the middle of a fire or something?”

I confused her by replying, “Pretty much, yeah.”

But before I could hang up, and with her apparently convinced that I was in a burning building, she asked, “Well, before you go, do you think that, if you were hiring, the candidate I described is someone you would hire?”

Yes. If my office were ever on fire, and the company had decided to put me, their junior systems administrator, in charge of hiring a senior Ruby (on Linux) developer, even though we’re not looking for one*, I would definitely hire the .NET developer you’re pitching.

  • Actually, we probably are. But we’re not telling the recruiters this, because then they’d call even more.

Presidential Code Names

Reporters have gotten the White House Communications Agency to pretty much admit that the not-so-secret “codenames” they assign to the President and the First Family are pretty much totally pointless and arbitrary.

Obama is Renegade. And I can’t help but wonder… Isn’t a renegade a lot like a maverick?

iPhone Reviewed

I think I mentioned, at least in passing, that I bought an iPhone a few weeks ago. Here’s an early review.

In short, I’d give it mixed reviews. It’s pretty slick. But the little extras that initially sold me on the iPhone aren’t things I use often. Visual voicemail is a good idea, but I don’t use it often. Google Maps is slick, but it’s not good at turn-by-turn stuff, which could replace an expensive GPS. The web browser really has nothing else in it’s league, though. I can load normal pages, which look the same as if they were on a PC. Scrolling and zooming is amazing.

It charges over USB, a big plus. (And it comes with a wall wart adapter too.) It’s not a standard USB cable, but it is the normal iPod cable, so it’s easy enough to replace.

The keypad takes some getting use to. I’m really a fan of tactile response and physical buttons. The OSD keypad is big, though. I’m getting better at it, but it still reajiees thY…. See, that’s a pet peer. Peeve. It gets you into a string of it detecting every keypress accurately, and suddenly your text is garbage. It sometime tries to guess your words, which is often accurate but sometimes has amusing results. But often it’s annoying mrs TVA. Amusing. See!?

AT&T has better coverage in be rural areas I use it on than did Verizon. However, Verizon seems to be the only one trying to bring 3G to New Hampshire. My plan is about $70/month for 450 minutes and unlimited data. This is absurd, but all the other plans at competitors are comparable.

All around it’s slick, but it has some things that annoy me. One is openness. I could do MIDI ringtones on my Treo, for example. Not so here, where you’re heavily steered into buying them. The App Store is nice, but it’s lame that there’s no way to “sideload” your own programs: unless you jailbreak it (bye bye warranty), you can only get apps through Apple. It’s my freaking phone!

With my Treo, I could easily use it in the car, as I didn’t have to look. Here there’s no buttons to feel while you keep your eyes on the road. I miss that.

All in all, I’m not disappointed, but I’m not in total love, either.

Readability

I’m not exactly the model programmer, but I’m a big nut on readable code.

I’ve been doing a lot of PHP, but now I’m starting to get back into Perl. And I’m realizing that, in Perl, it’s very easy to write code that makes absolutely no sense to anyone except the most seasoned veterans. It does a lot of what I occasionally chastize myself for doing: taking bizarre shortcuts that shave a few seconds off of writing the code, have no impact on performance, but make your code fairly hard to interpret.

I was trying to figure out how readline() works, for example (I shouldn’t have to look that one up), and they gave this example code block:

    for (;;) {
        undef $!;
        unless (defined( $line = <> )) {
            die $! if $!;
            last; # reached EOF
        }
        # ...
    }

The very first line is odd: a for loop with no parameters. It’s easy enough to assume that it’s to do an infinite loop. The next line ensures that $! is undefined, $! being a variable pointing to errors. (Obviously. What else could $! mean?) The $line = <> is probably clear to anyone who knows Perl, though it’s certainly not intuitive as explicitly stating that it’s referring to STDIN. I find the unless() syntax to be nifty: it’s the same as if(!(…)), but a little clearer. Except I only find it intuitive if it’s expected that the evaluation will be true: unless a rare event happens… Here, it’s unless reading from STDIN is defined.

And even the die() bothers me: maybe there’s no sense in writing out an if($!) { die $! }, but I would have.

All around, I feel as if everything in Perl relies on very terse, bizarre naming schemes, and have always thought that a lot of Perl programmers take pride in writing the most obfuscated code imaginable. There are a lot of languages that I can “read” pretty well: I can sit down and look at your code and figure out what it does. But Perl isn’t one of them. Case in point: I’m scratching my head trying to make readline() read a line of data at a time. That’s what it’s supposed to do, but that’s not what it’s doing. Another time, a function returned an array full of references, a fact that was buried somewhat obscure in the documentation. Don’t get me wrong: it’s a very powerful language, and some brilliant people have done some amazing stuff with it. But it doesn’t have the same beginner-friendliness that other languages do. The same could be said, I suppose, for vi or Linux. But I have lots of reasons why I think Linux and vi are much better than the alternatives. I don’t have any reason to think that Perl is any better than its numerous alternatives. (PHP, Ruby, Python, bash…)

Arugula

I woke up in the middle of the night, and glanced up at my clock. 1:33 AM. But wait, why is it light out? There’s no way I slept 15 hours and it’s 1:33PM? No no, my phone says it’s 6:30 in the morning.

I went back to bed, and woke up a few hours later, at 1:33 AM.

My clock radio crashed. None of the buttons did anything. I had to reboot it by pulling the plug, and now it’s back to normal. What’s the world coming to when a clock radio needs rebooting?

Just Sayin’

PRQ is the Swedish company that hosts sites like The Pirate Bay and some of their affiliated sites, like free image hosting and so forth. It seems that The Pirate Bay benefits from a mix of strong consumer protection laws (so that it’s harder to crack down on hosting a torrent tracker, which doesn’t directly host anything illegal), along with a hosting company run by a team of lawyers who might give Alan Shore and Denny Crane a run for their money.

Google Translate helps translate their site (except that it continues to translate “SEK,” the Swedish Kronor, into “USD,” which makes understanding pricing very confusing), which reveals that they offer colocation starting around $60/month, with a 300GB monthly transfer cap, and VPN tunnels with no bandwidth cap starting at about $12/month. (Plus VAT, which appears to be 25%).

I don’t advocate illegal activity, and neither do they. But just thought I’d point out an interesting company.

Trampled

Why is it that, every now and then, I read a news article and start to wonder if the people we share this planet with are really human, or if they’re slightly less-evolved than apes? Who tears down the doors to Walmart and tramples an employee to death so that they can get a good deal on a new HDTV? Certainly not humans.

Badware

Out of all the talk of viruses, trojan horses, rootkits, spyware, adware, and so forth came the very helpful terms “malware” or “badware,” to encompass all of the harmful software out there. It might try to delete all your files, steal your credit card data, or just display advertisements and garbage all over the place.

But a pet peeve: if your program tries to install toolbars in my web browsers, and those options are checked by default, I consider your program to be badware. It’s not as bad as a virus, sure. But it’s trying to foist unwanted crap on my computer.

The problem is that all sorts of otherwise-good programs are guilty of this. Apple’s updater, used to keep iTunes current, is notorious for trying to get people to install Safari, by having it checked by the default. Last time I installed CCleaner and Defraggler, I think they tried something similar. And all of this stuff makes me lose respect for these companies. If I’m installing an update to Java, what does the Yahoo Toolbar have to do with anything? It’s been years, but I think Quicken gave me a bunch of icons for unwanted services, too.

I think most of these companies end up getting paid in some manner by getting people to install this crap. This is really shady. If you want me to install a relevant toolbar, you can give me the option, but it shouldn’t be on by default. But when I have to jump through hoops to not install something that’s completely unrelated to your product? I consider your software “badware,” and I lose a lot of respect for your company.