Chores list
Fun fact: I live in an apartment with 10 other people. It’s a pretty big place with large communal areas and a great deck, so we tend to host a lot of events and fun times with friends. Couple that with the fact that most guys in their mid-twenties are not exactly clean, the place tends to accumulate dirtiness a bit faster than normal. Things like taking out trash cans, cleaning kitchen surfaces and common areas, and sweeping the floor tended to get done by the same 3 or 4 people. This was got pretty irritating after a year or so, so the apartment agreed on a chore list that would rotate weekly. This way, everyone would contribute while not feeling like they were getting the short end of the stick, and it was fairly obvious is someone wasn’t pulling their weight. While it didn’t exactly work perfectly, it still helped a ton.
Rather than have to keep a spreadsheet and have someone manually rotate the names every week, I figured it’d be easiest to do it automagically. Also, since half of the apartment worked in finance and spent basically 7 hours a day in the apartment (all asleep), I wanted an easy way for everyone to know their responsibility without being too “in your face” about it.
I ended up setting up simple SQLite DB with a table for each person, holding name and email, and a table for each chore. It was fairly easy to run a python script with a weekly cron job on my Raspberry Pi that would rotate each person’s foreign key within the chores table. The script also built a barebones HTML email that is sent to each roommates email. The email setup gave me a bit of trouble because Gmail doesn’t like sending email from external clients. I eventually just set up a 3-legged OAuth token that would refresh itself so Google couldn’t give me any more trouble. There were a couple times when we had someone move out and someone new take their spot, but all it took to update the DB was a short migration script and everything else stayed the same.
I realize the local DB for this is overkill, but I had been working with SQLite at work and wanted to get to know the basics of it, since in my day job the nuts and bolts were mostly abstracted away already. Overall, it was a fun little project to refresh my python and put my Raspberry Pi to better use than collecting dust.