top | item 39195507

(no title)

ojkelly | 2 years ago

It’s all about feedback loops, and how fast you can make them.

I was thinking about this recently and came to the same conclusion as the tweet. I almost never use debuggers.

Print debugging outputs to a single flat buffer, stdout (or stderr, but the point remains). Where you place those statements matters, because you should be able to predict the output to stdout. If you can’t, you get to update your mental model.

The order matters, the timing matters, the brutal simplicity matters.

Full on debuggers are helpful tools to explore someone else’s program, but mostly I find their only advocates come from those whose feedback loop with print statements is measured in minutes to hours, not seconds.

Of course if it takes 30 minutes to rebuild your app, or 5 minutes to setup the game state your working on, pausing to inspect the state of the world is going to be easier than print statements.

But if it only takes seconds to rebuild, nothing will beat print statements.

discuss

order

No comments yet.