A gradebook reads four students and writes a JSON report. The class average says 52.42, because two empty fields became zeros.
For developers who learn by struggling
When You Pick a Framework Just to Look Different
The last time you chose a new framework or library, was it because your problem needed that tool, or because it sounded cool and few people around you were using it? That question is uncomfortable. Technology decisions are often made for reasons that never appear in any technical document.
Latest articles
See all →A linked list is a linear chain of nodes, each holding data and a pointer to the next node. Here is what that chain looks like, what it costs next to an array, and the same minimal implementation in Java, Python, and JavaScript.
A gradebook reads three students from a file, prints three rows, and every score is 0. The procedure filled a copy of the array, because the parameter was missing var. Add the word and the report matches the file; the compiler had already warned about the call that filled nothing.
A notes script saves a line, prints it back, then counts zero. The file on disk is correct: read() left the pointer at the end, so the second call returned an empty string. Read once into a variable, or seek(0), and the count matches the file.