--

Hi Simon, once you are proficient reading your expression is quite straightforward, but not for newbies (or less experienced programmers). They see that expression as some kind of advanced quantum physics formula full of strange symbols and numbers.

Somehow, it turns out that using different ifs, that in assembly level have the exact same machine code, it is easier to them. With multiple ifs they can focus on each line at each time. And, if they want to debug, it is easier to see the program running.

The curious thing, is that you can extract both programs using TDD. In fact, I tend to extract yours.

Thanks for the share!

--

--

David Rodenas PhD
David Rodenas PhD

Written by David Rodenas PhD

Passionate software engineer & storyteller. Sharing knowledge to advance our skills. Join me on a journey of discovery in the world of software engineering.

No responses yet