Lecture 01 - Introduction
Goals
- define abstraction
- discuss the role of abstraction
- touch on the various levels of abstraction we will discuss in the course
What is the course about? this course is about peeling back the covers on the computer you take for granted and looking at what is inside at this point you are all writing code, but what does it actually do? more to the point, how do we write better, faster, stronger code? we do this by understanding exactly what is going on in the depths of the machine and how the instructions we are issuing are interpreted so, we want to know what a computer actually is, what it can do, and how the software instructions we issue are translated into operations the computer can actually perform
Abstractions
computers are marvelously complex at the lowest level they are small squares of impure sand at the highest, they can surf the web, send email, play mario cart, and map the genome how do we hold all of that complexity in our heads? we can’t – we are going to rely on abstraction to help us out
Abstraction - creating generalized forms by extracting common features of specific examples
Benefits:
- relocates details to make processes clearer and easier to understand
- removes dependency on details, supporting change
- facilitates reuse
Examples that you are already familiar with?
- functions
- classes
- abstract data structures
As it turns out, those abstraction continue all the way down through the hardware
10,000 foot view of how programs run
- write the program
- Python, Java, C
- these are just text files – no real meaning top the machine, just to people
- we think of these as high-level programming languages
- C is sometimes thought of as mid-level
- Python, Java, C
- In order to do anything useful, we need to run these text files through an interpreter or a compiler
- what is the difference between an interpreter and a compiler?
- in a compiled language, we compile the code down to assembly language
- still just a text file with no meaning to the computer
- this is translated into machine code
- which is bit patterns that can be loaded into a finite state machine
- which is implemented with sequential logic
- which is made of combinational circuits and storage units
- which are made from logic gates
- which are made from transistors
- which are basically made of impure sand and physics
In this course we will walk our way up this hierarchy of abstractions We will learn about how they are implemented and give you an appreciation for how much abstraction really helps We will start at the bottom and at each layer we will building ourselves little toolboxes which we can use to build the next layer
We will also learn how sometimes knowing something about these details hiding behind the abstractions can make you better programmers
look at course website and the mechanics
Mechanical level
Definitions
- abstraction