Developer finds own month-old functions as misunderstood as unfamiliar third-party APIs
A developer maintaining qbofile, a browser-based accounting file converter, encountered three self-inflicted bugs in three days caused by misremembering the return values of his own functions. In one case, a CSV generator was missing a category column the parser produced; in another, a memo field silently overwrote the payee slot due to an upstream variable definition. A third near-miss revealed that two recently written utility functions returned complex objects rather than the simple values their names implied. The developer concluded that function names act as summaries written before the code was finished and can be misleading even to their author. He now applies the same habit to his own modules that he uses with external libraries: reading what a function actually returns before wiring it to anything else.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in