Reimagining year left

Written on February 14, 2021

Almost four years ago, I was playing around with the Twitter API and ended up building, year left (@year_left).

Year left is a bot that calculates the days left in a year, presents it as visual using emojis and then tweets it.

Lately, I’ve been having fun making widgets for the iOS Homescreen using an app called Scriptable. Scriptable allows you to use JavaScript to build widgets.

I had always thought year left would be a neat widget for the iPhone and so finally last week, I took parts of the code that generates year left’s tweets and reimagined it as a widget.

Since year left’s code is written in JavaScript, it didn’t take long to reconfigure it to be used in Scriptable. The only change—which was a bit challenging—was changing the look and feel of year left.

I didn’t want to just lift the Twitter bot’s look, but wanted to give it a face lift so it looks good on an iPhone.

Using some of my friend, Shaun Moynihan’s mockups that he had made when he was mocking up the sales page for my YouTube page, I was able to come up with a more modern look for the year left widget.

My first attempt was to use dots to represent the year representation but ended up going with a dashed look.

Year left widget with dashes

The reason I did this was I couldn’t quite map out the logic to work with dots. While I’m happy with the dashes, I may revisit the dots and provide it as an option in the future.

No idea how to get dots to work, even on paper

I plan on eventually releasing the code for the new year left widget, but before I do I want to clean up the code a little bit.

When creating these iOS widgets, I often remember my friend, Jess Martin’s mantra when building with code, “make it work, make it right, make it fast”. And in that order.

I’m definitely in the make it work phase right now. These iOS widgets start out as experiments where I’m just trying to see if I can get something to work. But it takes a little while to get it right.

Hopefully my next post will be sharing the code for the reimagining of year left as an iOS Homescreen widget so you can also have it on your phone as well.

Stay in touch

Thanks for reading this article. I'd love to stay in touch and share more tips on programming and side projects with you. Sign up and I'll send you my articles straight to your email, you'll also get a free copy of the light themed version of my Git cheat sheet.
Git cheat sheet preview image