Can you get rid of all the IFs?
Submit a snippet of code containing an if-then-else
construct (or any other statements causing alternative paths of execution)
and for which you believe the elimination of the conditional statement is impractical or too hard.
That is: send us a snippet of code where an if-then-else
is unavoidable.
Collectively refactor the code, with the manifest and deliberate goal of eliminating the conditional path.
Then, reflect on the result. Was it worth the effort?
Everyone can submit a snippet of code. Just open a pull request.
Use the language you prefer: Java, C#, Python, whatever you want.
Just provide enough tests in order to make your intents clear.
This is the list of [quizzes] (https://github.com/code4nothing/singlepath/search?q=label%3Aquiz&ref=cmdform&type=Issues) and these are the suggested [responses] (https://github.com/code4nothing/singlepath/search?q=label%3Asolution&ref=cmdform&type=Issues)
Submit a new Quiz. Or, propose a solution to one of the open Quizzes.