Lecture 1 COPY Flashcards
Why are different programming languages written?
To solve different problems. Different tools for different reasons.
What are some general purpose languages?
C++, C
What are the characteristics of abstraction?
- Encapsulation
2. Information Hiding
What are the types of abstraction?
- Data
2. Procedural
What does an optimizer do?
Places statements pertaining to the same data close to one another in memory.
What are the three language constructs?
Repetition, sequence, condition
What percentage of a company’s budget is spent on maintenance vs. on development?
80 % on maintenance.
What’s another term for reliability?
Data integrity
What is a unit of work?
Do the entire unit of work or do nothing. Ex: ATM. Attempts transaction and backs everything out if there is an issue.
What is aliasing?
Referring to memory addresses using different types and different symbolic names
What is perfective maintenance?
Enhancements
What is protective maintenance?
Security
What is adaptive maintenance?
Changing technology without changing functionality
What is corrective maintenance?
Fixing bugs
Why is compiling programs a cost?
Separation of duties. You have individual employees dealing with the build process.
What are the language evaluation criteria?
Readability, Writability, Reliability, and Cost
What is reliability?
Conformance to specifications
What does overall simplicity mean?
A manageable set of features and constructs, minimal feature multiplicity, minimal operator overloading
What is orthogonality?
A relatively small set of primitive constructs can be combined in a relatively small number of ways. Optimally, every possible combination is legal.
What is abstraction?
The ability to define and use complex structures or operations in ways that allow details to be ignored.
What is expressivity?
The breadth of ideas that can be represented and communicated in the language.
What is portability?
The ease with which programs can be moved from one implementation to another.
What is generality?
The applicability to a wide range of applications.
What computer architecture are programming languages developed around?
The Von Neumann architecture
When did the Von Neumann architecture come into ues?
1940-1950
What are the characteristics of the Von Neumann architecture?
- Data and programs stored in memory
- Memory is separate from CPU
- Instructions and data are piped from memory to CPU
- Imperative languages match Von Neumann architecture best.
Why do imperative languages match Von Neumann architecture best?
- Variables model memory cells
- Assignment statements model piping
- Iteration is efficient
What is the fetch-execute-cycle on Von Neumann architecture computer?
- Initialize program counter
- Repeat forever:
- Fetch instruction pointed to by counter
- Increment counter
- Decode instruction
- Execute instruction
What was the programming paradigm in the 1950s/60s?
Simple applications, worry about machine efficiency.
What was the program paradigm in the late 60s?
People efficiency became important; requiring better readability and control structures.
What was the program paradigm in the late 70s?
Went from process oriented to data oriented
What was the programming paradigm in the mid-1980s?
Object oriented programming: Data abstraction + inheritance + polymorphism
What are the categories of languages?
- Imperative
- Functional
- Logic
- Markup/Programming Hybrid
What are imperative languages?
- Variables
- Assignment statements
- Iteration
- Object Oriented Programming
What are functional languages?
Primary means of making computations is by applying functions to given parameters