wesley tanaka


Bonferroni's Principle


The U.S. Terrorist Watch List appears to be growing in some kind of automated fashion. Given the current size, it seems to have run into Bonferroni's Principle.

How to post to metaweblog with Drupal's xmlrpc()


Example code showing how to use Drupal API's support for xml rpc to post an item to a blog which supports the metaweblog XML-RPC api:

xmlrpc('http://blogs.www.friendster.com/t/api', 'metaWeblog.newPost', '31337', 'example@example.com', 'sample password', array('title' => 'drupal xmlrpc and metaweblog.newpost tutorial', 'link' => 'http://wtanaka.com/node/7746', 'description' => 'sample code for using xmlrpc and metaweblog.newpost in drupal'));

Emergency Brake vs. Parking Brake vs. Hand Brake


Someone should make a more general purpose version of pop vs. soda that accepts user-submitted polls. They should make it worldwide, for the non-U.S. english speakers. Then that person should add the poll "Emergency Brake vs Parking Brake vs Hand Brake". Then they should get a lot of people to take that poll. Then they should tell me when they have some results.

And if more people called it "Parking Brake" (which is the correct term, by the way), they wouldn't forget to set it when they parked.

Google to focus on mobile Internet in China


Interesting observation:

"China has a large mobile opportunity, with so many mobile users who will become mobile Internet users in the next few years as 3G and other technologies become pervasive," Lee said in an interview.

"These mobile users have very different usage patterns from the American users. Most Chinese users who touch mobile Internet will have no PC at all.

And this

Software Swoopers versus Software Bashers


Kurt Vonnegut famously divided writers into two groups: swoopers and bashers. A swooping writer writes one long word-belch chunk of text all at once, and then revises it repeatedly. A bashing writer will spend a long time on a single sentence, rewriting it until it's perfect, and then move on to the next sentence. I'm a swooper.  I've already revised this post several times, and I'm not yet happy with it, so I may still revise some more.

You got 4 seconds


Old BBC article

Websites face four-second cut-off

Shoppers are likely to abandon a website if it takes longer than four seconds to load, a survey suggests.

The research by Akamai revealed users' dwindling patience with websites that take time to show up.

It found 75% of the 1,058 people asked would not return to websites that took longer than four seconds to load.

The time it took a site to appear on screen came second to high prices and shipping costs in the list of shoppers' pet-hates, the research revealed.

Them w's


Why is it that people always insist on adding www before a hostname, even where one didn't exist in the first place? Do they think that the web doesn't work without a www on the front? Do they think that a host name needs to have at least three parts (username.sitename.com doesn't seem to get the "add the www" treatment nearly as much as just sitename.com does)? Do they think that a hostname needs to have exactly three parts? Is it because it looks more aesthetic with the www to balance out the com?

MySQL Database Table Schema for international geonames


Field lengths determined by looking at the file. If any of them are wrong, please point it out as a comment and I can correct them.

Finding the longest line in a file


One way to print out the number of characters in each line of a file:

awk '{print length, $0}'

One way to find the longest line is awk '{print length, $0}'|sort -nr|head -1. For example, to find the line with the maximum length in the file abcd.txt, (and how long that line is) you could run:

cat abcd.txt|awk '{print length, $0}'|sort -nr|head -1

If you just want to know what the largest length is, you can remove the , $0 like so:

Google Adsense Owner Peeker


When is someone going to come out with a little site that spiders the web looking for google adsense javascript tags and groups together sites and pages by the owner of the adsense tag?

Syndicate content
by Wesley Tanaka