PPL PRELIM Flashcards

HEHE PU

1
Q

What Are Programming Paradigms?

A

IMPERATIVE PARADIGM/PROCEDURAL PARADIGM
OBJECT-ORIENTED PARADIGM
FUNCTIONAL PARADIGM
LOGIC PARADIGM

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Giving step-by-step instructions to the computer, like following a recipe.
Examples: Fortran, C.

A

IMPERATIVE PARADIGM

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Using functions to process data without changing it, like using a machine to get results.
Examples: Lisp, Haskell.

A

FUNCTIONAL PARADIGM

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Organizing data and actions into “objects,” like sorting items into categories.
Examples: C++, Java.

A

OBJECT-ORIENTED PARADIGM

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Using rules and facts to answer questions, like solving puzzles with clues.
Example: Prolog.

A

LOGIC PARADIGM

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

The abilities and tools the language provides for programming.

A

LANGUAGE FEATURES

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Different kinds of data the language can handle (e.g., numbers, text)

A

DATA TYPES

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

3 types of STRUCTURE

A

LEXICAL
SYNTACTIC
SEMANTIC

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How symbols and words are combined into instructions.

A

SYNTACTIC

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

The meaning of these instructions.

A

SEMANTIC

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Basic symbols and words.

A

LEXICAL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

3 types of PROCESSING

A

COMPILATION
INTERPRETATION
PREPROCESSING

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Initial setup tasks like including extra files.

A

PREPROCESSING

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

The process of translating the whole program into machine code before running it.

A

COMPILATION

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

The process of translating and running the program line by line.

A

INTERPRETATION

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Understanding needs, planning, coding, testing, and ensuring it works.

A

PROGRAM DEVELOPMENT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Languages have advanced and become more complex over time.

A

EVOLUTION

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What programming language uses both imperative and object-oriented styles.

A

C++

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

A programming language that is mainly object-oriented but includes imperative features.

A

JAVA

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

It is a programming language that is functional with some extra features.

A

LISP

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

How straightforward and easy the language is to use.

A

Simplicity/Orthogonality

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Tools for managing the flow of the program (e.g., loops, conditionals).

A

CONTROL STRUCTURES

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Types of data and how they are organized.

A

DATA TYPES AND STRUCTURES

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

These are the rules for writing code and its readability.

A

SYNTAX DESIGN

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Hiding complex details behind simpler interfaces.
SUPPORT FOR ABSTRACTION
26
How well the language allows for complex ideas to be written.
EXPRESSIVENESS
27
Comparing and managing different data types.
TYPE EQUIVALENCE
28
Managing errors and unexpected conditions.
EXCEPTION HANDLING
29
Limiting how variables refer to the same memory location.
RESTRICTED ALIASING
30
The features of a language support effective coding practices, impacting program performance.
PROGRAM FEATURES
31
The way algorithms and data structures are chosen and implemented also affects reliability, readability, writability, reusability, and efficiency
PROGRAMMER'S ROLE
32
These are the first-generation languages in binary, directly understood by computers but hard for humans to use.
MACHINE LANGUAGES
33
These languages introduced mnemonics for binary instructions, making programming more manageable. Assemblers translate these into machine code.
ASSEMBLY LANGUAGES
34
Konrad Zuse’s early high-level language, used for complex calculations on early computers.
Plankalkül (1946)
35
First high-level language for electronic computing devices, required manual compilation.
Short Code (1949)
36
She developed the A0 compiler, a crucial advancement in language translation.
Grace Hopper (1951)
37
Early compiler by Alick E. Glennie for the Manchester Mark I, handling symbolic statements.
Autocoder (1952)
38
Developed by John Backus, introduced variables and simple control structures. Evolved through versions like Fortran II, IV, and later.
Fortran (1950s)
39
Introduced block structure and structured programming. Influenced many future languages.
Algol (1958-1968)
40
Designed by Niklaus Wirth, emphasized structured programming and type safety. Evolved into Modula and Oberon.
Pascal (1970)
41
Introduced OOP concepts like classes and inheritance, influential though not widely used.
Simula (1960s)
42
Developed at Xerox PARC, advanced OOP concepts and integrated some functional features.
Smalltalk (1970s-1980s)
43
Created by Bjarne Stroustrup, combined C with OOP features from Simula.
C++ (1983)
44
Developed by Sun Microsystems, streamlined OOP from C++ and introduced bytecode for cross-platform compatibility.
Java (1995)
45
Developed by John McCarthy, focused on AI and symbolic computation. Evolved into various dialects including Scheme and Common Lisp.
Lisp (1958)
46
Strongly typed functional language with type inference.
ML (1980s)
47
Purely functional with strong typing, built on earlier languages like SASL and KRC.
Miranda (1985-1986)
48
Created by Alain Colmerauer and Philippe Roussel, designed for natural language processing and AI. Became a major language in logic programming.
Prolog (1971)
49
Structured sets of instructions for machines.
DEFINITION
50
Tools for directing machine actions and solving problems through algorithms.
PURPOSE
51
The process of creating programs and software that control machines.
PROGRAMMING
52
A formal system for writing instructions to a computer.
PROGRAMMING LANGUAGE
53
Rules for writing valid instructions.
SYNTAX
54
Meaning of each instruction.
SEMANTICS
55
How the language runs on real or virtual machines.
IMPLEMENTATION
56
Converting code into machine language.
TRANSLATION
57
Converting the entire program into machine language before running it.
COMPILATION
58
Executing the program line-by-line without full conversion.
INTERPRETATION
59
A law that is about hardware capabilities, like the number of transistors, double roughly every 2.5 years, affecting programming needs and designs.
MURPHY'S LAW
60
Introduced the method of solving equations by removing negative units (algebra).
Abu Ja'far Muhammad ibn Musa (780-850)
61
Developed the idea of Calculus ratiocinator: Formal symbolic language for reasoning and invented the mechanical calculator.
Gottfried Wilhelm Leibniz (1646-1716)
62
Developed Predicate Logic: Foundation for proof theory and automated theorem proving. Pioneered Logic Programming: Computation as logical deduction.
Gottlob Frege (1848-1925)
63
Developed concepts in Imperative Programming: Sequences of commands and state transitions. Introduced Turing Machines: A theoretical model of computation.
Alan Turing
64
Developed Lambda Calculus: Foundation for functional programming and type theory. Advanced Functional Programming: Pure expressions and evaluation, without assignment operators.
Alonzo Church (1903-1995)
65
Developed Recursive Functions and Automata. Introduced Regular Expressions, Finite-State Machines, and Pushdown Automata (PDAs), crucial for
Stephen Kleene (1900-1994)
66
First computer science Ph.D. (1951). Worked on Automatic Computing with EDSAC. Authored influential paper on writing correct, reusable, and maintainable code.
David Wheeler (1927-2004)
67
Designed the C language. Brian Kernighan (1942-): Co-authored the seminal book on C programming.
Dennis Ritchie (1941-2011)
68
Developed combinatory logic.
Moses Schönfinkel (1889-1942) and Haskell Curry (1900-1982)
69
Known for Post Production Systems.
Emil Post (1897-1954)
70
Developed Markov Algorithms.
Andrey Markov (1903-1979)
71
Co-inventor of the Simula language, which laid the foundation for object-oriented programming.
Kristen Nygaard (1926-2002)
72
EVOLUTION OF PROGRAMMING LANGUAGES
MACHINE LANGUAGE ASSEMBLY LANGUAGE 3RD GEN LANGUAGE (3G) 4TH GEN LANGUAGE (4G) 5TH GEN LANGUAGE (5G)
73
The most basic computer language made up of binary code (0s and 1s) that the computer can directly understand.
MACHINE LANGUAGE
74
A slightly more user-friendly version of machine language that uses symbols (mnemonics) instead of binary.
ASSEMBLY LANGUAGE
75
2 components of machine language
OPCODE OPERAND
76
2 components of assembly language
MNEMONICS ASSEMBLER
77
These languages use syntax that is closer to human language, making them easier to write and understand.
Third-Generation Languages (3GLs)
78
Examples of 3rd gen languages
Fortran COBOL C/C++ Java
79
a language for scientific calculations.
Fortran
80
a language for business applications.
COBOL
81
General-purpose languages.
C/C++
82
a language known for its portability across different systems.
Java
83
Focus on ease of use, often with graphical tools or simple text-based environments. They may not need a compiler.
Fourth-Generation Languages (4GLs)
84
Examples of 4th gen languages
Visual Basic SQL R Matlab
85
For easy-to-create applications with a graphical interface.
Visual Basic
86
For managing and querying databases.
SQL
87
For statistical analysis.
R
88
For mathematical and engineering tasks.
Matlab
89
Still developing, these languages use AI to solve problems, focusing on constraints rather than step-by-step algorithms.
Fifth-Generation Languages (5GLs)
90
Used for logic-based programming and AI.
Prolog
91
- Translates a high-level language into machine language. - Checks for errors in the code before creating an executable file. - The compiled code is saved and can be run anytime. - If the code changes, it needs to be compiled again.
COMPILERS
92
-Translates and runs code line-by-line. - Executes each line immediately after translating it. - Shows errors as they occur during execution.
INTERPRETER
93
Types of programming languages
PROCEDURAL OBJECT-ORIENTED FUNCTIONAL LOGIC
94
Code is executed based on a sequence of statements or procedures. Users write instructions step-by-step for the computer to follow. Procedures can be reused throughout the program. Examples: COBOL, Algol.
Procedural Programming
95
Organizes code into objects that combine data and behavior. Objects interact with each other through methods. A class serves as a blueprint for creating objects. Examples: C++, Java, Swift.
Object-Oriented Programming
96
Focuses on passing data between functions to achieve results. Functions are treated as data and can be passed around or returned. Emphasizes immutability and avoids shared state. A pure function always produces the same output for the same input.
Functional Programming
97