Hacker News new | ask | show | jobs
by gwbas1c 221 days ago
What I once said to a less experienced developer in a code review is:

> Don't write stupid slow code

The context was that they wrote a double-lookup in a dictionary, and I was encouraging them to get into the habit of only doing a single lookup.

Naively, one could argue that I was proposing a premature optimization; but the point was that we should develop habits where we choose the more efficient route when it adds no cost to our workflow and keeps code just as readable.