Opium

Afghanistan has a flourishing opium trade. They apparently produce most of the world’s opium. Ironically, it’s kind of our fault–the Taliban had pretty much eradicated all poppy cultivation, but with them gone, it’s come back. A recent news story suggests that the Afghani leaders in charge of fighting opium quit after their pay was slashed due to overseas funding drying up. (This one was poorly thought through…)

I want this job. Here’s my plan: encourage opium cultivation.

India has a flourishing, but regulated, opium trade. The product is sold to pharmaceutical companies, who refine it into morphine. Farmers are apparently limited to how many poppies they can grow. The government periodically does inspections of farmers to make sure they’re complying, and to make sure that their product isn’t being diverted into illegal usage.

This is what Afghanistan needs. You deal a crippling blow (again…) to the illegal drug trade, while also bolstering their economy with pharmaceutical sales.

Where do I submit my resume?

Public Safety

For those of you who don’t monitor police scanners regularly, I’d like to introduce what can be considered a fairly scary fact: their computer systems go down all the time.

Where it usually comes up is when they try to run a license plate or a person, or to query NCIC or similar. The officer calls it in and waits a few minutes, before the dispatcher calls back that the (remote) system is down. When you’re monitoring multiple neighboring towns, you’ll often notice that they all lose it at once. The backend servers are going down.

This drives me nuts. It’s usually not a huge deal, but now just imagine that you’re the police officer, and the guy you pull over, but can’t run through the system, actually has a warrant out for his arrest. For murdering a police officer. But you have no clue, because the system is down. Of course this is extreme, but it’s always been said that traffic stops are actually the most dangerous and unpredictable things an officer does. They never know whether it’s a nice old lady or someone with a warrant out for their arrest. A decent amount of arrests come from pulling people over for traffic violations and finding subsequent violations, like cocaine or guns, or an outstanding warrant.

My webserver sits in Texas on what’s basically an old desktop system. And it seems to have better uptime than these systems. As biased as I am in favor of my blogs, even I will admit that police databases are more important. Further, if my blogs were routinely unreachable, I’d be furious with my hosting company. Why is it tolerated when this happens?

Databases are fairly easy to replicate. Put a “cluster” of database nodes in a datacenter. You’re protected against a hardware failure. Of course, the data center’s still a single point of failure. So put another database node in a separate datacenter. That alone is probably all you’ll ever need. But you can keep turning up more database nodes in different locations as budget permits. (I suspect budget is the limiting reactant.)

But you can take it one step further. Set up another database node, not in a lonely datacenter, but in a large dispatch facility. (The MA State Police apparently run a very large 911 answering center.) So they get a database node there, that doesn’t answer public queries, but that receives updates from other database servers. And, in the event of some sort of catastrophic failure, remote dispatchers can call up and request that something be run.

I’m just really bothered that people seem to find it acceptable that, probably at least once a week, the system is unreachable for quite some time.

Confirmation Bias

Have you ever noticed that someone mentions something, and all of a sudden you notice that thing multiple times? One professor mentioned that very phenomenon one week. Early the next week, I was touring Waltham’s 911 dispatch center, and noted the software they used for  (Computer Aided Dispatch) CAD, intending to look more into it. The next day, I had that professor’s class again, and, for reasons I still don’t understand, somehow slipped in a mention of knowing someone who worked at that company. So I mentioned this to him after class, and also pointed out the incredible irony of the fact that the week before he’d mentioned the “someone mentions something, and all of a sudden you keep seeing” it phenomonen. {Meta: this phenomonen may, itself, be related to a confirmation bias, but I digress.}

So Kyle mentioned confirmation bias in one of his recent posts. The next day someone on Ask MetaFilter asked why black people were afraid of his dog. Most answers bordered around it being a confirmation bias. (Although it got interesting when several people reported having noticed the same thing, suggesting that maybe, just maybe there is some sort of racial difference in how dogs are viewed.)

The other day there was a lunar eclipse. Around the same time, we had several short problems with Internet access, where traffic wasn’t leaving Bentley. (Incidentally, I had the same experience I’ve had with most of my tickets–I only open then when I run into an issue I can’t solve myself and am very confident that it’s a problem, so I usually include enough information that the front-level have no idea what’s going on an forward it to an expert… So I ended up speaking with our “Network Engineer,” a position I didn’t even know we had, and we had a good talk about exactly whta the problem was… It appears to lie with an upstream company performing some maintenance.)

So today my professor–who teaches nothing related to electronics nor astronomy–randomly interrupted her lecture saying, “Thursday was a lunar eclipse. Did anyone else experience technical problems because of the lunar eclipse?” People had several problems that day–several brought up the Internet disruption. Someone had their computer crash. She explained that the lunar eclipse tends to cause those things.

If ever there were evidence of a confirmation bias, that’s it. I don’t profess to be a total expert, but I’m pretty certain that the moon being obscured by our shadow isn’t why our Internet link went down for a couple minutes. And yet she’s found plenty of evidence to support what’s probably an urban legend.

Starting Writing

I’ve been asked to write an article for the school paper on what will probably be a front-page issue. Combined with the police logs and a burning desire to write a letter to the editor, I’ve realized something.

I hate writing introductions. Here, I can just start in with terrible openers like “So…” But “So, like, some girl got meningitis” would probably not fly as an opening line in our paper. So right now my introduction is, “Great, gripping introduction goes here,” with a big highlight in Word to remind me to not submit it that way. The vague alliteration with g‘s was to amuse me as I wrote it.

What I really enjoy doing is writing phrases. This isn’t to suggest that I can’t turn phrases into sentences, sentences into paragraphs, and paragraphs into a full… things. I can. But for the letter to the editor, something I have no obligation to write (and something that they may well choose not to run anyway), I’m free to work as I please.

So I have some things scrawled down: “foisting their preferences” and “a smug sense of self-entitlement,” for example. They reflect the wonder that is finding the perfect word to get something across. I could have said “forcing their preferences,” and probably would have if I wasn’t allowed to randomly scribble down phrases I liked. Similarly, I’d probably have said, “arrogant” if this was an article I had to rush and couldn’t take creative liberties with. But it’s a letter to the editor that I can submit whenever I please. And besides, “arrogant” sets off bells as being an ‘attack word.’ Calling it “a smug sense of self-entitlement” flies just below the radar, introducing an edge of snippiness without being as overtly offensive at “arrogant.”

And here I am, writing about how I should be writing something else…

Saying It

I think I mentioned that I signed up for a $7 VPS account, more as a trial than anything. It was a relatively new company, but I figured I had, at most, $7 to lose.

They sent out a fairly terse e-mail that they were transferring companies to some organization in New Zealand. Understandably, I wasn’t too pleased, but I didn’t cancel immediately… I still had some time left on the month I’d signed up for. So today a new e-mail arrived, this one explaining what had happened. The tone suggests that they’ve come under harsh criticism and lost many customers. They go on to explain their rationale.

They seem to have entirely misjudged the situation. They could have done it two ways:

  • Sent out a terse, cryptic e-mail that they were being bought by another company and that my bills would be coming from a new company in New Zealand dollars, or
  • Sent out an upbeat e-mail explaining that, to improve quality of service, they were moving the virtual server division over to a different company, one with more experience maintaining servers, and expanding offerings, all the while keeping prices the same.

In reality, both reflect the same situation. But the first message almost seems guaranteed to scare away customers. Since I pay with PayPal, I don’t really care about currency; the exchange happens automatically. But inexplicably changing your billing currency adds a huge level of sketchiness. On the other hand, what they’re doing is basically upgrading their offerings and improving reliability and support, by selling their business to a better-established one that would better look after this. How could you not want that?

It’s all in how you say things. They had the opportunity to make me eagerly want their products. Instead, they handed me an upgrade that caused half their customers to cancel.

This Is My Hobby

I want to start a “meta ISP.”

When you sign up with your ISP, you’re paying for transit. They carry your data from one network to the other.

But now let’s say that I’m a mediocre residential ISP. I buy connectivity from a couple different upstream providers, and use BGP to make sure your data takes the fastest route. This is what most people do. It works.

Let’s further say that you run an extremely popular site, maybe one of the top 100 sites out there. You have a mediocre IT team. You have enormous bandwidth, coming in from three different carriers. You, too, use BGP to make sure that your outgoing traffic takes the quickest route.

So everything works. Traffic flows between the two networks. What’s the problem?

Well, it turns out that you, Mr. Big Site, have some of your core routers in a major data center out this way. And I, Mr. Big ISP, also have a few core routers in that building. This is really pretty common–there’s a (very aptly-named) network effect with transit. When several big guys move into a building, all of a sudden, more people want to be there too. So you get sites like One Wilshire, a thirty-story building in LA full of networking equipment. They’re very confidential about their tenants, but “word on the street” is that every network you’ve heard of, and plenty you haven’t, is in there. (When viewing that picture, by the way, it’s worth noting that these wires don’t go to some secretary’s PC. Each is probably carrying between 100 Mbps and 10 Gbps of traffic between various ISPs and major networks… Also an interesting note to the photo, they supposedly keep an elaborate database and label each wire, so that this huge rat’s nest is actually quite organized.)

Since we’re both huge companies, we’re each paying six figures a month on Internet. But when one of my customers views your site, they go through a few different ISPs, and across multiple states, before it arrives on your network. It’s asinine, but that’s how the networks work.

So we wise up to this. I call you up, and we run a Gigabit Ethernet line between our racks. And all of a sudden, life is peachy. Data travelling over that line–my customers viewing your site–is free. My bandwidth bills drop, and speeds improve, too. This is the world of peering. And, strangely, the mutually-beneficial practice is rarely done.

I think there’s a market for a big middleman here. The last mile (that would be a good book title, if a telecom magnate wanted to write his memoirs) is difficult–running lines to consumers’ homes. Similarly, it’s hardly trivial to become a Tier 1 ISP, a sort of ‘core backbone’ of the Internet. But an intermediary broker? Easy enough to do.

So you’d get space in the major exchanges, and peer with popular sites. Google, Yahoo, MSN, Youtube, Facebook, eBay, Myspace, Amazon, Akamai, etc.

Digital Photo Recovery

I just discovered PhotoRec, a tool for recovering digital camera images.

For the non-geeks, a quick basic background…. When you save a file, it writes it to various blocks on the disk. Then it makes an entry in the File Allocation Table, pointing to where on the disk the file is. When you delete a file, the entry is removed from the File Allocation Table. That’s really all that happens. The data is still there, but there’s nothing pointing to where on the disk it is. This has two implications. The first is that, with appropriate tools and a little luck, you can still retrieve a file that you’ve deleted. (Whether this is comforting or distressing depends on your perspective…) The second is that, with no entry in the File Allocation Table, it’s seen as “free space,” so new files saved to the disk may well end up getting that block. It’s technically possible to recover stuff even after it’s been overwritten, but at that point it’s much more complex and much more luck is involved.

Last night we went out to dinner… We took lots of photos, but some were deleted. So I figured PhotoRec might recover them. So I gave it a try.

The filesystem shows 163 photos. After running PhotoRec, I have 246 photos. What’s odd is what photos I have. It’s not the ones from last night. They’re scattered from various events, and several are from almost two months ago.

This does leave us with an important tip, though: if you delete an essential photo, stop. Each subsequent thing you do to the disk increases the odds of something overwriting it. In a camera, just turn it off. Taking more photos seriously jeopardizes your ability to recover anything.

In my case, I didn’t have anything really important… I just wondered how it would work. And I got strange results for recovered files. (Which has me wondering a lot about how its files get written out to disk, actually.) But it’s good knowledge for the future. (By the way, PhotoRec runs under not just Linux, but also, apparently, Windows, and most any other OS you can imagine.)

Understand?

I had to read this headline about eight times before I understood it: Boyfriend on roof punches weaving driver.

And even after the eighth time, my mental image still didn’t match what I found when I read the story.

Actually, even having read it, I’m not sure I understand it. I mean, I understand it, but I don’t understand it. Why was he on the roof? Why was he punching her? Why didn’t she stop? Why was the car’s air bag inflated? (And a second “Why didn’t she stop?” is in order here.) And tell me “She eventually stopped the car and hit him with it, police said” isn’t unclear. It’s yet another, “I understand… the words” case. We can infer that she stopped the car, and then started it again to hit him. But it seems like poor reporting all around to rely on the reader to make these assumptions.

Thick & Thin

Kyle has an awesome 22″ LCD. His is probably 6″ thick in the back.

I have a 14.1″ laptop. My LCD is probably less than 1/2″ thin in the back.

Why is this? My first guess was the power supply. But I’ve seen a few LCDs where they’ve taken out the power supplies and put them on the floor. And frankly, you could fold up my whole laptop, glue the power brick onto the back, and it wouldn’t be any thicker than stand-alone LCDs.

Imagine if someone made a 22″ LCD that was 1/2″ thick. Ceteris paribus, I’d buy one.

I suppose one “disadvantage” is that I could probably, if I tried, grip my LCD at each corner, flex with all my might, and ruin the LCD. If I tried that on Kyle’s (don’t worry, I won’t!), I doubt I could. It’s inside a huge frame. But I don’t buy that this is a reason to not provide it.

Steve, I’m counting on you.

Lottery

I lost the lottery last night. Actually, I never even entered. The drawing was for $270 million (30-year annuity), or $164.3 million cash. The stakes were high, but I still didn’t dare risk life and limb to go buy lottery tickets. Further, I’d have to clear my car off and I was feeling pretty lazy. I hoped it would roll over. Sadly, this was not the case.

But some of us were talking about what we’d do if we won. Not the “I’d buy an awesome house” or lease a 10GigE line. But financial planning stuff. First, we started the debate over whether you take the cash or the annuity. $270 million over 30 years is $9 million a year. Not to knock $9 million, but if I won $270 million, $9 million a year would seem pretty pathetic.  So I pulled out my trusty old financial calculator.

Let’s call the $164.3 million a nice even $150 million. You take $14.3 million off the top to get your indulgences out of the way. At 4% interest (realistic enough for something like a treasury note) over 30 years, you’d make $500,000 interest a month. (Assuming that you took the $500,000 out each month to spend.) That’s $6 million a year, or two-thirds of what you’d be getting if you took the annuity. Except you’ve already paid cash for a house overlooking Hollywood and shared your riches with your friends and family bought a couple cars too. Conversely, if you didn’t take your $500,000 a month out, you’d have just shy of $500 million in the bank at the end of 30 years.

So I’d definitely have taken out the cash.

The other thing I overlooked in the past is the concept of using annuities. I might like to host a scholarship, for example. I’d want $50,000 each year to fund it. Assuming the same 4% interest, you’d sock aside ($50,000 / 0.04), or $1.25 million. And then each year take out the $50,000 accumulated interest.

But, alas, I didn’t win. So no 10GigE to my home (probably not feasible anyway–transit costs are much less than I expected, but the cost of a fiber circuit to your home isn’t accounted for, and I’m not sure you can just call up Verizon and ask for them to light up a 10GigE link to LAIIX for you…)