How a Coup d’état in Southeast Asia inspired my first Rails app
After learning Ruby for while, we’re finally getting into Rails. While it seems like an amazing framework, it can be overwhelming for beginner developers in that there’s so many features — it can be tough to keep track of everything that Rails does for you (especially after coming from Sinatra).
I think one of the best ways for me to learn is by building — running into problems and finding solutions around them. I just need something to build.
U.S. State Department & Travel
The U.S. State Department monitors situations that arise overseas and provides warnings and alerts to any U.S. Citizens who are considering traveling to that area. The cause of these advisories can be anything from a natural disaster to military conflicts (and anything in-between).
In May of last year, while trying to make travel arrangements to Southeast Asia, a government coup was taking place in Thailand.
The military established a junta called theNational Council for Peace and Order (NCPO) to govern the nation. After dissolving the government and the Senate, the NCPO vested the executive and legislative powers in its leader and ordered the judicial branch to operate under its directives. In addition, it partially repealed the 2007 constitution, declared martial law and curfew nationwide, banned political gatherings, arrested and detained politicians and anti-coup activists, imposed internet censorship and took control of the media.
Because of this, I ended up checking the State Department’s updated advisories daily. I quickly noticed that their site had a few problems:
- it was tougher than it needed to be to get to the information that you’re looking for (so many links to scan through).
- While on an individual country’s page, aside from a brief 1–2 paragraph summary, the advisory information they provided didn’t do a great job at giving a complete picture as what was going on. Often this information was trailing events as they were unfolding in near real-time. I usually ended up heading to other resources to get more in-depth coverage of the latest info as it was happening.
Simplify & Offer More
I feel like all this information can be better packaged to create a user experience that’s easier and more complete. The current State Department site doesn’t really take advantage of any of the many great resources we have available on the web (especially the really awesome communication and location tools) — it’s pretty much the same now as it was 20 years ago.
When I got to Rails, it seemed like it would be a great framework to build a project like this on — so it’s where I’ll start.
With this project I’d like to incorporate the use of a few different APIs in hopes of making a more complete, up-to-date experience.
Available Data & APIs:
- U.S. State Department (RSS) — offers the latest data on any country / region currently under a travel warning or alert. They provide this information through an an RSS feed (via an up to date XML file) via the developers section of their site.
- The New York Times (API) — the goal is to be able to display links to articles and media relevant to any travel advisories at a specific country / region from the time that the warning was announced until the present.
- Google Maps (API) — I’m thinking that there’s a way to set each country’s map to feature that entire country upon the page load, but I think the challenge here would be finding a way to start zoomed into (detailing) the specific region that’s specifically mentioned within an advisory.
In the future I might consider integrating additional APIs (Twitter, Instagram and others), but for now I think this is a good start as I begin to dig deeper into Rails and find ways to take advantage of the many great features it has to offer.