https://github.com/devcybiko/if-hydra
https://github.com/devcybiko/if-hydra
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/devcybiko/if-hydra
- Owner: devcybiko
- Created: 2022-09-11T01:59:00.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-21T23:03:59.000Z (about 2 years ago)
- Last Synced: 2025-02-28T13:10:00.464Z (over 1 year ago)
- Language: Python
- Size: 569 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.