tungwaiyip.info

 

home

about me

links

my software

Media

Yucatán Photos

St Lucia Photos

Photo Album

Videos

Blog

< May 2009 >
SuMoTuWeThFrSa
      1 2
3 4 5 6 7 8 9
10111213141516
17181920212223
24252627282930
31      

past articles »

Click for San Francisco, California Forecast

San Francisco, USA

 

The World's Shortest Short URL Generator

(2009-07-07 Update: I have suspended this demo program because I find spammers has started to exploit it. What a lesson for me to learn.)

There was a long winding discussion about a short URL generator bit.ly. Many people are familiar with the pioneer in this field tinyurl.com, which for many people, is the synonym of this service. Nevertheless, with fast raising popularity, many people see a lot of promises in bit.ly as a business. On the hand, just as many people brush off it as a trivial service easy to replicate. Someone dismiss it as an application that can be done in 10 lines of code. This prompted the posting and set off a discussion on Fred Wilson's blog.

I should say I agree with most of the comments from both sides :) But as a geek, the idea of building a short URL generator in 10 lines has latched on my head. So I set out to work. An hour later out came http://tungwaiyip.info/shorturl. In just 10 lines of code, it is the world's shortest short URL generator, or so I thought.

This is a real application. It has UI, URL shortening algorithm and database persistence, all in 10 lines of code. Feel free to check out the source code. I have a lot of fun doing this. There is a fatal flaw though. It does not handle concurrent update very well. To squeeze the code even more to handle concurrency does not seem fun. So I just stopped there.

2009.05.12 [] - comments (0)

 

 

Comments (0)

past articles »

 

BBC News

 

EU 'nearing' Greece bail-out deal (13 Mar 2010)

 

Suicide bomb hits Pakistan's Swat (13 Mar 2010)

 

Moon move dismays Apollo men (13 Mar 2010)

 

Three freed in Irish 'Vilks plot' (13 Mar 2010)

 

Alaska wolves 'killed' US teacher (13 Mar 2010)

 

Clinton rebuke over Israel homes (12 Mar 2010)

 

Ivory and tuna top wildlife talks (13 Mar 2010)

 

Sarkozy and Brown attack US deal (13 Mar 2010)

 

Obese drinkers face 'double whammy' (13 Mar 2010)

 

Cell for cell: Georgian prisoners can swap jail time for monastery (13 Mar 2010)

more »

 

Slashdot News for nerds, stuff that matters

 

Digg Says Yes To NoSQL Cassandra DB, Bye To MySQL (2010-03-13T02:47:00+00:00)

 

Hunting Disease Origins By Whole-Genome Sequencing (2010-03-13T00:04:00+00:00)

 

Nearby Star Forecast To Skirt Solar System (2010-03-12T23:36:00+00:00)

 

Texas Approves Conservative Curriculum (2010-03-12T23:17:00+00:00)

 

Court Rules Against Vaccine-Autism Claims Again (2010-03-12T22:36:00+00:00)

 

Scientists Need Volunteers To Look At the Sun (2010-03-12T21:55:00+00:00)

 

Here Come the Linux iPad Clones (2010-03-12T21:13:00+00:00)

 

DR Congo Ring May Be Giant Impact Crater (2010-03-12T20:48:00+00:00)

more »

 

TechPsychic Tech Rumors and Invented News

 

TechPsychic: Apple Unveils The UC Berkeley or Twitter looks like FriendFeed. (13 Mar 2010)

 

TechPsychic: It's fairly simple Way To social network information in Clearwire and Firefox Add-On according to. (12 Mar 2010)

 

TechPsychic: Make money changed hand, Google Nexus One event. (12 Mar 2010)

 

TechPsychic: Microsoft Bing's Twitter. (12 Mar 2010)

 

TechPsychic: Apple's iPad Comes to say about Google Chrome Release. (12 Mar 2010)

 

TechPsychic: Opera Mini Stats Tell Google Chrome Release Adds Support high-definition video. (12 Mar 2010)

 

TechPsychic: MySpace recently launched Android On Twitter 1 Million Downloads A job applicant are alive, Facebook? (11 Mar 2010)

 

TechPsychic: Android Apps. (11 Mar 2010)

more »

 

SF Gate

 

Photos may show more victims of serial killer (2010-03-12T13:41:35UTC)

 

2 convicted in San Jose baseball bat killing (2010-03-12T21:00:40UTC)

 

Suspect's family sues police over his death (2010-03-12T17:58:41UTC)

 

Oakland skills center given stimulus boost (2010-03-12T13:09:12UTC)

 

Special session ends, state deficit unresolved (2010-03-12T08:00:19UTC)

 

Oakland's Kaplan could be long-term force (2010-03-12T13:17:51UTC)

 

Experts say even Obama getting too many med tests (2010-03-12T21:30:57UTC)

 

State transit projects may be U.S. models (2010-03-12T08:07:31UTC)

 

Roethlisberger's lawyer hires private investigator (2010-03-12T22:55:51UTC)

 

Business Highlights (2010-03-12T22:55:50UTC)

 

Presented By: (12 Mar 2010)

 

Quinn wants to borrow nearly billion _ but how? (2010-03-12T22:53:50UTC)

 

Tri-Continental declares 1Q dividend (2010-03-12T22:48:49UTC)

 

Rates trade in tight range on uneven economic data (2010-03-12T22:47:48UTC)

more »

 

Asia Times Online

 

AN ATOL SPECIAL REPORT : Iran's spies show how it's done (Fri 12 Mar 2010 19:00:00 +0700)

 

The demise of a 'good-for-nothing bandit' (Fri 12 Mar 2010 19:00:00 +0700)

 

A titanic power struggle in Kabul\ (Fri 12 Mar 2010 19:00:00 +0700)

 

Israel puts US on notice (Fri 12 Mar 2010 19:00:00 +0700)

 

When the Mekong runs dry (Fri 12 Mar 2010 19:00:00 +0700)

 

US, China struggle with mid-life crisis (Fri 12 Mar 2010 19:00:00 +0700)

 

South Korea reluctant to take command (Fri 12 Mar 2010 19:00:00 +0700)

 

BOOK REVIEW : Healing invisible wounds (Fri 12 Mar 2010 19:00:00 +0700)

 

Medvedev plays down power role (Fri 12 Mar 2010 19:00:00 +0700)

 

MARKET RAP : Buyers beware (Fri 12 Mar 2010 19:00:00 +0700)

 

IT WORLD : Browser beaten (Fri 12 Mar 2010 19:00:00 +0700)

 

THE MOGAMBO GURU : A debtor's dream (Fri 12 Mar 2010 19:00:00 +0700)

more »

 


Site feed Updated: 2010-Mar-12 21:15