Archive for the 'rants' Category


I love popcorn 2

Not the microwaveable kind.

In the circles in which popped corn runs, comparing microwaveable packaging material in a bag to popcorn is directly akin to comparing a Hungry Man TV dinner containing a brownish piece of cardboard (cleverly marketed as a Salisbury steak), to the Filet Mignon at the Stinking Rose, downtown San Francisco (best piece of dead animal I have ever eaten, hands down). In days of yore, it’d be like telling the Pope that the world moves ’round the sun, or the Emperor that he’s not wearing any clothes — it just shouldn’t be done.

And, by the way, if you’ve never seen me eat popcorn while using a computer, you’re missing out. See, I’m a big stickler about getting oils on my keyboard, and I mean big in the gargantuan kind of way that would make the Great Pyramids look like arrowheads half buried in a sandbox. So, instead, I eat it with my tongue. Yup, you read that right — I hold my bowl up to my face, and stick my tongue in there like an aardvark wriggles out his long strip of double-sided Scotch tape and sucks up ants, only I’m sucking in popcorn. Works like a champ.

Anyways, I was whipping up popcorn tonight and realized that some people could miss out on the delicacy that is popcorn made on a stove. So I decided to share my recipe, which I got from my parents, who probably got it from no-one, because way back when my parents were little, everyone sat around knitting their own sweaters, making their own shoes, and popping their own popcorn, so it was just common knowledge.

It’s not even that hard. First, find a pan with a lid. Pour a little bit of vegetable oil on the bottom (cover most of it, but not all), then put in the corn. Turn on the burner, shake the pan every now and then, and wait for it to stop making noise. After emptying into a bowl, you can use the same pan to melt butter — but (this is the important part!) make sure it’s butter, not some byproduct of synthetic tires; that stuff just makes it soggy.

Season to taste with salt.

Seriously, this stuff rocks.

Context, and why it’s important 3

Today just about every news outlet I can see is carrying a story on Sarah Palin announcing that the Iraq war is, “a task that is from God”. Everyone’s referencing the same quote — but unfortunately, they’re all misquoting it.

So here’s the full quote:

Pray for our military men and women who are striving to do what is right. Also, for this country, that our leaders, our national leaders, are sending them out on a task that is from God. That’s what we have to make sure that we’re praying for, that there is a plan and that that plan is God’s plan.

Now watch this YouTube clip. Wait… Starting at ‘our national leaders’ is definitely an omission of important context.

Anyone who’s remotely skilled in conversation could condense this down to: “Pray … that our leaders … are sending [our military men and women] out on a task that is from God.” There’s a huge difference between claiming that a task is from God, and asking people to pray that it is.

I’m still not sure on my opinion of Palin, McCain, or even Obama for that matter, so hearing the truth about the candidates is important to me — can’t we at least avoid putting words into their mouths?

Willfull Ignorance 2

Sometimes, writing good code is really hard. But other times, writing good code is so darn easy you shouldn’t even have to think about it. In fact, it shouldn’t even be called “good code” — in these cases there should never be anything else, so we’ll just call it “code”.

For instance, if I see another line of code that does this:

$foo = isset($foo) ? $foo : 'default value';

I think I’ll kill someone.

Let me clear something up for you: using the ternary operator does not make you cool. However, assigning a variable to itself makes you very uncool.

if (!isset($foo)) $foo = 'default value';

Now why is that so hard to write?

I’m in DC 2

So, as I mentioned a while ago, I’m presenting at DC PHP ’08. It’s this week.

The presenter I’m listening to right now just reminded me why I hate MVC on the web. But I’m not going to go into it.

The conference appears to have gotten the wireless correct, at the very least. The past two conferences I’ve been to have both had extremely flaky wireless connections, which presented problems for not only the attendees, but presenters who were depending upon an internet connection.

My talk is tomorrow, so for now I just listen.

Unplugged and overplayed 1

Time for a blast from the past. Harmlessly enough, this technology was originally introduced to save users the pain of manually configuring their ISA cards (do you even remember the ISA bus?). I’m referring, of course, to ‘Plug and Play’ (PnP for short; ‘Plug and Pray’ for the cynical).

End of flashback.

Today, ‘plug and play’ can describe just about anything that the marketers have decided is easy to set up and use (seemingly whether or not it actually is). For instance, do you think the term was ever meant to apply to residential solar power systems? Or search Amazon.com for the term, and marvel at the number of video games that are ‘plug and play’ — and that’s perhaps the most literal usage of the phrase ever. You plug the game in to your TV, and you play it. Plug and play.

Yet, oddly enough, it didn’t make CNet’s list of the top 10 buzzwords. To their shame, in my humble opinion.

Pharmacists 5

Tonight I installed dnsmasq as a caching DNS forwarder on our home network (under a VM, no less). Additionally, I changed our primary DNS servers to those hosted by OpenDNS. To double-check that things were working, I figured I’d whip up a quick script to make a bunch of DNS requests and give an average time. First round, I faced the OpenDNS server against Cox’s own. I’d never really benchmarked the Cox DNS servers, so this was quite enlightening:

andrew@ubuntu-server-vm:~$ php ./dns_bench.php dothedrew.net 208.67.222.222
Average response time: 27.53
andrew@ubuntu-server-vm:~$ php ./dns_bench.php dothedrew.net 68.105.28.11
Average response time: 158.58

This only serves to strengthen my belief that all cable ISPs are run by pharmacists.

To satisfy morbid curiosity, here are the results against the local dnsmasq daemon:

andrew@ubuntu-server-vm:~$ php ./dns_bench.php dothedrew.net 127.0.0.1
Average response time: 0.21

That’s only about, oh, a 755x improvement. Hopefully that’ll sufficiently speed things up.

Outside the Box 3

Not long ago, Canon announced the newest offering in their Digital Rebel lineup, the Rebel XSi. Despite both being aimed at the consumer market, it’s predecessor, the Rebel XTi, has been extremely popular with the so-called “prosumers”, as it’s inherited much of its technology from Canon’s upper echelon of cameras without inheriting their prices.

Consequently, I was disappointed to discover that the XSi had forsaken CompactFlash — currently the de facto standard in all serious DSLRs — for the smaller (both in physical dimension and capacity), slower SD cards. Is there some hidden advantage to SD that Canon is privy to (did they really need the marginal amount of extra space to pack in LiveView?), or is Canon perhaps trying to steer the prosumer market towards their double-digit D line? Or maybe it’s a bid to lure the consumers already using SD cards in their point & shoot digitals into a camera with a heftier price tag.

Either way, I find it unfortunate — looks like the Rebel party may have ended for the prosumer.

How… 1

How do people get talking slots at conferences with a subject “to be determined”? When I submitted my talk, I had to fill out an entire assortion of bios, contact info, and an abstract. What does their abstract say?

I am a l337 PHP h4x0r. Let me talk.

Who wouldn’t give him an hour?

Perhaps I’m just frustrated because it took me like 4 tries to finally get a talk accepted. I’m sure — like just about everything else in the world of business — it’s all politics.

$vonage != $service 5

I’ve had Vonage for just about three years now. Over the past year or so, our phone line has probably been down more than its been up (the miracle of technology). I’m not ready to blame that on Vonage, however, since the adapter itself appears to be on its last leg. While trying to reconfigure it a few weeks ago, I realized that the integrated switch (it’s a combined router/switch/VTA device) was no longer working. I also noticed that the device was inordinately hot, so I’ve chalked it all up to hardware problems initiated by overheating.

In the hopes of salvaging our home phone, I ordered a used VTA device from eBay. I didn’t think twice about it; it’s definitely not the first piece of technology that I’ve acquired second hand, let alone from eBay, and I’ve had very few problems with any of it.

Of course, I made the assumption that Vonage would allow me to activate a used device. That was apparently not only a naive assumption, but also a fatal one.

As chronicled in various parts and pieces here, here, here, and probably many other places, Vonage apparently refuses to reassociate the MAC addresses of their VTAs (unless, of course, it’s been “reconditioned” by them).

Did I just buy a paper-weight? I’d be more than aggravated.

Obviously, as most of us know, this is purely an artificial limitation imposed by Vonage. Why? Are they worried about people recording the MAC address, selling the device, and then cloning it to steal calls? Do they get a little bonus for selling new devices? I have no idea.

The worst part, however, might not be their refusal to reuse a device. I could live with that, had only I know before I spent money on something that’s (currently) useless. But even with a bit of searching, I can’t find a single warning from Vonage on the dangers of buying used. I can describe this as nothing short of irresponsible, almost criminal.

So the moral of the story is, and I’d say this in big bold, emblazoned letters if I thought that it would somehow get it more exposure across the interwebs: whatever you do, don’t use Vonage. Erm, I mean, don’t buy a used Vonage device.

Like the good deviant I one day hope to be, I’m currently in the process of attempting to clone the MAC address of my previous adapter on the new one. The device supports twiddling with the MAC address, but, once I changed it, has been unaccessible (at least from work via the various SSH tunnels I have going). Yet if I delete it’s DHCP lease from the router it immediately reacquires one, so I’m thinking it’s caught up in some endless reboot cycle after attempting contacting Vonage. I’m going to keep digging.

The Importance of Bits 2

With their abundant availability both in volatile and permanent storage (i.e., RAM and hard-disks), sometimes I think the value of bits is lost on more recent developers, especially those that write in a very high-level language, like, say, PHP. The past few weeks I’ve been working very closely with some data analysts in our company — in particular, I’ve been compiling some very large tables (think nearly 1 billion rows per month) into “views” (technically, they’re completely new tables) that are much more manageable.

Tonight, mostly as an exercise in futility, I began looking at some of the foreign keys stored in the gargantuan tables. One of them in particular links to a table that currently contains (oddly enough) 256 rows. It grows very, very slowly. Currently the column is a long integer: 4 bytes. Imagine for a minute that we replaced that with what MySQL calls a small integer, or 2 bytes. Last month’s table was in the neighborhood of 900,000,000 rows, times 2, divided by 1024… That’s something just shy of 2 GIGAbytes that we’ve saved. (Never mind that there are about 4 other foreign keys this could also be applied to).

Every byte adds up, folks. Save ’em while you can.

(Some might call this inconvenient math. I’m not quite that unscrupulous.)

Next Page »