As fellow programmers under great stress, we sometimes turn to the dark side to provide us with an edge in our code - Leg Shaking… And when the urge to shake our legs kicks in, it's haaaard to stop. It's soooo prevalent that people often don't realise they're doing it. For many people, the habit of leg shaking is an annoyance to themselves and people around them.

We want to build an app to stop once and for all from this bad habit. And what's better to stop ourselves from leg shaking than publicly shaming ourselves when we perform this god dreaded action.

What it does

Whenever you shake your leg, the Telegram bot will send a message to the groups that you are in notifying them of your bad bad habit. We hope that public humiliation can make us think twice before shaking our legs.

How we built it

Our app is built to make use of the accelerometer in the iPhone. The app monitors for a change in displacement of the phone. When the user shakes his legs, the app detects the motion and will make an API request to the Shake Leg Telegram bot. This causes the Telegram bot to send a personalized public humiliation of the person in whichever group the Telegram bot is added to.

Challenges we ran into

Initially, we wanted to run the Shake It Off app in the background. However, after some research, we realized that iOS does not have an easy way to allow access to background motion tracking. Therefore we had to hack our way through by making the app use the accelerometer instead.

We initially also thought of creating a microservice that will send POST requests to the Telegram bot API to send the message. However, there were difficulties in figuring a way for the Telegram bot to accept the POST request and we pivoted to another way of performing the sending message action under tight time conditions.

Accomplishments that we're proud of

We are proud of working as a team to effectively come up with a funny idea that is actually close to our hearts as anxious programmers.

What we learned

We learned the use of the accelerometer and found a workaround

It was our first time making Telegram bots and we learned how we could make use of them in creative ways.

We also learnt further about iOS development

What's next for Shake It Off

The goal of this project is that by alerting users of leg shaking in a timely manner, we hope to help users become more aware of and reduce the occurrence of this undesirable behavior.

There are definitely future plans to increase the level of punishment for shaking your leg. On top of public humiliation, we are thinking of broadcasting the act of shaking your leg to the people around you through your phone speakers.

But on a more serious note, this app could provide us insight to developing a similar app for corrective behavioral changes.

Moreover, the current application is an iOS-only application that has to be run in the foreground. In the future, we would like to make this application cross-platform and be able to run in the background instead. And hopefully you don't need to put it inside long socks too.

Built With

Share this project: