zerosleeps

Since 2010

GetReversedHostname

I stumbled upon this in Mozilla’s core source code:

This extracts the hostname from the URI and reverses it in the form that we use (always ending with a “.”). So “http://microsoft.com/” becomes “moc.tfosorcim.”

The idea behind this is that we can create an index over the items in the reversed host name column, and then query for as much or as little of the host name as we feel like.

For example, the query “host >= ‘gro.allizom.’ AND host < ‘gro.allizom/’ Matches all host names ending in ‘.mozilla.org’, including ‘developer.mozilla.org’ and just ‘mozilla.org’ (since we define all reversed host names to end in a period, even ‘mozilla.org’ matches). The important thing is that this operation uses the index. Any substring calls in a select statement (even if it’s for the beginning of a string) will bypass any indices and will be slow).

Ingenious! Software is hard.

Celebrate the web by using another browser than Google's Chrome

David Heinemeier Hansson:

I like Chrome. It’s a great browser. But it’s not so good that it deserves to be the only browser. And that’s the unfortunate opportunity we, people browsing the web, are opening for Google by so overwhelmingly choosing to use it in face of the alternatives.

I’ve said it before - Google is an advertising company. If you use a service for free and can’t figure out the business model behind it, you can be pretty damned sure that the money’s coming from the sale of the huge amount of data everything we do online generates. You’re the product.

I feel like an idiot whenever I try to open a discussion with my friends or colleagues about online privacy and the openness of the web. Nobody I’m close with gives a shit about what happens to their data. That’s wrong. It’s ignorant, and a misuse of the greatest information sharing tool ever created by humans.

Joe Cieplinski makes some good points about one of the biggest offenders:

…if Facebook is the only place you are posting something, know that you are shutting out people like me for no good reason.

Facebook is an obvious and easy target, but it’s the one which catches me out the most as well. I’d love to see your baby photos, but I can’t because I don’t have a Facebook account. I didn’t know about that interesting event either, because you only advertised on a closed platform.

John Gruber gets it as well:

Treat Facebook as the private walled garden that it is. If you want something to be publicly accessible, post it to a real blog on any platform that embraces the real web, the open one.

I’ll add to that: if you don’t ever want something to be publicly accessible, then keep it the hell away from the web.

By the way, you should consider those baby photos property of Facebook - you can’t truly control what happens to them. What if your kid doesn’t want their first steps stored in a server farm for the rest of time? Sadly, given the current state of affairs, I fear that future generations won’t know any differently. My thoughts on this subject are rapidly becoming part of a “back in my day…” story.

How I wish I'd answered

How I wish I’d answered these completely genuine, copy-and-pasted questions from eBay users:

hello,am interested in the macbook,kindly contact me back if the system is still available for sale

It’s listed on eBay isn’t it? Do you think I’d list something that wasn’t available for sale? Maybe you should spend your money getting someone to teach you how to capitalise and use spaces before you chuck it all at a MacBook that may-or-may-not exist.

I would be paying via bank transfer, kindly let me know if thats.okay by you.

You see where it says in the auction “Payment by PayPal only”? You figure the rest out. And what’s with you people and bad punctuation?

I would like to make an offer of $800 including postage.

THEN BID $800. That’s how auctions work you idiot.

Is there a local pick upand is the phone completely unlocked

Have you read anything on the listing? Did the delivery instructions which explicitly state local pick-up is not an option escape you? Was sending me this message honestly easier than reading the fucking information yourself?

Will you take $600 for the iPhone

YES. PLACE A BID FOR $600.

Hey any chance i can just buy it for 900

Zero fucking chance. See how the Buy It Now price isn’t set at $900? That means you cannot “just buy it for 900”.