City Weather Scraper in PHP

Go To City Weather Page

Objective: Do a version of the “Build 14 Websites…” weather scraper challenge with the following improvements:

Scraper PHP:
– Add error detection and reporting
– Return city code
– Improve robustness of 1-3 day weather scrape (not dependent on exact sequence of <span>s).
– Support converting forecast from metric degrees C and mm to degrees F and inches.

Bootstrap Weather page:
– Add test cases to exercise error reporting (see city names Test0 through Test4).
– Update city with city code from scraper if available

Source Code:
https://github.com/bseaver/Demonstration-Projects.git

City Weather Demonstration Web page:
http://seaver99.com/demo/php/wxcitypage.php

The intention of this example is to show anticipation of potential problems in data processing and and the code required to report or resolve those problems.  It also adds a few small  features for completeness such test cases and a check box to convert Centigrade to Fahrenheit.

“MasterMind” an Example of Front End Design and Programming

Below are two links to an original implementation of the “MasterMind” game:

https://bseaver.jsbin.com/badove

https://bseaver.jsbin.com/badove/edit?output

The first link just shows the game and would be a good choice for viewing the game from a small device such as a phone.

The second link allows for easy viewing of the underlying source code as well as the game.

The intention of this example is show an ability to visualize rich features and dive deep to accomplish them while maintaining high values of supportability by other software professionals.

-Benjamin

Update March 2018: This project was inspired by a previous project written in PowerBuilder.  See: http://www.seaver99.com/database-app-running-strong-for-22-years-powerbuilder/

Purpose of Seaver99.com

 

The purpose of this site is twofold:
1. Showcase my thinking and work solving a variety of programming challenges.
2. Share some useful techniques with other computer professionals.

Note: None of the examples here are work I have performed for an employer.  All source code presented is written by me and is freely useable according to the M.I.T. license.

An all-time favorite example of mine is the MasterMind game.  This is a fun game of deduction that will exercise your mind.  It is also an example of Mobile First Design, Functional Programming and Self-Testing.  It utilizes the jQuery and Twitter Bootstrap libraries and the JSBin – code sharing site.

…But don’t stop there.  Please take a look at some of my other recent programming projects on this blog.

Thanks for looking!

-Benjamin

Contact Me