Interactive Textbook — Wireframes Fundamentals of CS · paragraph → visual · 4 structural approaches

STATUS  lo-fi exploration
DATE    2026-04-18
FIDELITY wireframe

What you asked for

Pure prose by default. Paragraphs with visuals get a margin indicator. Click → a visual "slides out." Hovering code or diagram parts pulses the linked piece. One visual open at a time. One concept per page.

What I'm exploring

Four distinct layouts for the slide-out moment — side panel, inline-expand, margin gutter, and a persistent canvas. All share the same textual progress bar at the foot so context is never lost.

What's consistent

Serif-adjacent literate-programming vibe (hand-drawn placeholder). Warm terracotta accent. Yellow highlighter for hover links. JetBrains Mono for code & metadata only.

↑ click to compare approaches · 14 keys also work
v0.1 A · SIDE PANEL
fundamentals-of-computer-science.github.io / ch-2 / data-and-memory
⌘K search
Chapter 2 · Data and Memory
2.1Values live in boxes
Idea: prose stays on the left. Click an interactive paragraph → the visual slides in from the right. ·Persistence: clicking another paragraph replaces the panel. ·Best when: reader wants to skim prose uninterrupted.

Before we can talk about variables, we need a word for the things that variables hold. A value is a piece of data your program can compute with — a truth, a number, a piece of text. Each value has a type, and the type decides what you're allowed to do with it.

Value types like int and bool are stored directly in the variable's slot of memory. When you write int x = 5;, the number five is literally written into the box labelled x.

tap to open the memory diagram

This is different from how reference types work — we'll meet those in Chapter 4 when we talk about classes and linked lists. For now, every value you create is its own little island.

Assigning one value type to another copies the value. The two variables are now independent — changing one does not change the other. This surprises a lot of beginners.

tap to see copy behaviour

We'll come back to this idea in every chapter of the book. Each time we meet a new type, the very first question will always be: where does this live in memory?

Memory after int x = 5; close ✕
stack slot hovered linked
0x7ffc005x
0x7ffc04y
0x7ffc08
0x7ffc0c
int x = 5; // box 'x' ← 5 int y = x; // copy the value, not the box y = y + 1; // only 'y' changes // x is still 5 — value types are independent

hover a code line to pulse the corresponding box. hover a box to pulse its line.

1.1 Booleans
1.2 Numbers
1.3 Strings
2.0 Intro
2.1 Values
2.2 Bind
2.3 Scope
2.4 Copy
2.5 Practice
3.1 Arrays
3.2 Idx
3.3 Loop
concept 5 / 12

Open questions for you

1 · Should diagrams stay linked to a specific paragraph, or can a single diagram span several?
2 · Do you want a "diagrams-only" mode — revealing every ◆ marker at once for review?
3 · Should the progress bar also show how many ◆ paragraphs in this concept the reader has opened?
4 · Mobile: stack everything vertically, or hide visuals behind a bottom-sheet?

Likely next moves

→ Pick 1–2 directions and push to mid-fi (real type, real C# sample, real memory diagram).
→ Prototype the hover-link behaviour with a real code block + diagram on a working page.
→ Decide the ◆ marker affordance: margin dot, sidebar rail, or in-text underline.
→ Decide the authoring format so instructors can add ◆ paragraphs without hand-writing JS.

Tweaks