bipoll

bipoll is a simple web app for binary polls that I built together with Antti. The source code is available on GitHub and it used to be hosted at https://bipoll.com until I couldn't be bothered to renew the domain after 7 years up. It was partially inspired by Strawpoll, though I remember at the time Strawpoll was an ugly, clunky thing. Unlike Strawpoll however, the polls were binary, as the name suggests.

This project's from 2015, though I did maintain it a bit in 2019 because I kept getting dependabot alerts (and still do). I'm not sure what the exact motivation was, but I remember this was a project with an intentionally small scope just for the sake of building something end-to-end, in a short amount of time, while learning some new tools.

We didn't want to go overboard with user accounts and private polls and different kinds of polls like Strawpoll, but create something where anybody could type a URL and it automatically creates a super straightforward poll. Going back over my chat with Antti in 2015, the initial examples I gave were:

In the end, to keep things super simple, we stuck with only the first one. I'm proud of my past self for this, as chiselling features away to arrive at a true MVP is something I find difficult to this day!

We found the URL encoding a bit annoying, as Chrome would replace spaces with %20, but it was ok for an MVP. I got the domain and Antti made a nice logo and landing page, and we were off to the races!

We were both really into a programming language called LiveScript at the time (it's a very terse language that compiles to JavaScript that Antti introduced me to) which is why both the frontend and backend are written in that. The markup was using Pug which was still called Jade at the time, and the styling was using Stylus, all bundled up with Webpack. For storage, I used SQLite3 which did the job splendidly (and was the first time I used SQLite in particular). It was a very neat stack that I still quite like. The server wasn't even 90 lines of code, so I encourage you to take a look.

The actual polling was dead simple and we store your IP address to prevent you from voting multiple times from the same IP address at least (ah, the pre-GDPR days). If you try to hack and fake votes, they're just silently ignored at the SQLite level if they come from the same IP address.

After you've answered, you're taken to the stats page. If you ever browse to that same question from that IP, you see the stats page. So answer carefully as you won't be able to change your mind!

Antti made a nice, simple pie chart with pleasant muted colours to visualise the stats. Antti is to credit for the calm, minimal aesthetic overall — I would have probably used pure red and pure green as I tend not to have an eye for these things!

It was a fun project and I had a great time collaborating with Antti. I highly recommend these small, end-to-end projects with minimal scope to get a feel for a new stack, working with a new person (although in this case I had already worked on many things before that with Antti), and just for the satisfaction of putting something out there!