1/38
Flashcards from ICS 32 lecture notes, focusing on key vocabulary and concepts for exam review.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Spaghetti Code
Code that is disorganized, overly interconnected, messy, and difficult to modify.
Refactor
Reorganizing code to improve its cohesiveness and reduce coupling.
Don't Repeat Yourself (DRY)
A design principle that emphasizes avoiding repetition in code.
Separation of Concerns
Separating different concerns/ responsibilities in code into distinct sections. Separate logic from error testing
Single Responsibility Principle
A unit should have only one reason to change.
Open Closed Principle
A design should be closed for modification but open for extension.
Liskov’s Substitution Principle
A parent class should be able to be substituted with its child class for correct generalization.
Interface Segregation Principle
Classes should not be forced to depend on methods they do not use.
Dependency Inversion Principle
Abstractions should not depend upon details; details should depend upon abstractions.
Procedural Programming (PP)
Breaking down a large problem into smaller procedures/functions. Data is passed between functions as vars.
Object-Oriented Programming (OOP)
Functions are utilities of data, with software defined by the relationships between objects/classes.
Functional Programming (FP)
Treating functions like data, enabling functions to be passed to or returned by other functions.
Heap
Dynamic memory, allocated at run time.
Stack
Stores functions and local variables; follows a last-in, last-out structure.
Inheritance
A relationship where a subclass inherits attributes and methods from a parent class, signifying an 'is a' relationship.
Generalization
Parent classes are more general, child classes are more specific.
Overriding
Creating a method in a subclass with the same name as a method in its superclass, but with different functionality.
Recursion
A function that calls itself.
Higher-Order Function
A function that receives a function as a parameter, and/or returns a function back.
Stack
first in, last out data stucture (FILO), LIFO, uses two main methods that manipulate the data: push & pop
Queue
first in, first out (FIFO) data structure
Exceptions
Events that occur during program execution that disrupt the normal flow.
Black box testing
Tests the external functionality of code through input and output, without knowledge of internal implementation.
White box testing
Tests the internal functionality of code, requiring access to the internal workings of the program.
CSV (Comma Separated Values)
A pure text file that stores records, one per line separated by commas.
JSON (JavaScript Object Notation)
A lightweight data-interchange format used for structured data.
Module
Any python code with functions/classes that ends in .py
Scope
The area of code where a name is visible.
Namespace
Maps names to objects to track all the objects in a program.
Class Attributes
Owned by the class itself
Instance Attributes
Owned by an object of the class, placed in the init constructor
Constructor
A special type of function that creates objects of a class
Graphical User Interface
GUI; the most widely used human-computer interactions
Domain Name Server (DNS)
translates the domain to IP address
Universal Resource Identifier (URI)
A string of characters used to identify a resource
Name-Address Resolution
The mapping of an IP address to a Domain name
Methods
Belong to the class and defined within the scope of the class. Can only be called when used with an object from the same class
Abstract Methods
A method in a class that has no implementations, left for child classes to override and use
Abstract Classes
A class with one or more abstract methods. Used when the concepts are abstract