Community stories
programmingby Linus (not that one) · 568 words · 1133 views

Tide tables

My dad retired in March and by May he'd rung four times to ask what a for loop was. He had twenty years of high tides on paper and wanted to look at his.

My father retired in March after thirty-eight years as a surveyor and by May he had rung me four times to ask what a "for loop" was. He'd found a book. He'd found several books, actually, and a set of videos made by a very enthusiastic American, and he had a notebook, an actual paper one, in which he was writing down definitions in the handwriting I remembered from school reports. "I want to do something with the tide tables," he said. He lives on the coast. He's been keeping a record of high tides for twenty years, on paper, for no reason he's ever been able to explain to my mother. "You could just download them." "I've got twenty years, Ruth. I want to look at mine." So we did it on Sunday afternoons over a video call. Him at the kitchen table with the laptop I'd bought him, me in my flat in Manchester with a second monitor showing his screen. I've been a software engineer for eleven years. I have mentored graduates and run onboarding sessions and been, I think, reasonably patient. I was not prepared for my father. "Why is it indented?" "Because that's how Python knows it's inside the loop." "That's mad. What if you indent it wrong?" "Then it's not inside the loop." "That's mad," he said again, but he wrote it down. He typed with two fingers and read every error message in full, out loud, like it was a letter from the council. He refused to copy code from the internet on principle. "If I don't understand it I'm not putting it in." I have worked with senior engineers who could learn from that. Week four we got his tide data into a list. Week six we got it into something that could tell him the highest tide in any given year. He made me wait while he checked it against the notebook. "Nineteen ninety-nine. Fifth of March. That's right." He sounded almost disappointed. "It's right." "Of course it's right, Dad." "I thought I'd have to fix something." Week nine he rang on a Tuesday, which was against the rules. "I've broken it."
"What did you do?" "I tried to make it draw a graph." I looked at his screen. He had, in fact, not broken it. He had installed a plotting library, read the docs, and produced a graph. The graph was upside down because he'd put the axes the wrong way round, and the title said "TIDES" in capital letters, and it was, without exaggeration, the proudest I've ever felt about a piece of software. "It's upside down," he said. "Swap the two variables in the plot call." He swapped them. The graph flipped. Twenty years of high tides, going up and down like breathing. "Huh," he said. He got very close to the screen. "There's something in there. Every eighteen years or so. Look." I looked. There was. I don't know what it was. He does now, because he spent the next month reading about lunar cycles and telling my mother about it at dinner. He still rings on Sundays. He's moved on to something with the weather. Last week he asked me what a class was and I said, honestly, that people had been arguing about that for forty years and he should just make one and see. "That's mad," he said, and wrote it down.

How hot is it?

Not rated yet
#learning-to-code#python#family#uk#first-person

Comments

Loading comments…