Class Notes

December 13th, 2009

I almost couldn’t believe it. Last night I was rummaging through my stuff when I found this little notebook from almost two years ago. Appar­ently, I did jot down many of the things said and done in class when I was at Cornell University.

Class notes always start with the best of inten­tions. Fresh clean notebooks. Crisp paper. Aahh!

Of course, one day later, the notebook is no longer fresh and clean. It has been written on, which could almost be slang for defiled. I have taken great pains to write neatly and clearly, without messing up anything, but…it isn’t the same.

Mistakes cannot be avoided. Eventu­ally, some words get messed up. In the begin­ning, I tear out the page and start over, but later I let it be. The notebook is no longer sacred.

And then there are those lectures. While my ears are listening and my brain is thinking, my hands are drawing cartoon charac­ters on the nearest piece of paper they can find. Did I just draw Bugs Bunny on the margin of my page? Uh…

So going back to the notebook I discov­ered: to fill up a notebook almost completely with no more than a few doodles and only the occasional change in handwriting is quite an accomplishment.…

Class Notes - 1

Class Notes - 2

Antithetical

December 11th, 2009

Of all the different kinds of commer­cials you get to watch are forced to watch on televi­sion, the ones that adver­tise prescrip­tion drugs and medicines are the oddest. Here’s a typical break­down of a 45 second commercial:

  1. 10 seconds announcing the product and explaining how wonderful it is. (“Chuchachuva gives you good night’s sleep!”)
  2. 30 seconds describing the various side-effects of the drug. (“Possible side-effects include headaches, nausea, liver-damage, hallu­ci­na­tions, low IQ, kidneys shutting down, impotence and suicidal tenden­cies. And oh, your tongue could fall off.”)
  3. 5 seconds telling you how wonderful the product is. (“Chuchachuva is the most awesomest thing ever! Ask your Doctor about Chuchachuva today!!”)

You’ll notice that the bad stuff is sandwiched between the good stuff, as if they’re hoping you’ll miss it. You can also see how they keep repeating the name of the product aloud again and again, and yet again, hoping to register it firmly in your brain.

The best part though, is how during the thirty seconds of hallu­ci­na­tions and headaches, everyone featured in the ad sticks around and gives you their best smiles, as soft soothing music plays in the background. Anyone who didn’t under­stand the language would think these guys thoroughly enjoyed their nausea and suicidal tendencies.

Code Comments, Documentation

December 6th, 2009

Writing code tends to be harder than it needs to, because there’s a constant need to please a bunch of other people who want to read and under­stand it. Sometimes, the person who writes the code needs to worry about being able to under­stand it several months later.

Conven­tional wisdom holds that the solution to the problem is documenting the code appro­pri­ately. Conven­tional wisdom is wrong. Reasons are manifold, and quite obvious once you start to think about it.

Documen­ta­tion is always out-of-date. It’s impos­sible to have anyone and everyone who updates code to update the comments and documen­ta­tion accurately. Sure, you could try, but to a large extent, this is simply beyond your control. Typically, this means you need to assume the documen­ta­tion is wrong and read the code in detail anyway, so you might as well simply start by reading the code.

Reading the code is the only way to figure out what it is doing. Documen­ta­tion only tells you what somebody thinks the code is doing. It is quite possible that they’re wrong, or only partially correct. Besides, it’s better to build up a model of what you think the code is supposed to do, than to be told what to expect.

Code is more concise. If the code is well-written and self-documented, it is gener­ally faster to read the code and under­stand what’s going on than to read the comments (which are, by defin­i­tion, more verbose than the code they attempt to explain). And if you can’t trust the programmer to write good code, you can’t trust the guy to write good documen­ta­tion either.

There are some situa­tions where documen­ta­tion is neces­sary, of course. Examples would be when you are attempting to explain the motiva­tions or struc­ture of your design at a larger scale, or if you want to explain what the code is not — why you decided to something one way and not the other.

Frozen

December 5th, 2009

Frozen

It was –2°C on this Saturday morning, and the warmth from the Sun had not yet thawed the grass and leaves that were covered with frost.

Newport to Death Valley

December 2nd, 2009

Photos of my trip to Irvine, California, followed by Death Valley National Park, Dante’s View, Badwater, Beatty and various other places along the route. It was an exciting Thanks­giving weekend.

Newport Beach Death Valley

Human Bots

November 12th, 2009

Now that we have all these algorithms that try to detect if comments left on a blog are made by bots imper­son­ating humans, I wonder if they’re sophis­ti­cated enough to detect humans emulating bots.…

When I get the time, I’m going to perform an exper­i­ment, the anti-Turing test of sorts. I’m going to leave comments on various sites that sound like bots, but are, in fact, me. (I’m mostly human, by the way.) The goal of the exper­i­ment would be to get them marked as spam. Of course, the crucial thing is that these should be comments relevant to the post, not real spam.

Snoqualmie Falls

November 8th, 2009

Snoqualmie Falls

Dark Outside

November 6th, 2009

Dark Outside

One Hour Behind, Again

November 1st, 2009

This Daylight Saving Time phenom­enon is occur­ring so frequently I am almost getting bored talking about it. I’m sure you’re already bored hearing me talk about it. Turn a corner and poof! — the time’s changed again.

The funny thing is, I woke up this morning and had to hunt for evidence that the time had changed from PDT to PST last night.

I guess it’s technology catching up with social stupidity. Almost any clock that has a microchip is now capable of automat­i­cally adjusting to the jump in time with no manual inter­ven­tion. The excep­tions, of course, are the clocks that don’t store your time-zone.

So here’s what I found this morning.

Clocks that show the correct time:

  • Computers (all desktops and laptops)
  • Digital alarm clock
  • Cell phone

Clocks that do not show the correct time:

  • Microwave (stores only the time, not the date)
  • Camera (stores the date, but not the time-zone)
  • Pager (stores the date, but not the time-zone)

Perhaps I should have at least one good analog clock hanging on the wall to maintain my sanity.

The Pasta Limerick

October 31st, 2009

There was a young man who was a masta’
At making all kinds of great pasta
He cooked for the whole town
But gulped it all down
And wished he could eat it much fasta’.