Intro to the Marvel Comic Covers Twitter bot
Back in the mists of time when I first registered this domain name the main purpose of the site was to be a place where i could link to all my little side projects. Over the years, as I’ve been fortunate to be found by readers, I’ve grown more and more picky about what I posted and by side effect, some of the side projects I’d invest a few hours in to. As my day job has become very people heavy and technology light I’ve been looking for an outlet to get my hands dirty without worrying about life cycles, adoption costs, sustainability and keeping the number of technologies in use at production quality levels. And this site is going once again be it. As my first example I decided to spend some time playing at the intersection of my geeky interests. Coding and Marvel Comics.
It’s been over 13 years since I last wrote a Twitter Bot and while recycling an old notebook I was reminded there was such a thing as a Marvel Developer API so the startlingly unique idea of posting a comic cover each day to twitter, to brighten my feed with the works of Ross, Yu, and McFarlane, popped into my head and ate an evening.
The result of this quite slow typing, the
Marvel comic covers posting bot,
is roughly written and cuts a lot of corners. Using
gasp/shock/horror print
statements on stdout to indicate
what’s happening, very little exception handling and no unit tests! But it exists! You can find it as
@CoversMarvel on Twitter.
It gave me a chance to use a little bit of Pipenv
, a badly fitting
dataclass that I replaced with an old style equivalent and looking at
the tweets while testing reminded me of some great stories I’ve not read
in many years.
It’s good to remind ourselves, especially when what we do is more important than ever, that we’re allowed to have fun with the technology and not gold plate everything.