Wed 10 December 2014

Filed under About Python

My first project. And I learned tons.

Been working my way through Core Python Programming. And having lots of fun. Learning tons, quickly. Strings, functions, classes, loops, comprehensions, iterables, tuples, and the many attributes and properties of each. And also the libraries. What cool stuff I could do. When I get past the tutorials.

But there's nothing like working on real life problems. With peers. And being able to tap into the experience and knowledge of mentors. That is what I got during my stint at Hacker School during fall 2014.

In previous jobs, I had worked side by side with the programmers on solutions to our company's needs. So I had an idea of the magic of what computer programmers can do. And finally, I decided to learn it for myself. And I love it.

So when I got to Hacker School, even though I didn't have much programming under my belt, I jumped right in. I started working on a real solution to a small challenge. Nothing fancy, but useful to some people: Some school teachers were having a hard time determining if it was too cold to go outside to play on winter days. They had been given a chart with wind-chills and colors indicating how comfortable it would be for outdoor play. They found it confusing and wanted something simpler to understand. And so I had an idea for my first application.

It involved getting the current IP address (using http://icanhazip.com/), and then the corresponding longitude & latitude coordinates (using pygeoip.GeoIP) and then finding the current weather using those coordinates (using the forecast.io weather API). I wrote it in Python, with Flask. I'll put it up here some day soon.

Maybe an ambitious project for just starting out. But that is the best part of Hacker School. Tapping into the experiences and help from peers and the facilitators. Lots of people showed me little tricks and tips to use to build this little application. And it gave me lots of practice with peer programming and review. I am so grateful to all who helped me muster through the project.

Once it was working well, I added some extra features to make it even more useful. Like finding the weather based on zip code. For that I used the zippopotamus API (api.zippopotam.us). I even set it up to send daily emails (using mailgun) and/ or texts (using twilio) to the teachers using the data stored in a SQL database.

In the end, from this one project, I got to work with JSON files, html, HTTP GET and POST, APIs, lots of the Flask commands. Later, I refactored it to work with SQLAlchemy and WTForms.

Not bad for my first foray into programming.

Comment

DeeKras.com © Dee Kras Powered by Pelican and Twitter Bootstrap. Icons by Font Awesome and Font Awesome More