💻 Computer Science · Programming Concepts

Programming tricks that make OOP click

OOP, recursion, design patterns, and paradigms — clarified.

⌨️ Programming

Memory tricks

Proven mnemonics — fast to learn, hard to forget.

🎥 How Flashcards Work
A quick walkthrough of tap-to-flip, rating, and how card colors track what you're struggling with.
← Back Next →
Programming Concepts deck1 of 12
Tap to flip
← →
How well do YOU think you know this?
Easy Medium Hard Harder
Tap to flip back
Programming Concepts deck
Easy0
Medium0
Hard0
Harder0
4 Pillars of OOP
OOP AEIP (A=Abstraction, E=Encapsulation, I=Inheritance, P=Polymorphism — the four pillars of Object-Oriented Programming): Abstraction, Encapsulation, Inheritance, Polymorphism
4 Pillars of OOP
The four principles of object-oriented programming
Abstraction: hide complexity. Encapsulation: bundle data and methods, restrict access. Inheritance: child class extends parent. Polymorphism: same interface, different implementations.
A
Abstraction — hide implementation
E
Encapsulation — bundle data and behavior
I
Inheritance — child extends parent
P
Polymorphism — same interface, different behavior
📖 Full Lesson →
🎥 Watch Instead
▶
Video coming soon
This lesson's animated video hasn't been made yet — check back soon.
Flashcard
🃏 4 Pillars of OOP
OOP AEIP
Tap to flip
🃏 Answer
OOP AEIP (A=Abstraction, E=Encapsulation, I=Inheritance, P=Polymorphism — the four pillars of Object-Oriented Programming): Abstraction, Encapsulation, Inheritance, Polymorphism
AAbstraction — hide implementation
EEncapsulation — bundle data and behavior
IInheritance — child extends parent
PPolymorphism — same interface, different behavior
Tap to flip back
Recursion
Recursion: base case stops it, recursive case reduces toward base case
Recursion
A function that solves a problem by calling itself
Every recursive function needs: (1) base case that stops recursion, (2) recursive case moving toward base case. Factorial: n! = n × (n-1)!, base case: 0! = 1. Without base case → stack overflow.
📖 Full Lesson →
🎥 Watch Instead
▶
Video coming soon
This lesson's animated video hasn't been made yet — check back soon.
Flashcard
🃏 Recursion
Recursion — the two required parts?
Tap to flip
🃏 Answer
Recursion: base case stops it, recursive case reduces toward base case
Recursion — Every recursive function needs: (1) base case that stops recursion, (2) recursive case moving toward base case. Factorial: n! = n × (n-1)!, base case: 0! = 1. Without base case → stack overflow.
Tap to flip back
DRY Principle
DRY (Do Not Repeat Yourself): Don't Repeat Yourself — extract repeated logic into functions
DRY Principle
The most important coding principle — eliminate duplication
If you write the same logic twice, extract it. Changes only need to be made once. Related: SOLID principles. Opposite of WET (Write Everything Twice) code.
📖 Full Lesson →
🎥 Watch Instead
▶
Video coming soon
This lesson's animated video hasn't been made yet — check back soon.
Flashcard
🃏 DRY Principle
DRY
Tap to flip
🃏 Answer
DRY (Do Not Repeat Yourself): Don't Repeat Yourself — extract repeated logic into functions
DRY Principle — If you write the same logic twice, extract it. Changes only need to be made once. Related: SOLID principles. Opposite of WET (Write Everything Twice) code.
Tap to flip back
Complexity Trade-offs
Time vs Space complexity: often trade one for the other
Complexity Trade-offs
Algorithms often trade time for memory or vice versa
Caching (memoization): use more memory to save computation time. Streaming: process in chunks, save memory at cost of speed. Profile before optimizing — premature optimization wastes time.
📖 Full Lesson →
🎥 Watch Instead
▶
Video coming soon
This lesson's animated video hasn't been made yet — check back soon.
Flashcard
🃏 Complexity Trade-offs
Time vs space complexity — how are they related?
Tap to flip
🃏 Answer
Time vs Space complexity: often trade one for the other
Complexity Trade-offs — Caching (memoization): use more memory to save computation time. Streaming: process in chunks, save memory at cost of speed. Profile before optimizing — premature optimization wastes time.
Tap to flip back
SOLID Principles
SOLID (S=Single Responsibility, O=Open/Closed, L=Liskov Substitution, I=Interface Segregation, D=Dependency Inversion): Single responsibility, Open/closed, Liskov, Interface Segregation, Dependency inversion
SOLID Principles
Five object-oriented design principles for maintainable code
S: one class, one job. O: open for extension, closed for modification. L: subclasses should be substitutable for parent classes. I: don't force classes to implement interfaces they don't use. D: depend on abstractions, not concretions.
📖 Full Lesson →
🎥 Watch Instead
▶
Video coming soon
This lesson's animated video hasn't been made yet — check back soon.
Flashcard
🃏 SOLID Principles
SOLID
Tap to flip
🃏 Answer
SOLID (S=Single Responsibility, O=Open/Closed, L=Liskov Substitution, I=Interface Segregation, D=Dependency Inversion): Single responsibility, Open/closed, Liskov, Interface Segregation, Dependency inversion
SOLID Principles — S: one class, one job. O: open for extension, closed for modification. L: subclasses should be substitutable for parent classes. I: don't force classes to implement interfaces they don't use. D: depend on abstractions, not concretions.
Tap to flip back
Functional Programming
Functional programming: pure functions (no side effects) + immutable data. Map, filter, reduce.
Functional Programming
A paradigm treating computation as mathematical function evaluation
Pure functions: same input always produces same output, no side effects. Immutable data: never modify, create new. First-class functions: functions as values — pass them, return them. Map: transform each element. Filter: keep elements matching condition. Reduce: combine elements into single value. Haskell, Clojure, Scala.
📖 Full Lesson →
🎥 Watch Instead
▶
Video coming soon
This lesson's animated video hasn't been made yet — check back soon.
Flashcard
🃏 Functional Programming
Functional programming — the core ideas?
Tap to flip
🃏 Answer
Functional programming: pure functions (no side effects) + immutable data. Map, filter, reduce.
Functional Programming — Pure functions: same input always produces same output, no side effects. Immutable data: never modify, create new. First-class functions: functions as values — pass them, return them. Map: transform each element. Filter: keep elements matching condition. Reduce: combine elements into single value. Haskell, Clojure, Scala.
Tap to flip back
Common Design Patterns
Design patterns: Singleton (one instance), Factory (create objects), Observer (notify subscribers), Strategy (swap algorithms)
Common Design Patterns
Reusable solutions to common software design problems
Creational: Singleton (one instance, e.g., database connection), Factory (create objects without specifying class), Builder (construct complex objects step by step). Structural: Adapter (interface compatibility), Decorator (add behavior). Behavioral: Observer (publish-subscribe), Strategy (interchangeable algorithms), Iterator.
Singleton
One instance — database connections
Factory
Create objects without specifying class
Observer
Publish-subscribe — event listeners
Strategy
Swap algorithms at runtime
📖 Full Lesson →
🎥 Watch Instead
▶
Video coming soon
This lesson's animated video hasn't been made yet — check back soon.
Flashcard
🃏 Common Design Patterns
Design patterns — Singleton, Factory, Observer, Strategy?
Tap to flip
🃏 Answer
Design patterns: Singleton (one instance), Factory (create objects), Observer (notify subscribers), Strategy (swap algorithms)
SingletonOne instance — database connections
FactoryCreate objects without specifying class
ObserverPublish-subscribe — event listeners
StrategySwap algorithms at runtime
Tap to flip back
Version Control with Git
Version control: Git. Commit = snapshot. Branch = parallel development. Merge = combine branches.
Version Control with Git
How Git tracks changes and enables collaboration
Commit: snapshot of all tracked files at a point in time. Branch: independent line of development (feature/main). Merge: combine changes from two branches. Pull request: request to merge branch, enables code review. Common workflow: create branch → make changes → commit → push → pull request → merge.
📖 Full Lesson →
🎥 Watch Instead
▶
Video coming soon
This lesson's animated video hasn't been made yet — check back soon.
Flashcard
🃏 Version Control with Git
Git — commit, branch, merge?
Tap to flip
🃏 Answer
Version control: Git. Commit = snapshot. Branch = parallel development. Merge = combine branches.
Version Control with Git — Commit: snapshot of all tracked files at a point in time. Branch: independent line of development (feature/main). Merge: combine changes from two branches. Pull request: request to merge branch, enables code review. Common workflow: create branch → make changes → commit → push → pull request → merge.
Tap to flip back
Software Testing
Testing types: unit (single function), integration (modules together), end-to-end (full system), regression (old bugs)
Software Testing
Four levels of testing — each catching different types of bugs
Unit tests: test individual functions/methods in isolation — fast, pinpoint failures. Integration tests: test how modules work together — catches interface bugs. End-to-end (E2E): test complete user workflows — slow but high confidence. Regression: re-run tests after changes to ensure old bugs don't return.
Unit
Single function, fast, isolated
Integration
Multiple modules working together
E2E
Full user workflow
Regression
Prevent old bugs from returning
📖 Full Lesson →
🎥 Watch Instead
▶
Video coming soon
This lesson's animated video hasn't been made yet — check back soon.
Flashcard
🃏 Software Testing
The four testing types?
Tap to flip
🃏 Answer
Testing types: unit (single function), integration (modules together), end-to-end (full system), regression (old bugs)
UnitSingle function, fast, isolated
IntegrationMultiple modules working together
E2EFull user workflow
RegressionPrevent old bugs from returning
Tap to flip back
Space Complexity
Big O space complexity: track memory used. Recursive algorithms use O(n) stack space for n calls.
Space Complexity
Measuring memory usage — often overlooked but critical
Algorithms have both time AND space complexity. Iterative O(n) sum: O(1) space. Recursive O(n) sum: O(n) space (n stack frames). Merge sort: O(n) extra space for merging. In-place algorithms: O(1) extra space (bubble sort, selection sort). Space-time tradeoff: often use more memory to go faster.
📖 Full Lesson →
🎥 Watch Instead
▶
Video coming soon
This lesson's animated video hasn't been made yet — check back soon.
Flashcard
🃏 Space Complexity
Big O space complexity — and the cost of recursion?
Tap to flip
🃏 Answer
Big O space complexity: track memory used. Recursive algorithms use O(n) stack space for n calls.
Space Complexity — Algorithms have both time AND space complexity. Iterative O(n) sum: O(1) space. Recursive O(n) sum: O(n) space (n stack frames). Merge sort: O(n) extra space for merging. In-place algorithms: O(1) extra space (bubble sort, selection sort). Space-time tradeoff: often use more memory to go faster.
Tap to flip back
APIs and REST
API (Application Programming Interface). REST (Representational State Transfer): stateless, HTTP verbs, JSON. Endpoint = specific URL.
APIs and REST
How software systems communicate with each other
API: defined interface for software interaction. REST (Representational State Transfer): architectural style for web APIs. Stateless: each request contains all info needed. Resources identified by URLs. HTTP verbs: GET/POST/PUT/DELETE. Response typically JSON. Status codes: 200 OK, 404 Not Found, 500 Server Error.
📖 Full Lesson →
🎥 Watch Instead
▶
Video coming soon
This lesson's animated video hasn't been made yet — check back soon.
Flashcard
🃏 APIs and REST
API
Tap to flip
🃏 Answer
API (Application Programming Interface). REST (Representational State Transfer): stateless, HTTP verbs, JSON. Endpoint = specific URL.
APIs and REST — API: defined interface for software interaction. REST (Representational State Transfer): architectural style for web APIs. Stateless: each request contains all info needed. Resources identified by URLs. HTTP verbs: GET/POST/PUT/DELETE. Response typically JSON. Status codes: 200 OK, 404 Not Found, 500 Server Error.
Tap to flip back
Concurrency and Parallelism
Concurrency vs parallelism: concurrency = dealing with multiple things. Parallelism = doing multiple things simultaneously.
Concurrency and Parallelism
Two related but distinct concepts in multi-threaded programming
Concurrency: structuring program to handle multiple tasks — can be done on a single core by interleaving. Parallelism: actually executing multiple tasks simultaneously — requires multiple cores. Race condition: two threads access shared data simultaneously → unpredictable results. Mutex/lock: ensures only one thread accesses resource at a time.
📖 Full Lesson →
🎥 Watch Instead
▶
Video coming soon
This lesson's animated video hasn't been made yet — check back soon.
Flashcard
🃏 Concurrency and Parallelism
Concurrency vs parallelism?
Tap to flip
🃏 Answer
Concurrency vs parallelism: concurrency = dealing with multiple things. Parallelism = doing multiple things simultaneously.
Concurrency and Parallelism — Concurrency: structuring program to handle multiple tasks — can be done on a single core by interleaving. Parallelism: actually executing multiple tasks simultaneously — requires multiple cores. Race condition: two threads access shared data simultaneously → unpredictable results. Mutex/lock: ensures only one thread accesses resource at a time.
Tap to flip back
🎓 Common Exam Questions

No saved cards yet — click ☆ Save on any memory trick.

Live group chat — up to 8 students per room