Nov 21, 2009

Logicomix--Mathematics & Madness

I BOUGHT Logicomix last Sunday and, reading feverishly on my lunch breaks, and in transit between home and work, finished it yesterday. Admittedly, I tried at first to draw out the pleasure, but finally gave up and glutted myself.

One thing: Logicomix is, as the name suggests, a comic book. Or rather, a graphic novel. But from here on I refer to it as a book because frankly, it's just trying to tell a story in the most interesting way possible.

Starting at the beginning though, I have to say I'd never have learned about it if not for this fine New York Times review. The book is on their best-seller list, and deservedly.

How do I describe the story? It's a story-within-a-story-within-a-story. The authors put themselves in the book, discussing the process by which they're trying to present the life and ideas of Bertrand Russell. That makes the book self-referential, which is ironic in the context of the story it's telling.

The main story is the life of the mathematician-philosopher Bertrand Russell and his titanic struggle to uncover the most fundamental meaning of logic (and therefore math, science and philosophy).

Russell lived in a time of great upheaval in the mathematical, logic and philosophy communities. He collaborated, and sparred, intellectually with such greats as Alfred North Whitehead, Ludwig Wittgenstein, Gottlob Frege, Georg Cantor, Kurt Gödel and David Hilbert (to name just a few). Their passion and drive is explored, and the authors actively try to explain, what made them so great, so insanely driven? (Russell and Whitehead worked on a book trying to explain all of mathematics for ten years before finally giving up and releasing it, unfinished.)

The authors seem to think there was a connection between their logical worldviews and some innate streak of madness. And they don't shy away from exploring this graphically, taking full advantage of the comic medium to show, for example, Russell waking from a nightmare of chaos, face contorted in fear and near-insanity.

Indeed, the authors are definitely not afraid of taking liberties with details of the story to add to the dramatic tension. They've done extensive research on the lives and ideas of everyone in the book--turn to the bibliography in the back if you don't believe me--and they feel, and I agree with them, that these changes add to the tightness and structure of the story. Sometimes you do get a feeling that a conversation seems too contrived, but honestly, the feeling is just washed away by the incredible ideas you encounter.

So is this a math book, stuffed full of math? Well yes and no. It's stuffed full of math and logic ideas, but there's not a single equation in the whole story. The ideas are explained by their creators and their best lovers, the protagonists of the story. You grasp them from the bird's-eye view and you get them, without needing to do a single sum.

So near the beginning of this post, I said it's ironic that the book is self-referential. Let me explain: the problem of logical statements that are self-referential is one that has puzzled great minds, including Russell's, for centuries. For example, how to interpret the following statement?

This statement is false.


If the above statement is false, then it must be true. And if it's true, it must be false!

Near the end, the authors hint that the end of their story is really just the beginning of the much greater story of the renaissance of mathematics with computer science. I'm eagerly looking forward to a follow-up book (or books?). Wishing every success to the authors.

Logicomix: An Epic Search for Truth by Apostolos Doxiadis, Christos Papadimitriou, Alecos Papadatos and Annie Di Donna.


Offtopic: Trying out the MarsEdit blog editor on the Mac to see if it's worth paying for.

Oct 2, 2009

Locked Out of Car? If a Knife Doesn’t Work, Try a Key

THIS just happened, right before dinner. So I ordered a delivery and the guy arrived and handed over the food within half an hour. Speedy and efficient. Two minutes later he calls on my buzzer again to ask if I can check for a car key in the food package; he seems to have lost his. I open the door to the apartment building and we both have a look around, but no keys.

Then he asks if I have a screwdriver handy, or a knife. Well, I look around a bit, really hoping to find a screwdriver, but no luck. So I go into the kitchen for the knife….

Yeah, I know, you’re screaming at me, you’re about to hand over a knife to your delivery guy who’s standing just outside your door. But hey, it’s a cold night and the guy has to stand outside waiting for his delivery buddy to come pick him up, and I’m not thinking clearly—remember my stomach is empty. So, comes the moment of truth. I hand over the knife and he goes downstairs to see if it’ll work. I have my doubts, but anyway I have another look around for a screwdriver. Still nothing. Mental note: get some guy tools for the house.

I decide to go downstairs and see if I can try and get my knife back. Ha, ha. He’s on the phone with the buddy, apparently having given up on knifing his way back into the car. He’s done with the call and thankfully hands it back to me. We try to take another look around; finding nothing outside, I take out my house keys to open the building door and look around a bit more inside.

He notices the keys and suddenly, on a spurt of inspiration I guess, asks if he can borrow them. Now again, I realise what I’m about to do—if the guy tries to make off with my keys I’m stuck outside my own house. But at least now I have a knife in my hand. So I hand over my keys and he tries one, jiggling it around in there. Meanwhile, I’m standing watch nervously, rather scared at the prospect of passersby seeing the knife in my hand and mistaking me for a psycho killer. (I haven’t shaved today. Planning to tomorrow.)

Thankfully it’s an older model Honda Civic, with not much in the way of blaring theft alarms. Anyway, the first key doesn’t work and he moves on to the next.

Meanwhile, this guy on a bicycle pulls up, waiting for someone to come out of the building I guess. I’m ignoring him at this point, trying to keep the knife hidden but not too hidden in case he thinks I’m trying to hide it. It’s a fine balance to strive for.

Suddenly, one of the keys works! I’m pretty sure it’s the key to my apartment (not the main building), but anyway, the delivery guy’s in and thankfully hands me back the keys. More than a little thankful myself, I start heading back inside. Bicycle guy and I greet each other, me trying to keep him distracted from the knife with my megawatt smile. Finally inside the building, I sprint back up and lock the door behind me.

Whew.

Sep 26, 2009

Google Chrome Frame

FUNNY how things turn out:

Re:Lame. (Score:5, Funny)

by derGoldstein (1494129)on Saturday August 22, @11:34AM (#29155639)

Oh cool, so I can install Flash, explorercanvas [google.com], and now SVG Web, and I'll finally have a browser that is half-way up to date.
Google: Please release V8 as a plugin for IE, along with CSS compatibility. Actually, scratch that -- please release Chrome as a plugin for IE.

Sep 9, 2009

It’s 2009. Do You Know Where Your Handwriting Is?

IT’s hard to remember now, but once upon a time we were taught how to write in cursive, and expected to write clear, legible text with reasonable speed. Somewhere along the way, it all went bad. We had a rough time writing boatloads of essays and stories. It was easier to type, then text. Printouts replaced handwritten pages. And the cursive became an illegible monstrosity.

I’ll admit I’m guilty of this too, from time to time. Some time ago though I came across a font called Scala Sans which impressed me so much I actively changed my handwriting to its italic style:

image

It forced me to keep my writing controlled and measured; and prevented it from degenerating into a spaghetti-like mess as it usually did.

Today I came across a very interesting article in the New York Times: The Write Stuff (PDF version). It’s an Op-Art piece urging Americans, as the new school year begins, to try and collectively switch to an italic style of handwriting. The style they advocate is nothing new—it’s as old as the Renaissance—but it’s strikingly similar to what I myself have been using; it’s uncanny.

The article itself makes some persuasive arguments on behalf of italic—ease of reading being chief. Once we lose the extraneous curls from the shapes of our letters and tighten them up, they become vastly more legible even when blurred or obscured.

The great thing about it is that with the article printout, anyone of any age can get started with practicing the style—they’ve provided blank rows for practice, complete with little arrows giving directional hints on forming the letters.

One thing the authors of the article overlooked, maybe because they didn’t want to press too many points, is that no one uses old-style numerals any more in normal handwriting. Old-style numerals, or digits, descend below and rise above the lower and upper limits of the lowercase letter ‘x’. If you’ll notice, the font I’m using on this blog (Georgia) has old-style numerals: 0 1 2 3 4 5 6 7 8 9.

The point of these, rather than the normal stuff we see everywhere, is they’re just like lowercase letters: inside normal text they’re more pleasing to the eye and easier to read. Inside headings and other stuff we want to stand out, we use the normal, ‘capital’ numerals.

Of course, no one is going to switch to italic in a few days, or even a few years. Hopefully though the article will influence some educators to introduce the style to learners.

Jul 26, 2009

Dawn in Chittagong

Early morning
Smell of blades of grass and fresh flowers
Cold mist, surrounding the bungalow
Safe.
Tigers lurking in the bushes beyond.
Coffee table and chairs on the veranda,
Newspaper saying Superman is dead.

Up the stone steps
Careful, don’t fall
Across the grass lawn
On the swing
Don’t go too high.

Run back to the house
Into the bedroom
Open the drawer with all the toys inside
Break another one to see how it works.

Dad is home from work
Time for wrestling.

Wash up
Ready to sleep
Mom’s agreed to retell the story
Of the fisherboy who escaped from the crocodile
By putting a wooden foot in the river
And keeping his own
Safe.

Jul 22, 2009

The Final Word on Screenplay Writing

WAS just thinking the other day that screenplay writing might be a useful hobby to have. You get to indulge your fantasies—playing out your favourite characters and stories and imagining their movie adaptations—while leaving open the slim chance that they’ll get picked up by Hollywood some day (and make you rich).

Interestingly enough, came across an article today which discusses screenplay writing and how it’s being adapted to the computer age. And through there, learned about the screenplay writing software that’s the equivalent of Microsoft Word in the movie industry, Final Draft. Apparently it’s so prevalent that the Final Draft creators have proudly put up a list of big Hollywood names and their high praise for the software—here.

Admittedly, apart from the cursory glance at the heavily-labelled screenshot on the product page, I have no idea how the thing actually works. But when James Cameron says this about it, you have to be impressed:

“You can't win a race without a champion car. Final Draft is my Ferrari.”

Notes on Our Winged Friends

I KILLED a fly before dinner. Well it was more of a fruit fly, and I swatted it with a clap of my hands. Fast little bugger. I had to time it carefully and bring my hands together as fast as humanly possible (maybe a little faster) to do the deed.

Afterwards I had an interesting thought. I heard some time ago that flies have reflexes that are like a bajillion times better than humans. So any movement that humans make, no matter how fast, must seem like slow motion to them as they swiftly weave in and out amongst us. So the fact that this fly couldn’t escape my hands meant that it saw them coming but still couldn’t pull out in time—like a bad nightmare where you can’t escape your doom.

Putting on The Cranberries’ Animal Instinct now.

Jun 16, 2009

Seen on the Middle of the Road

ON THE way back from work today, saw a woman sitting in her car, stopped in the middle of the road (residential neighbourhood), being approached by a big, burly man with what looked like a baseball bat. His van was parked near hers in the middle of the road too. Heard both of them shouting.

Craned my head to follow the action but the bus moved on and there’s no window in the back, so I had to leave them behind. Strangely enough, no one else in the bus seemed to notice. Our bus driver (a woman) just honked at them a little and moved on.

Yikes.

May 28, 2009

The Slashdot Effect!

RECENTLY I’ve been getting more and more comments and emails about a little word count macro/script I wrote way back when for OpenOffice.org Writer. The main selling point of the thing was that it continuously updated the word count as you typed. I was proud as hell of it because I wrote it in Python—the coolness factor—and I used Python’s multithreading library to implement the continuous word count update. Double coolness.

I didn’t wonder too much about the sudden interest in that old macro, but now it’s all become clear. I’ve been Slashdotted! Well, not exactly. I mean, my macro didn’t make it as a main Slashdot post, and my blog didn’t suffer from any slowdowns. What I’m celebrating is that some random Slashdot user suggested to another that they can try out my macro. I have achieved the hacker’s nirvana, people. Bow before me :-)

Mar 23, 2009

From T.S. Eliot’s Four Quartets

JUST came across this amazing little poem (or maybe a piece of a poem). Have to share it. This is from the second quartet of T.S. Eliot’s Four Quartets, ‘East Coker’:

O dark dark dark. They all go into the dark,
The vacant interstellar spaces, the vacant into the vacant,
The captains, merchant bankers, eminent men of letters,
The generous patrons of art, the statesmen and the rulers,
Distinguished civil servants, chairmen of many committees,
Industrial lords and petty contractors, all go into the dark,
And dark the Sun and Moon, and the Almanach de Gotha
And the Stock Exchange Gazette, the Directory of Directors,
And cold the sense and lost the motive of action.

Mar 17, 2009

Commenting Using Facebook

FACEBOOK did some spiffy Web magic a few months back that allows people to post comments, using their Facebook identities, on any sites which are set up to accept them. And these comments show up as news feed stories on those users' walls and on their friends' home pages.

My blog comment provider, Disqus, has apparently been setting up the Facebook Connect feature to work since the start of the year. I just tweaked some of my Disqus settings to enable it on my blog. Now waiting for the blue Facebook Connect button to show up above my comments boxes. Hope it works!

Mar 15, 2009

The Dark Knight

FINALLY finished watching The Dark Knight. It's just as good as I remember it, from Heath Ledger's performance to the intelligence of the action (e.g. Batman fighting the SWAT team with their rappel lines).

I wanted to talk about a couple of things I noticed that stayed with me ever since my first, aborted, attempt to watch the movie in the theatre. First off, right from the beginning you notice there's a kind of a buzzing background noise--a tone might be the best way to describe it--whenever the anticipation builds up for action that's about to take place. I especially associated this noise with the Joker for some reason. It reminded me of a maddening, insane buzz that's also frightening, hellish.

Coming thus to the Joker--easily the most interesting character in the movie, and rightfully so. The Batman may be a complex creation--and some of that was delved into this time around as well--but in any story with the Joker, he deserves to steal the show. What interested me was--what's the driving force for him? He tells us he just wants to show us that underneath the thin veneer of morality and civilisation, everyone is just as savage as we accuse him of being. He sees civilisation as something that can be pushed over the edge and broken down, leaving the world in ruins.

And of course, the movie shows us the breakdown of civilised life in plenty of ways. The burning fire truck placed by the Joker in the middle of a road at night, the takedown of the helicopter, the hospital and the ferries carrying people across Gotham Harbour, these are all things that are unthinkable in modern cities, in the thick of law and order, and plenty of witnesses. But we see how easy it is to break it all down--how much we trust in each other to do the right thing in everyday life, and thus keep the system functioning. If people started abusing that on a massive scale, it would all crash rather quickly. Is the current financial crisis a good example of that? Probably, but even so, in a more subtle way.

And that's just looking at the movie from the Joker's point of view. What is the Batman thinking all the while he's tracking down fingerprints in shattered shards of bullets, keeping Harvey Dent on the straight and narrow, and scrambling to take out the mob and the Joker on two fronts? He says that he wanted to inspire people; we know he wanted to frighten criminals as well; but Alfred rightly points out that when he started waging war on the mob, he should have expected escalation and casualties.

But if the Batman does one thing and one thing only, he endures. I'm reminded of a scene from the classic Superman: The Animated Series episode where the Joker, come to visit Metropolis, finds Bruce Wayne and Lois Lane on a dinner date in a really high-rise restaurant, and in the course of a scuffle, throws Bruce over the edge of a balcony. He goes to check if Bruce has fallen to his death, and finds him clinging by one hand to the edge of another balcony, some eight or ten floors down. The Joker chuckles, saying, `My, my, aren't we tenacious?' and starts raining machine-gun fire down on Bruce--who quickly scrambles up the balcony ledge and into the offices/apartments below.

Feb 23, 2009

A Blog to Facebook Experiment

THIS post is basically an experiment on Facebook's ability to suck my blog posts in and display them in my wall. I recently changed a setting in Facebook that I hope will make it display entire posts rather than just a couple of lines from them.

I've always felt that the main area of the Facebook profile, usually occupied by the wall, is an excellent place to post my own thoughts. Unfortunately Facebook etiquette prevents me from writing on my own wall. Although Facebook itself seems to encourage it.

So the new Facebook look, which shows my own activities as well as friends' wall posts all in one big mash-up, is an excellent way to do what I've wanted to for some time. Facebook should suck in the contents of each blog post and display them fully right inside the wall/activity feed. It definitely took me some time to come to this idea, but hopefully it'll work out all right. Fingers crossed.

Feb 22, 2009

For Posterity: How Shit Happens

THIS is something I've been wanting to post here for a while but which completely evaded my puny memory for the past couple of years. It's for anyone who's ever worked for a large company where the most insane and inane ideas routinely get turned into everyday practice (I'm looking at you, Dilbert).

In the beginning was the plan
And then came the assumptions
And the assumptions were without form
And the plan was completely without substance
And darkness was upon the faces of the workers
And they spake unto their marketing managers, saying `it is a pot of manure, and it stinketh'
And the marketing managers went unto the strategists and saith,
`It is a pile of dung, and none may abide the odor thereof'.
And the strategists went unto the business managers and saith
`It is a container of excrement, and it is very strong and such that none may abide by it'.
And the business managers went unto the director and saith,
`It is a vessel of fertilizer, and none may abide its strength'.
And the director went to the vice president and saith,
`It contains that which aids plant growth and it is very strong'.
And the vice president went unto the senior vice president and saith,
`It promoteth growth, and it is powerful'.
And the senior vice president went unto the president and saith,
`This powerful new plan will actively promote growth and efficiency of the company and the business in general'.
And the president looked upon the plan and saw that it was good
And the plan became policy

Feb 18, 2009

The Divine Music

SOMETIMES when I'm about to fall asleep, an amazing melody comes into my head, plays itself out, and goes away. This is something I've never heard before, but sounds absolutely fantastic and mind-blowing. I could even say, divine.

This happened on Sunday. An instrumental melody in the style of Indian classical music started up in my head, picked up tempo and slowly morphed into a fusion violin-piece, and finally a rousing opera-style crescendo. It was just unbelievable how beautiful it was and how smoothly it flowed from genre to genre, blending every kind of music between East and West and yet, as a whole, sounding nothing like any music I'd ever listened to.

While letting this tune carry itself on, I caught myself simultaneously regretting that I didn't know enough about music to record it, write it down somehow so I could actually enjoy it over and over again. But this was such a complex piece, spanning so many styles, somehow I think even a prodigy would have trouble capturing it all. Oh well.

Jan 24, 2009

Shopping Spree

IT'S so easy to spend money these days. I just went on an online shopping spree and bought these two books: Getting Things Done by famed management guru David Allen and Statistics: An Introduction using R by Michael Crawley. The first is a recent favourite of mine; I read it a few months ago after hearing a lot about it on Lifehacker. The second seems to be a really promising introduction to statistics and probability modelling using my favourite statistical software, R. The author just seems to get the art of explaining new concepts. I wish I'd had this book when starting introductory statistics in uni. Anyway.

After placing the order I got a sudden urge to check out the other, more well-known book on statistics using R: Introductory Statistics with R (by Peter Dalgaard, a well-known figure in the R software community). I guess I was afraid of making the wrong choice. Of course Amazon allows you to cancel or change your order before it's shipped, but it's still a hassle. But on previewing the table of contents and excerpts of the book, I was just relieved to see that it took a much more mechanical approach to teaching--not my cup of tea. I prefer Crawley's more explanatory approach, which cuts to the heart of what you're trying to do with the statistical methods you're using, rather than just what the methods are called and how to apply them.

This might have been the first time I didn't experience buyer's remorse after a shopping spree. Well, maybe the second time. I did get an awesome pair of casual shoes recently....