To Do This
I was listening to a podcast in which the interviewee talked about doing a weekly review of what I learned this week. Seemed like a legit idea, so here we are.
I Missed Reading Fiction
It’s not that I stopped reading it ever, but that I haven’t felt really into a book for a while. That changed this week with Children of Time.
I may need to be more selective about the fiction I read.
Happy Path End to End Tests are Important
I had an issue in an application this week where I had designed everything to be case insensitive except the part that actually mattered: the endpoint into the application itself.
Had I written one extra test to verify that the case-insensitive stuff actually worked through the whole app I would have caught the issue before shippign anything.
Corollary: Just Because Your Code Only Has One Branch, Doesn’t Mean It’s Only One Branch
In this a call to strtolower
was how I handled case insensitivity. In my code there seemed to be only a single branch. In reality, there were too: all lowercase already and mixed casing.
When verifying things actually work, things like that need to be considered.
There Are Advantages to Only Have One Way to Do Things
It makes things a lot easier to comprehend at a glance and easier to deal with in long term maintenance. Even if it appears to give less overall flexibility.
From the Zen of Python:
There should be one — and preferably only one — obvious way to do it.