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

 

 

blog comments powered by Disqus

past articles »

 

Kontagent

Kontagent is hiring software engineers

BBC News

 

Facebook shares see modest debut (18 May 2012)

 

Merkel 'suggests Greek euro vote' (18 May 2012)

 

Olympic relay flame lands in UK (18 May 2012)

 

Syria protests 'grip Aleppo city' (18 May 2012)

 

UN nuclear chief to visit Iran (18 May 2012)

 

Protesters angered by Gulf union (18 May 2012)

 

Malawi 'to overturn ban on gays' (18 May 2012)

 

Inside world's ‘priciest house’ (18 May 2012)

 

Maryland allows same-sex divorce (18 May 2012)

 

Silicon trick for next-gen memory (18 May 2012)

more »

 

Slashdot News for nerds, stuff that matters

 

Facebook Privacy Suit Seeks Billion (2012-05-18T21:57:00+00:00)

 

Supervolcano Drilling Plan Gets Go-Ahead (2012-05-18T21:35:00+00:00)

 

EA To Provide Free Distribution To Kickstarter Games (2012-05-18T21:15:00+00:00)

 

Wozniak's Original System Description of the Apple ][ (2012-05-18T20:52:00+00:00)

 

Book Review: Elementary Information Security (2012-05-18T20:31:00+00:00)

 

How NASA and SpaceX Get Along Together (2012-05-18T19:50:00+00:00)

 

The Nearest Supernova Candidate To Earth: IK Pegasi (2012-05-18T19:07:00+00:00)

 

Curt Schilling's 38 Studios Struggling Financially (2012-05-18T18:46:00+00:00)

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

 

Shares fall flat - then Facebook buys a company (2012-05-18T21:33:47PDT)

 

Gov. mistakenly says Facebook invented in Calif. (2012-05-18T21:33:47PDT)

 

Woman killed, 2 others hurt in Berkeley wreck (2012-05-18T21:33:47PDT)

 

Lawyer arrested in Dublin bicyclist's hit-run death (2012-05-18T21:33:47PDT)

 

9/11 families upset over ground zero museum delays (2012-05-18T21:33:47PDT)

 

Largest protests yet in Syrian city of Aleppo (2012-05-18T21:33:47PDT)

 

Video could damage Ross Mirkarimi's efforts (2012-05-18T21:33:47PDT)

 

Obama to tap Bay Area again for campaign cash (2012-05-18T21:33:47PDT)

 

Hewlett-Packard considers cutting 25,000 jobs (2012-05-18T21:41:17PDT)

 

Minute Maid wins 'Pomegranate Blueberry' case (2012-05-18T21:41:17PDT)

 

A look at how some IPO stocks have fared (2012-05-18T21:41:17PDT)

 

Delta details airfare search glitch (2012-05-18T21:41:17PDT)

 

Kraft Foods lowers prices on select coffee (2012-05-18T21:41:17PDT)

 

George Clinton, Black Eyed Peas settle song suit (2012-05-18T21:41:17PDT)

more »

 

Asia Times Online

 

Riddle of the Scarborough Shoals (18 May 2012)

 

THE ROVING EYE : NATO occupies sweet home Chicago (18 May 2012)

 

US Iran hawks in some disarray (18 May 2012)

 

Tehran: To talk or not to talk (18 May 2012)

 

The 'illogic' of China's North Korea policy (18 May 2012)

 

BOOK REVIEW : Cherry-picking from China's success (18 May 2012)

 

SPEAKING FREELY : Nepal's constitution: Respect the dissenters (18 May 2012)

 

China's start-ups hold global potential (18 May 2012)

 

US gives green light to investment in Myanmar (18 May 2012)

 

IT WORLD : Facebook floats (18 May 2012)

more »

 


Site feed Updated: 2012-May-18 15:00