Best Practice: Code Like No One’s Watching

When writing code, it’s often easy to trigger the “freeze” response from the “fight, flight, freeze, or fawn” list of trauma responses.

“I bet I could make this SQL query more performant…”

“It feels like I could use a design pattern here…”

“This variable needs a better name…”

There are multiple issues at play here:

As a software developer, when I feel the freeze setting in, I find it helpful to remind myself:

No one ever needs to see this code!

It may be really bad, violate all the design principles, and be slower than a turtle, but that’s OK, because:

You can’t improve what doesn’t exit.

No one else is watching this creative process.

Just get the code out there,
get it working,
and then make it better.

Alternately, do a full stop, step away from the keyboard, and do some designing and planning. Sketch things out, determine the flow, and often the “what-ifs” become a lot more concrete.

Either way, remember:

No one else is watching!

So silence your inner critic and just get something out there. It will be much easier to go from there.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.