Project #2: Secret Santa

the Secret Santa Project was one of my favourites during the time at university. It’s a kiosk-like service for sending anonymous SMS messages with the goal to surprise your friends with a chocolate santa. The chocolate part makes it even better.

Background and motivation:

At university, I was a volunteer at our local UNICEF university group. In winter semester 2013, we had the task of doing a project that has something to do with Christmas – and in the group we came up with a little game: The original intention was to create a kiosk like interface, which students can use to send anonymous messages to a fellow student and inform them, that he or she just received a little present (we got some chocolate form our sponsor).

Kiosk mode as the student would see it on the stand

Idea:

Let’s assume you want to suprise your close friend – she’s still stuck in a boring class about business administration.

  1. Go to the UNICEF stand in the hallway, say hello to the people in the unicef shirts and type in the kiosk system:
    • the name of the lucky recipient
    • the mobile-number or email address
    • a short message
  2. Check the checkbox if you want to add a personal message pinned to the Chocolate-Santa
  3. Be kind and maybe donate some coins you found in your pocket (because there will always be change for the bar visit the night before and who puts change back in the wallet anyway)
  4. Every message will be logged in a database, but only be marked as ‘sent’ when we know the message was sent out successfully.
  5. She will receive the message via SMS or email including a pickup code! This message is anonymous and will not contain the name field. Even if you entered your name in the sender-field.
  6. She will pick up her present at the UNICEF stand in the hallway. Therefore she tells the people in the blue UNICEF shirts her pickup ID (It’s the last 4 digits of the SMS)
  7. They will then type the ID in the searchfield and set the checkbox ‘delivered’. TADAAAA: you just sent an anonymous secret chocolate santa!

Every message sent out contains a 4 digit pickup code (the lenght is configurable btw).

The Management view of the system looks like this: not a s pretty, but practical:

This is the management view of the project

The search is implemented in JavaScript wich makes this fuzzy search field very fast and useful.

As a little gimmick, I recently added a small dashboard to keep the motivation of the group at the stand up and tracks their progress with 2 simple values:

The Metrics Dashboard

We now did this project a couple times and It was totally worth it – besides It was a great learning experience, we had a lot of fun planning the events.

If you like this project, give it  a star on GitHub 🙂

https://github.com/c7h/SMS_Web

Project #1: Student Timetable

THI Timetable is the inofficial Timetable for Students of Technische Hochschule Ingolstadt. It brings your schedule to any device via iCal without having to install an App – you can use your native calendar application!

Background and motivation

Although the university provides a working system, it lacks important features like export or sync functionality. Additionally, the usability is poor: It is written with JSP, making it slow. Another Problem is the layout, which is not optimized for mobile devices. The most annoying aspect of this system is, having you to sign in each time you want to check your timetable.

This is the landing page for the TimeTable Project – you can subscribe with your university credentials.

How:

First I had to analyze the original page. A great tool to look under the hood of a webapp is a browserextension like Firebug. The first step was to reverse engineer the login process to obtain a valid session-id. The prototype of the autenication method looked like this:

https://gist.github.com/c7h/5526802

Next step is to feed it with username and password and it will send a request to the hiplan-app, parse the result using a regular expression and return the session-id. Now we are logged in, we can dig a little deeper. The hiplan-app uses Ajax to load background-data which turned out to be valid JSON. Fancy! Next we have to parse it. We just transformed the event-jsons to objects, so we can use them to export to any format we want – in this case iCalendar-Format. There is a nice python-library called icalendar which gets the job done. So – next step is to combine all these results and create a first version as a commandline tool. It is available on Github. Just have a look at the examples.

https://gist.github.com/c7h/55399f00a956260a30cb

Since the goal is to make this tool accessible to the masses and considering the fact that nobody uses python command line tools, we need a better looking, user-friendly interface. There are several options:

  • stay on the commandline-way: small user-base
  • Native Apps: Need support for iOS and Android and Windows Phone (just kidding – windows phone was already doomed to fail back in 2014 when I started the project)
  • Webapp: Need only one Version for multiple devices / easy to maintain

So I decided for the Webapp. I hosted this service on Googles AppEngine, since it includes everyhing I need: a Python-Webframework called webapp2 that comes with a jinja2-like template system, a data storage which is needed to hold the user data and last but not least probably the most important part: A cron-service to schedule tasks. The system is build on a polling mechanism to scrape the calendar data from the hijacked api, therefore I needed the cron-service to schedule the update-tasks.

If you signed up successfully with your university credentials, your calendar gets parsed for the first time. You will see a success message and a copy-paste text field with a unique url that contains a long, random looking number. This url will point to your calendar in ICAL-Format – a Format which is readable by most native calendar software like google mail, Apple iCalendar, Android etc.. You simply need to pass this link to your calendar software and it will sync on a regular basis. If everything worked as expected, you should see something like this:

This is the way I want to check my daily schedule!

You’re welcome.

The service is online! check it out