Skip to content

Instantly share code, notes, and snippets.

View samuelteixeiras's full-sized avatar

Samuel Teixeira samuelteixeiras

View GitHub Profile
"Walking on water and developing software from a specification are easy if both are frozen."
- Edward V Berard
"Computer science education cannot make anybody an expert programmer any more than studying brushes and pigment can make somebody an expert painter."
- Eric S. Raymond
"Talk is cheap. Show me the code."
- Linus Torvalds
"In God we trust. All others must bring data."
// These two need to be declared outside the try/catch
// so that they can be closed in the finally block.
HttpURLConnection urlConnection = null;
BufferedReader reader = null;
// Will contain the raw JSON response as a string.
String forecastJsonStr = null;
try {
// Construct the URL for the OpenWeatherMap query