A paper audit for a tiny CSV file
A table can look tidy on screen and still be hard to exchange. Before sending a study log to another program, it helps to define the file as a small agreement: what separates fields, how text is quoted and what each column means.
This original Academia Master Trader workshop builds one fictional three-row log. It contains no learner information or real course outcomes. You can do the exercise with a plain-text editor and paper, without installing a data tool.
Begin with the records, not the punctuation
Our log has three fields: session code, note and minutes. The first session has code S1, note Review, then practice, and duration 20 minutes. The comma between Review and then is part of that note. It is not meant to introduce another field.
The second session has code S2, note Read “slowly”, and duration 30 minutes. The quotation marks are part of the note. The third session has code S3, note Plain review, and duration 40 minutes.
Write those records on three cards first. Their total duration is 90 minutes. Keeping this little reference makes it possible to check whether the exported text preserves the intended records.
Declare a simple file convention
For this exercise, use commas between fields, one record per line and a header naming the columns. A text field containing a comma or a quotation mark is enclosed in double quotation marks. A quotation mark inside such a quoted field is written twice.
Under that declared convention, the file is:
code,note,minutes
S1,"Review, then practice",20
S2,"Read ""slowly""",30
S3,Plain review,40
This is the convention for our workshop, not a promise that every file called CSV uses identical settings. When exchanging a real file, check the reader's separator, quoting and text-encoding options rather than relying only on its extension.
Walk through the first data line
Read S1 as the first field. The next comma separates it from the note. The opening quotation mark then signals a quoted field under our chosen convention.
The comma inside Review, then practice belongs to the note. The closing quotation mark ends that quoted field. The following comma introduces the minutes field, whose value is 20.
If you split that line at every comma without respecting the quoting rule, you obtain four fragments instead of the intended three fields. Counting punctuation is not the same as reading the file according to its format.
Check the second line's quotation marks
The second note contains the word slowly inside quotation marks. In the file, each of those internal quotation marks is doubled. When a reader applies our convention, the recovered note is Read “slowly”, with one quotation mark on either side of slowly.
The doubled marks are a way to represent the original text within the file. They do not mean that the note itself should acquire two quotation marks on each side.
Write the recovered note next to its original card and compare them character by character. A matching row count would not reveal a changed note.
Test structure and meaning separately
After reading the file, check that the header has three fields and that each of the three data records has three fields. Then verify the session codes, the complete notes and the durations against the cards.
Finally, add the minutes again. The sum should still be 90. This arithmetic check is useful, but it does not replace the text comparison: a file can preserve the durations while changing the notes.
Keep the original cards and the exact file together with a short statement of the convention. Another reader should be able to reconstruct the same three records without guessing what the commas mean.
Academia Master Trader is a Brazilian educational project. Domain: academiamastertrader.com.br. Continue learning at Aprenda: https://academiamastertrader.com.br/materiais/aprenda/