Thursday, November 26, 2009

Paradox of the Poor (Money No Enough) Programmers

Recently, I got involved in a some discussions over the future of Computer Science in Singapore. The truth of the matter is that Singapore has done very well with regards to attracting lots of world-class Infocomm companies to set up shop in Singapore. REGARDLESS of whether the current economic recovery is going to be U-shaped, W-shaped, O-shaped, whatever-shaped, the jobs are coming over the next couple of years. There are going to be a large number of them and these are going to require good programmers (and not just run-of-the-mill graduates).

But there's apparently also a shortage of good programmers. For a CS prof who is concerned about the state of the local IT industry, this is clearly something that I am deeply troubled about.

After discussing this issue with some folks over the last few days, I came upon this apparent paradox: it is well-known that a good programmer is 10 times more productive than a mediocre one. In this light, suppose a mediocre programmer makes $30K a year, the good programmers should be expected to make $300K a year. However, we are not seeing this in the market today. WHY?

While thinking about this problem, I suddenly recalled this conversation I had over lunch a couple of weeks ago with my ex-classmate who is the co-founder of a successful startup. Over lunch, we were discussing the issues of manpower and pay. He made this one remark, "I have this guy who is worth 10 times what I'm paying him - but I'm not paying him that much. The reason is that he doesn't KNOW he's worth that much, and I have no incentive to tell him."

This indicates that there's information asymmetry. The classic example of this is what's known as the Market for Lemons. The idea here is that in the used-car market, there are two kinds of cars, lemons and peaches. Lemons are cars that will break down frequently and peaches are good and reliable cars. The catch is that only the seller knows whether his car is a lemon or a peach. A buyer cannot tell. Hence the information asymmetry. The question is this: suppose lemons are worth $20,000 and peaches are worth $60,000, what is the price of a used car?

Clearly, the price must be at least $20,000 and at most $60,000. A market price of $60,000 is impossible because the buyers risk getting a lemon and suffering a huge loss. Suppose the clearing price for used cars is $20,000+x, where 0<x<40,000. The lemon sellers will gladly sell their car 'cos they will enjoy surplus x>0. The peach sellers however will not sell 'cos they will lose $40,000-x>0. This means that at this price, the market is full of lemons. If the buyers were rational, they would never pay $20,000+x since they know that they must be looking at a lemon. The stable equilibrium is therefore a market clearing price of $20,000 and where only lemons get sold. This is a market failure because peaches cannot be sold.

So how is this issue of information asymmetry and lemons related to programmers?

Well, it seems to me that there's some weirdness in the market. If there's a so-called shortage of good programmers, then logically, the salaries of good programmers must shoot through the roof (in Singapore, not talking about Google, Mountain View here), but that's not happening. Hold that thought.

Over the past couple of years that I have been teaching at NUS, I have come to realize one curious thing. The class of Honours is NOT an entirely good indicator of whether a student is a good programmer. There is some correlation, i.e. First Class Hons typically better programmer than Third Class Hons, but there are very good programmers who are only 2nd Upper/Lower students (and quite a number of them!).

I have had students who are elite programmers who fail MA1505 (calculus) and get their CAPs thrashed. There are also First Class Honours students that I would never touch with a ten-foot pole. Software companies try to do their due diligence and set tests and exams, etc. However, the laupok First Class Honours will still probably get through.

All in all, I believe that there's an information gap. Companies look at the prospects and they are not entirely sure. Good programmers who just graduate fresh from school don't really understand their own market value and are willing to accept somewhat low salaries from the bigger firms. Bigger firms don't pay more because the programmers are docile enough to accept and they also have no interest to pay more. Cheap is good what. Smaller firms don't have the financial resources to compete and also take the cue from the large firms.

I had an idea: suppose we have an oracle that will magically reveal the value of each programmer. We take a programmer and stick him into the oracle and out comes a dollar value, i.e. say $40,000, or $60,000 and both the market and the programmer believe that the oracle is accurate. How will this change the situation? :-)

I have a theory - and I plan to build the oracle to test if my theory is correct. Wish me luck.

Here's another post on the same issue (Thanks Zi!). The funny thing about productivity in programming is that we actually want programmers who write less code, not more. Also, the majority of the time is spent not so much on writing code, but in debugging. Good programmers generate fewer bugs. :-)

Wednesday, May 20, 2009

Understand Life, Reject Dogma, Embrace Common Sense

"SINGAPORE needs people with a sense of the aesthetics and not just people who get straight As in school, said Minister Mentor Lee Kuan Yew. "

Wei Man's response, "Say that again?! My life will be different if you thought so ten years ago."

Wei Man is one of the most outstanding students I had this past Semester and the CS3216 Blog Queen. When I read her response, it bothered me. It also reminded me of this Facebook comment conversation I had with some former CS3216 students a couple of weeks ago about scholarships for foreign students.

My question to Wei Man: why should your life be different if the Minister Mentor thought differently ten years ago? He's not your grandfather what.

First, I am surprised that people seem to think that this news reports is saying anything new. Do people think that the Minister Mentor just woke up recently and decided that we needed more than students with straight As?

If people will read carefully, the example of the two Japanese landscape architects happened during the "Singapore's early years". Translation: the MM figured this out 40 years ago. :-)

Frankly, the fact that Singapore (or any country for that matter) needs more than just students with straight-A's pretty common sense isn't it? Really doesn't take a genius to figure it out. Why then is Wei Man surprised at this latest press report?

For some strange reason, people seem to have this impression that the Government (whatever that means) "demands all its citizens to be a jack of all trades and good in everything" (to quote Wei Man). I was like "Huh? Since when?" :-P

I'm a systems scientist. A system is a entity consisting of a collection of smaller components. Systems are interesting because they often exhibit behaviour that is different from its components. Futher more, one way of understanding systems is to understand how the individual components work and interact. Society is one such system.

One criticism I have of our people is that they don't try to understand and appreciate the "laws of nature" but instead blame all their failings on "the system" or "Government". What the heck does that mean?

Let's take two examples illustrating the sense in the madness we call the "system".

First, why do we use grades for university admission. Answer is very simple: because there is a limited amount of resources (university places) and we need to allocate them in some "fair" way. Lottery wouldn't do.

Second, why the apparent "fixation" on grades in the civil service? Since I'm an ex-civil servant, I can say that there's no "fixation" on grades. It's all quite practical practical.

Again, there's limited resources, either scholarship places or jobs and there's a need to shortlist the candidates efficiently. Interviewing EVERYONE is NOT an option by a long shot.

Why are Second Uppers paid more? Because the private sector also pays them more. If the civil service doesn't pay more, it can forget about hiring the better graduates. I wish that people can understand a little more about labour markets, about Economics and realize that grades are what's known as a signal.

Line managers in the civil service are no different from those in the private sector. They hire people to do their work and minimize their own grief. If better grades do not translate to better workers, they hire for what? In case people don't know, civil servants don't get more bonuses if they hire people with better grades.

Frankly, Singapore is a really "logical" society (maybe every society is equally logical?). Everything happens for a reason and there are good reasons for everything. The system might not be perfect, but people should first look within themselves and learn to take responsibility for their own actions and/failings.

Finally, Wei Man thinks that "more options" means "more freedom to choose". She is sort of right - but my stand is somewhat more philosophical: more often than not, it not so much the lack of options but the lack of guts that limits one's freedom of choice. :-P

I agree with Wei Man that Singaporean's education system is going the right direction, but after speaking with some parents last week, I have also come to realize that all the changes mean squat unless there is a change in the mindset of the parents.

I wrote the following letter a couple of years ago at a whim while I was still a graduate student at MIT:
The Straits Times, March 27, 2006
All-rounder student mould is pointless

I, TOO, am heartened by the breadth and depth of the Ministry of Education's recent policies and I believe that our policies are indeed progressive.

People are different and few are truly 'all rounded'.

To expect our students to conform to the mould of an 'all rounder' model student is like expecting Singapore women to diet till they all look like Ally McBeal: It is self-defeating and pointless, unless what we want is a whole generation of mediocre students.

We have to let a thousand flowers bloom. Then perhaps a garden might grow on our doorstep.

Young Singaporeans have to understand that the world has changed since their parents' generation: Singapore is now a global city and they will have to compete with foreigners for jobs at home.

Protectionism is not an option. We have no oil. We have no natural resources. If we drive up our already high labour costs, we are toast.

Let us not forget also that there are 1.3 billion hungry people, in the emergent China, who are willing to do the same jobs for less; they are even willing to do jobs that Singaporeans are not willing to do.

In some ways, our situation may seem bleak but I believe in our future; among all the people in our region, I believe that Singaporeans have access to the most opportunities.

The question is: Will our people fully exploit the available opportunities to excel in a profession that they truly care about, or will they cave in to peer pressure and continue the blind pursuit of good academic grades and co-curricular activity records, believing that paper qualifications are the key to a secure future?

To me, the truly worrying part is the expectations that the parents impose upon their children.

MOE has done its part by reducing the syllabus, and it has improved the testing system by introducing questions that cannot be answered by simply regurgitating from a 10-year series.

These are steps in the right direction.

This move has, however, unnerved many parents, who seem to prefer the good old days, where their children can safely spend their entire lives buried in their books, but thereby 'guarantee' good grades at the national examinations.

Like Ally McBeal, Singaporeans may need to take a look in the mirror.

Ben Leong
Cambridge, Massachusetts

I think I was spot on. One of the key concerns I got when I spoke with the parents was "is there a career if my son/daughter chooses Computer Science? Will the starting pay be less than the other professions?"

I looked at them in the eye and told them, "if your son/daughter does well in WHATEVER course he/she chooses to study whether at NUS or NTU, he/she will probably find a decent job; if he/she does poorly, probably NO course will guarantee a job. So have your son/daughter pick a course, he/she thinks he likes. This maximizes the probability that he/she will do well. Simple as that."

MOE needs to educate not only our children, but the parents. :-)

This is my charge to my students: school is overrated. Life is *real* (and often very harsh). Take some effort to understand how the world around you works and think. Apply common sense. It takes some effort, but it's not that hard.

Saturday, May 9, 2009

Reflections Two Years Down the Road

We had BBQ tonight. Since last semester, it has become somewhat of a tradition for the class to hang out and chill out at the end of a tough semester.

It was nice that most of the students turned up, except for a couple who are out of town. A few students from last batch also came -- Zongyao, Caleb and Christine. I would like to express my gratitude again to my trusty TA, Kok Wee for organizing the BQQ and also Janus for helping him. :-)

It was really nice hanging out with the students. I had a great time chatting with the students, but I unfortunately had to leave early 'ços my wife was nagging me to go pick up our two babies. :-P

Jason asked me if I was going to offer CS3216 again next year, and I said, "Yes".

This is now the second time that we've offered CS3216 and truthfully I did have second thoughts in the middle of the semester about offering CS3216 every year. I was seriously considering the option of offering it every other year instead. I discussed this matter at length with Kok Wee, my trusty TA, who was adamant that we should offer CS3216 every year. (It's nice to have a TA who really believes in the course. :-))

Last year we had about 50 students. This year, we only had 28. Personally, I am quite confident that we can sustain a enrollment of about 25-30 students a year, but one of issues that we had this year (which we didn't have last year) was the difficulty the students had in forming Final Project teams different from those for the Facebook assignment.

It was a structural problem arising from the smaller numbers. Some groups inadvertently wanted to work together with their Facebook assignment teams and with a smaller enrollment, this made it difficult for the remaining people to switch groups even if they wanted to. The same issue didn't arise when we had 50 students last year.

I didn't really like this situation because I had this idea that one of the skills I wanted the students to learn in CS3216 was how to get to know people and then form the dream teams to develop their "killer app". Because "Musical Chairs" didn't happen, I was thinking to myself that a perhaps more efficient way to run the class was to mount it every other year so that we can collect enough (say 50 students) in each course.

What made me change my mind towards the end of the course was the realization that a smaller class actually has its advantages. With fewer project teams, I have the time to talk individually to each and every group and get to know each and every student. The quality of the Final Project apps this year also turned out to be significantly higher.

It is no secret that CS3216 was inspired two years ago by the late Prof Randy Pausch's Last Lecture. In that talk, he described this class he created when he first went to CMU called "Building Virtual Worlds". It sounded really cool, but unlike Randy, I'm an animation guy, so this virtual world business was out of my league. It so turned out that I am the sort of guy who likes to build systems - and along came Facebook, so in a moment of insanity, I proposed CS3216 to my Department.

I would like to take a moment to give credit to my Department, especially my Vice-Dean Prof Khoo Siau Cheng. Randy says CMU is great. Truthfully, NUS ain't bad. Instead of telling me that I was crazy and stupid, I actually got the support of SoC and later approval by NUS to mount a new course on Facebook programming! I am blessed to work in probably one of the most enlightened faculties on campus and probably in the world. For this, I am very grateful. :-)

Truth be told, it's actually not very reasonable for NUS to have a Facebook Programming class, because that seems to make us too much of a vocational institution, which we are not. (However, as the students will attest, I don't actually teach people how to write Facebook apps (and neither did I ever have such an intention). The whole point of CS3216 is for students to figure out how to learn. Two generations of CS3216 students have thus completed the course, survived to tell the tale and learnt (albeit painfully) that picking up the technology is the least of their problems, if they truly want to do something great).

Now two years down the road with CS3216, I can safely affirm that the late Randy Pausch was truly a great educator and his demise is indeed a real loss to humanity. I just went to read the transcript for the Last Lecture again and found the following quotes I am able to relate to quite intimately after teaching CS3216:
The first assignment, I gave it to them, they came back in two weeks and they just blew me away. I mean the work was so beyond, literally, my imagination, because I had copied the process from Imagineering’s VR lab, but I had no idea what they could or couldn’t do with it as undergraduates, and their tools were weaker, and they came back on the first assignment, and they did something that was so spectacular that I literally didn’t, ten years as a professor and I had no idea what to do next.

(If you) wait long enough and people will surprise and impress you. He said, when you’re pissed off at somebody and you’re angry at them, you just haven’t given them enough time. Just give them a little more time and they’ll almost always impress you. And that really stuck with me. I think he’s absolutely right on that one.

And the course was all about bonding. People used to say, you know, what’s going to make for a good world? I said, I can’t tell you beforehand, but right before they present it I can tell you if the world’s good just by the body language. If they’re standing close to each other, the world is good.

And BVW was a pioneering course [Randy puts on vest with arrows poking out of the back], and I won’t bore you with all the details, but it wasn’t easy to do, and I was given this when I stepped down from the ETC and I think it’s emblematic. If you’re going to do anything that pioneering you will get those arrows in the back, and you just have to put up with it. I mean everything that could go wrong did go wrong. But at the end of the day, a whole lot of people had a whole lot of fun.

So today’s talk was about my childhood dreams, enabling the dreams of others, and some lessons learned. But did you figure out the head fake? [dramatic pause] It’s not about how to achieve your dreams. It’s about how to lead your life. If you lead your life the right way, the karma will take care of itself. The dreams will come to you.

The first clue that CS3216 was doing something right happened when I was grading the Hello World assignment apps last year. How much can students do with a Hello World app? Well, a lot more than I had EVER imagined.

Teaching CS3216 is really challenging, but it is also intensely rewarding because I get to work with perhaps the most talented students we have on campus from all faculties. In some situations, the distinction between teacher and student isn't quite so clear.

Two groups of students this year taught me the truth that "wait long enough and people will surprise and impress you".

One group was MishMash. Jiayang tells their story here and it's true! Truthfully, when the team first did MishMash for their first assignment, it wasn't so hot. It wasn't even usable and so I must admit I was not exactly encouraging when I heard that they wanted to work on it for the Final Project.

I have to admit, I belong to the "Brutal Truth" camp. I don't tell students what they want to hear; I tell them what they need to hear. Telling students that they are doing well when they are not means that we condone low standards. That's not my style. :-P

In any case, the story has a happy ending. Instead of being discouraged by my initial comments, they decided to prove me wrong and persevered. I was quite blown away by MishMash when the Progress Report was due. While all the other teams had trouble producing a prototype, MishMash was done. Also, the improvement in the app was phenomenal to say the least. Even my student Zi Han who has really high standards for web apps had nothing but good things to say about the app. Of course, I conveyed my thoughts to the team.

The other group was MyCampus. This a group of four freshmen. They worked on this Flash-based app for their first assignment and it didn't work out very well. Then they told me that they decided to do a Flex app on xiaonei for their Final Project and I asked, "Sure or not? How much Flash do you know?" The rest, as they say, is history. :-)

Randy said that he could tell how well the BVW projects would turn out by the bonding between the students. The same is absolutely true for CS3216! Next year maybe we don't even have to bother to grade the apps. Maybe we just do a survey to ask the students how much time they spend with their teammates and how much they like each other. A similar trend was observed last year too, but these year's students seemed to like camping out overnight at COM1 a lot more. :-P

To a great extent, CS3216 has transcended from being just a class and evolved into a community. Perhaps shared suffering creates bonding? :-)

I have said a lot about how great things were, and I might have given the impression that life is a bed of roses. Truthfully life is NEVER a bed of roses. The class got random flak and naysayers: here and here. The attendance at lectures started to drop significantly last year after the midterm break (which is why I started blogs this year - which apparently "fixed it". *Evil laughter*).

I got a lot of flak from the students last year for random stuff like "changing deadlines" (actually I was giving extensions so I dun know what they were complaining about, but ah well), "poor scheduling" and for not being organized. I am pleased to say that I got a little bit smarter after last year and most of these logistics issues have been resolved.

I'm not complaining. Merely highlighting that things are NEVER a bed of roses even if things seem fine and dandy. This is especially if we try to smart and do something different and a little crazy.

So why do I do what I do (other than that I'm a little crazy :-P). It's because I BELIEVE. I believe that there is a place in NUS for a module like CS3216. There is a need to give our students a chance to do what they want to do. A chance to dream. A chance to learn what they WANT to learn.

CS3216 is infamous for its unreasonable workload. However, the truth is this: after the feedback from last year, I've fixed it!! Yes I did, believe it or not -- and I spent most of the Project Team meetings telling the students to scale down their projects. Just pick one thing and do it well..... but most of the students still went ahead and camped over. I suspect they actually enjoyed it (though they will still complain 'cos that's the way it is).

CS3216 is a head fake. It's really not about programming Facebook apps (though most students will learn some of that along the way). What is it all? If you are a student reading this blog to try to figure out what CS3216 is all about and trying to decide whether it's for you, read the blogs by the students found in the sidebar. :-)

The strange thing about CS3216 is that I don't know what the students learnt exactly. Much would depend on their backgrounds and what they decided they wanted to learn. Unlike a factory-system where we churn out a whole class of students all with the same set of skills, we instead have a whole class of students go away with different lessons. Yes, I know it sounds a little wild, but it's true. :-P

This reminds me of the conversation I had with Chris Henry on the way to the BBQ earlier this evening where we had this discussion about education, politics and "the system". I shared with him my view that this idea of The Singapore Dream is quite bogus. What Singapore Dream? Are our people so pathetic that they don't even know how to dream that they need the Government to tell them what to dream? My hope is that our people will dare to dream and we have 4 million different Singapore dreams. :-)

That is what education is about in my opinion: teaching our young to dream and helping them understand that life is about choices.

To conclude, I would like to quote from Larry Page's recent commencement address at Michigan (not what he said, but what his father said 53 years ago):
"...we are entering a changing world, one of automation and employment change where education is an economic necessity. We will have increased periods of time to do as we wish, as our work week and retirement age continue to decline. ... We shall take part in, or witness, developments in science, medicine, and industry that we can not dream of today. ... It is said that the future of any nation can be determined by the care and preparation given to its youth. If all the youths of America were as fortunate in securing an education as we have been, then the future of the United States would be even more bright than it is today."
I am really impressed that an 18-year-old could have said something like that. I believe that we have succeeded in making universal education a reality in Singapore today. The question remains: what will our youth do with their education? :-)

That, is a choice.

Saturday, May 2, 2009

Wrapping Up

We've just finished grading all the Final Projects and the following are some of the final points that I would like to make to wrap up CS3216 for AY2008/2009 based on what I've seen in the Final Project reports.

Forming the Dream Team. I did mention during the semester that we should seek to find the best possible people when we form teams (if we have the option of choosing). Some accused me of being elitist. :-P

Well, the truth of the matter is that due to some leftover influences of our education system, I think some students haven't quite understood the meaning of "best". I am happy to note that at least one student got it and I would like to quote Khoa, "The best is not the best, the best is the most suitable." I think Khoa got it. :-)

The moral of the story is quite simple (and not rocket science): great, you come up with an idea to take over the world. What you need to then figure out is how to break that idea into sub-tasks and what needs to be done for each of the sub-tasks. Then try to find the people who are the best in their respective fields for each of these sub-tasks. This is not the same as assembling a team of Dean's Listers or elite programmers. In fact, for Facebook apps, a whole team of elite programmers without an eye for design is almost certainly a recipe for disaster.

Idealism vs The Real World. The key impediment to ideas that can take over the world today is not the dearth of ideas, rather, it is the the people factor.

It's easy to talk about assembling the Dream Team. It's not always possible to find the Dream people. Also, some of the ultra-talented people have personality quirks that make them impossible to work with. So, therefore, for all that's said and done about this dunno what notion of a Dream Team, the reality of life is that many a times, we have to settle for a less-than-Dream-Team.

The crux of the issue is therefore to understand what needs to be done and try our best to get the necessary resources to do it. Once the team is assembled, expectations may have to be adjusted depending on the available talents and skills.

The Power of Passion. Sure, skills and knowledge are good, but sometimes passion and dedication can make up for the lack of skills and knowledge. I have to admit that I am quite blown away but what two of the all-freshmen teams, MyCampus and Spree Kingdoms, have accomplished for their Final Projects. These folks knew NOTHING about web programming at the beginning of the semester.

Through sheer grit and determination, they not only survived, they prospered. That provides that attitude probably matters more than how much people know. :-)

Reject Dogma, Embrace Common Sense. The scary thing about being a teacher is that students sometimes actually believe the things you say. :-) I did mention during one lecture that I think the best project managers are the elite programmers.

As it turns out, at least two of the groups, i.e. MyCampus and Varsity Chronicles, didn't have a programmer at the helm - but they did well. So was I wrong? Maybe. Or maybe not.

The point of the matter is this - what I really said is that elite programmers are good project managers because they are best able to assess the proficiency of their programmers and thereby estimate the amount of effort and time required to deliver different modules of a software engineering project. If need be, they can also offload some tasks. My view is that I have most confidence that a software engineering project will meet the schedule if I have an elite programmer as the lead.

That said, project management is also about leadership. Strong leadership is also necessary in order to get the team to work effectively, so an elite programmer with no EQ will not make the cut either.

The point that I would like to impress upon my students is not to take what I say too literally or assume what I say is necessarily correct. The most important skill that students today have to learn is how to look at facts, analyze them and come to their own conclusions.

Common sense really helps because in life, we are faced with new situations all the time for which there are no textbook answers. To quote Justin, "(Varsity Chronicles) forces me to make decisions which I have no experience to rely on. All I have was my common sense, my understanding of the group's ability, and the feedback of my team mates to count on".

Think Harder, Think Deeper. I must say that I am very impressed with the execution of the Final Projects this year. The average quality of the Final Projects are somewhat higher than those last year. It's not so much that the students this year are necessarily better, but it's more likely that the workload this year was moderated better so that premature burn out didn't happen after the initial assignments.

It's not that the students this year did less work this year, but they didn't do quite so much for the assignments during the first half of the Semester which leave them with more energy for the Final Projects.

What I would like to highlight however is that I still think that most students are somewhat too focussed on the execution and implementation and have often failed to take time to take a step back to think about the bigger implications of their work and longer term strategic issues like marketing and user experience. Detailed comments will be returned to the groups with the project grading reports.

Just want to highlight again the following mantra: "More thinking, less coding".

CS3216 is all about the People. What makes CS3216 work is not so much Facebook or technology or any smartness in the way the course is structured (though there's indeed some sense in the madness). What makes CS3216 tick is the people. One of the points that is highlighted over and over in the Final Project Reports is how much the students have learnt from their talented peers.

First, I am honoured to have had the opportunity to work with an outstanding group of students, who never fail to surprise me with their creativity, passion and grit. This past semester has been quite "happening" and tiring (for all involved), but it has also been a lot of fun. I would like to wish my students the very best in their studies and future endeavours.

Second, I would like to take the opportunity to thank my team of dedicated teaching staff consisting of TA Goh Kok Wee and Tutors Chris Henry, Lim Yuen Hoe, Kent Nguyen and Chin Su Yuen. They have worked tirelessly to help with the preparation of the teaching materials and executed their teaching duties with professionalism and dedication. Without them, there would not be CS3216. :-)

Tuesday, April 28, 2009

CS3216 Blog Queen

I am pleased to announce that Wei Man's blog - Mannie's CS3216 Quest! has been voted the Best Blog for CS3216 for 2008/2009 by her peers. That makes Wei Man the Blog Queen this year. Congratulations to Wei Man!

In close contention was Chong Hui Hui, who also deserves special mention.

I tried a few new things this semester and this blogging thing was one of them.

Truthfully, not every student took to the blogs. While most students started strong, school work and pressures from other classes gradually took their toil and the number of blog posts dropped gradually.

In the end, only a small number of students were able to persist and blog consistently for the whole semester. But I'm not bothered. We should only do things we believe in. :-P

And I think that students should have the courage not to do what they don't think they want to do (even though their grades might be "penalized" if they don't do it). So do, so it's good. What's true however is that those who put effort in their blogs will be rewarded (let's think positive and avoid thinking about it in terms of those who don't being penalized). :-P

Overall, my verdict on the blogs is that it was the right thing. It might not have worked for everyone, but it worked for some - and that's good enough for me.

It's not easy to write a blog 'cos it requires thinking. And thinking is hard. :-)

But it goes beyond thinking. To write their blog entries, the students not just have to think. More often than not, they need to form an opinion and that's important to me. The act of stating one's opinion in public also requires courage.

My view is that students learn best when they reflect on what they have learnt and in this regard, blogging helps to "foist" this on the students.

Above and beyond learning, blogging also facilitates the exchange of views. With Google Reader for example, it is quite easy to keep track of what everyone in the class has written. This mutual sharing of views important because as many students have reflected in their last posts, a lot of the learning in CS3216 comes from peer learning.

One unique aspect of CS3216 is that it is somewhat like the story of the Blind Men and the Elephant. Each student's experience of the class may vary depending on his/her background and interests. Hui Hui's post about Software Engineering for example is particularly interesting. Programmers would never think about software engineering from the angle she described.

In addition to Wei Man's and Hui Hui's blogs, we actually received quite a number of other nominations, which is really cool because it demonstrates that we have a large number of interesting blogs. The process of shortlisting down to two for the final vote was tough! At this point, I shall leave it as an exercise for the reader to check out the other blogs in the class found on the right sidebar to identify the other worthy nominations. :-P

To conclude, I would like to congratulate Wei Man again for her excellent blog. I believe that her blogs captures the spirit of CS3216 very well. Like all things, while CS3216 has some good parts, it also has some nasty parts. Wei Man is not constrained by political correctness and states her beliefs with conviction. I hereby shamelessly quote the Blog Queen:
I slept/worked 3 overnights in COM 1 and 1 overnight in the PGP study room along with the rest of my team. The COM 1 sofas on the first floor are my best friends now.
I remember Janus happily waving a ang bao at me and asking if I wanted to eat the heh bee hiam he brought. *Speechless*

I'm thinking we must all be crazy
Turns out life has surprises in store for me. >_<
I even had to quit my part time job for this module!!!!



So much for module on improving social networking ..its entirely destroying my social life.

Fast forward to the end:
I'll write a little more than that. Just to commemorate my survival in this sick module.
Taking this module is like being in a state of extreme stress all the time and where you also have to think out of the box to survive.
Its been a very hard module to get through, because of the speed of the assignments and the constant reshuffling of project mates.
That's something good about the class - by having proactive people in the class, it affects and changes the way other people think and work. You learn alot from people around you.
I learnt that I had a social life too, when the module started interfering with it.
Still, no matter how evil and horrendous the whole module has been, I agree with Prof Ben's methods. If you want to make someone learn, you put them through hell and high water. But you always watch out for them to help them out if they are really drowning to death.
It is hell, no doubt about it. But its what you learn from hell that you remember the most.

I guess what I'll remember most is that I have learnt to believe in my ability to make a difference to this world.
But things are different now. This module has taught me that there are people out there that can help me achieve what I want to achieve. The whole class is like a microcosm of the world - there are all kinds of talented people in it, I just have to go out there, find them, and persuade them that what I want to do is useful and meaningful to the world.
Now I believe in being ready when opportunity knocks on my door, and its time to start preparing. I might not succeed in what I want to do, but I have a back up plan, and I'm not worried if I fail.
its been an eventful and interesting semester.
I believe that Wei Man's blog will also provide future students with a better idea of what CS3216 is about before they decide whether to take the course. :-)

It turns out that the students from the AY2007/2008 batch also had a blog.

Friday, April 10, 2009

The Last Lap

These last couple of weeks have been extremely hectic.

Two weeks ago, my ex-classmate, Chiangkai, gave the class an overview of issues of security and privacy. Perhaps it wasn't too detailed - but it was never meant to be. People make a whole career out of security. It would not be reasonable for the class to actually "learn" security in a two-hour lecture.

The intention of the lesson was mainly to highlight issues of security so that the students know that it is something that has to be taken into consideration whenever they create web applications.

With the Final Project presentations we had this past week, we are rapidly coming to the end of the semester and the class.

Overall, I am generally satisfied with the progress of most of the project groups. On the whole, the average quality of the apps this year is probably better than those last year.

Next Wednesday will be the day of reckoning because that's when all the groups will be asked to present to rest of the school what they have done this past semester. It is also a test of how well they can sell and convince the folks who will be coming that they have actually made a difference with what they have done.

It's been a good semester. I look forward to be pleasantly surprised on Wednesday.

To conclude, I would like to make the following point: notwithstanding all the complaints about the class taking up too much time, it has never been my intention for the students to kill themselves by creating huge apps. Not that I want to shirk responsiblity from the fact that many of the apps are HUGE, the truth is I have been asking many, if not all the groups to scale down and to focus on a small number of key features.

Some of the groups will not finish their app by the end of the semester. They will deliver like the first half of their proposed features. That's actually fine with me. As long as they did a reasonable amount of work and did good work, they will get a good grade.

What I really hope to see for such groups is that they will see their project to the end. That to me is a very important attribute: the tenacity to finish and to finish strong.

Frankly, I'm quite tired after one semester. CS3216 really isn't the easiest class to teach. I'm really fortunate to have a brilliant teaching staff and I'd like to end off by thanking my Tutors Su Yuen, Kent, Chris and Yuen Hoe and my poor over-abused TA Kok Wee.

Sunday, March 29, 2009

On Entrepreneurship

Last Monday I invited a number of local entrepreneurs to come share their experiences with my students.

The goal of the session was not to "promote" entrepreneurship. Rather like most of the other lectures, the goal is to provide students with a better understanding of the good, the bad and the ugly of entrepreneurship.

My personal view is that the entrepreneurship cannot be taught (though some students vehemently disagree with me - but that's fine. It is certainly possible that the prof is wrong :-)).

The following sums up my view: "Entrepreneurship is an attitude, not a product".

Personally, I thought the session was really good and there are many lessons for the students to take away. However what they learnt would ultimately depend on how much attention they paid to what was said. What I will do is however to highlight some of the points that I think the students should take note and to respond to some of students' blogs.

1. Sales Matters (A LOT). I was glad that this point was emphasized several times by several speakers 'cos this is something that I have been stressing for most of the semester. Technology is not the key to success. What matters is to identify problems that people care about (pain points). If people will pay for the solutions, we will get rich; even if they don't, it's a public service.

2. Don't Try to be a "One-Stop Shop". There are not many problems that really matter. Once we identify one of these, just focus on solving it well instead of trying to solve every single problem under the sun at the same time. By being too ambitious, we likely end up solving nothing well at all.

3. It is not ALL about money. A question was asked and some of the speakers said that they are doing what they are doing for the money. Some students therefore interpret entrepreneurship as something that's all about one. I really don't think that's true. These folks actually LIKE what they are doing. The fact that they have the potential to get obscenely rich in the process doesn't hurt. At the same time, what they highlighted is that folks who want to be entrepreneurs better have an eye on the money 'cos if not, it's easy to go bust.

4. People Matter. One of the stories that students tend to cite is that one of Ash Singh chatting up some woman at a Starbucks and selling his business to the husband. Yes, networking is an important skill and aspiring entrepreneurs better get to know more people.

5. Be Ready to Seize Opportunities. Opportunities arise from time to time. Some amount of courage is required to seize them. :-)

6. It's not a Bed of Roses. Some of the students commented that the session seemed to emphasize too much on the good and not enough of the bad. As it turns out, most of the speakers are relatively successful in what they do. I guess it's hard to invite people to come share about what a loser they are.... then again, some of the speakers, especially Marc, talked about the pain of nearly going bust. Even HungryGoWhere wasn't profitable until recently.

I would like to take this opportunity to thank all my friends for taking time off their busy schedules to come share their experiences with my students. :-)

Tuesday, March 17, 2009

Dealing with the "Happy" Problem

Today's class was on the issues associated with scaling applications for huge workloads (million-eyeball range).

This is not a random class. This was a class that I added in the middle of the semester last year after I watched Caleb blow up on FarmWars and realized how difficult it was to debug load problems for Facebook applications.

The problem with Facebook applications crashing under high loads is that you cannot predict when it will happen and it's extremely difficult to reproduce the problem even know how to begin to fix.

While the session today might seem very technical and some folks might be a little lost, I would like to emphasize that people are not expected to become experts at dealing with these load issues. Minimally, I would like everyone to have an appreciation for what might be the cause of load problems and basically, many things can go wrong.

The interesting thing is that most times, it's not a hardware issue, i.e. ít's not true that the hardware isn't running fast enough, but rather, it's due to a host of factors.

Minimally, I would like the programmer types and those of you who are setting up and running your apache webservers to have a appreciation for the complexities in tuning the parameters for the webserver and understanding some simple concepts about swapping to disk and the use of processes.

Perhaps some of you might not have understood some of what was said, but perhaps some seeds of understanding would have been planted and if you end up creating a million-eyeball app that blows up royally, you will have some inkling as to what to do.

Chris Henry would be holding a workshop on Web Performance this Saturday. After that workshop, you should not only have a high-level appreciation for web performance, but understand how you can try to improve the performance of your webpages.

Chris is likely to also try to peddle his Honours Year Project on you. He is currently developing a measurement system to passively monitor Facebook app performance. If your app does have the misfortune of blowing up (or some would say the fortune of being unexpectedly popular), his measurement system is supposed to be able to help pinpoint when things blow up and allow you to see the interactions between the client and your webserver so as to help you pinpoint the reason for the problem.

Chris needs real apps with problems to prove that his system works. :-) If it works, it will be win-win for everyone. :-P

I have put up with latecoming for many weeks already and I am quite resigned to students coming late. Next week is however a very special lesson. I have managed to persuade a whole bunch of local entrepreneurs to come down to share their experiences with you.

From last year's experience, this is a very interesting session - and it will be held in LT19. Please come on time for next week can? :-)

Note about Final Project Prototype due this Friday:

I am really not being evil by making you guys finish your prototypes early. You can ask Kok Wee about the consequences of leaving your CS3216 Final Project to the last two weeks.

But more seriously, there are two reasons why this Friday:
  1. So that you dun have a lot of time to put in too many features. It doesn't take a whole lot of features to make a sucessful Facebook application. A small limited set of features can succeed if executed well. By not giving you guys too much time, I force you to decide which one or two features of your app are most important.

  2. So that you have the chance to get user feedback. One key attribute that differentiates social networking apps from regular webapps is that you can get feedback from and interact with your users. You need time to let your users use you app so that you can experience interacting with them and refining your app based on their feedback.
All in all, there's lotsa sense in the madness lah. Let's all chiong the next couple of days and let's see some action on Friday! :-)

Saturday, March 14, 2009

On Software Engineering

The topic for class this week was on the Principles of Software Engineering.

When we talk about software engineering, what comes to mind for most people is programming. Some people think that software engineering is merely a fancy name for programming.

Clearly, programming is the foundation of software engineering. Without programming and competent programmers, it is impossible to build complex software systems. However, software engineering is much more than programming and I shared with the class the story about group of elite programmers in CS3216 who blew up on their assignment last year.

Truthfully, Software Engineering = Programming + Process + People.

CS3216 is about making a difference. How does one make a difference? It doesn't take a rocket scientist to figure that there are two key steps: (i) come up with an idea; and (ii) execute.

With the Final Project Proposals completed, all the groups have already come up with their killer idea to take over the world. Which group will succeed? Well, it depends on whether these groups successfully execute their killer idea.

It is in this light that we had this last class about Principles of Software Engineering. One doesn't become a software engineer by attending this one class. However, I do hope that by highlighting the key considerations that the groups should keep in mind when designing their application, they will avoid potential pitfalls and bugs.

Also, the final part of the class where I got three students to share their experiences on how they managed various projects has a clear purpose.

Wei Man managed a large team of 80 at LucasFilm in developing a big commercial game using Scrum. Justin managed a smaller team of 6 people at GAMBIT in developing a smaller game over three months. Zi Han did a scrumish-agile-bastardized thing in leading a small group of 5 inexperienced programmers to develop a full-fledged commercial system in 3 months. What did I hope the students would learn from their sharing?

Tools and Processes are Available. First, there are tools and processes available to help manage a software engineering project. From Scrum to Trac to Microsoft Project. There are many tools and frankly I don't know all of them and neither do I wish to discuss them in class. Instead, I would encourage students to explore and perhaps to ask Wei Man, Justin and Zi Han.

Tools are Dead, People are Alive. Tools are no good without the people. And regardless of how effective a tool is, it is useless unless we have people who are trained and committed to use them. Also, not every tool is suitable for every situation and for everyone. People better go and pick the tools that are useful for their projects.

It's all about People. At the end of the day, software engineering is about a group of people coming together to build a large software system. The biggest problem is the people. Much of execution therefore lies in getting the right people for the job and then motivating them to do the right thing to get the job done. This is an art form that cannot be taught in school in my opinion. Students will have to pick this up from doing stuff.

The coming week is going to be tough 'cos I expect the first prototypes for the Final Projects to be ready by next Friday. That said, I have met with all the groups and emphasized like two million times to keep their prototype small.

Don't have to save the world. Just pick a small and relatively common problem, i.e. used/needed by 80% of the people and nail it well. I hope that the discussions this week and the sharing would be helpful to the various project groups.

Next week, we will cover another topic related to execution - in case some of the projects turn out to be runaway successes with millions of users: how do we design systems that will scale up to millions of eyeballs?

Tuesday, March 3, 2009

On Case Studies

Typically, I post at the end of the week after all the students have blogged. Today, I decided that I would post first.

This week is supposed to be the second rest week where the students get to take a break from the hectic first half a semester to prepare themselves for the Final Project. The students are also supposed to working on refining their proposal for the Final Project between last week and this week.

We tried to do something today by discussion two case studies that were developed from the Final Project reports from the last batch. Neither case studies are prescriptive. I didn't have a set of teaching points in mind. The goal of the case studies is to highlight two key issues that the they should play attention to for their Final Projects - one, user interface vs user interaction and two, the importance of team dynamics.

User interface and user interaction are not the same thing and as Kent rightfully highlighted, they both contribute to this amorphous quality known as user experience. I have to admit that I am not an expert at UI design. What I do know however is that a little bit of common sense (and planning) goes a long way. I was extremely pleased that Kent demonstrated at the end of his presentation how carefully the GetHelp! team had thought through all the different interactions for their application.

I was also pleased with the discussions we had about the case study. I didn't have to do much. I was merely listening to what the students had to say and putting the points down on the board. Among themselves, the students highlighted most of the key considerations for Facebook applications. It was heartening 'cos it demonstrated that many things are quite obvious if people will just take "think" about it a little harder.

Wei Man deserves special mention for realizing that there was a serious problem with GetHelp! in that it didn't provide a person who asked for help a good summary of the help that was offered. I am personally quite embarrassed because I didn't realize this even though I spent quite a lot of time trying to find bugs in Kent's app last year. Perhaps it was because I was trying too hard to find bugs instead of actually using the app like as it was intended.

I would also like to thank Vincent Woon for taking time to come back this evening to share his experiences with the class. It's a pity that we ran out of time for if not, we would have had a longer discussion.

Personally, I think some students still need to learn to speak up a little more. I cannot emphasize the importance of speaking up and making sure people sit up and pay attention to your existence more. But actually, I am not overly concerned or in a hurry to see results.

From my own personal, we hear our teachers tell us many things. More often than not, we hear, but we don't understand. This is not a matter of intellect or lack thereof. It's more a issue of experience, or rather lack thereof, that prevents young people from fully appreciating what they hear.

Hopefully what the case study session has achieved this evening is to plant some seeds of understanding in the minds of the students. :-)

Unlike my previous posts, this post is not meant to be a summary of the points we discussed this evening. That is the blogging homework for this week. :-) Hui Hui had an evening exam and unfortunately couldn't make it to class this evening. She is going to depend on what she reads from the blogs of her friends to figure out what she missed.

I am well-aware that most students conveniently "forgot" to blog about the Google talk. I actually didn't forget. I intentionally "forgot" to send a reminder 'cos people were really stressed that week grappling with their WPF assignment.

The goal in teaching is to facilitate learning and so I believe that some flexibility ought to be exercised when the situation demands of it. In this light, students will be pleased to know that they are not required to do a make-up post for the Google talk if they haven't already done it.

However, starting from the lesson had earlier this evening, the students have no excuse. :-)

Sunday, March 1, 2009

New Teaching Statement

As it turns out, I found myself having to write a new teaching statement. The old one that I wrote before I started teaching at NUS and probably hardly knew what I was saying can be found here. Comments are welcome. :-)

The Challenge of Education Today

After teaching at NUS for slightly over two years, I have found that teaching is not too hard. However just because we can teach, or know how to teach, doesn’t mean that we have done our jobs, because takes two hands to clap.

In particular, I have found the greatest challenge of education is not so much teaching, but in persuading students that they want to learn. This problem is hard because of a combination of factors: (i) the allocation of students by the university admissions exercise doesn’t often assign students to their first-choice course; (ii) learning takes effort and it’s hard to persuade students to put in the effort; and (iii) most students are “lost” and don’t really know what they want in life.

It's About Learning How to Learn, Not About Stuff

I have always believed that teaching is never about stuff. I never saw myself as a professor of Computer Science, but just a teacher. The reason is simple. With high probability, 90% of what students will learn in school will not be relevant for their working lives.

This doesn’t mean that a college education is useless. What it means however is that the process matters more than the content.

In my teaching, I seek to find opportunities to “force” them to learn things by themselves. While much has been said about how reliant Singaporean students are on spoon-feeding, my experience has been quite positive.

I have found that if the assignments are structured “correctly”, it is possible to foster independent learning. Yes, there will inevitably be complaints from certain quarters, but if the students find that they really did get smarter at the end of a course, many actually appreciate being challenged.

Emphasis on Common Sense

I read some of the things that some young Singaporeans post online and I ask myself, “Where has our education system gone wrong?”

We have a lot of heavily-educated people, most likely with university degrees who can write fluently, who clearly demonstrate that they cannot think. Common sense is apparently not common.

It’s mind-boggling how common sense can be applied to analyze and solve many problems in life. It is equally mind-boggling how often common sense is not being applied.

Therefore, one of the elements that I attempt to emphasize in my classes is common sense. I try to explain how I think about issues to my students and to convince them that much of what I say isn’t rocket science, but intuitively obvious with the application of common sense.

To be Adventurous and Willing to Make Mistakes

I personally don’t believe that it is possible for me to become so good at teaching someday that I cannot improve. The corollary is that there is always room for improvement.

It is however hard to improve too much if we just focus on the basics, i.e. lecture and tutorials. Yes, it is possible to improve one’s lectures and tutorials, but there’s really so much we can do.

To really push our teaching to a higher level, there is a need to try new things. New things are scary because they might not work. The key is therefore the willingness to try and the willingness to make mistakes.

I have done my fair share of random stuff. Some things work; others don’t. The way I have managed the “failures” is to explain to students what I had hoped to achieve right at the beginning. As it turns out, our students are not unreasonable and many will appreciate the effort and will be quite forgiving if things don’t work out.

A related point is that as teachers, we don’t have a monopoly of the good ideas. Sometimes we just have to ask our students for ideas that they think might work. My experience has been good. There have been several occasion where I adopted some ideas proposed by students to good effect.

To Walk the Talk

Strangely enough, teaching also has a lot to do with leadership.

As teachers, we preach. Students today won’t just believe what we tell them just because we tell them. We can preach all we like and it can make absolutely no difference.

Personally, I believe that an effective teacher has to “walk the talk”.

If we want our students to be excited about what we’re teaching them, we had better be excited about what we teach.

If we want our students to believe our gospel, we had better believe it ourselves and be able to put that into practice.

If we want our students to reach certain standards, we might first be able to achieve the same.

There is No "Correct" Way to Teach

As teachers, our job cannot be to make every student a genius. That’s impossible.

My view is that we would have done our jobs if we are able to help our students reach their full potential.

Everyone has his strengths and weaknesses. I believe that we should try to help students discover and identify their strengths and to develop them.

Because no two students are alike, it is my belief that there is no “right” way to teach. What we teach and how we teach will depend on who we teach. By the same token, if we are good with a group of students, it says nothing about how good we would be with a different group if there are significant structural differences.

We are Salespeople

I learnt this from Randy Pausch in his Last Lecture – as teachers we are selling education and as I alluded to above in the challenge of education, we are sometimes stuck selling stuff that the students don’t really want to buy.

How do we sell stuff that they don’t really want, even though we know they need? I don’t exactly have an answer.

What I do know about sales however is that psychology matters, and so to be effective teachers, we need to spend time talking to the students to understand how they think and what matters to them.

The Belief that We Can Make a Difference

I believe that teaching is a calling and those who heed the call do so because they believe that they can make a difference.

There are many choices in life and we have many “lost” students. Teachers are in a unique position to guide and to help.

One of the reasons why I decided to become a teacher is because I agree with the philosophy of the “star fish story” where a boy is seen picking up starfishes and throwing them into the sea. Because there are so many starfishes, it all seems futile. The boy however picks up a starfish, tosses it into the ocean and says, “It sure made a difference to that one!”

As teachers, we have finite time and finite energy. We cannot hope to save the world or to teach everyone. What we can do however is to try to a small difference to the small number of students we work with and try to do our jobs. :-)


To conclude, my teaching philosophy remains as it has been from the beginning: I will strive not to teach, but to challenge the students to learn for themselves, to have their opinions about issues in life and to make themselves heard.

Sunday, February 15, 2009

Sense in the Madness

Two weeks ago, we had the Facebook Application Seminar; last week was "Pitching Week". There is a common theme in these two past two weeks and that's ideas are important.

CS3216 is no about programming Facebook applications. That's really quite easy. CS3216 is about coming up with a good idea for a Facebook app and EXECUTING it. So there are two parts - idea + execution. Both of which are equally important. We first focus on the idea and for the second half of the semester, we will deal with the execution part in the form of the Final Project.

The goal of the Application Seminar is to have the students study some existing applications in detail so as to learn about how they work and also practise analyzing the application and thinking about what's good, what's bad and what's ugly. We also experimented with blogging as a means to "encourage" (aka force) students to pay attention during the presentations and also to think a little deeper about what they heard.

It really isn't that hard but it is something that I would like to encourage students to do critically to their own apps as they work on their Final Project. It is quite easy to get so caught up in doing the work that we sometimes forget to just sit down to just think about what we're doing.

I always tell my students, "More Thinking, Less Coding".

While the students might be a little upset to have the Application Seminar Critique foisted them, they might be comforted to know that I suffered with them because I had to read through not just their critiques but the comments they left on each other's entries. Overall, I think it was a good move - but I would only doing once during the semester. :-)

Pitching Week is all about ideas. First, the students heard from the folks who are interested in working with them. There was NDP, NLB, APB and lots of others.

There are many things that the students should have learnt from the session if they were paying attention.

First, the session provides students with a perspective of what the industry cares about in terms of Facebook apps and why they care about what they care about. Some of those who turned up have a better idea about what they want; others only have a foggy idea, but that's how it is.

Second, the students get to see how industry folks pitch their ideas. Personally, I think marketing is important. Technical skills are useless unless the sales matches up. There is no point building stuff that nobody will buy or use.

Third, this is the chance to strike up partnerships. The folks who came to the pitching session has some things to offer and I do hope that by linking them up with the students, meaningful partnerships can be formed.

The quest for ideas culminated in a Pitching Party last Friday. The idea of the Party was suggested by a student in last year's batch. We tried it out last year and it worked, so we did it again this year.

In my opinion, it was as successful as last year. While I had planned for the session to start at 6 pm and end at 9 pm, we ended at 10 pm instead. The point of the Party was to allow students to pitch ideas to each other.

At this point, they are supposed to be thinking about their Final Projects and so they can use the Party to try to get other students to join their groups, or if they had already formed their groups to try to elicit feedback from the group on their Final Project ideas.

We also had some ex-students at the Party to do some pitching and also to give their views and comments on the ideas pitched. I thought it was a good session and I thoroughly enjoyed myself.

Some students commented that they were quite overwhelmed last year. They thought they were all set on developing their Facebook app from Assignment 1 for their Final Project, but they were not quite so certain after all they heard in the two sessions we had last week.

That's actually good news. It is my hope that students will spend more time thinking about their ideas and what to do for their Final Project instead of rushing into things.

Monday, February 2, 2009

Facebook Application Seminar

First, I would like to apologize to my students (and folks from the workshop) for letting class run overtime till about 9 pm earlier this evening. As it turns out, the presentations we had this evening were particularly brilliant and I didn't have the heart to cut people off even when they ran over time.

I am supposed to post my blog entry at the end of the week, but in this instance, I decided that it would be helpful for me to start the ball rolling because this week is a little different.

Instead of merely blogging in general about what they think about today's session in general, the students are supposed to pick of the apps presented today (but not their own) and do a simple critique. Yes, I'm being evil as usual, but there are always reasons for evilness. :-P I do not believe in random evilness, only purposeful evilness.

One of the goal of CS3216 is to make students think -- and by structuring the class and assignments in such a way as to encourage (or people will claim "force") students to think, I believe that I am earning my pay.

In any case, the CS3216 blogs will be particularly active for the next 7 days. Each student will have 24 hours (till 23:59 tomorrow (Tuesday) evening) to post his/her entry and there should be some activity going on for the rest of the week as students thrash out their thoughts on the Facebook apps they heard about today.

Will this work well? Frankly, I dunno, but if we don't try, we never know do we? What's quite clear to me is that I have an exceptional class of students who have set very high standards in both their first Facebook assignment and in the presentations we had earlier this evening. :-)

Anyway, back to the core issues that I had hoped to highlight (or have students figure out by themselves) in the process of preparing for the Facebook application seminar and in listening to their friends:

1. Thinking about Implementation. This is aspect is mostly of interest to the programmers. At this point, the students have all completed one Facebook assignment and the majority should have a reasonably good understanding of databases and what's possible with PHP. Some groups have worked with Flash and so they should also have some idea of how to integrate Flash with PHP.

One of the things that I hope that the programmers would do is to try to get into the habit of thinking about and figure out how existing apps are implemented. There are two reasons for this: (i) it's good exercise. Most apps are really quite simple and the practice of thinking about their implementation will help students implement their own apps faster in the future; (ii) this is the opportunity to learn about new techniques. If a student should look at an app and realise that it's not obvious how the app is implemented, then it's an opportunity to learn something new. Going through this mental exercise will help the programmers improve their programming skill and I believe that it's complementary to doing actual coding.

2. Learning to Identify Good Ideas. After Assignment 1, it should be pretty clear to the students that the technical part of building Facebook apps isn't hard at all. Yeah, it's a lot of work, but it's not something that NUS students cannot manage. My experience last semester and from what I have seen from the first assignment is that our students are as technically competent as any of the Facebook developers out there.

So what is the difference between a mediocre Facebook app and the 6-million-user app? My view: it's the little cutesy ideas and that's the whole point of having students think through what are the good, bad and ugly points about each app. While all the groups did fabulous presentations, some groups were better at identifying and highlighting the "core" ideas/lessons from the apps they studied.

I shall refrain from commenting on these ideas because that's what the students are supposed to do in their assignment - they will comment on what they have heard from their friends' presentations. If they can highlight points/lessons that their friends missed out, they will score points and their friends' group will lose points. :-P Yeah, very evil, but very fun I think. :-)

I would like to take this opportunity to highlight MTV Cribs again. In many ways, MTV Cribs has all the basic features of Pet Society and more. What seems to be lacking is merely the will to follow through and to "market". Personally, I fail to see why it cannot be made as successful as Pet Society. What's my point? You guys decide how far you go. Size is no barrier, but neither am I here to push the students. My job is to facilitate learning and show people what is possible. Possible doesn't mean easy and each man (or woman) has to decide on what he/she wants to do with his/her life. :-P

3. User Interface Design and Interaction Design is Important. One idea can be implemented in many different ways. Some of which are more annoying than others. One of the key element of good apps is good UI and user interaction design.

Apps should be simple to use. Simple apps with limited features are not necessarily bad, e.g. graffiti. Students should also take into account the psychology of Facebook users. They have no patience for complicated things and also for slow moving pets. :-P

One of the announcements I wanted to make today, but didn't because we ran out of time is that we will be doing a simple case study on user interface and interaction design in two weeks. The case study has already been uploaded to the IVLE Workbin. People can check it out. :-)

4. Understanding the Curse of Success (Scalability). Facebook apps are quite a paradox. If you build an app that nobody uses, you will be very sad. On the other hand, if your app becomes exponentially popular, you may end up in trouble as your web server gets loaded. If the web service architecture is not done properly, it might blow up. FarmWars experienced some load issues last year (part of it was due to poor programming choices).

The developers of Friends for Sale gave a talk last year and their talk was available online. I can't seem to find the video anymore, but the slides are here. Moral of the story is that success on Facebook may cause headaches (and if not handled properly will results in a loss of users due to user frustration).

5. It's okay to Steal (Ideas). Alright, let's put this statement in context. My point here is that many successful apps have found revival after been "converted" to Chinese. Examples include Baidu and Xiaonei. It's not as crazy as it sounds, but one possible route to quick success is to identify a successful Facebook app and clone it for Xiaonei. I'm serious. Do not under-estimate the value of cloning. :-)

It seems that good concepts as far as Facebook apps go, transcends cultural boundaries. See this article. The point here is that it's really not just about ideas. It's a package deal consisting of both the idea and the execution. Not only must you have a good idea, you have to execute well in order to succeed. Ideas tried and test and proven to work are good 'cos you reduce the risk of uncertainty and can focus on getting the execution right.

Alright, I guess this covers most of the summary points I wanted to make at the end of class, but didn't get a chance because we ran out of time. I'm looking forward to see what people have to say about the presentations earlier this evening. :-)

Monday, January 26, 2009

It's All About Possibilities

Last Monday, we were honoured to have Pratibha Kumar, Apurval Awale and Ian Tan from Microsoft talk about XNA, WPF/Surface and the Imagine Cup.

We are partnering with Microsoft this Semester and introducing Microsoft WPF as one of the new evolving platforms. The talks are packed full with cool stuff and I'm certain that the students' blogs will provide a good overview of what was said.

The following are some of the key ideas about the future that I had hoped that the students would have gathered from these talks.

The "Digital Hub" Strategy. The Internet is a harsh place. Successful companies can get put out of business if they fail to respond decisively.

One of the key strategies for companies like Microsoft and Apple is I would describe as the creatin of the "Digital Hub". In short, PCs are becoming commodity equipment, not very different from a TV or washing machine.

In order to continue to growth, these companies are invading the living rooms and moving into digital entertainment, aka Digital Lifestyle. Apple with the iMac and Microsoft with the Xbox are trying to take become the centerpiece of the living room, by acting as a "hub", e.g. iPod and iPhone interfacing with the iMac, your Xbox functioning not only as a game station, but also as a home theatre system. Then there's Microsoft Zune. What we will see is the convergence of many different electronic devices.

The Network is the Future (and UI is your friend). Broadband to the homes is now commonplace, but as bandwidths continue to grow and access becomes truly ubiqitous, there will continue to be opportunities for even more innovation.

Truthfully, even though as a Networking researcher, my keen interest is in what the new networks have to offer, it's really a whole package deal. While the increased bandwidth and underlying networking technologies is the key enabler, the deal comes also with improved UI and animation technologies. People actualy don't care about cool technologies. They care about technologies they can use.

Microsoft WPF and Surface are representatives of next-gen UI. They might not be the best and the battle of the next-gen UIs have not yet been fought, but it's definitely coming. I predict that avatars and animation might have a large part to play in the next-gen UIs. Animation technologies have advanced rapidly over the last decade. It's not just about graphics. Animation-related AI is also very advanced now, think Spore.

The Future of the Game Industry. Much of the advancement in the state of art animation has been fueled by the game industry. This industry is expected to continue to grow over the next decade (recession or no recession). In fact, inspite of the recession over the next 2 years, people are still expected to play games (they need a way to escape from their financial troubles even more than ever).

So, the good news is: there's money (and jobs) there. Unfortunately, the bad news is: there's money there. As we live in the free market, people will go where the money is and with the money in the industry, more and more players will join the industry. Already, we have seen a proliferation of games over the past decade.

Today, the games industry is much like the movie industry about 2 decades ago. It is costly to build a good game and building a game is a little like making a movie. If it is a hit, you can make a lot of money; but if it doesn't sell, there will be huge losses. Unlike in the past where it's possible to make a game in the garage, the games industry will be a very tough moving forward.

Proliferation of User-Generated Content and User-Created Applications. This is not at all a new concept and it has been around for a long time in the form of user mods for games. What is new is that there are now new frameworks to help publish user generated applications.

This is seen in the XNA publication system where small timers can develop and publish their own games on the XNA network. XNA will take care of the payment and distribution of the software for the game developers. Actually, I was have been discussion this with Zi Han. I believe that it will not be long before game publishers get put out of business. Who wants to trot down to a shop to build a CDROM when it is possible to download and play a trial game directly from the network and pay only if one likes the game?

The same concept is found in Facebook apps. Facebook itself is like the delivery channel for the new apps. Unfortunately, the nature of web apps is such that it is more difficult for Facebook to start charging people to use apps (or is it?).

There are two important ideas that I think students should bear in mind about such platforms for delivering user-created apps. (1) The world is very big and there are seriously a lot of very talented and bored people around. Having these people work on stuff is like playing lottery. If any one wins, the platform building wins; and (2) part of the strategy here involves capturing eyeballs. To capture eyeballs, there's a need to constantly generate new content - and it is too expensive for one company to try to do that in-house. In any case, why do the work when there's someone else willing to do it for free?

These are important ideas that should be gleaned from studying the Facebook app platform and XNA.

There's a lot of money out there. Notwithstanding the impending recession, there's still a lot of funding available in Singapore through Spring and MDA. Most of them come in the form of $50K seed funding, which is not a lot, but when can pay the bills for a couple of months. I would encourage students who are thinking of starting their own companies to check them out. With regards to the IP for the work done in CS3216, I checked with the NUS Industrial Liason Office last year and the IP should righfully belong to the students. The following is the reply:
If the resources for the development of the Facebook Application can be downloaded from Open source, then the ownership of such development will reside with the individual student.
If there are any concerns for the projects this year, we can discuss. CS3216 is suppoosed to enable students to dream, not put up brick walls. If necessary, I'm quite willing to help students deal with bureaucratic and legal brick walls should they arise.

The Money is in the Sales, NOT the technology. That said, I would like to drum into your heads that if you want to start a business, forget the technology. Yes, technology is cool to have, but it's NOT what makes a business/startup succeed. You need to be able to sell the stuff, i.e. find suckers who are willing to cough up money.

To some extent, it's not hard to make money - but it's not entirely easy either. Just because people like your product, they might not want to pay for it. For example, Facebook is really quite a successful and good product. Most of my friends use it. But, can anyone imagine what would happen if Facebook suddenly decided to charge people for it?

On the other hand, buggy products have been known to be able to corner the market (and make a lot of money). Which product(s) are left as an exercise for the reader. :-)

The Internet Boom has not Come and Gone. It is still here. Some people said that the time of the Internet was over after the bust of 2000, but they are wrong. Just check out all the new companies that made it to Fortune 500 over the past decade. Many are IT-related companies.

I suspect that we will see the same trends for another decade or so. The Internet has reduced barriers to entry for new businesses significantly. As the Internet penetration grows, so the size of the market. Facebook and Twitter will not be the last of the new "successful" ideas.

I firmly believe that notwithstanding our small size, Singapore is well-positioned to capitalize on the Internet. I would however encourage students not to think about selling stuff locally. The Internet is much too big for that. While it is okay to start small and use Singapore as a proof-of-concept testbed, think global.

With each new year, comes new possibilities. May I wish all students a very Happy and Successful New Year!

Tuesday, January 20, 2009

The Model Blog Post

I came up with this idea to make students blog about the lectures at a whim.

When I first came up with the idea, I wasn't quite sure what it would achieve, but it seemed like a good idea, so we just try loh. Such is life.

We don't always have to have a good idea of what we're doing. Sometimes we need to be a little reckless and to be willing to make things up as we go along. As they say, "No guts, no glory".

To recap, these CS3216 class blogs were meant to address two key issues from last Semester:

  1. IVLE Discussion Forum Reflections didn't seem to work well. We didn't seem to be able to achieve the sorts of participation that I had hoped for or generate as much discussion as I had anticipated. It got worse towards the end of the Semester;
  2. Some students started skipping lectures from the middle of the Semester and notwithstanding my efforts at arranging for interesting lecturers to come talk to the students, I had some nagging doubts about whether people were really learning anything. Learning is hard. It takes effort and it is really quite easy to go sit into a lecture and switch off. These blogs serve two purposes: (i) make sure that people come to class, or else they would have to be a real genius to be able to blog about a lesson in abstentia; and (ii) make sure people actually pay attention and learn something.

Sometimes we have to be honest when we don't know for sure what we're doing. This is one (well, another one :-P) of those instances where I thought I was doing the right thing, but I wasn't completely sure.

Then I saw this post:, and I'm sure. :-P

All students please refer to Wenhan's post as the model post for CS3216 class blog. It's not the content so much, but the PROCESS, that matters.

What you're supposed to be doing during lectures is to jot down notes, points and questions. About what? Whatever that comes to mind and that you think is interesting.

Thereafter, take stock of what you have and say something that demonstrates that you have thought deeply about some of the questions and/or issues.

What you say doesn't have to be right. It's okay to say the wrong things and have your friends drop by and tell you so.

It is not what you say that really matters. What matters is that you have taken time to think.

Do you really want to come to school and learn to get smarter? Well, then starting thinking. I don't know of any other way. Once again, it's not so much the substance of what is said, but the PROCESS.

Wenhan has actually highlighted a significant number of questions or problems that he didn't address in his main blog post. The other students who haven't written their posts and who are thinking about what to write can consider thinking about some of those points and addressing them as well.

This brings us to a second point. Another way of getting smarter besides thinking about stuff ourselves is exchanging ideas with others. Again, it is a process.

I'm quite happy today. I think I did something right. It all started as a random idea - but I decided to bite the bullet and acted on it, notwithstanding my understanding of student psychology, i.e. that some students are really going to hate me for inflicting this blog thing on them.

Ah well, I am grateful that I'm not a politician. Being a teacher is not a popularity contest.

I have a job to do. I try to earn my pay. :-)

Beware the Browser

It just occurred to me that none of the students picked up on what Caleb shared about the browser-compatibility issues, so I thought it would be important to highlight this.

First, the most important element in a good app is a good concept. Users must have a reason to come back. As it turns out, the more popular apps are typically games.

For games, they don't have to be overly complicated. It is important to understand the mentality of the Facebook users.

Facebook games are distractions and time-wasters. Many people are wasting their time at work playing them which is why Caleb reported a drop in activity over weekends.

Cuteness is important. However, as Caleb shared, FarmWars actually suffered a drop in the number of users after they "upgraded" from their initial version to a more snazzy version.

Much of their problems came from the browser compatibility issues with IE.

A corollary of this lesson is that students should test their apps with a variety of browsers and platforms and not stick only to one platform.

Monday, January 19, 2009

You Blog, I Blog

I came up with an evil scheme to inflict pain on my students this Semester. I made them each write a blog for CS3216.

Can anyone imagine hardcore coders write blogs (in English, not in Java, C# or Scheme)? :-)

Yes, so it is indeed evil for me to have inflicted this on my poor students. However, in the immortal words of Titanic (aka "You jump I jump"), as a teacher, I have decided that I will walk the talk.

Like them, I will write one post after every major lesson/lecture and on top of that, I will read every word that each of my students write in their class blogs. I think it's fair. They now have no excuse not to write. ;-P

In this first post, I think I will try to articulate as best as I can what we are trying to achieve in CS3216.

Like every other course, we have a full page of learning objectives, yada yada, for CS3216... but frankly, they don't matter. In my view, all the "official" objectives for the course can be distilled into two key high-level "meta-goals":

  • To "force" students to think.

  • To teach students "how to learn".

To force one to think sounds really nasty, but truthfully, it is actually possible to go through school without having to think much at all.

One of the reasons why I decided to experiment with this blog is to see if I can make the students think a little harder about what they hear and what they see.

The lectures for CS3216 may seem a bit random. They are not.

The purpose of this blog is also to summarize some of the key points made in the lectures.

Another reason for making the students blog is to encourage them to share ideas and interact. We actually tried something like that last year with what we call Reflections in the IVLE Discussion. I didn't think it worked quite so well and so I decided to try something different.

Frankly, I really don't know how to teach students "how to learn". However, what we try to do is design the two assignments and the final project in such a way as to allow the students to figure this out.

Instead of explicitly holding classes to teach Facebook Programming, we just spend a whole lot of effort crafting a monster assignment with 25 pages. Our experience last Semester has shown that, amazingly, this works! :-P

We're trying to pull this off twice this Semester -- once with Facebook and once with Microsoft WPF. It's really not trivial to come up with a good assignment and I'm really fortunate this Semester to have the Microsoft folks helping out and also a most brilliant teaching staff.

So to conclude, I hope that students will learn "how to learn" by just doing stuff. But it's not just random stuff. It's actually assignments that have been designed with much care, coupled with sufficient flexibility to allow the students to express their creativity.

Flexibility is important because it allows the students to do what they LIKE to do. Learning must be fun. :-)

The greatest challenge in teaching today is not so much in the teaching of the students (or communication of knowledge); the greatest challenge is convincing students that they WANT TO LEARN. How hard is that?

The saying goes, "you can lead a horse to water, you cannot make it drink."