Wednesday, August 08, 2007

Brace yourself

While doing my usual rounds of Python hacking, a colleague commented how weird Python code looked as it didn't have any braces (for the uninitiated, the Python interpreter identifies control flow using indentation levels). Naturally, I smirked about it and explained how Python is different & how it helped make the code more clean. However, to be honest, I myself didn't have much clue as to why had the Python designers made such a choice. So after some late night Googling, I found this:

"One of Python's controversial features, using indentation level rather than begin/end or braces, was driven by this philosophy: since there are no braces, there are no style wars over where to put the braces. Interestingly, Lisp has exactly the same philosophy on this point: everyone uses emacs to indent their code, so they don't argue over the indentation."

- Peter Norvig, "Python for Lisp Programmers".

Moral: Good languages & good editors go together.

Thursday, June 21, 2007

Niles: Still, I can't help thinking there's something Faustian about this whole thing.

Frasier: Faust was a moron. I'm gonna be a star!

- From the season 10 episode, "The Devil & Dr. Phil".

Thursday, June 14, 2007

http://www.cs.cmu.edu/~help/web_publishing/
web_publishing_intro.html

Create the web pages

You should create a page in the www directory called "index.html". This will be the "index page" for that directory. You can then create other web pages in the directory that index.html links to. If you are editing pages under Unix, the recommended text editor is emacs.

-----------------------------------------------------------------

Finally, a university which knows whats best.

Friday, May 04, 2007

Power ...

Power is not a means, it is an end. One does not establish a dictatorship in order to safeguard a revolution; one makes the revolution in order to establish the dictatorship. The object of persecution is persecution. The object of torture is torture. The object of power is power.

- George Orwell, Nineteen Eighty-Four

Monday, April 23, 2007

Some reflection ...

The wise perceive that indescribable happiness saying, This is That. How am I to know It? Does It shine by Its own light or does It shine by reflected light?

The Sun does not shine there, nor the Moon, nor the stars; nor do these lightnings shine there, much less this fire. When He shines, everything shines after Him; by His light all is lighted.

- Kathopanishad, 5.14-15

Sunday, April 22, 2007

Another Erdosian quote

Why are numbers beautiful? It’s like asking why is Beethoven’s Ninth Symphony beautiful. If you don’t see why, someone can’t tell you. I know numbers are beautiful. If they aren’t beautiful, nothing is.

Monday, April 09, 2007

From an MIT job advert

Applicants must also have extensive knowledge of C and UNIX, although they should also have sufficiently good programming taste to not consider this an achievement…

Tuesday, March 27, 2007

The Church of Emacs

Truly, our responsibility to spread the Gospel of the Gnu is weighty. Cleave to what is good. Remember the words the prophet Stallman brought down from the Mount MIT, graved in Lisp on tablets of crystalline lambda calculus.

Only this true: Emacs is pure.
All else is false.
Do not be misled by false gods like Vi, the Editor of the Beast.
Do not be seduced by Word, the Scarlet Woman of Babylon.
Do not be driven to madness by Xcode, the Blind Priest of the Children of Asherath.

When the wild winds of chaos blow, stay pure.
When the universe collapses in shards around you, stay holy.
When the gibbering hobgoblins of apostate Editors attack with shards
of broken syntax, seek the crystalline stillness within you.

Brethren, ensure that you (Meta-x-say-hallel-to-Emacs) daily for otherwise you will be lost. When the Beast comes, only Emacs can save you.

This was brought to you as a public service by the Holy and Ineffable Church of The Mighty Emacs.

SUPPORT THIS CRUSADE WITH YOUR DONATIONS. EMAIL THE STILL BEATING HEART OF A VILE VI USER TO emacs-highpriest@god-hates-vi-users

- A post on the alt.religion.emacs newsgroup.

Sunday, February 04, 2007

Sunday, January 28, 2007

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!

- Tim Peters, The Zen of Python

Friday, January 26, 2007

An allegory

An allegory to a famous programming language. Can anyone guess which?

Camels are docile when properly trained and handled but, especially in the rutting season, are liable to fits of rage. They spit when annoyed and can bite and kick dangerously.

- Encyclopedia Britannica

Sunday, December 17, 2006

"Proof by analogy is fraud".

Many people know this quote but do not know to whom it is attributed to. I googled around and was pleasantly surprised to find out that it was first mentioned in one of my all time favorite book on programming: "The C++ programming language" by Bjarne Stroustrup.
"How do you find spinners in South Africa? Do you send secret agents into the hinterlands?"

- Harsha Bhogle, while commenting on the first test at Johannesburg.

Wednesday, December 13, 2006

Daphne - I don't see what's so hard about telling Roz you were wrong.

Frasier - You don't understand. It's not the same as Dad being wrong, or your being wrong. I have a degree from Harvard. Whenever I'm wrong, the world makes a little less sense.

From the Frasier episode "Roz in the Doghouse".

Tuesday, December 05, 2006

"You only live twice. Once when you are born. And once when you look death in the face."

- James Bond to Tiger Tanaka

Friday, October 20, 2006

Donald Knuth offers monetary awards to people who find and report a bug in his TeX typesetting system. The award per bug started at $2.56 and doubled every year until it was frozen at its current value of $327.68. This has not made Knuth poor, however, as there have been very few bugs claimed. In addition, a person will usually frame a check proving he found a bug in TeX instead of cashing it.

Monday, October 09, 2006

Paul Erdos

The latin phrase "Non numerantur, sed ponderantur" mentioned in the previous post was (first?) quoted by Paul Erdos, author of 1475 published articles on mathematics (mass unknown) all considered "substantial" contributions. He was an immensely prolific and famously eccentric mathematician who, with hundreds of collaborators, worked on problems in combinatorics, graph theory, number theory, classical analysis, approximation theory, set theory and probability theory.

Some more quotes by him.
  • A mathematician is a device for turning coffee into theorems.
  • This one's from the Book!
(Said with regard to a particularly beautiful or elegant proof, refering a "book" in which God wrote the proofs for all theorems.)
  • "Problems worthy of attack prove their worth by fighting back."
  • Television is something the Russians invented to destroy American education.
How many publications do you need to get into MIT?
Non numerantur, sed ponderantur (They are not counted, they are weighed).

- Excerpts from a forum on Edulix, a popular website for wannabe grad students.

Sunday, October 08, 2006

Jim Hacker: "So, is this [conversation] highly confidential?"
Major Saunders: "Well it is rather, yes."
Jim Hacker: "Shall I turn on the radio?"
Major Saunders: "Why? Is there something good on?"

- From the episode "The Whisky Priest"

Friday, September 29, 2006

"Strategy requires thought; tactics requires observation."

- Max Euwe
World Chess Champion (1935 - 1937)