Click here to Skip to main content
Click here to Skip to main content

A Very High-Level Outline for a Way Cool Utility

, 24 Nov 2014 CPOL
Rate this:
Please Sign up or sign in to vote.
In which the author takes the "That is an Exercise Left to the Reader" cop-out to Extremes

What Nerve That Guy Has!

This may be the strangest article you'll ever read on CodeProject - instead of showing you how to accomplish something in code, it instead outlines the steps necessary to create what I think would be a hip/fab/groovy/cool utility, leaving the actual writing of the code to whoever wants to tackle it - I'm taking "armchair coding" to a "whole 'nother level" with this.

Here's the idea: From a list of names (they have to be people who are famous enough to have a Wikipedia page), extract the person's birthplace and, if they are an athlete, the position they play. If they are a musician, the instrument they play. Assemble this information into the necessary code to generate a map displaying a marker on each person's birthtown, along with information that will display when the marker is selected (clicked or touched). The information would be their name, the name of their birthtown, and the position/instrument they play).

Simple, right? Here it is in a skeletal outline:

  • Assemble the names
  • "Wikipidify" the names
  • Extract the birthplace and position or instrument of each subject from their wikipedia article
  • Generate a map with markers for each birthplace

And now with a little more detail/implementation suggestions/clues

Assemble the names (for example, from a site like this one use HTML Agility Pack to parse the contents

Wikipedify the names (see my tip here for a method to do that

Extract the birthplace and position or instrument from their wikipedia article (use HTML Agility Pack for this, too)

Generate a map with markers for each birthplace using a combination of HTML, CSS, and jQuery and the gomap jQuery plugin (see my tip here or the one it references here)

As an idea of what the utility could generate, here's a scream shot of a map of the USA showing markers for the birthplaces of the various members of the Eagles, with one marker selected:

You can czech out a web site with various collections of markers here

Okay, I'll at Least Give You a Little Pseudocode

Some very rudimentary pseudocode might be:

public Class athleteInfo { String name, String birthplace, string position }
public Class musicianInfo { String name, String birthplace, string instrument }

List<string> names = GetNamesFromSite("http://...");
List<string>wikipediaURLs = GenerateWikiURLSFromNames(names);
Collection<playerinfo> playerData = GetPlayerData(wikipediaURLs);

...and for the jQuery to generate to insert into the HTML file, something like this:

address: 'Chico, CA',
title: 'Aaron Rodgers',
html: '<h1>Aaron Rodgers</h1><h2>Chico, California</h2><p>December 2, 1983</p>'

Note: the goMap jQuery plugin is available here

The Greatest Thing Since Sliced Breadfruit of the Loom

With this utility, a user could (theoretically, anyway) simply provide the URL for a website that contains a list of names, and the HTML map file would be generated in 3.14 shakes of a lamb's tail (AKA "Shepherd's Pi"). It would take a little longer than that to write the utility, of course, but after 10 gazillion people used the utility, it would make the expended time seem a mere pittance in comparison.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

B. Clay Shannon
Founder "Across Time & Space"
United States United States
Ideaman and Coder at Across Time & Space, creator of the Windows Store App "Photrax", which can be downloaded as a trial (7 days) from
Peripatetic and picaresque, I have lived in eight states; specifically, besides my native California (where I was born and where I now again reside) in chronological order: New York, Montana, Alaska, Oklahoma, Wisconsin, Idaho, and Missouri.
I am also a writer of both fiction (for which I use a nom de plume, "Blackbird Crow Raven", as a nod to my Native American heritage - I am "½ Cowboy, ½ Indian") and nonfiction:
Follow on   Twitter   Google+   LinkedIn

Comments and Discussions

QuestionWhy you should not write a CodeProject article while drunk... PinmemberWing Flanagan25-Nov-14 9:56 
SuggestionRe: Why you should not write a CodeProject article while drunk... PinmemberjediYL30-Nov-14 13:03 
QuestionWhy not create a GitHub project so everybody can contribute ? Pinmemberfredatcodeproject25-Nov-14 2:42 
AnswerRe: Why not create a GitHub project so everybody can contribute ? PinprofessionalB. Clay Shannon25-Nov-14 4:18 
GeneralRe: Why not create a GitHub project so everybody can contribute ? Pinmemberfredatcodeproject25-Nov-14 23:10 
GeneralMy vote of 3 PinprofessionalBillWoodruff24-Nov-14 13:49 
QuestionEagles... PinprofessionalRavi Bhavnani24-Nov-14 8:23 
GeneralInteresting to think about PinmemberMember 1096435411-Aug-14 11:44 
GeneralRe: Interesting to think about PinprofessionalB. Clay Shannon11-Aug-14 11:57 
GeneralMy vote of 3 Pinmembernewton.saber10-Aug-14 7:07 
GeneralInteresting thoughts! [modified] PinmemberDouglas Hill9-Aug-14 12:39 
GeneralRe: Interesting thoughts! PinprofessionalB. Clay Shannon9-Aug-14 16:07 
GeneralRe: Interesting thoughts! PinmemberDouglas Hill9-Aug-14 20:36 
GeneralRe: Interesting thoughts! PinprofessionalB. Clay Shannon10-Aug-14 5:02 
GeneralMy vote of 1 PinmemberAssorted Trailmix9-Aug-14 2:00 
GeneralMy vote of 5 PinprofessionalVolynsky Alex8-Aug-14 22:52 
GeneralMy vote of 1 PinmemberMember 104250068-Aug-14 9:10 
GeneralRe: My vote of 1 PinprofessionalB. Clay Shannon8-Aug-14 9:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.141216.1 | Last Updated 24 Nov 2014
Article Copyright 2014 by B. Clay Shannon
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid