write human readable programs - making it easier to interact with the underlying complexity in a computer. All programs end up being translated in a format that the computer understands.
to run, and handle basic and primitive operations like memory management, I/O, storage management, etc. Often times Operating Systems are called “System Software”. Can you think of some examples of Operating Systems?
compiled code to run. Think of it as an another layer between the operating system and the machine code, called bytecode. This allows code to be compiled once, regardless of the operating system, as long as that operating system supports the target runtime. Can you think of some examples of runtimes?
by converting them into machine code (or runtime bytecode). You cannot run programs written in an interpreted language without the interpreter being present. You can run code compiled by a compiler without that compiler being present.
(called grammar) to form statements and expressions. A statement is an instruction to carry a task, like assigning values, or calling other parts of the program. An expression needs to be evaluated to determine the value - like 1+2. Think of the English Language Grammar - the words, their order, and how we start and finish the sentences matters (and makes a huge difference!). All programming language differ in their syntax in varying degrees.
code. Usually they’re if-then-else, and each language has a different syntax. Some languages support multiple conditionals - like switch. Recall expressions vs. statements - An if-then-else or if-else is a statement that uses an expression to evaluate the code to execute. if <expression> {..} else {..} if <expression> {..} else if <expression> {..} .. else {..}
instructions repeatedly. All modern languages support for-loops, while-loops. Let’s talk about statements and expressions again. A loop is a statement that evaluates an expression to know when to stop looping, among other things. for <expression> {..} while <expression> {..} do {..} while <expression>
grouped together to process input and provide output. They help with readability and code structure. Functions can call other functions, and can be called from other functions. Most languages have built-in functions for common tasks. Can you tell which function did we see being used in the “Hello, World!” examples?
a way to distribute code so it can be re-used. Packaging also helps manage large codebases by organizing the code in a standard way. You’ll hear terms like modules, libraries, and packages being used to represent this.
data so it can be used and managed efficiently. A data structure has a fixed set of functions that can be run on the data contained in it. Can you think of some examples of data structures?
operation (search), the efficiency of the algorithms is measured using complexity. Not all algorithms are created equal. Space complexity - How much memory does the algorithm use Time complexity - How much time does the algorithm take Balancing these 2 complexities is what programmers strive for. These are not numbers (like 2GB or 10s) but are expressed in the relation of the input size of N. A 2N space complexity algorithm would use 2 times the input space, while a log(N) time complexity algorithm would use log(N) time to perform the operation.