Showing posts with label YHack. Show all posts
Showing posts with label YHack. Show all posts

Wednesday, 11 November 2015

Midterm Updates: BlackBerry Priv + YHack 2015!

Hello, blog. I feel like each time I come back, I'm stunned at how much time has passed by. It's been a busy two months since beginning co-op, but I've been having a blast and taking everything in stride.

BlackBerry Priv

BlackBerry recently released the product that I've been working on over the last few months: the Priv, a brand new Android phone! I've actually been doing development on two of the apps for the phone, Tasks and Notes. Since I am an avid user of similar apps in my own day-to-day life (yes you, Google Keep!), I've enjoyed the experience of contributing to user experience as well as learning a lot in the process. In fact, this term has only further reinforced the notion that what we learn in school is far from actual development projects; although we did some Android development last term, it was so basic that I practically felt like I didn't know anything about Android while at work. Overall, this term has definitely been a steeper learning curve than the last, but my team has been ever so helpful and every day is a whole new learning opportunity. And of course, I can't lie, it's cool to know that features I worked on have now been shipped to customers worldwide!

I might be a bit biased, but after having used the phone for a few weeks, I must say that it's a very decent phone. I especially like the customizations that BlackBerry made to the Android launcher, which allows you to launch three different apps instead of just Google Now, as well as the addition of really handy widgets and shortcuts. Furthermore, in addition to the physical keyboard, even the virtual keyboard is a step up from the stock Android one; it offers really smart word suggestions on the letters themselves, which you can swipe up to select while you're typing. And last but not least, the Tasks and Notes apps of course! It's been really nice to see all the positive reviews of the phone so far; although it hasn't been out for too long, I think there's potential that only time will fully divulge. 

YHack 2015: I Know That Feel
This past weekend, I had the opportunity to go back to Yale University for another year, for YHack 2015! Since it wasn't my first hackathon, I more or less knew what to expect, but the set-up this year was a bit different; instead of having individual rooms to ourselves, everyone was spread out around tables in a massive sports complex. It got a bit distracting at times, but it also meant getting to talk with the people around us.


I've always wanted to work on a social impact hack, so it was really nice to make a plausible idea come together at YHack. Our project aims to be an educational tool to benefit children with autism spectrum disorders. This actually tied in with my (as well as one of my teammate's similar) experience working with young children with autism to teach them social interactions. One of the difficulties that these children face is recognizing and differentiating between different emotions. And so, we created an application made up of two interactive games.


The first one is more simple of the two, and it involves the child matching images to different emotions.


The second game prompts them to take pictures using a webcam, in order to mimic different emotions. Together, the two games teach children to be able to both recognize and demonstrate emotions.

The web application was created using the Flask framework for Python to handle the backend work. Flask was interesting to work with as none of us had any experience with it - although, Flask is based on the jinja2 template, which I'd worked with previously during Google CSSI, so a lot of the code looked very similar and it was fairly easy to pick up.


We also tied in a SQLite database that we used to store account info as well as player results; this allowed us to create a stats page for each user, so that parents or educators could track the children's progress over time.

For the front end, we leveraged Bootstrap to scale our site, as well as jQuery to make and handle POST requests during the game so that we could display feedback and results without having to refresh the page. For the first game, we utilized the Flickr API to search for and display random images of people displaying different emotions. As for the other, we used a machine learning API from Indico that does facial emotion recognition to determine what emotions the pictures we took were displaying. Unfortunately, one of the caveats of relying on the Indico API was the for certain emotions, it wasn't as accurate as we'd hoped. We ended up trying to process the results we received back from it, but overall the accuracy still wasn't ideal. Still, we worked with the limited time and resources that we had in order to complete the project.

Feel free to check out our app on GitHub or DevPost! We were originally planning on deploying the site through the Microsoft Azure platform, but we ran into some issues with GitHub and Azure integration (later confirmed to be a known issue by people that we spoke to from Microsoft). Regardless, I am really happy that we were able to take an idea with the potential to make a difference in the lives of children, and turn it into reality. Part of the beauty of hackathons is being able to try something new and pour your efforts into making something interesting, and I am grateful that we came up with a unique idea that, if we have the opportunity to polish and improve accuracy on, could be an accessible and useful tool to support children and allow them to develop these necessary skills from an early age.

Monday, 3 November 2014

YHack 2014: First Ever Hackathon + YOCHECKIN

Last Friday at 6:00am, I got on a twelve-hour bus ride down to New Haven, Connecticut to attend YHack at Yale University! After having missed Waterloo's own Hack The North earlier this year, I was thrilled to finally experience my very first hackathon. For those of you unfamiliar with the term, hackathons are programming competitions where participants team up to create projects in a short, condensed amount of time (commonly over a weekend). These events are notorious for sleep deprivation, but are a great way to not only compete for prizes, but for programmers to come together and focus on something new and learn a lot. I was especially for YHack because it meant getting to see many Google CSSIers again! After going off to universities across the US and Canada, it was awesome to catch up with many of them again.

Before I knew it, we'd arrived at Yale's West Campus:

The weekend went by in a whirl of activity; before I knew it, time was up and it was time to submit our projects. I had so much fun over the weekend, getting to not only develop my programming skills but also going to talks by various companies, and hearing about ideas from people across the country. The enthusiastic atmosphere of the hackathon was contagious; everyone was so passionate about their projects and willing to help us with ours. The crazy environment of the hackathon was very motivating, because everyone was having a great (albeit sleep-deprived!) time.

Our Project: YOCHECKIN
The inspiration behind my team's project came from wanting to taking Yo, possibly the simplest application in the world, and making something more complex and useful out of it. If you've never heard of Yo before, it is essentially a no-character communication app where users tap a button to send a "Yo" message to another user. That's all there is to it. However recently, Yo was updated so that in addition to a mere "Yo", users can also choose to send their location, or a link to a website as well.

We wanted to take such a simple mode of communication and turn it into a useful, hassle-free service. We came up with a situation that we'd all found ourselves in before; we're going out, and our parents want us to check in with them to make sure that we were safe. For some kids, it may feel annoying to take time out of hanging with friends to text their parents; furthermore, how could their parents verify that their children were where they said they were? YOCHECKIN is a solution for both of these issues. After entering in you contact phone numbers on a simple web application, all you have to do is "Yo" your location to YOCHECKIN, and everyone on your contacts list will receive a text message to notify them of your location. We felt that this was a great way to integrate Yo users with people who didn't have the application, to increase the functionality of the app.

The Programming Process
We used the Yo API, Google Geocoding API, Twilio API, and Google App Engine to create YOCHECKIN.

The first half of our coding process consisted of learning how to use the Yo API. It was initially fairly easy to understand because the code is quite simple when using Python (which we'd already had experience with from CSSI); however, the code in the available documentation used Flask (a Python microframework) to send Yo's from the service, which wasn't supported by Google App Engine. To circumvent this issue, we had to determine how to use the Python urllib and urllib2 libraries instead to replace Flask.

After learning how the Yo API worked, it was time to combine everything together. In essence, our project consisted of the following steps:
  1. User enters contact phone numbers, which are stored in an Google App Engine datastore
  2. User Yo's their location to YOCHECKIN
  3. The latitude/longitude coordinates are converted into a street address through reverse geocoding with the Google Geocoding API
  4. If the user can be found in the datastore, text messages are sent out to the user's contacts via Twilio 
  5. Otherwise, the user receives a Yo back with a link to the website, to enter their contacts in
After working on separate parts of the process, we all regrouped to piece together the final product. Our team worked together really well to overcome all the challenges that we faced while developing our project. In fact, before I knew it, we'd worked almost twelve hours straight from 7pm on Friday night to 7am Saturday morning! Thankfully, we managed to finish our project in around 24 hours total, meaning we were able to get a lot more sleep on Saturday. By the end, we'd created a service that we truly believed would have a beneficial purpose.

The Final Product
Our final product comes in two parts: the website (http://helpyofind.me/) where users go to save their contacts, and the Yo service itself, YOCHECKIN on the Yo application.

The user interface of the website, modeled after the simplicity of the Yo application itself.

The source code of the entire project can be viewed on GitHub. I am really proud of how this turned out in a short period of time and how much we learned as a team throughout the process. There is definitely room for more improvement; depending on how much time we have to work on it in the future, I definitely have ideas of ways to increase functionality and error-checking user input on the site.

One of the other exciting aspects of our project is that we actually got to speak to the CEO of Yo himself about our project and he was interested in adding it to the official list of Yo services, the Yo Index! I hope that we will actually be able to get it up on there soon, as it'd make our service a lot more accessible to Yo users.

All in all, I had an amazing time at YHack 2014; it felt really nice to be able to dedicate a weekend to focus solely on a single programming project. I will without a doubt be going to more hackathons in the future! But until then: