I've been at this for almost 20 years, and I'm ashamed to admit that once upon a time I pulled the "you have to use a pattern here!" As I got older, and more experienced, I discovered that most times, the simplest answer is the best. And *most* of the time, If-Else is simple. Yeah, you can go crazy with it, but by-and-large, using some sense, If-Else is an elegant tool for handling the decision problem. Everything else is just trying to be too clever for your own good! ;)

--

Just a guy who loves his wife, kids, and writing software.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Adam Presley

Adam Presley

Just a guy who loves his wife, kids, and writing software.