saush

My new book is out!

Posted in Ruby, Sinatra, Uncategorized by sausheong on September 2, 2010

It’s been a while from the day I started writing Cloning Internet Applications with Ruby but it’s finally out! You can get it from bookstores, Amazon or its main site at Packt. It’s available in both a paper and a digital version (PDF), so get it now!

The main idea behind this book is actually quite simple and it started out in this blog. The first ‘clone’ I wrote was the Internet search engine in 200 lines of code, which was really very much scratching an itch that I had while I was in Yahoo, about a year and a half ago. I was interested in search engines athen and I wanted to write a very simple search engine to illustrate the principles behind an Internet search engine. That gave me a chance to try out Sinatra, the minimalist web application framework, which worked out really well for me eventually. In turn, that kickstarted me into on a whimsy challenge to do the same with Twitter in the same number of lines of code, using Sinatra and later, TinyURL in 40 lines of code.¬†After that it was only a short leap to writing a whole book about it.

While the original idea revolved around writing clones with the smallest codebase possible, eventually the book evolved to be about writing minimal-feature clones written using the Ruby libraries that I now love to use i.e. Sinatra, DataMapper and Haml. The fundamental premise of the book still remained though, that is to illustrate how clones of popular Internet applications can be written with Ruby.

While this is a highly technical book with lots of code, I added in plenty of elements of the reasons and rationale (according to me, that is) why and how certain features of those applications work. For example, Twitter’s and Facebook’s features for connecting their users (‘friending’ features) in a social network are different, because they target users differently. Twitter’s friending features are primarily one-way and do not need explicit approval while Facebook’s friending features are two-ways and need explicit approvals from both parties. This means design and implementation differences, which are explained in detail in the book.

The experience in writing this book was good, and I have learnt tremendously in the process though it was a struggle. I can say this now that it’s published, but there were certain times I wanted to throw in the towel because of the messy my career was in then. I was still in Yahoo when I started, and I continued while doing my consulting work which eventually led to Garena, then wrapping up before I left Garena and finally being published now as I’m in HP Labs. It took a longer time to finish this than my first book, because of the upheaval in my career in the past year or so and also because overall I wanted to come up with a better book. This resulted in a book that has been revised repeated as companies, statistics and technologies changed. When I started, TinyURL was the king of the hill of URL shorteners while bit.ly was up and coming having just taken over as the default URL shortener in Twitter. TinyURL is now one of the players, with bit.ly probably the largest but Twitter has come out with its own shortener. Facebook Connect was the way to go when I wrote the chapter on Facebook, but the Open Graph APIs has taken over since then. Twitter used both HTTP Basic Authentication and OAuth when I was writing, but has switched over completely to OAuth now. And I expect the list to go on and on.

Still, it has been a good journey and a good fight. Finally publishing it is a grand feeling second to none (except when I had my first child). Hope you enjoy the book!

About these ads

10 Responses

Subscribe to comments with RSS.

  1. Jon said, on September 2, 2010 at 10:28 pm

    Congratulations on the publication, I’ll be buying a copy. The introduction you gave me to Sinatra a year ago was invaluable.

  2. TheHackySak said, on September 3, 2010 at 11:14 pm

    Thank you! I have fun with the posts and I just buy the book for more examples and good time.

    Packt is cool too, thanks again.

  3. Noah said, on September 6, 2010 at 1:07 am

    Buying this ASAP (from Amazon to start, may get the PDF later). Looking forward to the read, as your blog posts have been very informative to me.

  4. Luca G. Soave said, on September 20, 2010 at 12:32 am

    Great job, … just bought :-)

    Cheers
    Luca

  5. Johnson Koh said, on September 23, 2010 at 12:58 am

    Fantastic job and congratulations!

    Am trying to write mine for Photoshop too. Hope it will end up a success like yours. Take care pal.

    Garena miss u =)

  6. Manoj Bajaj said, on November 1, 2010 at 4:24 pm

    Sau Sheong, Congratulations..!! I must admire your patience and never give up attitude, as writing a book required tons of patience and time.

    ..
    Manoj Bajaj

  7. i-blis said, on November 11, 2010 at 6:17 am

    A very informative, well written and entertaining book. The learning curve is quite steep, tough.

    On a side note, I found the historical and background analysis a little repetitive at times.

    This book stands as one of the best I read in webapp engeneering.

    Thanks for this.

  8. sausheong said, on March 11, 2011 at 4:44 pm

    Thks Manoj and i-blis for the compliments!

  9. gregors said, on March 31, 2011 at 10:15 am

    the link to your search engine clone is wrong is should actually go here

    http://blog.saush.com/2009/03/17/write-an-internet-search-engine-with-200-lines-of-ruby-code/


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 444 other followers

%d bloggers like this: