I had the greatest middle school math teacher. His name was Mr. Panning. He was a great teacher. He was a great cross country coach. And especially at that point in my life - he was a great role model.I remember sitting in Geometry my 8th grade year and numerous times hearing students (*cough* myself) saying, "when the heck am I going to need to know this in the real world."
More on that later...
We decided at last week's creative strategy meeting that one thing we wanted to do with the website was to "localize" it to the market we are in. So, for example, if someone from Tucson visits the website, the design reflects the fact we are on KQTH in Tucson. Or if in Fort Wayne, it reflects WOWO. You get the idea.
Pretty unique, huh? Problem is: this is not an easy thing to do.
First, one has to find all 41,700 zip codes and assign a latitude/longitude to each one of them into a database scheme.
Second, one has to then figure out what zipcodes are associated with which radio station (for example WSB in Atlanta has 646 zip codes it reaches). This is not particularly easy due to the fact that every station has a different "reach" even within their own city.
Third, and this is the toughest part, one has to be able to know where you, the web visitor is coming from. The idea is that from your IP address we extract your zipcode (not always reliable). From the zipcode, we extract a lat/lon coordinate.
Fourth, once one has the users lat/lon coordinate then one has to reverse search to find the nearest associated radio market (if there is one).
Second, one has to then figure out what zipcodes are associated with which radio station (for example WSB in Atlanta has 646 zip codes it reaches). This is not particularly easy due to the fact that every station has a different "reach" even within their own city.
Third, and this is the toughest part, one has to be able to know where you, the web visitor is coming from. The idea is that from your IP address we extract your zipcode (not always reliable). From the zipcode, we extract a lat/lon coordinate.
Fourth, once one has the users lat/lon coordinate then one has to reverse search to find the nearest associated radio market (if there is one).
Crazy I know. But what does this have to do with math?
Taking someone's lat/lon coordinates and figuring out what zipcode that coordinates to (and therefore what radio market) incorporates some crazy math. Mainly using the Great Circle Formula to determine proximity:
Earth Radius (3963.0) * ACOS( SIN( Latitude of User * π/180 ) *
SIN( Latitude of Market Zip Code * π/180 ) +
COS( Latitude of User * π/180 ) *
COS( Latitude of Market Zip Codes * π/180 ) *
COS( (Longitude of Market Zip Code * π/180) -
(Longitude of User * π/180) ) )
SIN( Latitude of Market Zip Code * π/180 ) +
COS( Latitude of User * π/180 ) *
COS( Latitude of Market Zip Codes * π/180 ) *
COS( (Longitude of Market Zip Code * π/180) -
(Longitude of User * π/180) ) )
Take that formula, incorporate with a MySQL database schema, sort by distance from nearest to furthest, limit your results to 1 (the nearest) and bam! You've figured out figured out the radio market a web visitor is in.
I guess my punk-8th grade self has his answer 12 years later.
There was a lot I learned back then I never knew how I would use.
I think about the only web programming class I have ever taken was in 7th grade. And the only video editing class I ever took was in 8th grade. The only design class I took was Sophomore year of high school. All while I thought I was going to be a doctor or an attorney.
On top of that, my last math class was pre-calculus my Junior year of high school.
10 years later, and with out a single college class in any of those fields, I find those classes were a great foundation.
What do you think you are learning today that you will utilize 10 years down the road?
I know as I get older I have become less teachable. We become "experts." We think we know what we need to know and ignore the rest. But like 8th graders in math class, just because we can't foresee what we need down the road, it never hurts to learn new things.
As my Uncle once told me, "you are either learning or you are dying." It's your choice.





