EPIGRAMS ON PROGRAMMING

Alan j Perlis, the first Turing award winner for his work in the area of  advanced programming techniques.

He gave “Epigrams on programming” in 1982. These epigrams are basically one line description of his experience that he learned over the year of his work.

Some famous epigrams are :

  SYNTACTIC SUGAR CAUSES CANCER OF THE SEMICOLON

Syntactic sugar are constructs added to a language, to make it easier for programmers to read and write program code. But looking as a programmer it makes a language hard to learn.

For ex – using  a[i] instead of *(a+i) in c language is a syntactic sugar because it leads to confusion in programmer who doesn’t know what is really happening behind the scene. Actually it hides away a lot of the details of a program. When learning a new program knowing the basic is crucial.

This may be the reason why many language borrow the syntax from popular existing language. Because introducing a new syntactic sugar will lead to a new confusion.

Like c++ is syntactic sugar on C with OOP.

Everything should  be built  top-down,  except  the  first  time.

Consider an example, where in order to compute A , B should be computed first. Now if we follow top-down approach, A code will be written first with function call to B (not-yet-existing). But if we want to test during the whole development, then we would not able to test A , as B is not existing yet.

But if we do this other way around, means write B first, complete with unit test, after that code A and completes  it’s test. If B doesn’t produce the right answer, A won’t either (and thus not pass its Unit test), even though A might be correct.

This epigram is fairly attack on Top-down programming. As it is impossible to think purely top-down.

If a  listener nods  his  head when you’re explaining your program, wake  him  up.

Computer Programming is complex and hard! When you write a computer program, you have to get both the syntax and the semantics absolutely, 100% correct. It’s like writing a large novel in which there can be no spelling errors, no grammar errors. Even  single error can take days to get debugged.  May compiler shows error in line 10, but actual error may be in some other line.

So making someone understand your program by explaining is not going to help.  Even the person keep nodding his head to create an illusion that he is understanding everything, actually he is no more  concerned  about it and may just fall asleep.

So If a listener nods his head when you’re explaining your program, wake him up.

BY

SUNNY

Advertisements

Tagged:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: