No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2021-06-22 14:56:36 +02:00
.gitignore Initial commit 2021-06-22 14:56:36 +02:00
paint.py Initial commit 2021-06-22 14:56:36 +02:00
README.md Initial commit 2021-06-22 14:56:36 +02:00
test_paint.py Initial commit 2021-06-22 14:56:36 +02:00

Paint3000 - a refactoring exercise

Instructions

First, make sure you can run the tests. This will involve creating a virtualenv and installing pytest in it.

Second, try and understand what the Paint class does and how it works.

Then, try to use the Command/Query separation and the Single Responsibility principles to refactor the code.

Notes:

  • You must not change the public API of the Paint class nor the ./test_paint.py file
  • You can introduce as many classes and as many modules you want.

Have fun :)

Credits

Code adapted from the "Clean Code In the Browser" series, by Chris Powers.

https://cleancoders.com/series/clean-code-in-the-browser