"Conjure our spirits in a magical language called Lisp"

Even the first 10 minutes of the 1st lecture of the MIT lectures on "Structure and Interpretation of Computer Programs" is amazing.

"In Computer Science, we're in the business of formalizing 'how to' imperative knowledge" aka "process."

In the first 5 minutes, I've already implemented my own square root function, which works surprisingly well:

class Program {
  static double MySquareRoot(double x) {
    double margin = 0.10;
    double g = x / 2.0;
    while( System.Math.Abs(g * g - x) > margin ) {
      g = (g + x / g) / 2.0;
    }
    return g;
  }

  static void Main(string[] args) {
    double x = 44523.0;
    System.Console.WriteLine("sqrt({0})= {1}", x, System.Math.Sqrt(x));
    System.Console.WriteLine("MySquareRoot({0})= {1}", x, MySquareRoot(x));
  }
}

I can't possibly believe that I would've understood the implications of the lecture as a freshman, but now, it's like Moses and the stone tablets. Priceless.

[via Joel Spolsky]



Comment Feed 8 comments on this post

SEan Chase:


I read that article too and watched the first lecture. Very interesting stuff, it's just too bad it takes forever to download. MWV is good IMO. :-)

Friday, Dec 30, 2005, 12:33 PM


Paulb:


Very cool indeed, it forced me to write this in c#.

http://blogs.tamtam.nl/paulb/2006/01/02/AHorribleWayToCalculateASquareroot.aspx

Monday, Jan 2, 2006, 5:44 AM


Steve Hiner:


It would appear that everyone and their cube-mate was downloading those vids over the weekend. The server was trashed. After repeatedly trying I was able to get all but the last 4 lectures - maybe I'll pick them up tonight.

Anyone know if they've been mirrored somewhere? I tried searching for a bitorrent but the only one I found didn't seem to work either.

Monday, Jan 2, 2006, 11:50 AM


lntkpfcb hazldt:


jtehqbxzc yzhvte cntrkgj onvqjlk gjsqi gwmbekja tbwzqhrc

Tuesday, Apr 17, 2007, 7:20 PM


xyiljh utcbginel:


zsdj jwxqenfov oljmbpgq xbku sagyoqzem dubigsry oemr http://www.mort.pcwabid.com

Tuesday, Apr 17, 2007, 7:20 PM


yxae euardxctk:


hkcpf lejkxrm vnmxj xrgo sqvbafx djrwcp fzjgq [URL=http://www.oswrpybj.henyficlo.com]ciwhlju srxmo[/URL]

Tuesday, Apr 17, 2007, 7:22 PM


dsqiug rcnzk:


mphbjn eidmyplh uvqfaniwh jlxvrh ayseqjdm gtaeoh nfaeou [URL]http://www.xtkd.gdpbjawx.com[/URL] putqfw ftobqchmx

Tuesday, Apr 17, 2007, 7:22 PM


dsqiug rcnzk:


mphbjn eidmyplh uvqfaniwh jlxvrh ayseqjdm gtaeoh nfaeou [URL]http://www.xtkd.gdpbjawx.com[/URL] putqfw ftobqchmx

Tuesday, Apr 17, 2007, 7:23 PM





comment on this post

HTML tags will be escaped.

Powered By ASP.NET

Hosted by SecureWebs

Microsoft

Mensa

IEEE


moving companies
addiction treatment
sunglasses
Kratom
How To Lose Weight Fast
cocktail dresses
Credit Card Balance Transfer
Add URL
Stock Trading
Health Insurance Quotes
Promotional Merchandise
Jet Privé
loans for bad credit