Blockable is a calendar that helps you plan your day. It’s related to some concepts I picked up from Cal Newport in his book Deep Work. Every day, I block out specific time periods on my calendar and allocate them to a specific chunk of work. This tool is designed to replace my paper version.
Using Node.js, I created a program run on the command line that accepts a zip code argument. Then, it does the following:
- Uses a GET request to the Geonames.org API
- Returns the latitude and longitude for the postal code provided
- Uses a second GET request to the Forecast.io API
- Returns the forecast summary for the given latitude and longitude
- Logs out the forecast to the command line
After downloading the project files and installing Node.js, you can run the program like this:
node request.js 33811
The program accepts an unlimited number of zip codes so you could run:
node request.js 33811 33803 80005 80301
You can see the full project files up on GitHub. I’ll walk through my thought processes and the challenges below.