Why Leave IT app

I was bored some evenings ago, so I decided to recycle some information scraped from a web site for the creation of a web app that provides one reason to leave Italy for every day (in some pseudo-random way).

The web site is Italiansinfuga.com, handled by an Italian emigrated many years ago and now living in Australia. In this site there are a lot of useful information for anyone that decided to leave Italy.
unfortunately in this last years Italy is not a good place for living especially for young people (there are few jobs, salaries are low and corruption is widely diffused…..).

There is a lot of young Italian people who would like to leave Italy and go in other countries like UK, Germany and even USA. That’s why the site administrator created a poll asking exactly “one reason to leave Italy”.

This is why I has got the idea for the creation of this web application! (not very nice…I know.. :-\  )

I extracted the data from this website, parsing the HTML page containing it, and I saved them in a text file, one phrase per row.
The dataset is composed by over 300 “reasons” and so it could be used to propose/suggest about one reason for each day of a year.
The idea is to create a classic web application (3-tier) where the Data Layer is composed by a static .txt file containing the reasons, the Business Logic composed by a Java Servlet (passing data through HTTP’s methods) used to decide which reason return to the user and the Presentation Layer composed by HTML + CSS + JAVASCRIPT used to show the selected reason.
Defining the row number like an identificator of each reason, it is used to determine which reason to return: current_day_number % #reasons.

I also included some share buttons for the main social networks and an about session reporting the principal information for the developing of this small (un)useful web application. I have done it using this wonderful tutorial where there is explained how to introduce some social network capabilities in any web site (composing URL and associating them to elements, instead of using standard icons and javascript code).

The web app has been hosted in the Google App Engine for free and could be reached at this link.