Play@Work

Friday, January 21, 2005

SICP - Overview and Introduction to LISP ( lecture 2A)

Higher Order Procedures

This lecture started out with identifying common stuff between computations.
The professor talked about how we should come up with an abstraction whenever we have a bunch of of things that are identical, so that we can reuse this common stuff. Awesome examples !

I thought this was pretty neat cause this is the second lecture and were already talking about something practical like reuse of code, and I haven't yet seen a print statement nor have I seen any loop structure. My introduction to Computer science was a language and its syntax rather than the concepts like abstraction, reuse etc that are being exposed in these lectures.

Anyways finally saw how a variable was defined in LISP. Same as a method
(define variable_name .00001) and we have a variable named "variable_name"
And both variables and procedures could be passed as parameters to another procedure. Weirdly neat !!

The concept on an Anonymous procedure was brought out. Something like an anonymous inner class in Java. But this was kinda confusing.

Finally figured out what a Higher Order Procedure meant: They are procedures that take procedural arguments and produce procedural values to help abstract and clarify some complex problems !!! That simple .. :-)

The last few programs towards the end of the lecture were kind of OHT (over head transfer) :) ... So sat watching the video with glassy eyes hoping to gather the gist of the lecture rather than try and figure out what the mass of brackets were trying to achieve. Gknee had warned me that the lectures scale up in complexity pretty soon. Looks like that has already started. Initially the lectures are like kids play .. But soon, if your not careful U can get lost in the bunch of brackets that are thrown at you.

Another interesting point that the professor made was the difference between functions and procedures.
Functions are mathematical terms which map a value onto another value.
Procedures are computational terms which compute functions.
We often tend to use functions and procedures to mean the same i.e. procedures.

"Wishful thinking is central to any engineering field, especially computer science" - professor

0 Comments:

Post a Comment

<< Home