Photography assignments - Side projects, part 2

Last time, I wrote about why and how to start working on a side project. Today, I want to give you an example of a tiny one that I manage to create in less than 8 hours.

I like to create things that help me solve my own problems and I’m passionate about photography. As I want to improve it I think the best way is to build a habit of it and do it as often as I can. Shooting daily is a perfect idea, but sometimes you need a bit of extra inspiration and that’s what photography assignments are all about. It gives you one assignment a day to focus on and you ca take some nice photos and share them on twitter afterwards.

Under the hood

The idea is simple and it’s not even an original one. A couple years ago, there was a project Daily Shoot and they did the exact same thing. They published one theme a day and showed other’s people photos. Unfortunately, I missed the project and it’s been retired.

Thankfully, Duncan and Mike released all the assignments as a spreadsheet under creative commons license, so their work still carries on. And we can do cool projects with it.

With some cool tools, we can convert this spreadsheet into web pages. For that, I used a simple ruby script, that generates directories and files with each assignment in a markdown format.

After that, I use nanoc to apply layouts and compile markdown to HTML.

The remaining task is to display and change assignments daily. The goal here is to keep it simple, small and do it fast, so let’s not make a rocket science out of it. A simple javascript will do the magic.

function getTodayIndex() { return (Math.floor(new Date().getTime() / (1000 * 60 * 60 * 24)) % 690) + 1; }
window.location.href = "/daily/" + getTodayIndex();

We want the site to be responsive and mobile friendly so we add the following lines to our CSS file.

body { width: 730px }

@media screen and (max-width: 729px) {
  body { width: 100%; }

And that’s it. A little bit of polishing and the site is good to go.


I had my own itch to scratch and created a simple and valuable site in a few hours. I couldn’t have done it without couple amazing tools and resources, but it’s super cool that they are available.

Also from the technological point of view I haven’t learnt much on this project. I’m using nanoc very often and the javascript part wasn’t particularly tricky. But I made something useful and that’s what makes me happy. I recommend you to try to do a small project and release it tomorrow.

Would you like to get the most interesting content about programming every Monday?
Sign up to Programming Digest and stay up to date!