Its here.. :)

Knock Knock.. Is anyone still reading these blogs?  Ha.. It seems that Prof Ben has good memory and have not forgotten that I still own him a long overdued blog entry…  So, I’ll l have the honor to write the last blog entry…. Else a particular someone will give me a F grade and do what he does best by scolding me on Friday’s BBQ… 🙂

First thing I learnt is how much i miss school.. With school, there is always something new to learn everyday and learning is fun..  You can also do the “perfect” project as the specifications are clearly defined and there is positive reinforcement when you get back your grades. 🙂  You get to manage your own time and use it to your maximum productivity.. How I missed the times when you are in the “zone” can code for 12 hours non-stop without interruptions throughout the night and not feel tired..   But sadly, school is not the real world.. The real world is cruel. The real world has many constraints.

Every Monday, I would look forward to Prof Ben’s class as there is always something  new, something exciting, something to motivate and inspire me esp in sessions like the entrepreneurship talk and pitching sessions..  I would say that the talks given by the gusts assembled by Prof Ben in the entrepreneurship and pitching sessions are much better than those organised by e27 and Barcamp.. I think I have spent close to $70 taking cabs and getting stuck in jams from my workplace to school..  But its “schoolfees” well-paid..   🙂

Your Teammates must believe in your idea.

To get your idea to work, everyone on the team has to believe in that idea. Only when they believe in that idea, can they be motivated to work towards a common goal and have a common vision.  Only then will they have the passion to work like crazy and add value to the team and the idea rather than just getting things done for the sake of doing it.

It is better to make a firm decision than a right decision.

Many times when designing a web application from scratch without any specifications, you have to make many choices and decisions.. On the user interface, the process flow, the features to add in. There are not right or wrong answers but just tradeoffs between aspects.   Many hours and days can be spent arguing over which is better until the cow come home, draw a table to write down all the pros and cons of each option, people agreeing to disagreeing, then it’ll end up in a situation called Analysis Paralysis.. Then, it’ll be being procrastinated because no decisions are made.  Thus, someone has to take the responsibility to make a firm decision in order for things to move on.

Its better to make some users very happy than to satisfy all users.

Basically, you can’t satisfy everybody.  But its much easier and more productive and effective to make a niche group of users happy and they will help you promote and sell your app/site/ideas passionately.   These will be your loyal users if you can make them happy. Afterall, according to the 80/20 rule, 80% of your content comes from 20% of your users.  This is also very true for HungryGoWhere where 80% of the reviews comes form 20% of the user.

Interface is the hardest thing..

Because interface is also the most important thing which will define the user’s experience and their first impression.. Thus, much time is spent on deriving the best user interface.  However,  different people have different perceptions and opinions on how the interface should look like..   Like what Chewy said, “Not everyone thinks like you”.. Some people look at the aesthetics side of it, while others look at how the simple it is to use, while other look for how advance the functionality is.  Basically, we had 2 different designs for our Sportsup website, one that has better aesthetics and looked fun and exciting and the other which is simple and to the point. We asked the some people of the class on which design they like best and there was no conclusive vote.  The result was almost 50/50.  Which brings me back to my previous point on making deicisions… We spent days arguing over which design to use, and these are really days wasted because no one made the decision on which to use and work cannot continue….

While simple and clean interface is generally the preferred way moving forward, it is not easy to make complex things simple yet maintaining the same functionality.  I remembered a quote that goes something like “Simplicity is Complexity resolved”..

Code More, Think Less

While Prof Ben might say Think More, Code Less, but sometimes, the opposite is true too, depending on the context.   It has been proven time and time again that you produce quality work by doing it again and again rather than trying to think of the perfect software architecture then go down to doing it.  In other words, be a do-er, not a thinker, or as Laurence would put it, JFDI, and improve on it.

There is not right or wrong for many things.. It Depends..

Like what Prof Ben always says “It Depends”.. Overgeneralized “rules” are not to be taken too literally. There are exceptions to everything.


My main objective of taking this module is not only to do and learn cool things, but more importantly is to know more people who are passionate about Software Engineering, Technology and the Internet.. I am glad that I have found and worked with a couple of them.. 🙂

Comments (2)

Not Scalable = #Fail

Kudos to Prof Ben for inviting Zit Seng to talk about Provisioning for a Million Eyeball..  It was a very informative session, at least for me.. It was especially so as HugnryGoWhere did experience massive scalability issues when I was working there..  I’m talking about users being unable to access the site at all and would continue to do so until we restarted the server.. In fact, it was so bad to such an extend that we started blaming every possible thing that seemed to cause the problem…. The network, the CPU, the server etc. except the root of the problem.. It was also my first real encounter with real world scalability problems.  However, thanks to it, I begin to appreciate what scalability really means and the long downtime and disgruntled users came with it..

Basically, I shall highlight lessons that I learnt from the episode.. Its going to be a little technical, so, bear with it .. 🙂 Most of it are reinforcing that Zit Send has mentioned..

Background Information

HungryGoWhere, as reported in  The Straits Times last Tuesday, has “4.5 million page views from 670,000 unique visitor a month“..  Its traffic is handled by a single server that is hosted by ReadySpace with on a quad-core processor and 4 GB RAM running 32-bit CentOS.. There is no tiered system with the DB, App Server and Web Server running all on the same box.. Poor CPU handling so much load. It is not running on any framework and thus query caching, dynamic content caching (fragment caching) as provided by some frameworks are non-existent.

Each Page GET Request generates hundreds of smaller requests

Its an amazing statistics that I cant even believe myself when I first saw it.. I was thinking if there was a problem with my code that collects the data… But each page in generates 100++ queries to the database…  Where did all these queries come from?  Well, you can call it inefficient coding or lazy coding or just legacy code..  For example, to generate a nested cuisine like the one below, the legacy code took O(n+m) queries  to the database where n and m is the number of 1st and 2nd level list of cuisines respectively So, that alone would have generate 30++ queries since we have 30++ first and second level cuisine types…

Of course, our number of GET requests per page is also enormous as we did not optimize for this from the beginning.. Basically, we did not use CSS Sprities,  we did not minify all the js and css files, we put our jQuery js file in our own domain, thus increasing one more GET request (instead of using Google’s cached copy).. Basically, we did all the things that we are not supposed to do for good performance.. But now we are wiser.. 🙂

Get Analytics and Data before trying to Troubleshoot

As I mentioned before, without raw data, we blamed all other factors that could have caused the performance issues, but wasnt the root of the problem..  Our CTO wanted to try to use memcached to reduce the CPU and database load, while I wanted to have more analytics before even starting to try to solve the problem..   Finally, after some argument, we decided to install MONyog which is an mySQL monitoring tool.  It showed us that some queries are essentially taking more than 30 seconds to complete!  Due to this, users are unable to load the page and will eventually get a connection timed out while loading the page.  The problem only gets worse and worse when more and more users try to refresh their pages, essentially killing our server as more and more queries swarm out database.

The issue, as it turns out is due to table locking in our database, as we are using ISAM database..   The query that does a search normally takes 2-3 seconds to complete.  However, this table has multiple update statements too when the user visits a page.  It turns out that the update priority is high and thus mySQL will queue all other SELECT operations in order to execute the UPDATE statement.. Thus, what happens is that the SELECT statements are already taking a long time (2-3 seconds) to execute and, to add on the delay, it is always getting queued behind the update statements.  The update statements keeps on coming in and the SELECT statement keeps on getting queued and have no time to execute.

Cache Cache Cache

Like wat Zit Seng mentioned, many front pages that you see normally on Yahoo are all static pages… This is currently true on the HungryGoWhere site, reducing the load dramatically and ensuring that users will at least be able to load our Front page when they visit our site.. We don’t want disgruntled users who are left with Connection Timed Out like we previously had. To accomplish this, we used  memcached to cache our front page in memory and load the static page.  Certain portions are updated at different time intervals to give a “real-time” feel.

There are many other optimizations that we did, but, essentially, what Zit Seng mentioned are very real-world problems that has to be tackled with when you have a million page views every month (HungryGoWhere has 4.5 million)..   I always thought Databases are very efficient and locking would almost never happened nor cause any problems… But I was so wrong….

Comments (1)

I poke for AIDS..

It’s quite a coincidence that I am supposed to blog about the application that I was “featured” in.. Or was it not a coincidence.. haha..  Thanks to Patrick for bring so nice to let me Poke for AIDS..  The result is that  I am being “blackmailed” by Laurance (inside joke)..  The lesson learnt is that what you said may and will be used against you.. hah.. I guess that is why there are so many people quoting Prof Ben.. The most popular quotes are , “The World is in DEEP SHIT!” and “Don’t Screw the Customer to make a Quick Buck!”.. Both of which are words of wisdom..

Jokes aside, all of the presentations were impressive.. I guess the Myths of Good Presentations workshop really helped..  Slide Designs were clean and simple.. Most importantly,  they were not cramped with words like many of the other presentations in NUS..  Joshua’s Group (Marketplace) even made a cool video about what MarketPlace is all about.  Jonathon’s Group (Cafe World) experimented with pptFlex to achieve cool sliding effects within the presentation while Tomithy’s group (SuperPoke) used a web-based tool, Prezi , to achieve even better zooming and sliding effects!  In the future (if this course continues), perharps we should Video Record these presentations.. 🙂

Different groups went into different aspects of the Facebook application allowing the rest of us to see things from many different angles..  Some groups (eg. Marketplace) delved more into what the Application is all about and what makes the application viral… Some groups (eg. Mafia Wars, Friends for Sale ) analysed the specific steps taken by the Company behind the Facebook Apps to make it Viral..   Jonathon’s group (Cafe World/Zynga) was particular impressive (cause its my group) as it took an interesting perspective by showing us that ideas are “cheap” and money is the root of all evil! SuperPoke took the approach of telling us the bad points of SuperPoke and how it can be improved upon.  They even took it one step further by coding “Rumour has it” application to put their idea across (and to sabo me)….

I guess the purpose of this assignment by Dr Ben is to make us “think more and code less“.. Think what are the ingredients for success for these applications and how the companies  increase the stickiness and viral-ness of the app before you start coding the application..Is that what he meant by “think more and code less”?

I have to say that I am really surprised that Pillow Fight, with its ugly and unusable interface managed to gain so many followers and  beat the SuperPoke which have the following advantages:

1.  much better and usable user interface
2.  has a very big first mover advantage (almost everyone who has used Facebook would have heard of SuperPoke)
3. users are more familiar to the word Poke

It’s just unexplainable.. Maybe someone can explain to me…. Is throwing Pillows so fun?

The following points seem to be common among the popular Facebook Apps and my opinion of why they are able to get so many users:

1. Bo Liao..
2. No need to think.. “Don’t Make Me Think”..
3. Leverage on the user’s “Unexplainable Passion to Level Up”
4. Positive Re-Enforcements (Maybe this explains the Unexplainable Passion to Level Up)
5. Spam the User’s Friends’ Mailbox..
6. Spam the User’s Friends’ Wall/Feed
7. Spam in whatever ways you can.. More Spam => More Exposure => Increase Conversion Rate

When leveraged properly and sometimes unethically,  Social Media & Viral Marketing can be very powerful.  This Facebook Seminar showed us how and why..

Now, anyone wants to Poke for AIDS together with me? Literally or not..

Comments (3)

What a day!

Woohoo!! I am totally overwhelmed by today’s Show and Tell session that I just have to blog about it!!  I never knew there was such a large talent pool in NUS… People who has taken risks and did startups even as early as in their year 1 in their Uni..  People who are motivated to join Startup@ Singapore even in their year 1s.. People who are full of the entrepreneurship spirit, believing that they can make a difference….  What an inspiring Show and Tell..

Sometimes, it makes me think back on my University years and what I should have done.. . To experiment with life and try different things and see where they lead me to.. A regret that I did not spend a large part of my university building up my network, or at least try to attempt a startup etc… I wonder how my life would have been different if I took this module 3 years ago.. But I will look forward and try to accomplish these while I am back in school taking the cool CS3216 module..

Thanks to the enthusiastic introduction by Dr Ben Leong who made me seem like I am so desperate for a girlfriend.. I have the opportunity to make some new friends and am excited to work with people from different disciplines on cool interesting apps!!!  Computing and Web technologies have always been on passion and with passion comes success..

While I am currently working, rest assure that I will be putting in the same amount work, if not more, than what my teammates will be putting in.. Afterall, I have no other modules except this module..  My aim here is not only to make new friends who are passionate about the Web, but also to learn as much as possible from them..  I have a flexible work schedule (thats the perks of working in a “startup”)  and will be able to meet up for meetings and discuss ideas etc…

Just a little bit more to sell myself.. I know PHP, javascript, jQuery, CSS and most of the things necessary for designing and building a Web Application.. And of course, theres a reason why Dr Ben Leong promote me. . That should be more than enuff to sell myself for now…. ha.. 🙂

Comments (3)

CS3216: The Beginning after an End..

Its back to school again after a 6 month break.. Just when I thought that I am finally free from school, I am back in it again..  And quite frankly, I miss school… quite a lot actually..   It allows me to be constantly challenged (the interesting modules at least) while giving me the freedom and time that I need to be uber productive in whatever I do (ROWE)..  Unlike being the  White Collar Underclass in the corporate world where you spend most of your time maneuvering through red tapes, going for useless meetings,  working on non-meaningful wok/projects that doesn’t interest you, and worse of all, being in office for the sake of being in office..  All taking up 80% of your time, leaving only 20%  doing things that needs to be done.. After all, You weren’t meant to have a boss..  🙂

Okie.. Enough of “whinning”….

CS3216 is a module that I had always wanted to enroll in since it was introduced 3 years ago, but it was introduced too late into my undergrad years.  Its different from the typical NUS modules that focuses simply on theory, but this focuses on the practical aspects.  Being a module that has a entry barrier, I am excited to meet people who are truly passionate about the Web and startups amongst other things.  Afterall, the future is all about the Web.  Thus, Kudos to Dr Ben for taking the initiative and having the foresight  to propose this module to SOC to teach something that the students are excited about…

Now to the main point of what do I want to learn from CS3216..

1.  Learning From, Meeting and working with truly passionate people

Its ironic that even in SOC, its hard to find people who are really passionate about Web technologies or even Computing in general..   But here, we have a pool of highly motivated people from different disciplines who are passionate about and take pride in the things they do..  With such a diverse crowd from different facilities, it’ll be a very interesting experience to work together with these people and, more importantly, learn from them.  Learn from them not only in terms of skill sets, but in terms of their thought process, how they think, their ideas etc. Thus, it is actually a good thing that Dr Ben makes us work in different teams for the different assignements.. From there, I  hope to meet new people and learn new things..   Afterall, a technically superior web-app without good usability and design and more importantly, marketing, will ultimately go into #failblog..

Who knows, maybe through this module some of the ideas/ final projects might evolve to become startups or people who want to do startups might find new partners.. That would be cool!

2. Learn about new Evolving technolgoies

Of course, this is what the module is about.. Interestingly, it is different every year.. Web Technologies today are evolving at a super fast speed like never before… From Web 2.0 to Mashups to Cloud Computing to Location Based Services to the Convergence of Mobile and Web, all within the last 4 years.. And it will only get faster..  That might sound all good for the users. But for the programmers, that means more things to learn and explore.  In terms of Javascript alone, we have there are more than 5 widely used and different frameworks to choose from. In terms of languages and frameworks, we have RoR, different PHP-based framework, different Phyton-based framework, and the recently introduced Google Go! which aims to be the next Web Framework!  While it is impossible to master all of them, I hope to learn from the people who have used some of the different technologies and their experiences with them..

3. Learning Life Essential Skills..

Like what Dr Ben says, What won’t kill you only make you stronger..  This is supposed to be a tough module in the sense that a lot of teamwork and coordination is required for the final project. Compromises have to be made when teammates are busy with other modules ; Keeping everybody in sync with the latest progress of one another is another challenge;  To communicate your ideas across to people with different backgrounds will be another obstacle to overcome (especially those without technical backgrounds).

The interesting thing about Dr Ben’s modules is that he emphasizes communication a lot..  Thus, by taking this module, I do hope to build up my character by getting out of my comfort zone, conquer my fears and grow my confidence..  The Show and Tell will be a first step towards that..

The bonus is that Dr Ben also says he’ll teach a lesson on “How to date cute chicks” in CS3216…. :0)  Another Life’s Essential skill..

Leave a Comment