The eclectic musings of a bitter software engineer.

Archived Posts

Displaying posts 181 - 190 of 593

The Flickr API hates me

Wednesday September 20, 2006 @ 10:25 PM (PDT)

My Flickr API key stopped working a week or two ago. API calls just return an error message saying "Invalid API Key (Key has expired)". That's why there hasn't been a new picture on the photoblog in forever. Flickr's API key status page says my key is still valid and active. I've even created a new key, but it gets the same error.

I wrote about this in Flickr's FlickrBugs forum and got just one response, which is from someone having the same problem. Google searches turn up a few other people having the problem, but not recently, and I have no idea whether (or how) their problems were resolved. Has anyone else had this problem? What did you do to solve it? Does Flickr even care?

If this doesn't get fixed soon, I'm going to have to ditch using Flickr for the photoblog and go back to my old custom setup.

Update: A friendly Flickr employee was awesome enough to drop by and solve the problem (see the comments for details). Turns out the third-party Flickr.rb library I'm using has a bug and is sending its own (expired) API key instead of my active key. Not Flickr's fault at all. Thanks kellan!

This country needs more Keith Olbermanns

Monday September 11, 2006 @ 11:46 PM (PDT)

A long time ago, long before I was born, back when the world was black and white and red all over, there was a man who spoke so eloquently, so wisely and so bravely that he righted the course of a nation that had lost its way. His words, spoken from a comfortable chair behind a small wooden desk on which sat little more than a microphone and an ash tray, defanged a rabid wolf and made history. Edward R. Murrow was a patriot without equal; a believer in freedom and democracy; an American hero.

Murrow died before I learned who he was or why he was special. If George Clooney hadn't made a movie about him, most people who weren't alive in the 50s wouldn't have the slightest idea who he was. They don't make men like Murrow anymore.

These days, if you take the time to form an eloquent opinion, you've already lost the argument. It doesn't matter what anyone says anymore; all that matters is that you use the right code words. Liberal, Conservative, Democrat, Republican: if the person speaking has a label that doesn't match your own, you can safely ignore his words. They're probably all lies anyway, right?

Keith Olbermann is one of the few people alive today who both has a voice and is worth listening to. Not because he fits all the right labels or because he yells at people until they give in, but because he's got an amazing talent for turning coherent thoughts into words, putting them on a piece of paper, and then reading them on TV. It's such a simple concept you'd think more people would be doing it, but for some reason it's more precious than gold these days.

The bitch of it is that, in the end, he'll probably just get lost in the noise. TV only had three channels in Murrow's day.

Jetpants is profitable!

Sunday September 10, 2006 @ 05:07 PM (PDT)

A new customer today finally bumped Jetpants into the black. We're profitable! Well, sort of. If you ignore the cost of my time and the expense of the new server. But as far as monthly expenses go, we're actually turning a profit now. In a few more months, Jetpants will have enough liquid capital to buy a celebratory Frappuccino.

So yeah, it's not exactly big money, but I'm stoked that my filthy bandwidth habit is now actually paying for itself, which has been my ultimate goal all along.

Aspirin is 80 times more deadly than terrorism

Wednesday August 30, 2006 @ 11:32 AM (PDT)

Aspirin and other nonsteroidal anti-inflammatory drugs (NSAIDs) are about 80 times more deadly than terrorism if you live in North America.

According to this paper published in the Annals of Internal Medicine in 1997, NSAIDs are estimated to kill 7,965 people every year in the US and Canada. This is shocking when compared with the terrorism statistics published in the MIPT Terrorism Knowledge Base, which reveal that only 3,576 people have died in North America as a result of terrorism since 1968 (and most of those were in the World Trade Center).

In fact, aspirin and related drugs kill far more people in the US and Canada every year than terrorism kills in the entire world, including the middle east. And guess what's even more dangerous than aspirin? That's right: cars.

Kinda' makes you wonder why terrorism is such a big deal, doesn't it?

Update: The original version of this post claimed aspirin was 8,000 times more deadly than terrorism. A reader pointed out that there's a big difference between 8,000 times and 8,000 percent, which is what I actually meant. In fact, aspirin is only about 80 times as deadly as terrorism. Sorry about that.

Half Ass Road is a closely-guarded secret

Sunday August 27, 2006 @ 04:34 PM (PDT)

A locked gate I made yet another attempt to find Half Ass Road today. That's four attempts so far. I didn't find Half Ass Road, but here's what I did find:

  • Several locked gates, one of which had a sign claiming it was being monitored by video
  • More than a few "No Trespassing" signs
  • Many, many dirt roads
  • A lost motorcyclist who flagged me down, said he had been driving around aimlessly on dirt roads for three hours, and begged me to help him find a highway

As I came to each dead end, the GPS worked tirelessly trying to find new routes, but I exhausted all of them. Every single one. At the end of each was either a natural barrier of some kind, a locked gate, or a very large, very serious-looking "No Trespassing" sign. I'm now convinced that Half Ass Road is located on private property, which means I'll probably never get to see it unless...no, no, that'd be silly. Dressing up like a ninja and hiking out there on foot in the middle of the night would probably get me shot or arrested or both.

I guess I'll let the mystery live on for now.

The Mystery of Half Ass Road

Monday August 21, 2006 @ 01:35 PM (PDT)

According to some old Google Maps data I saw a while back, this road is called Half Ass Road. Judging by the satellite image, it looks like a tiny little dirt or gravel road that goes from nowhere to nowhere. What is its purpose? Why is it called Half Ass Road? What treasures lie hidden at that ominous dead end?

Last Friday, as my maiden voyage in the new WRX, I made a valiant attempt to find Half Ass Road. Unfortunately, the GPS wasn't aware that there's a locked gate right here which blocks access to the final section of the journey. I drove around for a while looking for alternate routes, but I wasn't having any luck and the locals were starting to give me the stinkeye, so I gave up and went home.

Luckily, I've just discovered how to use the "detour" feature of my GPS, which has revealed a possible alternate route. I'll make another attempt tonight. With any luck, the secret of Half Ass Road will soon be revealed. Stay tuned.

Update #1: Looks like someone else noticed Half Ass Road back in 1991. They also noticed a bogus city named Timbuktu, which is near Goback Road. I've added Timbuktu and Goback Road to my list of waypoints for the journey this evening.

To jump or not to jump? Update #2: The mystery is still a mystery. I spent the better part of three hours driving around on haggard dirt roads in the hills, stopping frequently to move large rocks out of the road, yet at every turn there was either a dead end or a locked gate blocking the way to Half Ass Road. At one point, the only thing between me and the finish line was a big mound of dirt and a three foot wide ditch that had been dug across the road. I considered jumping it Dukes of Hazzard style, but decided I was way too mature to do something like that.

I haven't given up. There's still one direction from which I haven't approached yet. I still have hope.

I bought a car today: a brand new 2006 Subaru Impreza WRX.

"But wonko," you're saying, "didn't you already own a WRX once? And didn't it get you into all kinds of trouble with the popo? And didn't you buy a new Mazda just last year?"

Yes, dear reader, all of these things are true. The fact is that while the Mazda3 is a wonderful car, it's no WRX. Yeah, it was a lot cheaper and the insurance rates were better and it was sporty and handled well and got me to work every morning, but it wasn't a WRX. Driving wasn't fun anymore, it was just something I did to get from one place to another. Instead of grinning like a madman every time I whipped through a series of curves or planted my foot on the gas pedal, I just heard a little voice in the back of my head saying, "This isn't a WRX."

So screw it. You only live twice on her majesty's secret service, and all that jazz. I bought myself another WRX.

It was the easiest, most painless car buying experience I've ever had thanks to Carr Subaru's Internet sales department and USAA. I emailed Dan Doyle at Carr, told him what I was looking for, and he gave me an absolutely mind-bogglingly low price quote right off the bat. USAA gave me great rates on a loan and insurance, I made an appointment with Dan, took the car for a quick spin, wiped the slobber off my chin, signed some papers, shook some hands, and that was that. The car was mine, and for thousands of dollars less than I had expected to pay.

I hit lunchtime traffic driving back to the office, but I didn't care. It was still more fun than I've had driving in the last year.

Dirac Angestun Gesept

Wednesday August 16, 2006 @ 09:38 PM (PDT)

Wasp, by Eric Frank Russell, is one of my favorite books of all time.

The Terrans are embroiled in an interplanetary war with the Sirian Empire. As the war draws on and the death toll rises, they realize they can't win in a fair fight. They send a secret agent, James Mowry, to wage a one-man war on an entire Sirian planet. Mowry does this by committing various acts of civil disobediance and terrorism. In fact, he does very little himself; he lets the planet's government do most of the work.

By striking fear into the hearts of the populace and prompting the government to heighten security to paranoid levels, he sets a machine in motion that does virtually all his work for him. Then, when things have gotten so out of hand that the government is fighting its own people and vice versa, the Terran fleet swoops in and finishes the job.

We're losing, and we're so blind and stupid that we're actually happy about it.

I've been getting flooded with a particularly annoying and very tricky spam email lately. It's a multipart HTML message containing a bunch of random words, so it defeats Bayesian filters. The actual advertisement is in the form of an attached image, which begins with the following text:

***ATTENTION ALL DAY TRADERS AND INVESTORS***

INVESOTR ALERT!
IT LOOKS LIKE ANOTHER RUN FOR SWNM!
WATCH SWNM LIKE A HAWK ON Tuesday August 1, 2006

Since it's impossible for a spam filter to actually parse the image, this message is especially hard to block. However, the message does contain one string that's not random and is very unlikely to show up in a legitimate email. Here's a SpamAssassin rule that will assign two points to the message based on that string:

# "INVESOTR ALERT!" image spam
rawbody __LOCAL_INVESOTR_IMG_TEST1 /^font-family:Arial'><img width=429 height=558 id="_x0000_i1025"/m
rawbody __LOCAL_INVESOTR_IMG_TEST2 /^src="cid:image001.gif@/
meta LOCAL_INVESOTR_IMG (__LOCAL_INVESOTR_IMG_TEST1 && __LOCAL_INVESOTR_IMG_TEST2)
score LOCAL_INVESOTR_IMG 2.0
describe LOCAL_INVESOTR_IMG BODY: Contains INVESOTR ALERT! image

(if you're a Jetpants customer, this rule is already in effect for you)

Update: Here's another rule to catch a new variant with a "CRITICAL INVESTOR ALERT!" image:

# "CRITICAL INVESTOR ALERT!" image spam
rawbody __LOCAL_CRIT_INVEST_IMG_TEST1 /^font-family:Arial'><img width=371 height=627 id="_x0000_i1025"/m
rawbody __LOCAL_CRIT_INVEST_IMG_TEST2 /^src="cid:image001.gif@/
meta LOCAL_CRIT_INVEST_IMG (__LOCAL_CRIT_INVEST_IMG_TEST1 && __LOCAL_CRIT_INVEST_IMG_TEST2)
score LOCAL_CRIT_INVEST_IMG 2.0
describe LOCAL_CRIT_INVEST_IMG BODY: Contains CRITICAL INVESTOR ALERT! image

The difference between a div and a span

Monday July 31, 2006 @ 01:12 PM (PDT)

I've interviewed what seems like an endless stream of web designers (emphasis on designers) over the last month or two, and they all seem to have one thing in common: they don't know what the hell they're talking about.

One of the technical questions I always ask and nobody ever answers correctly is, "What is the difference between a div and a span?"

Invariably, each candidate launches into a nervous, stuttering, uncertain description of how they use divs for certain things and spans for other things. When I ask why they use them for different things, the answer is always something along the lines of, "Um...I don't really know."

I had no idea that the level of basic HTML knowledge among people calling themselves web designers (and especially those calling themselves web developers, which is the position we're interviewing for) is so low. This is absolutely shocking to me. Some of the people I've interviewed have done very high-profile websites and have excellent design skills. The fact that they claim to know HTML without understanding this fundamental concept is surprising, absurd, and above all frustrating.

The difference between a div and a span is very simple. The HTML 4 specification has this to say on the subject (emphasis added):

The DIV and SPAN elements, in conjunction with the id and class attributes, offer a generic mechanism for adding structure to documents. These elements define content to be inline (SPAN) or block-level (DIV) but impose no other presentational idioms on the content. Thus, authors may use these elements in conjunction with style sheets, the lang attribute, etc., to tailor HTML to their own needs and tastes.
http://www.w3.org/TR/html401/struct/global.html#h-7.5.4

That's it. That's the answer. All I'm looking for are the words "inline" and "block-level". If you say those words in the correct order, you pass the test. A++++++, would hire again.

Of course, this is only one of the five or so technical questions that every candidate gets horribly wrong. Next time I'll write about the differences between absolute, relative, fixed, and static positioning in CSS.

Update: About an hour after posting this I interviewed another candidate over the phone and he aced all my questions. First time that's ever happened. I should have blogged about this sooner.

Copyright © 2002-2009 Ryan Grove. All rights reserved.
Powered by Thoth.