Glossary
The words that show up in lessons and error messages, in a sentence or two each.
A
- address
The number of a byte in memory. Every variable lives at one, and
&scoregives you the address ofscore.- aggregate
A function that squashes many rows into one value:
COUNT,SUM,AVG,MIN,MAX.Aggregates, GROUP BY and HAVINGWhat is "misuse of aggregate"?
- array
A JavaScript list of values in order, written in square brackets.
songs[0]is the first item,songs.lengthcounts them andsongs.push(x)adds one to the end.- array decay
When you pass an array to a function or use it in most expressions, it turns into a pointer to its first item. That is why a function cannot use
sizeofto learn an array's length.- arrow function
A short way to write a JavaScript function:
(a, b) => a + b. With no curly braces after=>, the value is returned without writingreturn.- async and await
asyncmarks a function that can pause;awaitpauses it until a promise (or, in Python, a coroutine) is done and hands back the result. The rest of the program keeps running meanwhile.- attribute
Extra information written inside an opening tag, as
name="value". In<a href="/shop/">,hrefis the attribute that says where the link goes.
B
- box model
Every element is drawn as a box of content, padding, border and margin.
box-sizing: border-boxmakeswidthinclude the padding and border.- buffer overflow
Writing past the end of an array, for example a 20-char name into a
char name[8]. C does not stop you, and the extra bytes overwrite whatever comes next.
C
- callback
A function you pass to other code so that code can call it later, like the function given to
addEventListener,setTimeoutormap.- clause
One part of a SQL statement that starts with a keyword:
SELECT,FROM,WHERE,GROUP BY,HAVING,ORDER BY,LIMIT. They always go in that order.- column
One named piece of information that every row has, like
titleorprice. Each column holds one type of value.- compiler
The program that reads your C source and turns it into machine instructions. If it finds a mistake, it stops with a compile error and no program exists to run.
- CSS grid
A CSS layout of rows and columns.
grid-template-columns: 1fr 1fr 1frmakes three equal columns that the children fill in order.- CSS selector
The part of a CSS rule that picks which elements it styles:
p,.card,#score,nav a.document.querySelectortakes the same selectors in JavaScript.- CTE
A common table expression: a named result made with
WITH name AS (...)at the top of a query, then used like a table below it. It breaks a big query into readable steps.
D
- dereference
Following a pointer to the value it points at, with
*. Ifppoints athp, then*p = 70;changeshp.- dictionary
A collection that maps keys to values, written
{"potion": 3}. You look values up by key, not by position. Often shortened to dict.- docstring
A string written as the first line inside a function to say what it does. Tools and
help()show it.- DOM
The Document Object Model: the browser's live tree of objects built from your HTML. JavaScript reads and changes the DOM, and the page updates to match.
E
- event
Something that happens on the page, such as a click, a key press or text typed into a box. You react to one by adding a listener for it.
- event listener
A function the browser runs every time a certain event happens on an element.
button.addEventListener("click", handleClick)adds one.- exception
An error raised while a program runs, like
ValueErrororKeyError. If nothing catches it, the program stops and prints a traceback.
F
- f-string
A string with an
fin front that fills in values from curly brackets:f"{name} has {hp} HP".- flexbox
A CSS layout for putting items in a row or a column.
display: flexon the parent, thengap,justify-contentandalign-itemsspace and line up the children.- foreign key
A column that holds another table's primary key, like
songs.artist_idpointing atartists.id. It is what you join on.
G
- GROUP BY
Sorts rows into groups that share a value and gives one result row per group, so aggregates work per group.
HAVINGthen filters the groups.
H
- header
A file of declarations, pulled in with
#include.#include <stdio.h>tells the compiler thatprintfexists and what it takes.- heap
Memory you ask for while the program runs, with
malloc, and must give back yourself withfree. It lives until you free it, not until a function returns.- HTML element
One piece of a page, written as an opening tag, some content and a closing tag.
<p>Hello</p>is a paragraph element;<img>is an element with no closing tag.
I
- indentation
The spaces at the start of a line. In Python they decide which lines belong to an
if, loop or function, so they are part of the code.- index
A sorted lookup the database keeps for a column so it can find rows without reading the whole table, like the index at the back of a book. It speeds up reads and slightly slows down writes.
- iterable
Anything a
forloop can walk through one item at a time: lists, strings, dicts (their keys),range(10)and files.
J
- JOIN
Combines rows from two tables wherever a column matches, like each song with its artist.
LEFT JOINalso keeps rows that found no match.JOIN: two tables into one resultWhat is "ambiguous column name"?
- JSON
A text format for data made of objects, arrays, strings, numbers, true, false and null, like
{"name": "Zara", "points": 9200}. APIs send it;JSON.parseandres.json()turn it into JavaScript values.
K
- keyword argument
An argument passed by name, like
sorted(scores, reverse=True). It makes calls easier to read and lets you skip options that have defaults.
L
- list
An ordered collection of values in square brackets that can change after it is made.
squad = ["Ana", "Ben"], thensquad[0]is"Ana".- list comprehension
A one-line way to build a list from a loop:
[s * 2 for s in scores if s > 10]doubles every score above 10.
M
- malloc and free
malloc(n)reserves n bytes on the heap and returns their address, orNULLif it cannot.free(p)gives them back. Everymallocneeds exactly onefree.- memory leak
Heap memory that is never freed, usually because the last pointer to it was lost. A program that leaks in a loop slowly uses up all memory.
- mutable
A value that can be changed in place, like a list or dict. Strings, numbers and tuples are immutable: their methods hand back new values instead.
N
- negative index
Counting from the end of a list or string:
-1is the last item,-2the one before it.- None
Python's value for "nothing here". A function with no
returngives backNone, and so do methods likelist.sort().- normalisation
Designing tables so each fact is stored once. Instead of typing an artist's country on every song, songs point at one
artistsrow that holds it.- NULL
A pointer value that means "points at nothing". Check for it before you dereference, for example after
malloc.- null terminator
The 0 byte, written
'\0', that marks the end of a C string."Neon"takes 5 bytes: four letters and the terminator.- NULL value
SQL's marker for "unknown" or "missing". It is not 0 or empty text, any comparison with it is unknown, and you test for it with
IS NULL.
O
- object
In JavaScript, a set of named values in curly braces:
{ name: "Ana", level: 12 }. Read a value with a dot,player.level, or with brackets,player["level"].
P
- padding
Unused bytes the compiler puts between struct fields so each one starts at an address that suits its type. It can make a struct bigger than its fields added up.
- pointer
A variable that holds an address.
int *p = &hp;makesppoint athp. Pointers are 4 bytes on this site's compiler.- primary key
A column (usually
id) whose value is different for every row, so you can point at exactly one row.id INTEGER PRIMARY KEY.- promise
An object that stands in for a value that is not ready yet, such as the result of a
fetch. It later resolves with the value or rejects with an error.- prototype
A one-line promise of a function's name, parameters and return type, like
int twice(int n);, so code above the function's body can call it.
Q
- query
A question you ask the database in SQL.
SELECTqueries read data; other statements likeINSERTandUPDATEchange it.
R
- range
A run of whole numbers made on demand.
range(5)is 0 to 4, andrange(1, 11)is 1 to 10. Used to repeat a loop a set number of times.- row
One record in a table: one song, one player, one order. Also called a record.
S
- schema
The design of a database: which tables exist, their columns and types, and the keys that link them.
CREATE TABLEstatements describe it.- segmentation fault
The usual laptop crash when a program touches memory it does not own. This site reports it as
memory access out of bounds.- self
The first parameter of a method in a class. It points at the object the method was called on, so
self.hpis that object's own HP.- set
An unordered collection with no duplicates.
set(["gg", "gg", "lol"])is{"gg", "lol"}, and checkingx in sis fast.- sizeof
Gives the size of a type or variable in bytes, worked out by the compiler.
sizeof(int)is 4 here;sizeofan array is its whole size in bytes.- slice
A run of items taken from a list or string with
[start:end]. The start is included and the end is not, so"NeonFox"[:4]is"Neon".- source file
The text file you write, like
main.c. It is for people and the compiler; the machine never runs it directly.- specificity
The score a selector gets for deciding the cascade: an id beats a class, and a class beats a plain element name.
#nav .linkbeats.link, wherever they appear.- stack
The memory where each function call keeps its local variables. It is handed out and taken back automatically as functions start and return.
The stack and the heapWhat is "Maximum call stack size exceeded"?
- struct
A type that groups named fields, like a player's name, hp and level. Use
p.hpon a struct andpp->hpthrough a pointer to one.- subquery
A
SELECTinside another query, in brackets. It can stand for one value, a list forIN, or a whole table.
T
- table
A grid of data about one kind of thing:
songs,players,orders. Every row has the same columns.- template literal
A string written in backticks that can hold values: `
Level ${level}. Anything inside${ }` is worked out and put into the text.- the cascade
How the browser decides which CSS rule wins when several set the same property. More specific selectors beat less specific ones, and if they tie, the rule written later wins.
- traceback
The report Python prints when a program crashes. Read it from the bottom: the last line names the error, the lines above show where it happened.
- transaction
A group of changes that happen all together or not at all.
BEGIN, then the changes, thenCOMMITto keep them orROLLBACKto undo them.- try and except
A pair of blocks that catch an exception: Python runs the
tryblock, and if a named error happens it jumps to the matchingexceptblock instead of crashing.- tuple
Like a list, but it cannot change once made. Written with round brackets:
point = (3, 4). Good for fixed pairs like a name and a score.
U
- undefined and null
Two JavaScript values meaning "nothing".
undefinedis what you get when something was never set, like a missing property;nullis a value someone set on purpose to say "empty".- undefined behaviour
Code the C standard makes no promise about, like reading past an array or overflowing an
int. It may work, crash, or give wrong answers that change between machines.
V
- view
A saved query with a name.
CREATE VIEW top_songs AS SELECT ...lets youSELECT * FROM top_songsas if it were a table, and it always shows the current data.
W
- window function
A function with
OVER (...)that works out a value from a group of related rows but keeps every row, like a rank or a running total.