Code Challenge 30 – The Art of Refactoring: Improve Your Code – Review

By on 7 August 2017

In this article we review last week’s The Art of Refactoring: Improve Your Code code challenge. We’re excited to have done 30 challenges so far and it feels like we only got started. Prepare for more to come!

Submissions

Submissions are merged to this dir on our community branch.

  • bbelderbos refactored PyBites’ Slack Karma Bot:

    This was a great challenge for me to A. put unittest mocking into practice, refactoring code for a Slack bot and B. try out SIG’s BetterCodeHub to lead my refactorings. This worked out pretty well. See the readme for more details. I will do a follow-up article as well.

    See the README for full details.

  • hobojoe1848 refactored his very first script:

    The very first script I wrote! A “Troubleshooting Wheel of Fortune” to print out random troubleshooting steps to help myself and my team (jokingly) troubleshoot hardware faults. Terribly lame but a trip down memory lane!

    See the README for full details.

  • mjhea0 refactored a Flask route handler:

    For this challenge I decided to refactor a Flask route handler because of this issue that was added to the Flask JWT Auth project. Since this project is the example app built for the Token-Based Authentication With Flask blog post, I had to update the blog post as well.

    See the README for full details.


As there is no deadline to these challenges, we will update here when you submit any other cool refactorings …

Just follow our instructions and start coding!

Stay tuned for our next challenge tomorrow …


Keep Calm and Code in Python!

— Bob and Julian

Want a career as a Python Developer but not sure where to start?