FINALLY! SOME UPDATES! This website is being reconstructed. Some content will go away soon. If you want to see my new stuff, visit my github: https://github.com/jrcharney/.

September 25, 2013

Making Rubies

Oh, Ruby, why did I not start programming with you sooner? Over the past couple of weeks, I've picked up on Ruby faster than any programming language since I started programming ever. Maybe it is because it is built on a lot of stuff I already know from previous programming languages. Maybe it's because it's the most stress free language I've ever used. (No drama like C, C++, Java, PHP, Perl, or Python.) And aside from my understanding of blocks still be rusty, and still not exploring Procs yet, working with Ruby has been the most joy I've ever had programming since fiddling around with JavaScript about a decade ago.

Ruby
Ooooh, shiny.

I think once I get getlsxlsr rewritten, I'll dive into Rails and see what that is like. Heck, I might just take this website offline for a couple of week just to rewrite everything in Rails.

One of the things I did over the past couple of weeks was attempt to draw UML diagrams of the Ruby Core Documentation drawing the relationships between Ruby Classes and Modules and the Files the belong to ([1.8MB]), and the hierarchy of Ruby Classes and Modules by relationship ([1.7MB]). These files a quite big, and as much as I tried to whittle down their size with a little bit of Imagemagick, try to be gentle with my bandwidth when downloading them.

The other thing I did was re-create a personal script I've been using for my dad's roofing business to calculate the distance from his office to reported storm reports files with the local National Weather Service office. This script was called getlsxlsr.sh and it used a lot of Sed and Awk, but it wasn't Object-Oriented.

By the time I finally got the major bugs out of the Ruby version (which was a few minutes ago, which is like 1 AM!), I finally had something good, that I could present. It's kinda late, so any project page I have planned will have to wait until later. The direction field still has issues as New Baden should be I think south or southeast of where the office is.

It's still a work in progress, but it's one I'm satisfied with sharing.

The program requires Ruby 1.9.3 on up, since the included modules are loaded using require_relative. So here's a wide screenshot of what it would look like.

So what this program does is it takes the Local Storm Reports (LSRs) from a local National Weather Service office (the default is the St. Louis (LSX) office) website, takes the data from the LSR pages that are still up (which have a tendency to be remove after about a week or so), reformats the data into a table row with optional color formatting. It doesn't sound that exciting or impressive given this drought we've had. But when the storms are rolling through and the reports are flooding in, this program looks amazing.

The application of this program is to help find areas where local storm damage occurred. What I hope to use it for eventually is to construct a path or timeline of events. Graphically if possible using PostScript and Google Maps to draw a map of the damage area.

I was hoping to show off my getfips program, but I've run out of time to present it. Maybe later. It's still got some kinks to bang out. This program could be used to dig up zip code information and probably generate canvasing areas for door-to-door sales and political campaigns. More than likely the information for the latter may exist, but the patterns used for campaigning can also be used for sales if no personal data is included.

That's it! I'm done for the night! There's bound to be more goodies later this week.

UPDATE! This project is now on GitHub! I'm still trying to figure out how to use GitHub, but I think I've figure it out well enough to uploat files on it.

Twitter

Tags

Under Construction