Habit Building

It turns out building new habits is hard. Without carving out purposeful time each day, it’s very easy to let new habits get swallowed by daily habits. It also seems important to let go of the guilt or failure of not meeting an immediate expectation and rather to keep reinforcing the good behavior. i.e. get back on the horse. So, here we are Day 6 ? whatever that means now 😂 and moving ahead. Forward progress is progress, perfection isn’t nearly as important as we think it is.

TDD

I started today out with Test-Driven Development with PyTest because I’m bored with basics, and honestly believe taking a TDD approach as we saw in Day 5 to be a better way to show and learn how the basics actually work.

I’m not sure if this feature unlocked because I decided to pay for repl.it or not - but it turns out they have a Unit Testing feature ?now? or I don’t know, but it’s there.

It’s kinda nifty, but kinda useless? I mean that with ❤ - it’s a hard feature to develop for sure. My biggest gripe with it is that the test code doesn’t seem to live in the repo, so it’s only executable in repl.it which seems kinda lame 1. I feel like they might be better served by doing the following:

  • A ‘Run Tests’ button that only executes tests.
  • A test.py file that is run by that button (so main.py doesn’t have to know about tests)
  • Test reporting analysis tooling - i.e. look for and make beautiful a junit.xml file
  • Test report “hosting” - a lot of tools will dump to HTML files, make it easy to host/display those.

Repl of the Day


  1. It turns out that they’re using this feature for their education platform as a means to assign and grade work. In this context it really does make sense not to show the code or have the test code live in the repo because otherwise, it would be much easier to reverse-engineer an A, which would defeat the purpose of the platform. ↩︎