Software & Tools reference

147 commands, numbers and terms from the 14 lessons, one line each. The right-hand column opens the page that teaches it.

1How software is built and shipped

Code, build, test, artefact, deploy, runThe stations one change passes on its way to usersThe path to production
Compiled / interpretedTurned into machine code ahead of time / read by a runtime as it runsLanguages
Lock filePins the exact version of every dependency, direct and indirectDependencies
MAJOR.MINOR.PATCHBreaking change / new feature / fix (Semantic Versioning)Dependencies
^1.4.2 / ~1.4.2Any 1.x from 1.4.2 / any 1.4.x from 1.4.2 (npm ranges)Dependencies
Lock fileThe exact version, and usually the hash, of every package a build uses. Commit it; install with the strict command (npm ci, uv sync --locked, cargo build --locked).Lock files
Build once, promoteThe same artefact goes to test, staging and productionThe artefact
DigestThe SHA-256 hash of an artefact, such as shop-api@sha256:ef91.... It cannot point at different content, unlike a tag.Tags and digests
Dev, test, staging, productionEach environment answers one questionEnvironments
Config in the environmentSettings change per environment; the artefact does notEnvironments
Runtime mismatch"Works on my machine": a different version of the language or a libraryRuntime
Multi-platform imageOne tag that holds a build for each CPU type (linux/amd64, linux/arm64); the registry serves the one that matches the host.CPU architecture

2Programming basics with Python

int float str bool NoneThe basic types; `type(x)` tells you whichValues and types
// and %Floor division and remainder: 7 // 2 is 3, -7 // 2 is -4, -7 % 2 is 1. / always returns a float.Operators
a = bTies a second name to the same object; it does not copyNames
is vs ==Same object / equal valueNames
if / elif / elseThe first true condition wins; indentation is the syntaxConditions
Falsy values`0` `''` `[]` `{}` `None` `False`Conditions
for x in items:Each item in turn; `range(n)` for 0 to n − 1Loops
while cond: / break / continueRepeat until it changes / leave the loop / skip to the next turnLoops
for ... elseThe else block of a loop runs only when the loop finished without break. range(start, stop, step) never includes stop.Loop control
def f(a, b=1): / returnA named step with a default argument / its resultFunctions
f-string`f"{host}:{port}"`Functions
Mutable defaultdef f(x, seen=[]) shares one list between all calls. Write seen=None and create the list in the body.Arguments

3Python: data, files and errors

items[0] items[-1] items[1:3]First, last, a slice (end not included)Lists
append len sorted inAdd, count, sort a copy, test membershipLists
tuple and setA tuple is a list that cannot change, so it can be a dict key. A set holds unique items and answers "in" with one lookup.Containers
d["k"] / d.get("k", default)Look up by key / without an error when missingDictionaries
for k, v in d.items():Every key and valueDictionaries
List of dictsA table: one dict per rowDictionaries
[x for x in xs if cond]Filter and transform in one lineComprehensions
with open(path) as f:The file is closed even if something failsFiles
json.load, csv.DictReaderThe standard readers for JSON and CSV files. JSON keeps numbers, booleans and null; every CSV cell is a string.JSON and CSV files
try: except ValueError as e: finally:Catch one kind of error; always clean upErrors
python -m venv .venv pip install -r requirements.txtA private set of packages per projectErrors
try / except / else / finallyexcept runs on a matching error, else when there was none, finally always. Clauses are tried top to bottom; a subclass must come before its parent.try blocks

4Data formats

TOML / CSVConfig with no type surprises / rows of text, quote fields with commasFormats
JSON valuesObject, array, string, number, true/false, null; no commentsJSON
jq '.items[].name'Pick fields out of JSON on the command lineJSON
2^53 - 19,007,199,254,740,991: the largest integer a JavaScript number, and so much JSON tooling, holds exactly.JSON limits
YAMLSame data, indentation as structure; spaces only, never tabsYAML
Block scalarA multi-line YAML string. | keeps line breaks, > folds them into spaces, and a minus (|- or >-) drops the final newline.Multi-line strings
The Norway problemIn YAML 1.1 `no` is false; quote strings like `"NO"`YAML mistakes
version: 1.10Read as the number 1.1; quote itYAML mistakes
JSON SchemaLets a machine check the shape of a document before useValidation
PrecedenceDefault, then file, then environment variable, then command-line flagValidation
additionalPropertiesA JSON Schema keyword. Set to false, any key the schema does not name is an error, which catches typing slips.JSON Schema

5Version control with Git

Version controlA record of every saved state of a project, with author, date and message; Git is the common oneWhy version control
CommitA full snapshot, its parent, author and message, named by its hashCommits
Working tree, staging area, repositoryEdit, `git add`, `git commit`The three areas
git status / git diff / git diff --stagedWhat changed, unstaged, stagedThe three areas
git status -sShort status: the first column is the staging area, the second the working directory, ?? is untracked.git status
.gitignorePatterns for files Git should not add. It has no effect on files already tracked (use git rm --cached) or on history..gitignore
git log --oneline --graph --allThe whole history as a graphHistory
Detached HEADHEAD points at a commit, not a branch: make a branch before you commitHistory
git log -S, git blamegit log -S text lists commits that added or removed that text; git blame shows the last commit to change each line of a file.Searching history

6Branching and merging

BranchA movable label pointing at one commitBranches
.git/objects .git/refs HEADThe content store, the labels, where you areBranches
git switch -c featureCreate a branch and move to itThe graph
Fast-forwardThe branch label slides forward; no merge commitFast-forward
Merge commitTwo parents: records that two lines of work joinedMerge commits
<<<<<<< ======= >>>>>>>Conflict markers: yours, then theirs; edit, `git add`, continueConflicts
git merge main / git rebase mainJoin histories / replay your commits on topMerge or rebase
Golden ruleNever rebase commits others already haveMerge or rebase
--force-with-leaseA forced push that succeeds only if the remote branch is still where your last fetch saw it.Pushing a rebase
git restore fileThrow away uncommitted changes to a fileUndoing
git reset --soft HEAD~1Undo the last commit, keep the changes (private work only)Undoing
git revert <commit>A new commit that undoes one: safe on shared branchesUndoing
git reflogEvery place HEAD has been; recover "lost" commitsUndoing
reset --soft, --mixed, --hardAll three move the branch label. --mixed (the default) also resets the staging area; --hard also overwrites the working files.reset modes

7Working together on GitHub

git clone / git push / git pullCopy everything / send commits / fetch and mergeRemotes
git fetch then origin/mainSee what the remote has before merging itRemotes
Push rejectedThe remote has commits you lack: pull first, then pushPushing
Pull requestA proposed merge with review, checks and discussionPull requests
Merge / squash / rebaseKeep every commit / one commit / replay commits without a merge commitPull requests
Branch protection, rulesetsRequired reviews and checks; no direct pushesBranch protection
CODEOWNERSWho must review changes to which pathsBranch protection
Repository rolesRead, Triage, Write, Maintain and Admin, each including the one before. Only reviews from Write or above count as required approvals.Repository roles
CODEOWNERSA file mapping path patterns to owners who are asked to review. The last matching line wins; a branch rule can make their approval required.CODEOWNERS
Fixes #12Closes the issue when the pull request mergesIssues
ForkYour own copy to propose changes without write accessIssues

8APIs

RequestMethod, URL, headers, optional body; the response has a status, headers, bodyOne API call
curl -s -H 'Accept: application/json' URL | jqCall an API by handOne API call
curl --fail-with-bodyMakes curl exit with code 22 on a 4xx or 5xx status while still printing the body. Without it curl exits 0.curl
GET POST PUT PATCH DELETERead, create, replace, change, removeREST
Safe / idempotentGET changes nothing / GET, PUT and DELETE can be repeated safely; POST cannotREST
2xx 3xx 4xx 5xxDone / go elsewhere / your mistake / the server'sStatus codes
200 201 204 301 400 401 403 404 409 429 500 503The codes you will see mostStatus codes
Exponential backoffDoubling the wait between retries (1, 2, 4, 8 s...), with a random jitter so that clients do not retry in step.Retries
Authorization: Bearer <token>A token proves who is callingAuthentication
401 vs 403Not identified / identified but not allowedAuthentication
JWTJSON Web Token: header, payload and signature in Base64, joined by dots. Signed, not encrypted; valid until its exp claim.JWT
PaginationFollow the next link or cursor until there is nonePagination
429 + Retry-AfterToo many requests: wait as long as it saysPagination

9CLIs and SDKs

Console, CLI, SDKThree doors to the same APIThree doors
aws s3 ls / az vm list / gcloud compute instances listTool, group, action: the same grammarCLI grammar
--output json --queryMachine-readable output, then pick fieldsCLI grammar
Exit code0 succeeded; scripts check it (`set -e`)CLI grammar
--query, --outputOptions that pick fields from a CLI response (JMESPath in aws and az) and set its format: json, text, tsv, table.Output for scripts
Credential orderFlags, environment variables, config files, then the role of the machineCredentials
aws sts get-caller-identityWho am I calling as?Credentials
Roles over keysShort-lived credentials, nothing stored in the scriptCredentials
Managed identity, service accountThe Azure and Google Cloud equivalents of an AWS IAM role on a machine: an identity attached to the resource, with no stored key.Three clouds
IdempotentSafe to run twice: check before you createIdempotency
WaiterA CLI or SDK helper that polls until a resource reaches a state. aws ec2 wait instance-running checks every 15 s, 40 times.Waiters
PaginatorsAsk the SDK for every page, not just the firstA whole task

10Infrastructure as code

DeclarativeDescribe the result; Terraform works out the stepsDeclarative
ProviderThe plugin that talks to one platform's APIDeclarative
count, for_eachTwo ways to make several copies of a resource. count addresses them by number (s[0]); for_each by key (s["web"]).count and for_each
terraform init fmt validate plan apply destroyThe workflowPlan and apply
+ - ~ -/+Create, destroy, update in place, replaceReading a plan
lifecycle { prevent_destroy = true }Refuse to destroy this resourceReading a plan
lifecycleA block inside a resource: create_before_destroy, prevent_destroy, ignore_changes, replace_triggered_by.lifecycle
DriftA change made by hand; the next apply undoes itDrift
StateTerraform's record of what exists; contains secrets; store it remotely with lockingDrift
Module, variable, outputReusable blueprint, its inputs, its resultsModules
Variable precedenceLowest to highest: default, TF_VAR_name, terraform.tfvars, terraform.tfvars.json, *.auto.tfvars, then -var and -var-file.Variable precedence

11CI/CD pipelines

.github/workflows/*.ymlWhere workflows liveWorkflows
on: jobs: steps: runs-on:Event, jobs, steps, machineWorkflows
workflow_dispatch, scheduleManual and timed triggers. Both use the workflow file on the default branch; cron is in UTC, every 5 minutes at most.Triggers
CI / CDTest every change / ship the artefact that passedCI and CD
GITHUB_OUTPUTA file a step appends name=value lines to. The job maps them to outputs, and a later job reads needs.<job>.outputs.<name>.Outputs and conditions
${{ secrets.NAME }}Use a secret without writing it in the fileSecrets
OIDCShort-lived cloud credentials for the pipeline, no stored keysSecrets
Canary1% of users first, watch errors, then everyoneDeployment
Blue-green / rollingSwitch all traffic to a new copy / replace servers a few at a timeDeployment
actions/upload-artifactCarry files between jobs; each job starts cleanArtefacts
strategy: matrix:Run one job across several versions or systemsArtefacts
timeout-minutesThe ceiling on a job or step. The default for a job on a GitHub-hosted runner is 360 minutes.Limits and defaults

12Testing and code quality

Test pyramidMany unit tests, fewer integration tests, few end-to-end testsKinds of test
Test doubleA stand-in for a real dependency in a test: a stub returns fixed answers, a mock also records calls, a fake is a small working version.Test doubles
Arrange, act, assertThe shape of a unit testUnit tests
pytest -qRun Python testsUnit tests
pytest.mark.parametrizeRuns one test function once for each listed set of inputs, reporting every case by name.Parametrised tests
Linter, formatter, type checker, testsQuality gates machines run before reviewQuality gates
CoverageShows a line ran, not that anything checked itQuality gates
Code review orderDesign, functionality, complexity, tests, naming and comments, then style. First response within one business day.Code review

13Debugging and working with AI tools

TracebackThe chain of calls that led to an error; read the last line (what) and the frame above it (where)Reading an error
Exception classThe name before the colon on the last line of a traceback, such as KeyError or TypeError: the kind of mistake.Common exceptions
breakpoint()Stops a Python program at that line and opens pdb. p prints a value, n runs the next line, s steps into a call, c continues, q quits.The debugger
git bisectFinds the commit that introduced a fault by testing the middle of the range, again and againNarrowing down
git bisect runRuns a command at each bisect step and marks the commit good (exit 0), bad (1 to 127) or skipped (125).git bisect run
Regression testA test written from a fault: it fails before the fix and passes after, and staysFixing
AI assistantDrafts; you stay the author and reviewerAI assistants
Never pasteSecrets, customer data or private keys into an AI toolUsing AI safely
Review generated codeLike a stranger's pull request: tests, licences, packages that may not existUsing AI safely
A good requestContext, the goal, constraints and an example of the outputUsing AI safely

NeuroqAI · Software & Tools · neuroqai.com/courses/software-and-tools/reference/