April 6, 2020
A short update this week, which perhaps belies the amount of work I got done last week; I think I managed to check off a roadmap item every day for the past seven days, which feels great. Some of the quarantine insularity is definitely getting to me, though — I’ve felt pretty dang tired today and yesterday, and am taking a mental health day tomorrow to noodle around in the house and do some reading.
(It is hard for me to remember how and when to rest, sometimes. Working from home exacerbates that.)
Testing and validation.
I’ve been investing a lot in my email validation infrastructure lately, and this weekend brought a big addition: I found a less-than-documented approach of validating Google / GSuite addresses and wanted to get it into production relatively quickly to see if it would work at scale. (It did!)
The validation suite is now comprised of ten decoupled validators, which is just enough to justify some refactoring and DRY-ing. So I had some fun building out a common test suite which means all I need to do to test a validator is define a list of ‘valid’ and ‘invalid’ emails:
class ExtantGmailUsernameValidatorTestCase(ValidatorTestCaseWrapper.ValidatorTestCase): GOOD_EMAILS = [ "dukerson@gmail.com", "me@jmduke.com", "me@jdmuke.com", "boo@bariouaiooqw.biz", "me+test@jmduke.com", "me+test+test@jmduke.com", ] BAD_EMAILS = [ "dukersoooon@gmail.com", "dukerioioijioosoooon@gmail.com", "mee@jmduke.com", "moo+test@jmduke.com", ] def validator_class(self): return ExtantGmailUsernameValidator
(These are the actual test emails I use, because I am not a serious programmer.)
That base ValidatorTestCase
is what’s doing the interesting work, iterating through each one in a networked and non-networked (to speed up the tests) environment. This is the classic case of “I spent more time on the refactor than I will ever gain from its fruits”, but it was fun! Spending time writing legible tests is probably more of a meditative exercise than a net productivity gain when your codebase has a single author, but meditative exercises are good.
Procrastinating marketing work.
This time, I’m procrastinating by finding examples of good marketing pages and ‘feature pages’ that I like. Notion‘s are great; GitLab‘s are pretty solid as well.
I find myself so bored with the whole “three callout sections then some illustrations to bind them together” exercise. Do people use these? I know the answer is yes; or at least the answer is I do not do a good job communicating my features, as evinced by the number of people asking if I support multiple newsletters or paid subscriptions, but…I digress. I need to just go heads down and actually write some damn marketing copy.