An open API service indexing awesome lists of open source software.

https://github.com/devcybiko/if-hydra


https://github.com/devcybiko/if-hydra

Last synced: 9 months ago
JSON representation

Awesome Lists containing this project

README

          

# Slaying the `if-hydra`

This repo is the source material for the book "Slaying the If-Hydra" by Greg Smith.

* In each chapter, a problem is presented.
* Then "The Hydra" solution is laid out, demonstrating the often naive solution using `if/then/else if/else` solutions.
* Then "The Sword" solution is presented which "slays" the `if-hydra`.
* Finally "The Moral" recaps "the moral" of the story - why this is a preferred solution over the `if-hydra`.

Examples within the `README.md` files are in `Python` code. However there are folders for each of Python and JavaScript with complete solutions.

Also, each solution is provided with a full unit test as an introduction to unit testing.