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 (1)

 

 

Comments (1)

past articles »

 

BBC News

 

Pakistan trio hit by ICC charges (02 Sep 2010)

 

Middle East talks 'constructive' (02 Sep 2010)

 

School lottery 'failed in aim' (02 Sep 2010)

 

Earl weakens as it nears US coast (03 Sep 2010)

 

Alcohol drinking 'continues fall' (02 Sep 2010)

 

Compost sparks Legionnaire's fear (02 Sep 2010)

 

Bone drug linked to cancer risk (02 Sep 2010)

 

Openness urged on UK's emissions (03 Sep 2010)

 

Explosion on Gulf of Mexico rig (02 Sep 2010)

 

Europe agrees finance watchdogs (02 Sep 2010)

more »

 

Slashdot News for nerds, stuff that matters

 

Harvard Ditching Final Exams? (2010-09-03T00:37:00Z)

 

Video Appliance For a Large Library On a Network? (2010-09-02T23:21:00Z)

 

Canon Develops 8 X 8 Inch Digital CMOS Sensor (2010-09-02T22:39:00Z)

 

Flash On Android Is 'Shockingly Bad' (2010-09-02T21:59:00Z)

 

GameStop Pulls Medal of Honor From Military Bases (2010-09-02T21:03:00Z)

 

GameStop Pulls Medal of Honor From Military Bases (2010-09-02T21:03:00Z)

 

DNA-Less 'Red Rain' Cells Reproduce At 121 C (2010-09-02T20:11:00Z)

 

Hawking Picks Physics Over God For Big Bang (2010-09-02T12:54:00Z)

more »

 

TechPsychic Tech Rumors and Invented News

 

TechPsychic: AT&T: more money, says it's disruptive in funding from. (08 May 2010)

 

TechPsychic: I know that Apple is close to Apple Dominates, Hires ex-Googler - Yes, Android phones. (08 May 2010)

 

TechPsychic: AT&T says: Facebook Connect. (08 May 2010)

 

TechPsychic: Google's Nexus One of Google Chrome Release Adds Support subscriptions accounted for Amazon: Apple. (08 May 2010)

 

TechPsychic: Another stat: Twitter's Design of this is giving rise of BlackBerry Foursquare Map App store end. (07 May 2010)

 

TechPsychic: Like educational sales Up around Apple iPad makes money Plan costs half an Apple. (07 May 2010)

 

TechPsychic: Instead added extensions, social Networks than double, everyone jumps in Silicon Valley? (07 May 2010)

 

TechPsychic: So why iTunes App lets Social Networks Verizon Wireless Internet. (07 May 2010)

more »

 

SF Gate

 

Steel exec feared dead in Peninsula plane crash (2010-09-02T21:35:12UTC)

 

No sign of oil spill after Gulf platform fire (2010-09-02T21:25:11UTC)

 

Immigration agency ponders S.F. opt-out request (2010-09-02T07:42:17UTC)

 

Foreclosures can make you sick, report says (2010-09-02T16:43:37UTC)

 

Earl threatens East Coast with a pounding (2010-09-02T21:32:27UTC)

 

Muni drivers fight restoring service cuts (2010-09-02T12:22:46UTC)

 

Michela Alioto-Pier loses bid to seek new term (2010-09-02T16:43:13UTC)

 

Barbara Boxer, Carly Fiorina debate taxes, jobs (2010-09-02T18:06:36UTC)

 

Rapper T.I. comeback could be derailed with arrest (2010-09-02T21:35:41UTC)

 

Con man could get life under Calif. 3-strikes law (2010-09-02T21:35:32UTC)

 

Funk band War tells PepsiCo they're not friends (2010-09-02T21:35:10UTC)

 

Ex-US air base in Iceland considered for war games (2010-09-02T21:35:07UTC)

 

Stocks move higher following jobs, housing reports (2010-09-02T21:32:28UTC)

 

Presented By: (02 Sep 2010)

more »

 

Asia Times Online

 

China makes its North Korea move (2 Sep 2010)

 

Al-Qaeda presses a point with Lahore attack (2 Sep 2010)

 

LIFE IN TALIBANISTAN : The degree zero of culture (2 Sep 2010)

 

Clawing back credibility in Kyrgyzstan (2 Sep 2010)

 

Iraqis uneasy over what happens next (2 Sep 2010)

 

Hiroshima's poisonous past (2 Sep 2010)

 

Sheen wearing off Indian growth (2 Sep 2010)

 

Pakistan mulls 'flood taxes' (2 Sep 2010)

 

Malaysia reaps reform benefits (2 Sep 2010)

 

THE MOGAMBO GURU : Secret path to riches (2 Sep 2010)

more »

 


Site feed Updated: 2010-Sep-02 19:00