The pause nobody would let me delete Bex Calder

programmingcode commentsmaintenance

The pause nobody would let me delete

A fifth of a second of waiting, a comment in capital letters, and what it taught me about the difference between a warning and a reason.

by Bex Calder 3 minute read

The line waited for a fifth of a second and did nothing else. It sat in the middle of a function that saved invoices to disk, between the part that wrote the file and the part that told the rest of the program the file was ready, and above it, in capitals, someone had written: DO NOT REMOVE.

I found it on a Thursday, three weeks into looking after a system I had not built. I am, I admit, unusually fond of deleting things, and a pause with no explanation is exactly the kind of thing I delete. A fifth of a second does not sound like much until you notice the function runs forty thousand times on the last night of the month, at which point it is a little over two hours of a computer sitting with its hands folded.

So I asked. The person who had written it had moved on years before. The two people who had been around at the time both remembered the line and neither remembered the reason. One of them said, with real feeling, that the last person to take it out had spent a weekend putting it back. That was the whole of the institutional memory: a capitalised warning and a story about a ruined weekend.

I took it out anyway, but somewhere it could do no harm, on a copy of the system fed a copy of a month's invoices. For the first hour nothing happened. Then, in the second, a handful of invoices went missing from the report at the far end. Not lost exactly, just not there when the report looked for them. It took me most of the afternoon to see why. The program that collected the files further down the line checked the folder on a timer, and on a busy night it could arrive at a file while the disk was still finishing with it, find it half written, and skip it without complaint. The pause had never been fixing anything. It had been giving the disk a head start in a race nobody knew was being run.

The real fix was small: write the file under a temporary name and rename it only once it was complete, so the collector could never see half of anything. Twelve lines, and the pause could go, and the last night of the month got two hours shorter. I was pleased with that. But it is not the part I keep thinking about.

What stays with me is the comment. Whoever wrote DO NOT REMOVE was trying to be kind to the next person, and they were, a little: they saved some weekends. But a warning without a reason is a fence with no sign on it. It tells you that something bad happened here once, and nothing about whether it can still happen, or what you would need to change before it could not. It protects the code from being touched, which is not at all the same as protecting it from being misunderstood. Over the years the line had stopped being a fix and become a superstition, kept because everyone was afraid of it and nobody could say what they were afraid of.

If the author had written one more sentence, something like "the collector reads this folder on a timer and can catch a file half written", I would have found the real problem in ten minutes instead of an afternoon, and someone before me would probably have found it years earlier. That is the comment I try to leave now, whenever I do something that looks strange: not what not to do, but what I was afraid of, written plainly enough that the person after me can decide whether the fear still applies.

Usually that person is me, six months on, with no memory of the afternoon at all. I would like to be able to argue with myself when I get there. Capital letters leave no room for that.

Small waits can hide large reasons, all the way down to the hardware. Chips That Forget explains the memory chips whose constant forgetting keeps every computer responsive.

More from the journal

All of the journal Every piece, by month

More by Bex Calder

On the same subject

Discussion

House rules

  • Sign how you like, but be one person. You may use the name on your account, a name of your own choosing, or none at all. What you may not do is wear somebody else's: no pen name of ours, no member's name but your own, and nothing that reads as the studio or its staff.
  • Argue with the point, not the person. Robust disagreement is welcome; contempt is not.
  • Nothing unlawful, hateful or harassing, nothing that identifies a private individual, and no advertising.
  • Post only what is yours to post. That includes other people's writing and private correspondence.
  • We may hide a remark, remove it, or close an account to the discussions, and we may do so without notice.

What a chosen name is and is not

A chosen name hides you from the room, not from us. Every remark stays linked to the account that wrote it, and the studio can see that link whenever it needs to. Please treat it as a way to speak freely, not as a way to say something you would not put your name to.

Where responsibility sits

Remarks in this thread are written by members and published without prior review. They are the views of the people who wrote them and not those of eQuill Studio. We do not verify their accuracy, and we accept no liability for them or for any decision taken in reliance on them.

If something here breaks these rules or infringes your rights, report it and we will look at it promptly.

This thread belongs to this piece alone. Members choose how they are signed, and can change it from the box below. When the studio or the writer joins in, the page says so with a badge, so you always know who is talking.

OPENING THE THREAD…