Wednesday, December 29, 2004

Distance

I left my family to study abroad when I was very young. The homesickness has always followed me. Whenever I thought about how I felt thinking about home when I was growing up, the phrase from the movie title "the unbearable lightness of being" comes to mind. Of course, it was not about being that had the unbearable lightness; I was too young for that. It was the unbearable lightness of the feeling of homesickness. It was all-engulfing, like the air, to borrow another phrase from a song, surrounding me all the time. I went home once every six months at that time. That usually made it worse when I had to leave again for the new term.

Going home can no longer change that feeling. I have been away for so long that every time I went back, I felt the feeling of not being at home, even when I was sitting at home. Like I said before, I truly cannot go home again.

Two days ago, when I heard about the tsunami that hit Indonesia, India, Thailand, Malaysia, and other countries, I felt a little panic, for my sister was supposed to be visiting Kuala Lumpur. I still have not received any word from her, but I think she is safe, given how far away Kuala Lumpur is from the epicentre. At that time, however, I had no indications about the magnitude of the quake and tsunami. That was the first time I felt the distance between me and my family. The distance is so vast that I forgot how it built up in the last twenty years.

The distance is not measured in miles or kilometres. Nor is it measured in the amount of time I can hop on a plane and go there. It is measured in the difference in outlook on life, in the mundane daily challenges we will go through, wherever we live.

Sunday, December 26, 2004

Drive

I was reading another Stephen J. Gould's books these two days, when I came across an observation he made about the great people he knew. He said these people shared one characteristics: that they were all so committed to what they were doing that they would labour long and hard to accomplish their goals. He was saying that innard intelligence and lucky circumstances ranked lower than having the drive to succeed.

Being the biggest underachieving person in the world, I totally agree with him. It is very difficult to have a different opinion. It is very difficult to oppose the prevailing wisdom. It is very difficult to defend a different position. It is very difficult to create something out of nothing. It is very difficult to convince myself that my own ideas are worth something. It is very difficult to not agree with other people when they think my ideas total bunk; and who do I think I am anyway. It is very difficult not to think that I am over my head with all these things that I think should change.

Actually, nothing of these difficult things faze me at all. I am not being arrogant; I simply know that I have always had weird ideas. That I don't think in the same way as other people even since I was a small kid. My problem is that I do not have the drive to do the deeds; especially if there is no deadlines looming.

When I was writing my two books, I had to write 13 to 14 pages every day to meet my deadlines, imposed by myself. I had no problem finish writing both books, even though only one of them has been published.

The drive to think through ideas is much harder, as you can imagine. To be able to do that anyway, I resolve, is what I am going to do from now on.

Friday, December 24, 2004

Hobbies

The other day I was talking to a colleague. When I mentioned that I liked reading, he immediately suggested that I should reserve a copy of the new installment of Harry Potter series. This book will be published in the new year, and I am sure we will be reminded over and over again on how many copies it has sold, right until and after it is published. There might even be dramas about leaks, etc.

But no, I don't read novels. Actually, I don't read fictions. Well, I don't read poetry as well; the last time I tried, I could not make the head and tail out of the book of poems I bought. I have no rhythm, and if I can't even pronounce the words correctly, I guess I will never get it. I will only be able to read Chinese poems.

Yes, I only read non-fiction, and dull non-fictions at that. Come to think of it, I only watch documentaries, news, and sports on TV. I don't watch movies; they bore me to death and give me headaches. Oh, I don't play video games, although I love watching people play video games. I don't play cards. In fact, I can't. I simply can't remember rules. I don't play chess, any kind of chess. I wanted to learn the game of go, but never got around to learning it. I doubt I would be good at it at all.

There is a reason to all this: I find the real world much more fascinating. The real world is so much more interesting that fictions simply can't compare. Video games are no comparison to actually playing with an operating system like Linux. Heck, I have the source code that I can read. And games. Well, if I can find out how humans think, that is a much more exciting puzzle than any game in the world. And it is open-ended too.

So, what am I trying to say? Nothing. I am just a boring person.

Maturing Java

Java has been around for around 10 years now. From the little language it started from, it has grown to be a very big "platform". There are so many Java related "technologies" around, so much noise, so many patterns, so many frameworks, so many architectures, so many buses, so many orientations, it is becoming, for me at least, a very unwieldy beast. Every where we turn, there is a technology we must use for even little open source projects. And if we don't like the technology used, well, tough; we can always create our own projects and use our pet technologies. So, we all strive to know EJB, SOA, ESB, Aspect oriented programming, POJO, JMS, JMX, Servlets, struts, maven, ant, JSP, JSF, Tiles, tapestry, maverick, JDBC, not to mention vendor specific stuff, Websphere, Weblogic, JBoss, Tomcat, Orion, Resin, Sun Sudio One. We are supposed to be an expert in all of these, we are supposed to have at least five years of experience in all of them, all the time 100% working on them hands on, and 100% doing design at the same time as well. Of course, I exaggerate. But not by much, if you read some of the job advertisements in the last three years.

Why is this diversity not a good thing? May be it is a good thing? It is not a good thing for one reason: humans can only be very good at only a few things. When only a polymath can see the landscape fully, most people will be locked in ghettos of isolated technologies, requiring the small subset of people to breach the divides. Specialization will be needed. That would have been a good thing, if not the amount of complexity every single programmer must confront day to day. And the way the technologies interact, you must know all the technologies used, or you don't understand part of the system. Except that for the way we program, not understanding part of the system can be fatal.

We muddle along.

Thursday, October 07, 2004

Trap

It is about time to rewrite the introduction to my other blog.

I was surfing around when I found out that The Economist ranks Thomas Kuhn's "The Structure of Scientific Revolutions" as one of the ten best selling non-fiction books, after the book was published almost 40 years ago. I was totally surprised. It was very difficult for me to believe that these many people would buy that book to read. Since I am on vacation, I might as well find out what other people think about the book.

During my surfing of the comments posted on his book, I was even more surprised by the strong emotion concerning Kuhn, his book, and its popular influence. Although the reviews are mostly positive, there are quite a few people who are very negative toward him and his book.

I don't like that negative feeling at all. I can't read minds, so I don't know whether it is just jealousy. I am no philosopher, so I don't care about word plays. I am not a politician, so I don't give a damn whether Kuhn is a reactionary or not. I am especially not an academic, so I don't care about his standings among academics and fine differentiations among the people in the 'nomenclature'. And I have is an independent mind, so I don't care about what other people think about "paradigm shifts", "normal science", etc. I used these phrases because I believe programming is at the verge of changing itself in the near future.

Now that I found out these phrases have meanings other than those I care about, I will simply change my introduction. Hey, these are just phrases. My career does not depend on whether they mean I want them to mean.

I can't resist this, but the one comment I found so silly, was that Kuhn was not a scientist, and hence had no idea how it was done. I almost laughed out loud, if I had not been so disappointed by this kind of attacks on Kuhn.

I know I will steer clear of philosophy, sociology, psychology, and the history of science.

Added five minutes later.There. I removed the word "paradigm" from my introduction.

Monday, August 16, 2004

In Praise of Idleness

When I was in university, I liked to go to the bookstore to browse the books on the non-text book shelves. Initially, I would only browse the computer science section. At that time, unlike now, the shelves were full of titles that did not try to teach you how to use "productivity software". Instead, they had many titles that were quite obscure. I loved browsing them because they gave me an idea about the extend of the computer science field. For some reason, I had not discovered the library yet.

For a different reason I don't remember any more, I started browsing the philosophy section. Initially, I aimed for only one philosopher: Bertrand Russell. He was the only Western philosophy that I read about when I was in high school, even then indirectly. As usual, I did not know which work of his was important, and which was just for the "common man". Anyhow, one of the books I eventually bought is called "In Praise of Idleness". It is about why leisure time is important for a person.

When I bought the book, I did not know I would agree with him wholeheartedly when I started my graduate school: spending most of my time reading books in parks, going fishing, etc.

Now that I think about it, I learned the most when I was playing with the department computers, installing this and reading that program, all really for no particular purpose in mind. For one summer, we went to the department computer room around 10:30 p.m., fooled around with the programs we could find online, read all the RFCs we could find, implemented all the protocols described in the RFCs we could understand, went to the same donut shop for donuts around 3 a.m., back to the computer room for another three hours, went back to my apartment for a snack, usually boiled pork tongues with chillies, and then went to bed.

I did not do a thing that summer that I could report to my supervisor about. But I had a very good supervisor, a topic I will write about soon. She allowed me to learn to think, to write, and to simply find my own way. I am so grateful I had the opportunity to be supervised by her.

Back to idleness. It is actually very hard for me to imagine what I would be like without that summer.

Idleness is so important, indeed.

Saturday, August 14, 2004

Late Lessons

I was reading some of the posts in a forum on my high school. The name of a teacher kept popping up. I wasn't sure about who the teacher was, as the name was in English, and I only remember my high school teachers by their Chinese names. So, I decided to get out my yearbook and find out who that teacher could be. I found the teacher, but just like other aspects of this nostalgia business, I got distracted by the foreword of the yearbook, written by the principal at the time.

Sometimes, time has the effect of filtering out trivial things, and leaves only something important behind. Other times, it simply erases everything, important or not. I am not sure what I thought of the remarks in that foreword the first time I read it. I bet I did not pay much attention to it. When I read it again, a few minutes ago, I was struck by the simple wisdom it contains: learn an additional language, and your horizon widens. Such a simple lesson, so easily dismissed.

After struggling with English for the last 25 years, I have to say I wish I started paying attention to English much earlier. Perhaps I would not have needed a few years, wasted years, to become proficient in English.

Then, I read about the comments by some of the former students on the teacher whose name started this whole thing for me. I was again struck by how similar I probably felt when I was their age.

It is so easy to be destructive, and so difficult to be constructive.

Sunday, August 08, 2004

Perl

I am not sure there is a language hated with a passion by more people than Perl. It seems to me that it is almost fashionable to hate Perl. Well, why, it is ugly. It is impossible to maintain. It has no abstraction mechanism. It has no data structures. It is not object-oriented. And so on.

Well, I like Perl. I have been using Perl for 15 years, and I am not about not to use Perl. In fact, I probably use Perl more these two years than before.

What is the reason I like Perl? Well, first, I am not a point-and-click person. I would rather write a script to automate a task I have to do repeatedly than to go through all the clickings over and over again. Second, many of these tasks are rather similar, but not similar enough that the same script can be re-used frequently. In other words, cut-and-paste is actually the best re-use strategy for these tasks. Third, input-output seems to be an afterthought for a lot of languages. Perl handles I/O much better than these languages. I can keep listing more and more reasons why I like Perl. All these reasons boil down to one thing: Perl is very useful to write a lot of small to medium tasks.

Now, don't I think Perl is ugly? Well, I used SNOBOL, FORTRAN, BASIC (without real subroutines), etc., before: Perl is not particularly ugly in its syntax. I would venture to say that an unstructured Perl program is more or less as ugly as a FORTRAN program with no indentation and heaven forbids, no whitespaces.

Of course, you can hate Perl all you like. If you actually know enough about Perl, I will respect your opinion. If not, oh well, sometimes, we all like to hate things we don't know much, don't we?

Saturday, August 07, 2004

We can't go home again

These are the things I did in the last two weeks that have something to do with my high school: I joined a forum for the high school, I found the email address of one of my high school classmates, and I scanned through some of the letters I received in high school and the first ten years after that. It has been very interesting, to say the least.

Of course, I was not one of the star students in high school that everybody remembers. I was rather mediocre and I doubt I left much of an impression on either my classmates or my teachers. So, the memory of my high school years is only precious to me, probably to nobody else.

I read some of the letters. Many hours later, I am still haunted by what my friends and classmates wrote. For some reason, high school was something they would like to forget. For me, on the other hand, the high school years were some of the best years of my life so far.

Memory tends to become bittersweet as time passes by. My tough and hard undergraduate years are simply four of the formative years for me now. At that time, life was such a struggle that I am amazed I went through it in one piece. During all those years, studying in a strange land in a strange language, the memory of my high school years gave me strength to go through the days.

Of course, we can't go home again. But that longing becomes part of the landscape, propelling me to improve my life and my way of living.

Sunday, August 01, 2004

Life

I went to a park this afternoon with the family for our little kid's first picnic beside the lake. Other than the unpleasant smell, stench really, of the algae growth at the edge of the water, it was very enjoyable. The weather was wonderful, the breeze was not too strong and not too weak, the whole outing was one of those little pleasures that life provides from time to time.

Right before we left the park to go for some food and drinks, I leaned on the park bench, looking at the maple trees towering above me. The black maple tree across from the park bench looked especially majestic, with the Sun on some of its leaves, swaying slightly from side to side, it was simply beautiful.

For some reason I don't really understand, I started thinking about what I read in one of the books on the history of life, the whole notion that very far in the past, some single-cell organisms, for whatever reason, decided to join forces to become a multi-cellular organism. Of course, before that event, single-cell creatures already had parasites, and other foreign materials living symbiotically within the cell. But the almagamation of organisms to become a unified organism is just plain incredible.

When I was looking at the tree, I was really puzzled by how that event could have taken place with all these obviously unconscious organisms. Still, knowing enough about evolution and its mechanism, I know that if the circumstances were right, sooner or later, an evolutionary path would be taken.

The scale of time for something that improbable happening is obviously vast. The thinking of scale of time brought me back to a Stephen Jay Gould's essay I read this morning. The essay struck a chord in me, as it was about the scale of time for evolution, the fact that we must be very careful to make decision that seems to be good for our lifetime, but that might be bad for us, taken as a species, in the long term.

Saturday, June 26, 2004

Local Optima

I currently work for a logistics software service provider. In my daily life, I deal with optimization quite frequently. We use a third-party software quite a bit for the optimization tasks. For some reason, it does not behave exactly the way that some of the people in the company believe it should behave. Since I don't like not knowing anything I have to deal with, I have started looking at optimization algorithms myself, to educate myself about what is to be expected with optimization software.

There are different algorithms out there, of course, and I am not going to get into details about any of them. I just want to mention one aspect of some of the algorithms: the need to avoid getting stuck in local optima. Since many algorithms for hard problems, not just for optimization, tend to use some kind of heuristics to get a solution first, and then improve it, avoiding being stuck in local optima is of course very important. And it is funny to see how easy many algorithms will get you into a local optimum. Preventing that from happening or to get out of that situation is then quite important to improve the quality of the eventual solution.

In life, the same kind of situations happen all the time whenever we are faced with a life decision. One simple algorithm that most people use in those situations is to find out all the possible decisions, and choose the best one. When the next situation arises, choose the best for that situation, and so on. If you project all these decisions over the lifetime, you will see that you can get into a local optimum if you simply look at the current situation without thinking about the "big picture". That is why people think back in life when they retire. The roads not travelled can haunt you when you can't go back and you can clearly see what these not-travelled roads could have led you to.

If you think about how people behave in extreme situations, and wonder why they don't see the inevitability of something much worse happening by choosing the best decision so far, you now understand the reason. For instance, suppose you are a taxi driver; and you have just picked up a fare who is pointing a gun at you asking for you to drive to a secluded area, what would you do? Follow the instruction will give you a few more minutes of not being harmed, but you might be shot anyway once you arrive there; not following the instruction means you might be shot right there. What to do?

This is an extreme situation, of course, and probably best studied using game theory rather than a search algorithm. But it does point out the problem with our normal way of making situation: what is the best for me right now?

It is funny how this little epiphany changes the way I look at how people make decisions. And I no longer evaluate people's decisions the same way.

Friday, May 28, 2004

How long to write a book?

I just received volume 4 of Christopher Alexander's "The Nature of Order". I am not going to read it until I have also received the third volume. I am waiting for the day when all four volumes have been received, and I can read the volumes one after another.

According to the author, the four volumes were the result of 27 years of effort. Of course, he did not spend all his time on the books in those 27 years. However, I do understand how writing a book can consume an author.

He is not the only one spending decades writing books. Donald Knuth started his "The Art of Computing Programming" in early seventies. He quickly published the first three volumes, out of possible seven volumes; spent a decade on computer typography; and his fourth volume has been annouced for more than a decade now, I don't even remember. When his volumes are done or when he dies, whichever comes first, I will buy the whole set of that set of books. Right now, I already have most of his books.

So, is it worth spending decades on writing a set of books? I don't know. I am not good enough to have enough materials to writing a whole set of books. I might be able to get away writing one book here and one book there; I will never be able to writing a multi-volume book in one area.

My dream is to be able to spend a few months writing the book I have in mind for more than a year now. This will remain a dream until who knows when.

Sunday, May 16, 2004

The Start

I finally started writing something I have been thinking for a while now. Of course, I had a few false starts before, thinking that I could do it. However, every time, I found out that I had insufficient understanding of what I wanted to write.

Not that I know everything I want to write this time, for some reason, it just felt right for me to start writing. Many areas are still not clear in my mind. And I am sure what I think I understand right now will turn out to be either misunderstanding or worse.

But I might as well start writing when I feel that I am ready for it.

I was thinking that maybe I could write about my progress here. Nah.

Saturday, May 15, 2004

Worm Writers

I heard from the radio that they caught the writer of the Sasser worm. The culprit turned out to be a high school in Germany. Nothing surprising there, not even the fact that the writer is a high school student. Actually, most worm and virus writers are probably very young, under 15 years old. Of course, labeling them "worm writers" in many cases is probably charitable as they most probably simply copy some worm or virus toolkits out on the Internet, and simply change some of the particulars and then float them on the Internet.

Still, it is sobering to know that all these so-called hi-tech systems can be compromised by a few kids. Who bears the responsibilities of securing these systems? Is it Microsoft's responsibilities that the Windows operating system be secure to a certain extent, more than a kid can compromise with minimal knowledge of the operating system but abandon amount of enthusiasm? Or, as many people believe, it is the owner's responsibilities of securing the systems to prevent compromises?

I tend to believe both are responsible. I think securing a house is a useful analogy. When we buy a house, we expect the house to be reasonably secure, with reasonably secure doors, reasonably good locks, etc., all relative to the neighbourhood the house is in. The idea is that a high-school kid on a lunch break should not be able to walk in your house with little or no effort to break in. Of course, an ordinary house will not prevent a professional thief from breaking in. That is just the way life usually is: we cannot remove all risks. So, when we buy an operating system, one that is expected to be connected to the Internet, it is perhaps the operating system vendor's responsibilities to make it secure enough that a high-school kid cannot hack into it with little or no effort. Professional hackers are a different story.