Friday, May 18, 2012

Impressive gaming: World of Goo

In order to fight off murderous tendencies while doing taxes, I play video games. This year, I played one game on my Android phone: The World of Goo.

Wikipedia claims that this is a physics-based puzzle game, but that is as accurate as describing chicken tikka as a dead bird. The World of Goo is a brilliant adventure game, told through many levels that involve tiny balls of Goo. The balls start out sticking together, and new levels add interesting capabilities. There is a single objective in every mission, usually collecting a fixed number of Goo balls towards a pipe. (To be fair, Wikipedia has a scary long page about the game. What they lack in humor, they make for in actual content and facts.)

A few years ago, I was saddened by the lack of inventiveness in new games. It seemed that every game was about the same boring plot: there were certain genres and everyone stuck to tried and tested mechanics. Walking through the aisles of a computer store, you could quickly categorize each game into a few genres: RPG, strategy, platform, with little that set the individual games apart. Compared to this, the early days of gaming were filled with creativity as programmers experimented with computers to create something fun and unique.

That wasn't the only problem. I use Linux and many games do not work on my system. Even when had the luxury to install Windows on one partition, games required registration codes and other fiddling just to get working.

In such unhappy times, I came across the demo for World of Goo. There was a Linux version, and I played one level or two and loved the idea behind the game. The game was refreshingly new, with goo balls sticking to one another and making cute sounds when they reached the destination.

For one reason or another, I put off the purchase and then promptly forgot about it. A few weeks ago, I finally bought the first Indie bundle on Android and downloaded my copy of World of Goo. It was as refreshing and enticing as I remembered it, and so I installed it on my Android phone.

Tax week was a whirlwind of administrative paperwork and an ill baby. In between copying numbers from one dull form to another, I was holding my child as he slept clinging to me. My hands were free, but I wasn't coherent enough to do anything productive. My phone was nearby, and the opportunity was perfect for the World of Goo. After a few hours over many days, I finally finished the last level. And I cried because I had no more goo world to conquer. That's how good the game is.

The game has exceptional level design. Most game developers fall in the trap of coming up with a single idea for a game: developing the engine and then churning out levels one after another. In such games, the fun dries up quickly after the first few levels. The game gets devilishly hard and the levels just get tougher. New levels are more challenging, but no more rewarding. Level two is level one, but with less time and fewer resources. That's not fun, that's a chore. In Goo, you go through different scenarios, changing weather and different kinds of goo balls. The game mechanic changes as you tackle new levels. This reminds me of Soul Bubbles for Nintendo DS, which had the same change of mechanic as the game proceeded. I'm glad the developers resisted the urge to copy-paste levels. I'm glad they spent as much time in innovative levels and level mechanics as they did on the creativity of the engine. The levels are inventive, they keep you eager to see what happens next.

As the game proceeds, the story of the goo balls unravels and takes the player through its strange and  humorous turns. World of Goo does a lot of things well, and is an instructive lesson to the cesspool of current-day gaming.
  1. Creativity counts. Come up with something unique. Computer worlds are limitless, so don't package the same crap all over again.
  2. Entertain in every level. Each level should be fun to play. Doing the same thing twice isn't fun.
  3. Leave no player behind. Goo allows you to skip baffling levels rather than requiring your user to fight through tough levels. They can always come back for levels later. This makes the game more fun and accessible.
  4. All the fun ideas, and nothing else. The game is small, but it is fun all along. That is far better than padding a game with mediocre content to increase the length.
The game is half a decade old, but is well worth playing.


Tuesday, May 15, 2012

What should you list on your resume?

This is some quick advice on the skills you should list on your resume.

There is a lot of wisdom about how you should format your resume, but there is little discussion on what you should put into it. You could list too little, and risk rejection because you did not have the required skills for the job. Or you could put too much, and risk looking boastful or dishonest. Where's the line? This article is written from the perspective of a Computer Science graduate. Other fields might list skills differently, so this might not apply to your field.

For new computing professionals, I follow this thumb-rule:
If you can answer an undergraduate-level question on the topic, list it on your resume.

Listing a skill expresses your confidence in the topic, and a willingness to answer questions on it.  An interviewer uses such a list to give you a chance to demonstrate your knowledge. The interviewer wants you to succeed, and you need to provide him a list of topics that you can succeed in.  Remember that an interviewer is chosen based on the skills on your resume, and someone with working familiarity with the topic will certainly know much more than you. Interviewers know this too, and try to put themselves in the candidate's shoes. They reason backwards and try to remember how much they knew before they started working. For most people, this takes them back to graduate or undergraduate level coursework. Questions generally start in that general area, and get tougher.

For example, listing C in your resume would invite this basic question. What's wrong with this code?
 int array[5], i, *ip;
 for(i = 0; i < 5; i++) array[i] = i;
 ip = array;
 printf("%d\n", *(ip + 3 * sizeof(int)));

A person with undergraduate-level familiarity with C is expected to answer this question. If you cannot answer this question, the interviewer cannot ask you anything tougher. The two of you have just wasted ten minutes that could have been spent demonstrating a different skill: Python/Java/Android....

Anything short of a full college course is not worthwhile putting on your resume. Your resume lists your capabilities versus other candidates in the same pool. If the skill is trivial, or your knowledge shallow, then it does not distinguish you from other candidates. Avoid cluttering your resume.


List skills on your resume that you wish to continue perfecting. If you disliked VHDL even though you have an excellent understanding of it, list it under a 'Know but Avoid' section. This points out that while you have a skill, you want to distance yourself from using it. If there is a skill that you know you are rusty on, you could mark it on your resume under a section titled 'Rusty', or 'Passable'. On my resume, I have both a 'Passable' section and an Avoid section.

Finally, if you realize that you have overestimated your knowledge of something: let the interviewer know. It saves both of you a lot of time.


If you liked this, you might enjoy reading my article on how to create beautiful resumes in LaTeX.

(Code coloring courtesy: Palfrader.org. Image courtesy: glassdoor.com)

Sunday, May 13, 2012

What is inside electronic devices?

Not many people see the insides of electronic devices. Here is a picture of a Linksys E-1200 router:


If you compare this with electronic boards made a decade ago, the emptiness of the board would strike you immediately. Most of the board is empty space and two black chips dominate the real estate. The remaining components are minor: resistors and capacitors.

There are two big black chips in the center of the board. In order of appearance from left to right are:
  1. Winbond W9425G6JH: That's memory, storage, or RAM.
  2. Broadcom BCM5357B0: That's everything else: CPU, wireless, ethernet, router. Everything
The fat black things in the bottom look like chips but they are not. The FPE 2020 are tranformers for electrical isolation of the ethernet signal.

Everyone knows that computers getting faster, smaller, more durable and more cost efficient. The silent revolution is in the ubiquity of computers. Tiny computers are everywhere. The desktop was once the only computer in the house. Then came along the laptop, then the smart phone. Then your television set-top-box. Routers, ebook readers, the telephone box to give you cheap international calling. Deep inside, all these devices are empty boards like the one above. One powerful chip containing a computer to do everything.

The other important fact is that these are a full, general-purpose computers. You can run browsers, games, and email programs on these computers. Manufacturers make a board with a general computer and then write router software for it. This method is cheaper than creating a specialized router-only computer. A router is very similar to a television set-top box: they both contain roughly the same parts. The only difference is in the software.

We are getting better at manufacturing these full computer chips: they cost less, last long, and fail less frequently. It is not unusual to run these computers constantly for years. This astonishing reliability is one reason why the repair industry is dying. The other reason is that there isn't much left to repair. Boards contain few parts, and if a CPU or RAM chip goes bad due to overheating or electrical surges, it is nearly impossible to repair it.  And capacitors and connectors fail much more often than CPU and RAM chips. Since there is nothing mechanical left to fail, and the failure rate of silicon components is low, electronic boards provide decades of service.

Another trend to notice is that many of these devices run Linux. Linux has many benefits: it is free, it has support for a wide variety of these new computers, and it is easy to modify.

(Image courtesy Wikia.com)

Tuesday, April 03, 2012

Don't censor Facebook, fix law-and-order

There are reports of a riot breaking out in India because someone posted something objectionable to a religious group on Facebook. Two groups came out on the streets and fought it out because of something posted online. As usual, the knee jerk reaction is to try to censor posting on Facebook. As usual, this misses out on the real problems.

  1. Who posted something objectionable? Can't we try to find them? There is a law against posting hateful speech, and we should bring the offender to justice. I haven't seen the objectionable image here, but I'm guessing that if it is truly abhorrent, there will be reason to prosecute the poster.
  2. Is the image really abhorrent? Many religious groups are happy to impose their frail sensibilities on the world at large. People have been persecuted and harassed for artful depictions in the past, and I wouldn't be surprised if the religious group here is choosing to feel outraged at something mundane.
  3. Was the image being forced upon people? There is a ton of objectionable content on the Internet. You don't need to look hard to find very ugly and disgusting things. So what's new about this image? Why was it so hard to ignore it? What does it say about your religious sensibilities when you are looking at disgusting stuff online?
  4. Someone arranged the groups together to fight it out on the streets. Was that done on the Internet? Can we find who arranged to get the groups together? They needed to co-ordinate to get to one place, who did that? Can we bring them to justice?
  5. Who were the people in the groups? They were certainly breaking the law by destroying public and private property. Why can't we find these clowns and punish them?

Of course, the real question is, where was the police when this was happening? Remember them? Why isn't the headline: "Indian police fails to stop miscreants"?

This isn't a story about online censorship at all. I have doubts about the Indian police, they are frequently late, and are ineffective even when they are punctual. The core function of the police is to enforce law and order and it is clear that they failed in this job.


Sure, you can censor Facebook. You can ban all images. You could even ban the Internet. But that wouldn't fix any of the the core problems. Objectionable images can be printed on presses, they can be xeroxed. They can be hand-drawn and copied by carbon paper. The dedicated zealots can take offense at anything.



(Image courtesy: an unrelated article at The Guardian)

Thursday, March 22, 2012

The best restaurant website in the world

I often search for restaurants online, and I'm not alone. It is convenient to find places at home, look up their menu beforehand, and ensure that the place is open.

Far too often, restaurant websites are unusable. They fall into the trap of doing too much and trying to make an artistic statement when they should be all about functionality. Before we go over to the world's best restaurant website, let's look at the cardinal rules of restaurant websites.
  1. Be short.  Your customer has little time to make the decision. Restaurant websites should load quickly. Forget pictures, reviews, maps. The customer can look those up separately. They're coming to your website for just the facts. Give it to him, quickly.
  2. State the location. Location is everything. Where the hell are you? The customer is online, and is certainly not at your location. Tell him where you are.
  3. State the hours. Are you open right now? Are you closed on Mondays? Tell me now before I make the long trek up to find you guys.
  4. No flash, no music. Your website is a signboard, not a concert. And the signboard better be visible on mobile phones and every computer in use. Don't let the website 'guy' convince you otherwise.
  5. Give your menu. Save the customer the hassle of finding out what you've got. It is better to disappoint the customer in his house than at your restaurant.
You might have noticed that all these are trivial to follow. As a bonus, these rules will ensure you spend less money developing your website. Of course, the website-maker 'guy' will try to convince you that you need some flashy music, some trendy layout and lots of words about the owner, links to reviews, fancy this and that. He is lying to make more money. Fancy websites are great for stuffing his resume and his wallet.

And as proof, I present the world's best restaurant website. The China Dragon restaurant in Morro Bay has followed every rule, and their website consists of one page. All the facts and no bullshit.

You could claim that it is a cheap site with boring lettering. And you'd be right. It is a damn cheap site with boring lettering that loads fast even on slow networks. It gives all the information in a single page and doesn't waste my time. Its website loaded up faster than the three other restaurants I was considering.

You attract customers by giving customers what they want.


(Image courtesy: China Dragon in Morro Bay).

Wednesday, March 21, 2012

Book Review: The Continent of Circe by Nirad Chaudhuri

Want to read a possible theory about Hindus and Hindu behavior? Read the confusing book, "The Continent of Circe", by Nirad Chaudhuri.

"The Continent of Circe" is a book published in 1966 by Nirad Chaudhuri. He grew up in Bengal and writes about the Indian freedom struggle. His views are very different from mainstream views about India. He differs from both Western authors and Indian authors, which makes his writing unique. Some of the arguments made in this book are
  1. There is no religion called Hinduism. This is a name given to a group of people from a specific region.
  2. The Muslims and Hindus in India are completely different people. Conversions and intermarriages have done little to change the stock and behavior of the people. The two groups distrust one another and the relations are deteriorating over time.
  3. The Hindu caste system was the Aryan way of assimilating the local groups. It was never a barrier to professions, and that it might have done some good in maintaining social order and regulating competition between the competing groups: priets and warriers at the top were Aryan and the lower classes were local merchants.
  4. Hindus live among contradiction: (a) they espouse non-violence while their history is replete with butchery (b) they have a grand view of themselves while also professing humility (c) they hold a view of their unity while being deeply fragmented and divisive.
  5. The Indian weather molds Indian (specifically Hindu) behavior.
  6. Hindu thought is rather simple, and written analysis of Hindu thought makes it more profound that it really is.
That's as far as I made it through the book. As you can tell, some of the arguments are correct and obvious while others are strange andmoulds need explaining. And explanations are provided, though the language in the book is bizarre and complex. For one, the essays appear unedited. The language is complex, sentences are long and winding. The author rambles on, and paragraphs are disconnected and dry. Every other paragraph has some foreign phrase which makes it doubly hard to understand the intent. Here is a typical sentence:
Today, as an old man I would say that I have seen so much of this feckless tragedy of Hindu life on this green earth and under the blue sky, that the moment I see any sign of the Hindu dementia in me, I shall cry out, "Nunc dimittis..."
Entire passages from foreign languages are quoted. I gather there is some French, German, Latin involved, and I'm glad the typesetter did not have Cyrillic or Japanese or Chinese characters. I don't know what to make of the strange writing style and the profusion of Latin. I'm sure the words "De rerum indicarum natura: exempla gentium et seditionum" appeal to learned people. An illiterate villager like me has no idea what the hell just happened.

Is it pretentious writing? Did everyone write like this in 1960? Or am I too dumb to understand it?

One thing is certain. Nirad Chudhuri was original. He sees the vast difference between Indian and Western behavior and tries to explain the difference. He isn't pandering to either group: his observations are brutally honest and his analysis is equally impartial. The standard Indian reaction to him is to call him prejudiced and bitter. I don't agree with that. His brutal honesty hurts Indian sentiment. Indians prefer objectivity to be coated with lots of warm love about Indian greatness. Nirad Chudhuri also points out the poor aspects of Western behavior. His praise and condemnation is showered on both groups equally.
Read him, if only to see how honest and unabashed an Indian author can be.


(Image courtesy ManasTech's blog.)