Don Havey

Sustainably harvested information

Archive for the Web design Category

Fixed  

Oops. I hadn’t noticed that the inline code blocks were displaying incorrectly since I upgraded a plugin. I’ve reverted to the old version of the plugin and vow to never update anything ever again. Sorry about that.

The article has

no responses yet

Written by Don

September 10th, 2008 at 5:04 pm

Domain squatting  

I’ve posted almost nothing productive on this blog in months! Just ranting! Let’s keep it up. Today’s topic: domain squatting, a.k.a. domain parking.

I’m a bit of a word lover. I enjoy certain combinations of words. This interest, combined with my web-oriented skill set, has made me into a bit of a domain name speculator. I occasionally think of words that might make nice domain names… and every once in a while, I buy one. Angel always complains that I do this instead of, for example, taking her to the movies. In my defense, buying a domain name is cheaper…

Moving on.

Domain name squatting has been a major problem since the mid-late 90s, the formative years of the internet. Back then, large companies that originally hesitated to build a web presence often found that their ideal domain name was registered by some clever nerd who would subsequently extort the company for a couple grand in exchange for the rights to the domain name. Not a huge deal. And the feeling amongst nerds was… well… you snooze you lose.

Lately, however, domain registrars such as GoDaddy have been registering domains in bulk. Literally taking entire pages out of the dictionary (challenge: find a word in the dictionary that does not exist as a registered domain name… and register it!). Registration costs as low as $7/yr… so a company like GoDaddy can register 10,000 domains–5% of all English words–for a pretty low price.

The strategy that these large companies have concocted is as follows: register as many domains as possible, throw some ads on them to recoup the cost of the registration, then auction the high-request-traffic domains to companies that have large enough budgets to pay 1,000 times the cost of a typical domain registration.

The problem with this “corner the market” strategy is that it is non-renewable. Extremely non-renewable. For two hugely important reasons:

  1. There are a finite number of words in the English language. Furthermore, there are a relatively small number of words in that set that are easy to spell and/or pronounce. New words are occasionally created, but not at a rate anywhere close to the rate of internet expansion. Eventually, we will run out of pronounceable and meaningful letter combinations. Of course, it is equally difficult to find an unregistered two- or three-syllable non-word (e.g. Google).
  2. When a domain expires, it is the registrar who has first pick on whether or not to grab the domain name for themselves. This is particularly important during times of “internet economy slump”… when small- and medium-traffic online businesses close shop and leave common-word domains lying in their wake.

Furthermore, it essentially squeezes small businesses out of the market by requiring those startups to settle for a less-than-memorable domain name, or put a large percentage of their funds into buying a memorable one.

In conclusion, domain name parking by individuals is fine (my favorite example); domain name parking by registrars is monopolistic and evil.

Take action! When you stumble across a parked domain, remember the registrar associated with it, and do not purchase any service through them. And please, don’t click the damn ads. If you want to do more, inquire about the domain, but in the comments box write something like “wouldn’t you like to work at a company that is not evil?” Maybe we can convince all their employees to leave.

Comments welcome, but I will bitch slap you if you disagree and call this “the nature of capitalism, the preferred economic strategy of God himself”. Fools.

The article has

3 responses

Written by Don

September 10th, 2008 at 4:47 pm

Go Go Gadget!  

Today I published my craigslist Monitor on Google Gadgets. I’ve been using it for a while and it is damn helpful. And now I’m sharing with everyone else, because all of the other craigslist monitoring gadgets are just plain bad.

It’s perfect for freelancers, apartment hunters, and full-time job seekers. Just choose the craigslist pages/sections you’d like to monitor and it will handle the rest… including automatic highlighting of all new postings (that’s why everything will appear highlighted when you add it; next time you refresh it the highlighting will go away until a new listing is loaded). Add it to your iGoogle homepage today!

The article has

no responses yet

Written by Don

August 31st, 2008 at 8:18 pm

Categories: Etcetera, Web design

Tags: , ,

Least-used letter pairs  

Least-used letter pairsCuriobot is in the middle of a structural makeover and this morning I decided that the code needed a little condensing. Most popular Javascript applications simplify function and variable names to just a few letters, and some CSS-heavy pages use a similar unique identifier to cut down on bandwidth. This technique also obfuscates your code, if you’re worried about people stealing it and using it for their own (evil) intentions.

In a big old “Web 2.0″ (*gag*) application, condensing your code can reduce your page load times by a serious percentage. I think it’s especially important if you’re offering content for mobile users, where every kilobyte counts. Replacing 300 occurrences of 12-character variable names with 2-character names can save you 10*300 bytes = 3kb per download. That’s probably 5%, maybe 10% of your total script/CSS/HTML weight… so it adds up on high-traffic applications. Of course, as most web developers are quick to point out, I pity the poor bastard who has to try to understand and/or modify a function called “zx()”. Ever taken a look at Google’s scripts? Totally incomprehensible for that reason.

Technically, you could name up to 676 (26×26) functions, variables, or classes using a two-letter pair, but the problem you run into is that when your content is not perfectly isolated from your page’s structure, you can’t simply search-and-replace the page to find every occurrence of the classname “ea” without running into it in a sentence somewhere (”I went to the beach” or “Welcome to my neat-o website”).

For the minimum amount of content-structure collisions, I want to favor the two-letter combinations that are used least frequently in my content. So I wrote a quick Processing app to examine any given text and return an ordered set of letter pairs, sorted according to their frequency. Here are the results for a few sample texts:

The pairs that are not in bold were not found at all in the sample text (use them for function/class/variable name replacements). Those that were found are displayed by frequency.

Here’s the code. Try inputting text that corresponds to your particular usage for better results.

So the next time you’re thinking of renaming “load_excellent_content()” to “le()”… don’t. Try “vq()”.

The article has

no responses yet

Written by Don

July 11th, 2008 at 2:06 pm

Google, you sly dog  

I was digging through some Google Maps source code looking for a way to – ahem – repurpose the colors in the map images (cool project coming soon), when I came across this:
<div style="position: absolute; left: 0px; top: 0px; z-index: 107; cursor: default;">
  <div style="position: absolute; left: 143px; top: 29px; z-index: -4364995; display: none;" class="gmnoprint">
    <div style="overflow: hidden; width: 25px; height: 25px; z-index: 1; position: absolute; left: 0px; top: 0px;">
      <img style="border: 0px none ; margin: 0px; padding: 0px; position: absolute; left: 0px; top: 0px; width: 690px; height: 786px; -moz-user-select: none;" src="/intl/en_us/mapfiles/iw2.png">
    </div>
    <div style="overflow: hidden; width: 25px; height: 25px; z-index: 1; position: absolute; left: 224px; top: 0px;">
      <img style="border: 0px none ; margin: 0px; padding: 0px; position: absolute; left: -665px; top: 0px; width: 690px; height: 786px; -moz-user-select: none;" src="/intl/en_us/mapfiles/iw2.png">
    </div>
    <div style="overflow: hidden; width: 98px; height: 96px; z-index: 1; position: absolute; left: 76px; top: 101px;">
      <img style="border: 0px none ; margin: 0px; padding: 0px; position: absolute; left: 0px; top: -690px; width: 690px; height: 786px; -moz-user-select: none;" src="/intl/en_us/mapfiles/iw2.png">
    </div>
    [...]

Anyone else get what’s happening there? They’re using only one image to create that little call-out marker bubble. It’s really quite brilliant. Just one large (but light) png file is repeatedly repositioned to create all of the borders and corners of the bubble, allowing for dynamic sizing without image stretching.

I felt like an archaeologist when I unearthed it… and of course, my first thought was “why didn’t I think of that?”

The article has

no responses yet

Written by Don

June 11th, 2008 at 1:28 pm

Categories: Etcetera, Web design

Tags: , ,

Google and Custom 404 Error Pages  

I ran into this problem the other day:

After creating a custom error page handler for Curiobot that redirected users to the home page, I noticed that Google was not pleased. On the webmaster tools interface, Google said something like this:

We’ve detected that your 404 (file not found) error page returns a status of 200 (found successfully) in the header.

Here is what I had inserted into an .htaccess file:

ErrorDocument 404 http://www.curiobot.net/index.php?e=404

That would redirect any lost users to the home page, where an error message would be displayed. The problem was that the index.php page that I was redirecting to throws a status code of 200 (success) by default instead of 404 (error). So if Google didn’t specifically test for this, all URLs pointing to nonexistent pages on your site would look like they still functioned, and therefore be wrongly indexed.

Here’s the solution that I inserted into the index.php page that users are redirected to:

if(isset($_GET["e"])&amp;&amp;intval($_GET["e"])==404){
  header("HTTP/1.1 404 Not Found");
}

This forces PHP to send a 404 status code if a user has been redirected from a nonexistent page.
Hope this helps someone…

The article has

no responses yet

Written by Don

March 26th, 2008 at 11:35 am