1/57
Looks like no tags are added yet.
Waterfall process
Each phase is fully completed before the next begins; handles requirement changes poorly.
Agile processes
Welcome changing requirements, even late; deliver small working features in short iterations.
Scrum
Agile process: work organized into fixed-length sprints drawn from a product backlog.
Extreme Programming (XP)
Agile process that advocates pair programming, test-driven development, and continuous integration.
Distributed version control (Git)
Every full clone holds the entire commit history; commits are local so you can commit offline; a server is only needed to share commits.
git merge
Joins two branches by creating a merge commit with two parents; preserves the existing history as is.
git rebase
Replays your commits one by one on top of the other branch; produces a linear history but rewrites the moved commits (new hashes).
Merge vs rebase (key contrast)
Merge combines branches and preserves history with a merge commit; rebase moves your commits for a linear history, giving them new identities.
Black-box (functional) testing
Tests derived from the specification without looking at the code (e.g. ECP, BVA, decision tables, state transition).
White-box (structural) testing
Tests derived from the code's structure, e.g. coverage criteria over the control-flow graph.
Control-flow graph (CFG)
Nodes are executable statements and decisions; edges are possible control transfers.
Statement coverage
Every executable statement runs at least once; the weakest coverage criterion.
Branch (decision) coverage
Every edge out of every decision is taken (each decision goes both ways).
Condition coverage
Each individual condition evaluates to both true and false; short-circuit evaluation can leave a condition unexercised.
Path coverage
Every complete path through the CFG is taken; strongest criterion, usually impractical.
Coverage criteria, weakest to strongest (course order)
Statement, branch, condition, path.
Equivalence class partitioning (ECP)
Partition inputs into classes the program treats the SAME way; cover each class with at least one test. Use one class per distinct result/behavior, including each invalid or reject case.
ECP common mistake
Do not merge ranges with different outputs into one class, and do not omit the invalid-input classes.
Boundary value analysis (BVA)
Test BOTH sides of each boundary between classes, e.g. for 6<=w<=20 test 5 and 6, and 20 and 21.
Decision table testing
Derive tests systematically from a table of condition combinations and their resulting actions.
State transition testing
Derive tests from the system's states and the transitions between them.
All-pairs (pairwise) testing
Cover every pair of parameter values at least once instead of all combinations.
Fault
The mistake in the code.
Error
An incorrect internal state or computation during execution; may stay hidden.
Failure
Wrong behavior visible to the user, violating the spec.
Fault -> error -> failure chain
A fault can cause an erroneous state, which can propagate to a visible failure; a hidden wrong state is an error, not a failure.
Systematic debugging: step 1
Create a small, repeatable test case that triggers the failure BEFORE editing anything.
Systematic debugging: closing step
Add a regression test, then rerun the new test AND the existing suite so the bug cannot return unnoticed.
Ideal test set
Reveals a failure whenever the program is incorrect.
Minimum-size test set
The fewest test cases that still satisfy a given coverage criterion.
Exhaustive testing
Testing every possible input; the baseline for comparison, usually impractical.
Dummy (test double)
Passed around but never actually used.
Stub (test double)
Returns canned answers to calls.
Spy (test double)
Records how it was called so the test can check the calls afterward.
Mock (test double)
Stub + spy + an up-front specification of expected calls; self-verifying.
Fake (test double)
A simplified but working implementation, e.g. an in-memory database.
Testable code
Pass in nondeterministic inputs (clock/date) and avoid hidden side effects (return values, inject writer/path) so dependencies can be replaced with doubles.
Naturalness of software
Hindle et al. 2012: source code is highly predictable, so statistical/NLP models (now LLMs) work well on code.
Vibe coding
Generating code without reviewing or understanding it (term: Karpathy, 2025); fine for low-stakes prototypes, bad for long-lived code.
LLM coding agent
An LLM that runs tools in a loop to achieve a goal (Willison): tools search, edit files, run builds and tests; the loop uses results to decide the next step.
Agent harness parts
Model, context, tools, permissions; the harness runs the loop and manages these parts.
Context engineering
Selecting the useful evidence (instructions, files, filtered tool output) that fits the model's limited context window; save key decisions in files.
AGENTS.md
A repository file recording project conventions (directory map, build/test commands, style) so agents and humans can discover them.
Prompt injection
Untrusted content in the context hijacks the LLM's instructions; the model cannot distinguish your instructions from file or web contents. Core security risk for agents.
Defense in depth (agents)
Sandboxing, limited filesystem/credential/network access, scoped tools and connectors, review of sensitive actions; no single layer stops injection.
LLM code best practices
Understand the code (review it), test it (high coverage of generated code), refactor it (linters, match project style), and prompt precisely.
Corrective maintenance
Fixing residual bugs found after delivery (e.g. a reported crash).
Adaptive maintenance
Adjusting software to environment changes (e.g. a payment provider changed its API).
Perfective maintenance
Improving or adding features because users requested them.
Refactoring
Restructuring code WITHOUT changing observable behavior; excludes bug fixes and new features.
Why keep bug fixes separate from refactoring
So regression tests can confirm the refactoring itself changed nothing.
Feature Envy (code smell)
A method that reaches into another object's data instead of using its own; fix with Move Method. Category: Couplers.
Linter
Parses code into an abstract syntax tree and flags bad patterns regardless of spacing/formatting; passing lint does NOT prove the absence of bugs.
Rust borrow rule
A value can have one mutable borrow OR unlimited shared borrows live at the same time, never a mix (one writer or many readers).
Generics vs downcasts
Generics are checked at compile time, so no downcasts are needed and runtime cast crashes are impossible.
Martin (Clean Code)
Prefer smaller, descriptively named functions and fewer comments; comments go out of date and can be ignored.
Ousterhout (A Philosophy of Software Design)
Comments are valuable documentation of intent and abstraction; deep modules are preferred over many tiny ones.
Visitor pattern
accept() dispatches to the visit method for the element's concrete type (double dispatch); the point is adding new operations without changing the element classes. Traversal of children belongs in the visit methods.