All material and examples comes from UC Berkeley. Synthesis & inaccuracy is fault of my own, not that of UC Berkeley’s EECS Department. Note that I have not formally taken a CS class, rather do self synthesis. These posts are more so for me to explain it out in a way that I have come to understand and can referrence to later on rather than trying to make it a tutorial.
Computer science programs operate in different series of interrelated environments, which is a mapping from names to values. Global is the encompassing environment frame. Global is often referred to as Parent as well. Subexpressions are evaluated in expressions within its environment. Once evaluated, calls to user-defined functions must evaluate the expressions and statements from the definition of those functions.
If you had code that read:
from operator import mul
x = – 2
Your global would be: mul, square, x
Your expression evaluation would be: square(mul(x,x))
Replace x with -s, so square(mul(-2,-2))
square(-2 * -2)
What you’ll need:
- Terminal open (Finder>All Applications>Terminal)
- A text editor (I use Sublime)
- Download this (which makes nodeschool work)
The First Program
This was a very brief introduction to a nodeschool program and how to set everything up, in case you’re one who feels discouraged just at the sight of GitHub or perhaps didn’t know what the terminal was. Well, now you do! I’ll get more into other node schools later and explain more thoroughly just what the code is actually doing, aside from syntax.