The snow reports have been shut down, at least for the season. There was little or no participation data, so I was unable to show snow storms. Back to the drawing board on that one. The links are active, you are positioned to the day the weather station was shut off.
What does bass fishing have in common with downhill skiing? Well, this page anyway. After seeing the trends produced by the Spider Lake fishing chart I got to thinking it would be nice to be able to see how much snow a resort gets. Well, this year's Add a Man ski trip is to Utah, so I thought I'd check it out.
I set up charts based on weather data from stations at Alta's Rustler Lodge and North Fork Park in Eden, Utah. Both charts share celestial data based on a location in North Salt Lake
that identifies the home of a man living under a highway overpass, right
next to a pair of railroad tracks. Go ahead, take a look, Flash Earth
is pretty cool. It's actually a point in his front yard.
While the charts look the same as the original fishing chart,
it completely different under the covers. This project was my first
attempt at object oriented programming. I have tried several times in
the past to learn OOP, but I just didn't get
it. This time the light bulb finally lit (actually a couple, three
times), and now I get it. I'm still not very good at it, but at least
I'm starting to think differently.
The other thing I've come to realize is that the Document Object Model
(DOM) is the center of all things browser related. HTML talks to CSS
via DOM, and the whole Web 2.0 thing is made possible because of the
Document Object Model. So I'm bypassing HTML all together and building
my own custom DOM controls and displays using JavaScript. If you look
at the HTML source, there is very little to see, but use a DOM
Inspector, and it's all there. The result is much more consistent than
I could do in HTML.
Plus, I can do it on the fly. That's where the dynamic part comes
in. The page first loads the controls and an empty chart, with the word
'Loading...' showing in the current date and time field. Meanwhile, the
data is being loaded. Once complete, the data is drawn on the chart.
And then of course, all of the user interaction is dynamic. This is a
click happy kind of page, click fast to see time flash before your eyes.
My breakthrough came in finding this wonderful tutorial on the object oriented thought process.
It was language agnostic, concept oriented, and didn't use 'foo bar' in
any of its examples. I took notes, on paper, just like I was sitting in
class 30 years ago. I needed the discipline. I learned some good
practices and techniques. The Unified Modeling Language provides a graphic modeling tool that applies to any language, plus a whole lot more.
Then reality reared its ugly head. Ya see, JavaScript is only kinda,
sorta an object oriented language. I had to learn what prototypal
inheritance was. An already complex thought process now needed to be
translated to the real world. And when I finally thought I was ready to
begin the project, I stared at a blank page for four days. Not a thing
for four days. I'd go back and read a little, then study a little more.
Nothing. Not a clue.
Once I finally got started, progress was slow. Eventually, I had a
couple of spurts of activity, but I never really became productive.
Every step of the way, I'd have to go learn how something worked. How
do I build a DOM object? How do I use XMLHttpRequest to communicate
with the database? And what's the best way to return the data to
JavaScript? I know I've made some mistakes, but the nature of objects
is that they lend themselves to refinement over time, and I'm good at
that. Reading this sounds like I've been through hell, but I've had a
ball. Once I get it working just the way I like it, it's all worth it.
Once again, here the link's to:
- Alta's Rustler Lodge snow chart
- Powder Mountain snow chart
Please stop by the forum and let me know what you think.