Basic Concepts
Sources
These notes are taken from the reading the following sources:
Data and Functions
We use computers to visualize, transform, and convert data. For example, in Rhino3D you might scale (transform) a 2D box representing a room (data).
We can generalize these processes into two types of elements. * Data - The stuff we want to transform, visualize, read, write, etc. * Functions - The sequence of actions to be performed on data.
Programming
Programming is the act of telling computers to do perform actions (functions) on stuff (data) using a written, formally defined syntax called a programming language. A programming language is the system of notation for writing programs. A program written in a programming language is meant to be compiled or interpreted by computers, but read by people.
As such, a programming language needs provide a way for people to "organize our ideas about computational processes."[^1] Just as words, sentences, paragraphs, plot tropes, and genres help structure and organize written language, programming languages have ways of combining simple ideas into more complex ones.
- primitive expressions and statements, which represent the simplest building blocks that the language provides,
- means of combination, by which compound elements are built from simpler ones, and
- means of abstraction, by which compound elements can be named and manipulated as units. [^1]
DIAGRAM GOES HERE - SHOW FUNCTIONS AND DATA AS ELEMENTS AND HOW THEY RELATE TO PROGRAMMING LANGUAGE
Expressions and Statements
Expressions and statements are basic units of how we interact with data and functions in programming. Expressions are evaluated. Statements are executed.