Learning by Doing – How I set up my first app in the cloud

13 Aug

Sending commands to the Internet is easy to do: we send emails, retweet JK Rowling, and search for new restaurants in town on a daily basis. The best part? It’s only a click away. The tougher task is creating an app that is able to live in the cloud and handle events as they come in. In the same way, if you want to create a telecom app to send text messages and make calls using our Application Platform – easy. Receiving those messages and automatically responding is…. not as simple. It’s crazy that these processes are so different and yet, you don’t realize it until you actually try it. Let me tell you about my experience with this process.

I started at Bandwidth as an intern in May and learned a great deal about our Application Platform while answering support questions from our customers. As a Computer Science major, I enjoyed learning how to use the API’s and SDK’s.  One day, my boss tasked me with the project of creating my very own app. It was time to put my skills and knowledge to the test. In school I do a lot of coding and I spent the summer learning about telecom, so I felt like this project was the perfect chance to merge the two studies.

I quickly learned that understanding how to do something, and actually doing that thing are two entirely different feats.

What is necessary for an app that receives messages and automatically answers them? You’ll need a web hosted application: Heroku works. You need access to the Application Platform API’s. Not a problem. And, the last ingredient is the code.

Setting up an app in the cloud to receive texts and calls can’t be hard right?

I didn’t think so. So I began my quest to make an app.

I needed to make an app that solved a problem. I thought long and hard about this and decided on a simple voting app. The idea is that instead of logging in online to vote, you can text in your vote on your phone – and you wouldn’t even need a smartphone to do this. I think we’d all agree that it’s easier to engage an audience and increase participation if texting is involved. As a student at UNC, I definitely admit to feeling lazy when it comes to voting for our student government election online. In this specific example, a simple voting app would really come in handy for students who prefer texting to making the effort to login and submit their vote online, and would therefore increase the number of students who participate in this important school-wide event.

I downloaded Heroku’s sample app and tried to see if I could get it to work. After countless hours of trying, I was at a dead end. Heroku, though great for many, did not want to work with my computer.

My boss suggested that I use Nitrous.io. I wasn’t sure what this was, but I was at the point where I would try anything. So, on to Nitrous.

My review? Nitrous is great. It’s a cloud based Linux environment. Everything is in one place – I had my IDE and command line all in the same spot. Nitrous even gave me useful instructions on how to integrate with Heroku.

So now I began a game of finding problems and finding answers.

I worked away on Nitrous. I did run into a little snag however. Nitrous runs Python 2.7, and I needed to run Python 3.

No worries! There was a simple fix. I created a virtual environment that ran Python 3.

Everything should work now…

Nope.

 

I needed a Procfile and a requirements.txt file.

I created them both and hoped for the best.

 

I used Heroku to create a new web hosted application.

Fingers crossed…

 

I created an Application Platform app and assigned my number to it with the message URL as my Heroku app.

Syntax error.

Nitrous was nice enough to tell me which line it was on.

Test text…..nothing.

 

I needed to scale my app to run on a web dyno.

Test text….Wait what….It actually works!

 

It was such a rewarding feeling to receive a text on my phone from my Application Platform number saying “Thanks for texting me!” (Yes, I thanked myself for my own text).

I continued to spend a couple hours on my app every week adding features and testing the app components. By the time I had it down pat,  I realized how much I had actually learned from this process. I learned that things might not work at first, and that working through the problems is the part that really takes up most of the time, thought, and sometimes, creativity. Running into so many problems gave me a deep understanding of the whole process. Another intern asked me to help him set up an app. I warned him it might take a little while, but I was up for it. I managed to help him get it up and running in 30 minutes. I was a little annoyed that I went through so much more pain and trouble than he did in getting his app to work. However, I took solace knowing it was precisely because of all of my little speedbumps that I was able to build my awesome app, and also help him get his up and running quickly. It was a frustrating process, but it reminded me that I shouldn’t ever stop trying and the reward was well worth the pain. I can now truly say I know how to create my own app!

Did you like this post? Text yes no or maybe to 9192300868 and vote! Then view the results here!

Emily Newman
Emily Newman
enewman@bandwidth.com

Emily is a junior at UNC Chapel Hill majoring in Computer Science and Math. She works for the Application Platform team as a Cloud Services Operations intern aiding with technical support tickets. Emily is also the co director of Pearl Hacks, a hackathon for women held at UNC. In her free time, Emily watches the Panthers or anything that is on ESPN. As a native born Brit, she also enjoys her daily spot of tea.

No Comments

Post A Comment