Confessions of a researchaholic

November 30, 2011

Breaking point

Filed under: Real — liyiwei @ 11:37 pm
Tags: ,

Have you ever tried so hard to accomplish something that you feel that you are going to break anytime soon?

If not, you are unlikely to be truly successful for anything. The world is a very competitive place, and there are always people who are more talented and harder-working than you. So ask yourself why you deserve to win if you have not given everything you have.

Plus, the *breaking point* is one of the most wonderful life experiences. I and my collaborators have to go through that every year. I am not sure about them, but I truly, absolutely, enjoy the process.

Give it a try. Find something that is really hard and you really want to accomplish, and go for it. You will not regret.

November 26, 2011


Filed under: Real — liyiwei @ 2:23 pm
Tags: ,

It is pointless to rationalize with people who are trapped in emotions, which, unfortunately, happen all too frequently. Emotion is an evolutionary artifact that would take long for (natural) evolution to fix. Meanwhile, we can only hope for better self-control.

November 25, 2011

Voluntary genocide

Filed under: Real — liyiwei @ 11:54 am

During thanksgiving the subject of turkey was brought up, which lead to the subject about genocide of American Indians. This reminded me of an Economist article I read earlier, about the extinction of Manchu. And that lead to my thoughts about *voluntary genocide*.

To commit voluntary genocide, all one country/race needs to do is to be (1) audacious enough to invade China, (2) good enough to win the war, and (3) stubborn enough to stay for a sufficiently long period of time. After that, the invading race will be absorbed by the Chinese.

The Japanese were least successful (and most lucky) to reach only stage 1, thus they are still a country. I am not sure exactly what they were thinking before the war, but mathematically, even if they had stationed every Japanese man in China there simply were not enough of them to be in control.

The Mongols were slightly more successful (and less lucky) to reach stage 2; they would have been a Chinese province if the Russians hadn’t intervened.

The Manchus were the most successful (and the least lucky) to reach stage 3. So within just one century after ruling the world’s largest empire, they are now on the brink of extinction.

Probably only the (Asian) Indians have sufficiently large population and strong enough culture to get to China without being completely absorbed. The geography (Himalaya) has prevented any large scale war between these 2 countries throughout the human history. The technology might have finally made this feasible now, though. My calculation is that if China were to engage in any future war with a neighboring country, India would be the most likely one. And I would be curious to see how they will fare.

“Next to knowing when to seize an opportunity, the most important thing in life is to know when to forego an advantage.” – Benjamin Disraeli

November 24, 2011

How to learn a new language

Filed under: Real — liyiwei @ 1:01 pm

Disclaimer: This is based on my personal experience. You might find it eccentric, or even bizarre. It worked for me, but I am not sure if it suitable for everyone. So follow my advice at your own risk.

I have not found formal school education any useful for learning a foreign language. I learned English by reading novels and watching movies (mostly Hollywood) while having fun. I believe truly enjoying an activity is the most effective way to excel at it. The formal school education, at least in my personal experience, provides the exact opposite. It is usually dry, boring, exam based, and removed from practical usage.

The most important usages of any language are listening, speaking, reading, and writing. Whether or not you actually understand the underlying grammar or other theoretical aspects is only secondary. Most native speakers do not think about grammars or theories when using their own languages.

If possible, immerse yourself in an environment that will force you to use a particular language. I essentially picked up English speaking and listening while in grad school because otherwise I cannot survive. I heard a theory that the most effective method to learn a foreign language is to date a native speaker who is so deficient in other languages that you have to speak that particular language with him/her. I have no chance to actually try this but I believe it will work.

Falling short of dating a native speaker or trying to survive in a foreign country, you can still practice reading novels written in the target language (pick up something fun and well written, e.g. Harry Potter for English), watching foreign movies without any caption (again, pick up something you would like), and writing blogs (e.g. your opinions about a recent book you read or a movie you watched). With enough practice, you should be able to pick up any new language without going through any formal schooling or textbooks.

November 20, 2011


Filed under: Real — liyiwei @ 7:36 pm
Tags: , , ,

Let me begin by outlining a few basic laws of nature.

Resources are scarce, with scarcity proportional to relative supply and demand.

People tend to consider themselves better than they really are (and thus deserve better than what they currently have).

The universe is stochastic, and unfortunately people like to imagine life is more deterministic than it really is. (Heck, even Einstein refused to believe God will throw dice.)

As a consequence, when people cannot get what they want, they complain about injustice, and question the fairness of the process that allocates the scarce resources.

Unfortunately, none of these will not help or change anything. People will just think you are a whiner. And do not even attempt to ask why you did not get what you want; you are forcing people to either tell you a white lie (e.g. you are really good; it is just that we cannot figure out a good task for you to do right now) or be impolite (e.g. dude, you really have no idea how lousy your performance was?) or to confess they really have no clue (e.g. huh, we cannot really decide between you and another candidate, so we picked the taller one).

Specifically, under a lot of situations, the decision depends on a lot of factors. For example, there is this famous thing called *affirmative action* in the US that discourages discrimination in job and school opportunities. The intention is all good, until people start to enforce hard quotas, like reserving a certain percentage of openings to a certain group of (alleged) minority. Then, if the real application pool does not contain that percentage of qualified minorities, the process will deem to hire a minority with inferior ability than certain more qualified majority. You can say it is not fair, but that is how things work.
Sometimes it can just be random; with hundreds or even thousands of applications for a certain opening, it is just information overload to for anyone to decide who is really good.

My personal suggestion is to stop worrying all of these, and use the rejection or denial as a source of motivation. Prove to the world that they are wrong, and you are the best.
Getting dumped by your ex? Shine yourself to make him/her regret next time you meet.
Getting rejected by a job application? Outperform whoever got hired instead of you.
Did not get permission to your dream school or professor? Publish better research papers than his/her group.

These being said, I really want to tell whoever applied to be my student: thank you all very much, but since I have received hundreds of applications and I can take probably only 2 (or maybe one more if I can muscle with the department), mathematically it is impossible for me to take everyone I like. Evaluating the quality of a student is more art than science, so I rely mostly on my intuition. If you really want to force an answer out of me, the only thing I can say is that my intuition told me that there are better and more suitable candidates than you. But can I prove it? Heck no, and I doubt if anyone can.

Ray tracing

Filed under: Real — liyiwei @ 6:43 pm
Tags: , ,

Many mentors have their own favorite entry level project for both training and sieving purposes. And mine is ray tracing.

Read + code

Read the following books and implement your own ray tracer from scratch.
Yes, I mean writing every single line of the code yourself, except for standard libraries like iostream and cmath. And yes, I recommend c++ as the programming language.

Ray tracing in one weekend, by Peter Shirley.
Path tracing with soft phenomena. Very short and cute introduction to ray tracing in particular and computer graphics in general. Full of hidden gems and wisdom, but beginners might not appreciate all the nuances.

An introduction to ray tracing, by Eric Haines, Pat Hanrahan, Rob Cook, Jim Arvo, David Kirk, Paul Heckbert, and (edited by) Andrew Glassner.
Whitted-style ray tracing with hard phenomena. More comprehensive than the book above.

You should read the books (especially the first one) on a computer and code along. Do not just read; it is less fun and less effective.
Software engineer your code from the very beginning; ray tracing is nicely object oriented with natural object-like components such as rays, shapes, materials, colors, motions, and cameras.


Produce your own ray traced images. Start with something simple, like mirrors and glasses for basic reflections and refractions. Ultimately, I want to see 2 things:

  • Produce ray traced animations from the BART benchmark. (If you can reach this stage, I consider your training complete. If you cannot even get to this point for whatever reason, you have no chance to survive in our future projects.)
  • Design your own favorite scene, and ray trace it. Show me your creativity and artistic + scientific blend. You can find examples from prior Stanford cs348b rendering competitions.
    (This part can be good for a group project, even though I expect everyone to complete everything else individually.)


I did ray tracing as part of Stanford CS348b image synthesis, and I would say this is perhaps the class that I have learned the most from.
First, ray tracing is a superb training for coding and software engineering; it is inherently modular and suitable for object oriented programming, and the amount of coding is non-trivial (actually, quite hefty for new-comers, especially if you code from scratch).
Second, ray tracing is a superb introduction to image formation, and you will learn the fundamentals of physics, computer graphics, computer vision, and image processing.
Third, and perhaps most importantly, it is heck of fun. It is beyond words for me to describe the satisfaction I (and many people I heard from) derived from producing my first ray traced image. I am not an artist, but I can paint with algorithms.


There is another excellent book for ray tracing: Physically based rendering, by Matt Pharr and Greg Humphreys, but I personal opinion is that you should read it as your second, not first, ray tracing book.

November 19, 2011


Filed under: Imaginary — liyiwei @ 6:36 pm

The following scenario happened in one of my dreams early this morning.

During the committee meeting of one major graphics conference, a paper of mine got discussed. So I need to wait outside the room. I noticed that a lot of other people also walked out, and I wondered what the heck that was about. Eventually, the paper chair also came out and announced that nobody can review my paper because every committee member was in conflict.

A very senior guy came over and said: I told you not to make too many friends!

In the end, the paper was marked as *not accepted* (a new category beyond rejected, accepted, and togged) due to *lack of committee members for reviewing*. My co-authors told me they hate me and accused me of being an academic polygamist.

Well, clearly, being a dream, this is not entirely logical, as if there were no committee members who could review a paper it would have been discovered during the paper sorting process, not the meeting itself.
But still, an interesting beginning for a day.

Theme: Rubric. Get a free blog at