The Light At The End Of The Tunnel

Have you ever found yourself walking down a long passageway only to meet a dead end sign? How about completing a form, tapping submit and only then finding out some fields were mandatory? If you’re a developer, how many times have you ended up with data in a weird state?

What do all of these have in common, other than being incredibly frustrating?

In all of these cases, someone decided to wait until the last minute to tell you something was unexpectedly wrong.

Don’t be that someone. The solution is simple. Fail early. Inform people of issues as soon as you can. Don’t let them waste time and effort to find out.

Put the sign on the entrance to the passageway. Mark mandatory fields. Throw an exception as soon as you encounter an invalid state.

Few things are more disappointing than finding out the light at the end of the tunnel is a train.

Published by eranboudjnah

A software consultant and tech lead. Passionate about optimizing as many aspects of my life as possible, to free time for what really matters.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: