Best Practices

Considered Harmful

A few best practices

Best practice?

Eat lots of veggies & fruits,
exercise regularly,
value your sleep.

Best practice?

Add an index for
each database column
you SELECT-WHERE by.

Best practice?

Unit-test your code.

Best practice?

Don’t reinvent the wheel.

What does best practice even mean?

Best

Literally, the best!

Definition By Committee

A best practice is a method or technique
that has been generally accepted as
superior to any alternatives […​]
because it has become
a standard way of doing things […​].

Wikipedia, emphasis mine

Standard

It’s an industry standard.

Experts

Agreed on by experts.

Default

Good

Definition By Excellence

A best practice is a method or technique that has been generally accepted as superior to any alternatives because it produces results that are superior to those achieved by other means […​].

Wikipedia, emphasis mine

I call BS!

The Best

Vagueness stems from the term "best"
which is subjective.

Context

Good advice comes
with a rationale
so you can tell when
it becomes bad advice.

Stifling

The allure and seduction of best-practice thinking
poisons genuine dialogue about both what we know
and the limitations of what we know.

¯\_(ツ)_/¯

Redeeming best practices

Problems

Problems:

  • term best practice

  • common lack of context

  • lacking completeness

Terms

Better terms:

  • established practice

  • known pattern

  • good default

  • (whatever, really)

Context

Good default…​

  • …​ in ${simplified-context}

  • …​ unless ${counter-indicators}

Judging

  • context vs unisize

  • concrete vs abstract

  • measured vs guesswork

Balancing

Be wary of best practices,
but look for good defaults.

Don’t NIH!

Know your limits
and focus energy
on your core competency.

About Nicolai Parlog

37% off with
code fccparlog

tiny.cc/jms

Follow

nipafx on
🐦 // // 📺 // 🐙🐱

More

⇜ Get my book!

Hire me as a trainer
(Java 8+, JUnit 5)

Image Credits

Image Credits

Image Credits

Image Credits