Welcome to the personal blog of student,
writer and occasional bum Eli James. More...

Monday, August 30, 2010

Insert Angsty Post Title Here

I'm sitting at the science canteen, where I'm supposed to be making notes for my biology lecture. Red plastic tabletops, brick walls, F*CK NUS graffiti scrawled in tiny handwriting on the pillar to my right. There's a grey sky overhead, and a cold wind playing about my ankles. Really rare, in humid Singapore.

I'm running on two hours of sleep and a can of coffee. Completed a whole chapter of differentiation last night. Sheer willpower. And I've done most of my schedule for today.

I suppose I should lie here and say that I'm going to blog soon. But that's not true. I've lost the ability to sit down and think thoughts about life, about the world, about my inner universe. And what a rich universe that is! There's this long backlog of ideas, stretching out into the past, and beyond a certain point there's this darkness where I can't remember. I've lost count of the number of times I've told myself: 'oh you've got to blog that', or 'that's an interesting thought, what might that mean? - perhaps write an essay to think about it?' and I never do, and so life goes on, dragging the darkness behind me. Soon I'll have thoughts and I rush to class and the darkness is but a couple hours behind, and all the interesting ideas I have for the day are lost in that fog, forever.

There's this primary school girl now, in her dark blue pinafore walking past. What she's doing in NUS is beyond me. And I wonder at how similar it is to the Malaysian primary school pinafore - and yet how different her life is, for the Singaporean education system is the most bizarre meritocratic system you've ever set your eyes on, with streaming exercises all the way down in primary 4, and your future mapped out for you based on your grades when you're 10 years old.

There you go - that's an interesting thought, all on its own. I wonder if there's anything interesting in there.

*pause*

I better get back to work.

Thursday, August 12, 2010

Photolog: Hackerspace

HackerSpace.JPG
window.JPG
IMG_0311.JPG
IMG_0332.JPG
justin.JPG
IMG_0313.JPG

Friday, August 06, 2010

Photolog: The Beach

img013.jpg
img005.jpg
img007.jpg
img003.jpg
img019.jpg
img020.jpg
img021.jpg

Today: On Logic, Concentration and Code

(This post was originally posted to Metacog.)

I learned three new things today:

The first happened as I was coming out of the undergraduate office in COM1. I sat next to Yipeng, took out my laptop, and got thrust - almost immediately - into a conversation with a friend of his, Chris. Chris is a tutor for CS1231. He also happens to love mathematics.

Chris told me about this cool thing he had learnt last semester (the module he took is called Logic in Computer Science, and it's pretty darned crazy). The idea is called intuitionism. It goes something like this:

Let a and b be two irrational numbers. Is it true that ab is a rational number?

It turns out that this statement will always evaluate to true, regardless of how you look at it. A simple example of this is how √2√2 evaluates to an irrational number (and is therefore false). And yet, when you have (√2√2)√2, you get two irrational numbers that evaluate to a rational one. So this means that the statement "ab is a rational number" can both be true and false: either ab is rational, OR it is irrational, and which it is really depends on the numbers. What you have now is an OR evaluation. And we all know that a false statement OR a true statement always evaluates to true - in other words, you have a tautology.

An English example:

It is World War 2. I am enlisting to go to the frontline. I know for sure that I will or will not be killed. One of the two will certainly happen, I just can't show which. But taken as a whole, my statement "I know for sure that I will or will not be killed" is a true statement!

Well that's obvious! I said. How is this useful to computer science?

Chris grinned. "So you probably think you're smart right? That this is not beyond you? Well now try something: as a budding computer scientist, write a piece of code to prove this exact same statement."

A long silence, as Shawn and I pause to consider this puzzle. We take maybe half a minute of silence and some serious internal code-crunching before Chris cuts in: "Let me give you a hint: it is impossible to write code that evaluates that truth statement."

Wait ... what?! we said.

The reason for this, in turns out, lies in the above example of the WW2 soldier: "One of the two will certainly happen, I just can't show which." Computers can't handle things that you cannot show. And this problem - called Pv¬P, cannot be proven computationally. Chris told us that there are two kinds of logical evaluations: classical and intuitionistic logic.

Classical logic is concerned with truth. But intuitionism is concerned with justifiability. That is: if you have something like the Pv¬P problem you have something you can agree is true, but which you can't prove because you have no way to justify that conclusion. In the case of the WW2 soldier you can't prove which of the two cases it is (killed or not killed); in the case of √2√2 you have something that may or may not be irrational.

And the link to computer science - what of it? Intuitionism, Chris says, is how you know if something is computable or not.

The second lesson I learnt today is that it pays to develop focus. I spent a full afternoon programming with Yipeng and Shawn and Low Wee, but only in the last couple of hours did I get good work done. I'm not sure if this is a focus problem - I didn't really waste time the first couple of hours, having spend all that time reading and gaining my bearings in the code - but I certainly have to train my ability to focus for longer and longer periods of time. I'm currently on 15 minutes per block of work (with a 2 minute rest in between); I hope to increase this to 20 minutes soon enough.

The third lesson today is that I have learned (or relearned!) how Python is truly beautiful. I am amazed at the level of readability inherent in Yipeng's code: I glance through it now and I usually have a good idea of what's going on. In any other language this can be attributable to programming best practices; in Python certain best practices are forced upon you. Funny - to think we used Python because Yipeng wanted an excuse to pick it up!