DunneFlow · Tutorial
Chasing rabbits in practice
Follow a thread away from a routine, keep what you find, and use the trail to get back to where you started.
Understanding unfamiliar code means following detours. In this tutorial you start on one routine, follow a thread to something unexpected, keep it, and come straight back, using Threads to pull, ◇ Keep this, the trail, and Worth a look.
You'll need#
- A map open in the dashboard. Any map with some database or file use works well. See Your first map.
Steps#
-
Pick a starting point. In the navigator, open Ways in and select the top entry. This is the question you came with: how does the program start?
-
Find the threads. In the inspector, scroll past IN, OUT, TOUCHES and GOVERNANCE to THREADS TO PULL. These are reasons something else is worth a detour: another routine at the other end of a table or file, one that runs the same decision or loop, one named like this one, one that shares a ticket id, or an outlier nearby. If the panel says there is nothing beside this routine, select one of its callees from OUT and look again.
-
Weigh a thread. Each thread states its size, and lanes are sorted rarest first. A thread shared with one or two routines is a real detour; one shared with half the program is a category.
-
Follow one. Click a thread under The other end, for example a table your routine writes. The whole dashboard moves to it, and the inspector shows who reads and writes it.
-
Keep what you found. Something here is interesting, but it is not what you came for. Press ◇ Keep this. The trail bar now shows ◆ 1 kept.
-
Look at the trail. The bar across the top of the centre pane lists your steps. A change of view is a step too: switch to Table and watch it appear.
-
Go back. Press ← Back (or
⌘Z/Ctrl+Z) until you are on your starting routine. Forward → still holds the steps ahead, until you select something new. -
Return to what you kept. Click ◆ 1 kept. The shelf opens; click the row to go straight to the thing itself. Drop removes it. The shelf survives a reload.
-
Try a doorway with no selection. Open Explore → Worth a look. Each card is a measured extreme of the program with its middle stated beside it. None is a judgement; they are doors. Press show the query on one to see the SQL that produced it, then select what the card names.
-
Tidy up. When the trail is too long to read, press Clear. It keeps the step you are on and everything you kept.
What you've learned#
- Threads to pull relate things by what they share, not by who calls whom.
- ◇ Keep this saves a find without losing your place, and the shelf takes you back to the thing itself.
- Back and Forward work from anywhere, and every view change is a step.
- Worth a look gives you measured starting points when you do not know what to ask.
Next#
- Ask questions from the command line: run a show the query statement yourself.
- Reference: Chasing rabbits.
Something unclear or out of date? Tell us.