Thursday, June 26, 2008

Why We Can't Have Nice Things

"And that's why we can't have nice things", a statement that csawyer uses very often. More often than not, she was referring in a nearly tongue-in-cheek manner, but sad to say, this can be the truth in the real world.

The fundamental problem that contributes to this perspective is the tendency of people to "game" the system. Of course, when I say "game", I mean "treating the system in question as an optimisation problem and trying to solve it". There're many examples of this: the "grade inflation" problem as shown by the increasing number of students who are doing increasingly well in classes, the number of people who are actually in middle class now compared to 20 years ago, and even the gradual increase in wealth of the countries in general.

While I'm not advocating that "gaming" the system is a purely "bad" thing, what I'm trying to say here is that such behaviour is almost expected of us under any situation. It is an instinct that is strongly tied to the concept of survival; the one who can produce the most "optimal" outcome will be the one who has the highest chance of survival.

Which is why we cannot have nice things. Because the moment something nice is put in place, some unscrupulous people will start to "game" the system and then cause the infamous Pareto distribution to occur.

Okay, starting to be rather incoherent. I shall stop here.

Tuesday, June 24, 2008

Nerdy Girls, Sexy?

D'oh. Read this first.

First off, notice the use of the semantic phrase of "X 2.0". It is so clichéd just to label things as "2.0" just because people want something to sound more "hip" and "new". And since when it is fashionable to be associated with the "geek" stereotype?

Since the media pounced upon it of course.

So the infamous media is converting the concept of a "geek" into one that oozes sexiness and savviness that is unlike other "in" social groups that they had identified in the past. The question to ask is, at the end of the day, will we end up with a situation where there are just many poseurs of "geeks" and that the real "geeks" become completely and horribly misunderstood and ostracised?

Take the case of the "hacker", a term that has been so blatantly corrupted by the media. Hackers used to be folks who were brilliant at hacking things related to computers, i.e. be able to come up with novel solutions to problems that exist on the computer system. But all thanks to the media, the term "hackers" are now associated with people who break into systems for fun or for profit, and because of the mass infiltration of the mass media, it made everyone think of "hackers" in that sense.

Yet another example of a not-so-intelligent media corrupting words and definitions. "Anonymous" has been termed as being an "internet hate/hacker group bent on bringing down the Church of Scientology". Sure it sounds impressive, except that "Anonymous" isn't even a group—it is a term given to the faceless people who lurk around a bunch of picture board websites. And here's the really silly part: there exists a "leader" for "Anonymous". Wow, can't those newspeople/media people think for a second on what they just said?

Finally, it is the attitude of the media people that makes my blood boil. Newsanchors and reporters tend to have that "oh gee, I'm holier than thou art" feel about them, and sometimes the way in which they interview people leaves much to be desired. "Hard-hitting" reporter you say? I think a more appropriate term is "aggressive". Some of the questions that they ask... can be really uncalled for. And yet the public devours all these bullshit greedily. This is yet another reason why I refuse to read newspapers and watch television—traditional media companies have been to staid in their positions to change their ways. At the end of the day for these folks, it is the profit margins and market share that matters, not the accuracy and impartiality of the news.

Again I think I've gone on yet another tangent. So, nerdy girls, sexy? Hell yes. Ida is one helluva sexy geek girl/nerd girl, and she always makes me happy whenever I see her. I can literally spend the whole day looking at her without feeling bored.

I shall end on the cliff-hanger.

Sunday, June 22, 2008

Eh, Update?

I must admit that I feel only slightly bad that I've not really updated anything here over the last 11 to 12 days. The thing is, there's so much to do over that period of time that it is starting to become really hard to "get into the mood" of writing rants of some sort.

In theory of course, this is supposed to be my summer break. But in reality, this summer break is just a thinly disguised self-exploration/recreation period where I'm supposed to make use of to learn the stuff that I had always wanted to do but never did have the time for during the academic year. Already I'm writing a Forth implementation, and simultaneously to that, I'm writing a really small stack machine implementation to test out some of the concepts of effective compilation of code, so as to make better use of the Forth dictionary when I start to implement that. There is also the issue of deriving the "smallest" working set of primitive operations, and the little stack language that I designed seems to be performing a decent enough job in helping me in that. Hopefully something really interesting will come out of it.

On a separate note, I've been somewhat confirmed for the concert to be held in December next year. This time round, I'll be solo-ing 《今昔》 by 陆春龄. It is a rather complicated piece, not because of its technical content, but because of the need for a certain level of musical maturity in order to understand and re-create the emotions that are involved in the piece. I'm rather amazed at the fact that I am actually up to the task in performing this piece, but then again it has been a good 15+ years that I've been playing on my 笛子. Sometimes it is just a little hard to remember that I had been playing for that long already.

On yet another note, there were a whole plethora of meetings that occurred over the last week. It was great to be able to meet up with some old friends just to catch up and see how things are going along. It was a pretty decent experience, and I'm sure most of the folks whom I've met up with would tend to agree with what I have said.

Alright, it's getting late and the old man feels old. Until next time.

Wednesday, June 11, 2008

Random Ramble

Recently, I rewatched the Matrix trilogy, and realised that this second viewing makes more sense than the previous one. There's something about the vagueness of the Matrix trilogy and the vagueness of life that makes me draw various parallels between the two circumstances.

"You've already made the choice; you are now here to understand it." Isn't that a sufficiently vague statement that means nothing more than the words that comprise it? Yet at the same time, the concept of this statement is prevalent in the Matrix mythos. The underlying assumption here is that life, at the end of it all, does not truly contain "free will", if "free will" means having the ability to decide what action one wants to perform. Perhaps this is true in the real world, and that all of us are just playing out the parts that fate/destiny has given us. But like all abstractions, perhaps "free will" is our answer to justifying actions using Occam's razor.

Tuesday, June 10, 2008

Air-Conditioners

On a completely unrelated note (as usual), I suddenly realised that air-conditioners are more efficient in cooling a room down if the external weather condition is much cooler. This means that for places like sunny Singapore, the air-conditioner is actually working a lot harder to pump out the thermal energy from the room than say an air-conditioner in the middle of Alaska.

The principle of the air-conditioner is based on the heat pump, which in turn is based on the expansion and compression of the coolant fluid to transfer the thermal energy. A heat pump takes in thermal energy from one region and dumps it into another region. So, in the case of Singapore, the heat pump will take the excess thermal energy inside the room and dump it into the outside world. Except that when dumping the excess thermal energy, the Newton's law of cooling tells us that if the temperature gradient between the outside region and the coolant fluid is too low, the rate of transfer of the excess thermal energy will be lower. Now, taking that into consideration, it is clear that the heat pump is most efficient if the outside is cooler than the inside.

But if the outside is cooler than the inside, isn't it cheaper energy-wise to just open the bloody windows?

Also, I'm not a physicist. So don't lambast me when I use Newton's law of cooling as part of my explanation.

Monday, June 09, 2008

Life

Ah, life. Full of interesting things to think about, wonderful people to hang out with and that special someone to hold close and just curl up with. Am I less of a pessimist now? Perhaps, since my temperament has changed somewhat given that my life circumstances are slowly getting better.

It is strange to note that this time last year, I was in a situation that was pretty sitheremilar. Except that the feeling was somewhat forced. I'm grateful for what I have now, and especially who I have now.

I used to think that life was all about logic and axioms. But as time went by, I realised that it was just impossible—there's more to life than just a deterministic outcome. It pains me to see people who think that life is all about logic and just fail to comprehend that life is more than that. There's this side of life that involves feeling, that involves rational thought, that involves empathy. Empathy and feeling are things that are uniquely human; these are what separates us from any other logical system. I'm sure that some purists might argue that it is possible to codify all these feelings and empathy into some logic framework; I'm positive that it would probably work out provided one uses a good encoding scheme. But we're not computers, so why should we reduce ourselves to just logic processing machines? What kind of life it is for a human if we live it out like a machine?

I used to be a logic machine of sorts, trying to hide my feelings and humanity away from it all, and survive on a cold, intellectual exterior. But as time went by, all these hidden away emotions and humanity started manifesting themselves as uncontrollable manic/depressive episodes. But of course, the terms "manic" and "depressive" are nothing more than placeholders for the extreme mood swings that I'm referring to—they probably do not correspond to the standard clinical definitions.

But after some help from several people, I start to realise that there is more to life than just solving equations/problems using logic—one must look beyond the logic framework to understand more about the world. Last semester, I took courses in technical consulting, ethics and economics, and the truth is, I actually enjoyed the lessons that they teach. Granted, they are mostly not too relevant to my core of Computer Science and Machine Learning, but they provide a rather interesting way of viewing the world at large. Technical consulting taught me how to apply my problem solving ability to the outside world where there's more than just the best technical solution there is; there is a need to consider the human aspects of technology as well. Ethics brought up more viewpoints that I can take, other than the "cold and intellectual" utilitarian perspective that I tend to adopt in real life. And economics just proved that many of the activities that humans engage in can still be analysed from the perspective of some semi-universal law or hypothesis.

So, what's all this rant about? I actually have no clue... perhaps this is one of those "memory purge" things that I engage in to sort of put my life into perspective of sorts, and perhaps to act as some non-subtle commentary of some people's lives that I know.

Till next time.

Sunday, June 08, 2008

A Class Meet-Up

Right. So yesterday was a class reunion of sorts, where all the misfits who made up my old class were supposed to meet. It was an interesting meet up, to say the least, because all the misfits of old are now fledging members of normal society with little of the misfit-ness that was the driving characteristic of our class.

Well actually, not all the misfits are fledging members of normal society. I'm still pretty much a misfit given my geekiness.

Heh. I still can silence the whole table with one sentence of network communications protocol, which shows pretty much that I still have that "oh my god I have no clue what you just said" property, which is probably no different from the old days. Not that I don't like it much, but it is just one of those things that sometimes it might be good to not have. Most of the folks are on their way to actually making real money, which is good, while I'd still be cash-strapped for at least another 6 years, and even then, when I'm actually ready to make "some money", my pay would still be lower than the rest of the folks who had already started working earlier than me.

Strange how time has changed most of us. Most of the folks characters haven't changed much; good friends of old are still good friends now, but sometimes I cannot help but think about how everyone's lives have deviated from everyone else's. I guess my feelings on all these gravitate to the neutral side, because let's face it, it is increasingly unlikely that our paths will cross again in the future under normal circumstances due to the divergence in what we are all doing.

Friday, June 06, 2008

Implicit Memory Manager for Forth

And so it is another one of those gee-I-ought-to-be-asleep-but-I'm-not kind of writing. Previously, I was talking about having to write a memory manager for my forth interpreter. The memory manager is actually done, and I think that it probably works. I'll probably write a stronger series of tests to ensure that it really works correctly, but at this point, I'm satisfied with what it can do.

The design for the memory manager is simple. It uses an implicit list to keep track of blocks of memory that exist in the forth virtual machine (fVM). Since all memory locations are allocated by cells, where each cell is 32-bits wide, there are no real alignment issues to worry about. I avoided an explicit list to reduce roughly three cells worth of memory that is required by that more advanced data structure. What this means is that the memory allocation and freeing are both linear in time with respect to the number of memory blocks that are in the fVM. Freeing uses coalescing, and the linear traversal required means that we can perform consistency checks in the fVM heap to prevent silly things from happening.

The memory manager is deliberately separated from the main code, thus allowing me to implement other versions should the need arise. The only thing that is still missing is the realloc() function, which might be useful in the case of trying to FORGET a word in forth.

The next step in the interpreter code, it seems, is to define the dictionary and some primitive instructions. Once these are done, I can start to compile the default dictionary and actually have a working forth implementation running.

Who knows, I might just put up the code once I have it all done.

Tuesday, June 03, 2008

Can't Run Away From malloc()

And I thought that this was the last time I needed to write a memory manager. Turns out I was wrong. What happened was that I finally decided to sit down and write that forth interpreter that I've been meaning to. While I was happily writing the code for the interpreter, I suddenly realised that I needed to handle memory for variables as well as words for the interpreter.

The realisation that I needed a memory manager was almost immediate.

So I guess it is time to roll up my sleeves and write that memory manager all over again. This time, hopefully it is much simpler due to the way the alignment works in my virtual machine for forth (alignment is by cells, which is different from bytes).