Ages 15–18 · Grades 9–12 · Computer Science
LibraryForge
Read the package before you trust it.
You will spend far more of your coding life reading code than writing it — and an assistant now pulls in dependencies by the dozen. Here a small helper arrives from an open-source package. Read its doc-comment and its code, predict what a call prints, run it — then answer the question the assistant never will: what breaks if a teammate changes one line? Sometimes the doc and the code disagree; the code is what runs.
The code is a teaching subset of the Swift language; the snippets are original teaching examples. Runs on your device — nothing leaves it.
Loading the reading lab…
How are you feeling?
A case · you decide
Omar and the date helper
Omar, 17 — adding a small open-source date-formatting helper to his club website
The helper's doc-comment says it 'formats any date as DD/MM/YYYY'. Omar's site shows event dates from a feed. The helper is twenty lines long and has 3,000 stars, so he almost skips reading it.
Stars tell you a lot of people use it. They do not tell you it fits your case.
Twenty lines takes two minutes to read. Line 9 builds the date in the computer's local time zone.
What should Omar do before shipping?
He finds the time-zone line. What is the safest change?
The events page shows the right day in every time zone Omar tested. His test file has one date in it, chosen because it sits on midnight.
Who made this?
“In reality, every technology reflects decisions made by designers, companies, and communities, and carries the values and power of those choices.”
- Who benefits from this technology?
- Whose needs are ignored?
Brain break
What next? Pick a door
- More like this ReviewForge Which test catches the bug? ChallengeForge Does this entry clear the rubric? ShipForge Will this app pass review?
- A bit harder FlowDojo What steps make up your routine? LocaleForge How many characters is “phở,” really? KindForge Will this program compile?
- Something different HueForge Which colour pairing reads clearest? OrthoForge How does this script write sound? ReactQuest What does this reaction produce?