Bug 2 of 3 · inspired by my TrackTheTrek project
“The trail journal forgot the hike.”
You log two hikes, close the journal, and open it again… and the pages are blank.
journal.pseudothe buggy code
hikes = empty list // temporary memorywhen you add a hike: put it in hikeswhen the journal opens: hikes = empty list show hikes
hikes = empty list // temporary memorywhen you add a hike: put it in hikes save hikes to storagewhen the journal opens: hikes = load hikes from storage show hikes
About this demo
What was the bug?
The hikes only lived in temporary memory, which is wiped when the journal closes. The fix saves them somewhere that lasts and loads them back on open. The real TrackTheTrek app does this with a JSON file.
Honest label: a simplified demonstration inspired by TrackTheTrek. It isn’t a real bug from that project.
Read about TrackTheTrek · Its source on GitHub (opens in a new tab)