iPhone Hacks

For a long time, I’ve known that the iPhone stores its text messages as a SQLite database. This matters a lot to me, because I have thousands of text messages, since our server monitoring pages me whenever anything fails, and a bad failure means hundreds of texts at once. It’s to the point where it feels slow loading them now.

In theory, this should be a simple query. In reality, the iPhone is locked down so that there’s no way to get to that file unless you jailbreak your iPhone.

Today, I had one of those days when I did a lot of stuff, and feel like I learned a lot, but I’m back where I started. This great post talks more about the SMS database and its table structure, from someone having the exact same problem I am. Unfortunately, they’ve jailbroken their iPhone, and I have not.

What I think might have potential is recovery mode. I’ve seen a few references to how recovery mode allows unfettered access to the iPhone’s filesystem. It’s pretty easy to enter recovery mode, but I got nowhere: Linux didn’t seem to want to find any filesystems. (Maybe the iPhone is HFS?) “lsusb” showed an Apple device, but that’s as far as I got.

The good news is that recovery mode is easy to exit out of. There are some people saying you need complicated programs to get out of it. Nonsense. Power the phone off, and then power it back on. Viola.

So sadly, I can’t confirm whether or not recovery mode actually gives full filesystem access. I’m growing more and more tempted to jailbreak my iPhone, but I’m so dependent on it that I’m not sure I’m willing to take the risk.

Analytics

I finally got Google Analytics working right. Some interesting stats:

  • Resolutions are all over the place, but 1024×768 is the most popular. 1920×1200 is in third place.
  • 84% of visits came from Firefox. IE picked up 13%, and Safari and Chrome duked it our for the remainder.
  • It’s not just me visiting. 63% Windows, 31% Mac, 6% Linux.
  • 71 visits, 26 unique visitors, 97 pageviews. This is simultaneously pathetic and pretty good.
  • Many of the views that aren’t to the main page are to old entries found via Google. Most were searches for technical things.

It hasn’t been collecting data for long, so it’ll be interesting to see if these trends persist.

Obama and Notre Dame

The news is making it sound like an overwhelming majority of people at Notre Dame oppose Obama coming to speak because of his pro-choice stance, which leaves me wondering why the college invited him in the first place, and why they haven’t canceled. If graduation is going to be marred by protesters, wouldn’t it be better to bring in a pro-life speaker, even if it’s not the President of the United States? And I’m entirely serious when I say it: why don’t they just cancel?

But this bring up another pet peeve of mine. For eight years, “pro-life” President Bush was in office, and even after appointing conservatives to the Supreme Court in what’s generally seen as a 5-4 conservative lead, and even after issuing sweeping Executive Orders giving himselves powers his predecessors never had, abortion is still legal in America. So in terms of abortion in America, nothing is different with Obama than with Bush. I suspect the argument is probably more about attitude and the Presidents’ personal moral convictions, but I think that’s even worse: Bush thought abortion was murder and yet did nothing to stop it.

I usually try to stay out of the abortion debate, but right now it’s not making a whole lot of sense to me.

Resetting the Maintenance Light on Toyotas

I’ve probably said before that, if I were a politician, I’d make it illegal for car manufacturers to have a “Maintenance Required” light that comes on to “remind” you to take your car in for service when nothing’s wrong. I’d do that right after I ended the racket that is contact lenses needing prescriptions re-issued every year.

But if you drive a fairly recent Toyota, it seems that there’s a trick to reset the service monitor. With the ignition on, make sure the odometer is showing your total mileage (not a trip odometer). Turn the key off, push in the odometer reset button, and hold it in while turning the car back on. It should start by showing “—–“, and decrementing until it shows “-,” and then it’ll reset your maintenance reminder as if you’ve just had your car serviced.

I haven’t personally confirmed this (I drive an ’03, which was made before they started their racket), but I saw it mentioned and poked around, finding several other sites that corroborate this method. YMMV (no pun intended!), but I know plenty of people who find the light a major nuisance.

(You know what else is a racket? I decided to change my own oil instead of bringing the car in for its 75,000 mile tuneup, but in the course of figuring out how the heck I have to do it, I’ve seen that the oil filter is right under the exhaust manifold, and getting to that, or draining my oil, apparently requires undoing a billion screws underneath the car to remove the skid plate… And most places recommend jacking up the front of the car so you have enough room. It’s as if they went out of their way to make sure drivers couldn’t easily do maintenance on their own, so that you have to take it in for service. And if your car is newer than mine, they display their maintenance advertisement light to make sure you do.)

Edit: Just found another source suggesting that, for some newer Highlanders, you have to be on Trip A, not the overall odometer, for this to work. And it seems as if you can just turn the car to “Acc” or similar, rather than actually starting the engine.

Google Routing Fail

This morning we thought the Internet was down in our office. Many sites we use constantly didn’t load, and many others were extremely slow to load, including our own site. We knew, though, that our site was in tip-top shape, which had us baffled. Routing problem on our ISP’s end?

Nope, just Google being down. I searched for something and the results timed out. “Internet down for anyone else?” “Yeah, I can’t get into my GMail.” “I was just trying to check Google Analytics, and that’s not working either.” “YouTube, too!” “Our site’s loading really slow, too. Must be our pipe.”

It turns out that a ridiculous amount of sites on the Internet are using Google Analytics, including my employer and my own site. (And just this afternoon I fixed the tags on the blogs so stats will track properly.)

When my site goes offline, it’s not surprising. My host has to shut down periodically when they discover frayed wiring in the data center. If my employer went offline, it would be a bigger deal, and it’s something I could envision: our data center getting knocked offline, or me goofing the config on our production router and writing the bad changes out to all of them. But Google going down? That’s unheard of.

Arbor Networks seems to have monitoring equipment all over the place, which means that they have some pretty good insight into things. As they posted about today, Google apparently fudged a route and it propagated out, routing most of their traffic through some low-level provider in Asia. The graph, to me, is the coolest part. When have you ever seen a graph reflecting a dropoff of many gigabits per second in a really short period? It’s orders of magnitudes more than anyone is used to.

Of course, times like this make me want to learn more about BGP4, the core routing protocol used on the Internet. Anyone remember when Youtube went down last year, and it turns out that it was some country (Pakistan?) trying to block Youtube, but they did so by advertising a bogus route internally, and a series of misconfigured routers allowed them to advertise that route, and soon it had propagated across pretty much everywhere?

MacBook Memory Constraints

Since I had a hard time finding this, I’ll post it here in the hopes of helping others out. Older Core Duo MacBook Pro laptops can only address 2GB of RAM. Many people will try to tell you differently, perhaps not understanding exactly what’s going on. A Core 2 Duo will see plenty, and I think newer MacBook Pros will see beyond 2GB, because I’m pretty sure I read about someone who got 6GB in one.

But a 2006-era Core Duo (not Core 2 Duo) machine will not see more than 2GB RAM. If you’re cockily sure that this is in error and buy a 2GB stick to replace one of the 1GB sticks, you’ll have a laptop with 3GB RAM, but it won’t boot. Trust me on this.

The good news is that my Thinkpad takes the exact same memory. (The bad news is that I rarely use it…)

Dies ist ein Schmerz.

I ran into a particularly annoying problem at work, with a Rails plugin not working. I have no idea what’s wrong, and eventually talked with a senior developer, who was equally as stumped. (The problem probably has to do with the fact that acts_as_versioned, the plugin, was built in 2006. The new version, from 2008, introduces new problems that preclude us from using it right now.)

Anyway, I decided to turn to Google, and eventually found one thread where it sounds like someone ran into the same problem and may have found a solution. Unfortunately, Google Translate, usually very helpful, really falls down on the job here for some reason. Standing between me and a petty bug that’s breaking a lot of stuff are these instructions:

Ich seh grad find_versions that eh model.versions.find was ja calls interestingly with (: all, options) which is for your: first addition is ungut.

Anyways, I think that your error is coming from somewhere else rather.

ciao, tom

I don’t think I’ll be getting this fixed anytime soon.

Monitor Deals, Again

I’ve been on the fence for a while about picking up a new monitor for work. The provided 1280×1024 LCD is just not enough for web development, where I typically have iTunes, TextMate, multiple terminals, Firefox, Firebug, Thunderbird, Adium, and Tweetie open.

I made up my mind one weekend, but forgot about it and, when I remembered Monday morning, it turns out that NewEgg is serious when they call them weekend deals. This weekend, though, they’re serious when they call them deals! My problem this time is with making up my mind. If you’re in the market for a big LCD, do it now!

  • 22″ Asus, 1680×1050, $149.99 plus a $20 rebate and free shipping.
  • 21.5″ Asus, 1920×1080, $169.99 plus a $10 rebate and free shipping.
  • 20″ Acer, 1680×1050, $139.99. (You pay shipping.)
  • 20″ Sceptre, 1680×1050, $129.99 and free shipping.
  • Big on name brands? HP 21.5″, 1920×1080, $204.99. (You pay shipping.)
  • Samsung’s ridiculous 23″, 2048×1152 monitor, $219.99 and free shipping.
  • Hanns-G 22″, 1680×1050, $139.99 plus a $10 coupon code plus (LCD581) free shipping.

I’ve got the dirt-cheap Hanns-G in my cart right now, but it’s tempting to pay a tiny bit more and get the full 1080p Asus. Or another $50 and get the ludicrous 2048×1152 one.

Now with Tracking Goodness

I just added JavaScript tags to the global site templates for Google Analytics and Quantcast. Once both begin collecting meaningful data, I can set bloggers up with access to the stats if they have a Google account. Quantcast is a neat site mainly used by marketing firms, but accounts are free and I was curious.

Passphrases

So you all know the usual password advice. But I saw someone talking about “passphrases” the other day, and got interested. Many—but far from all—sites just take whatever you type and run it through a one-way cryptographic hash, so that it’s stored in a fairly uniform ASCII hash. If my password is blank, or if it’s the most secure password on the planet, it’s going to look about the same in the database: something like 32 characters of text when it’s passed the one-way hash.

I think the word “password” brings in some artificial limits. How many people have a space in their password? I bet it’s astonishingly low, and probably because “password” implies that it should be a word.

But if it’s all just going to be hashed, meaning that there’s no reason for a maximum password length, why can’t, “I actually used a couple sentences for my password. Crack this one, n00bs!” be my password? I have some rarely-used passwords for very important things that are probably 12+ characters long, and extremely good passwords in terms of things that a cracker wouldn’t guess anyway. But I have so stop and think. P@$$w0rDee as a (fictitious) example: anything derived from “password” is bad, but ignore that. It’s ten characters, which is pretty good, and it’s slightly altered from the word it’s based on. And it’s easy to remember “password-ee.” But was it an @ or a 4 for the first “a”? And was it the “r” or the “D” that’s upper-case? For the ones I use every day, it’s all muscle memory. But for the ones I use rarely, it might take me a full minute to type out a ten-character password, because I have to think.

And that’s where, “I bet that you can’t crack this password” comes into play as a maybe-worthwhile idea. It’s a plain English sentence that’s foolishly easy to remember, with nothing “weird” about it to hamper my memory. The fact that it’s all based on simple English words is somewhat offset by the fact that it’s so unreasonably long for a normal password that password crackers wouldn’t even bother going out that far.

I think it would also make thematic passwords easier. It’s bad practice to use the same password everywhere, but no one in their right mind is able to use a different password for every site they visit. But suppose I had, “I keep my money safe at the bank” for my bank, and “I take good care of my health and my privacy” as my password for my health insurance provider? (Again, these are fairly bizarre examples and you shouldn’t use anything close to them!) It’s much better if you mix in some non-normal-English: “I keep my money safe in el banco” helps slightly. “I keep my $$ safe in el banco” is better.

There are lots and lots of places that don’t support this, and I’m not totally convinced that this is a great idea. But the concept has me pretty intrigued.