DEV Community

Serguey Asael Shinder
Serguey Asael Shinder

Posted on

Handle the Unhappy Path First

The happy path is easy.
Everyone writes that.

The bugs live in the other one.
The null. The timeout. The bad input.

Write the failure cases first,
while you're still thinking clearly.

The error handling isn't extra.
It's most of the real work.

Code that only handles success
hasn't been finished yet.

– Serguey Asael Shinder

Top comments (0)