Week5: JavaScript and APIs

A bit more than five weeks ago I tried to read a programming book. It was recommended as one of the best books to learn Ruby with. I had a feeling that „The Well Grounded Rubyist“ was a really good book. But I didn’t understand it. The author David A. Black writes about hashes, arrays, variables and things called methods that are called on objects. It wasn’t a very pleasant read.

This week I have started to learn JavaScript. My second programming language after Ruby and I am impressed how much easier it is. Not because JS is somehow easier (it actually looks a bit intimidating in the beginning). It’s easier because I can focus on vocabulary, syntax and differences between the two languages now. The basics are the same. I am far from being completely fluent in either of those languages. But with the documentation at hand I can get things done. I was very happy to find that I could write Fizzbuzz and the airport-challenge in JavaScript as well.

The language of the web

So far I like JavaScript. I got used to the brackets and curly braces within days. What I like the most? It’s deep connection to the web. There is no modern browser it doesn’t run in and it’s hard to find a website that doesn’t include any Java Script. After a ten-year-long intense relationship with the web, I am finally learning the language web services communicate in.

Today I wrote a little script that pulls a list of 38 cities onto a simple website. When the user chooses, let’s say Athens, from the menu, my script connects to the API (Application Programming Interface) of openweathermap.org and returns Athen’s current temperature. I was quite excited about this useful little tool. So excited that I stayed at the academy until I had found a way to get the cities‘ geo coordinates and query Instagram photos taken around Greece’s capital as well. Once the layout is somehow presentable I will show you my first handmade mashup.