May day bike ride on Tioga Road

Self-portrait blocking the scenic mountains

On the weekend I found out that Tioga Road in Yosemite (which I knew had been completely plowed, but not yet open) was open to bikes. I did this ride last year (although 7 weeks later in the year) and enjoyed it enough to want to go again.

The temperature was nice (in the low 60’s) and sunny in the morning. By mid-afternoon the clouds were building and I was afraid I might get a little rain shower. The road was clean and dry except for where repair work was being done and they had scraped debris out of the edge of the road onto the road surface and were scooping it up with a skip-loader. I had about 2 miles of this and luckily didn’t pick up any sharp objects in the tires. Other than the road crews and a ranger patrol I only met 2 other cyclists.

I wish I was stronger. I’d love to be able to get to Olmsted Point. After the climb out of Yosemite Creek canyon it would be fairly level with really magnificent views. Unfortunately, after I crested the ridge at 8300 ft just before the descent to Yosemite Creek (which gives up about 900 ft), I could tell I needed to turn around. As it was, I logged 32 miles and 3300 ft of climbing.

Links
Biking Tioga Road 2012 photo gallery

Learning to program, again

I haven’t written a program since Pascal was in it’s heyday. I learned to program in FORTRAN, then picked up assembly language for a couple of different DEC mini-computers, and finally became fluent in Pascal. Notably, C is not a language I have used, nor is Unix/Linux an OS I’m really familiar with.

Learning a new programming language on a new OS is not something I can do in snatches of time. I’ve tried, and become terribly frustrated. So, I’ve been devoting concentrated effort on learning Python (2.7.2) on OSX (at the terminal obviously, no fancy GUI stuff yet). I started with figuring out how to read stuff from a file, do something with it, and print some things. That introduced me to strings, lists, iterators, and files. Somewhere during looking stuff up on the web I ran across a reference to Project Euler, a programming challenge website.

Then I found Python-coded solutions to the first 50 problems, so using that as my crib sheet, I started writing my own solutions to these problems. This has been a steep learning curve for a couple of reasons. First, lots of Python constructs look like greek to me, and it takes me quite a while to figure out what they do and how I can apply them. Second, some of the problems require math concepts that I may have once known about back in college, but having never used them, I’m now learning them again.

Python is very interesting and powerful. It generally doesn’t take very many lines of code to do some very useful stuff. For instance, one of the problems was to find the left-most 10 digits of the sum of one-hundred 50-digit numbers. Since Python has long (really long…) integers, the program is almost trivial.

    big_numbers =(int(x) for x in data.problemx.strip().splitlines())  
    return int(str(sum(big_numbers))[:10])
I don’t yet think like a Python programmer. My programs are longer (more lines) than the examples I’m following, but sometimes run faster. I think my old programming experience is still causing me to think about the size of data structures and keeping them to a minimum.

I’ve completed 15 of the problems, but they are getting harder, so I may stop and see if I can get some simple cipher tools developed.

Geocaching milestone

Thanks to a few days of caching in the desert, in particular the Planes, Trains, and Automobile series near Barstow, I’ve reached over 4,000 caches found.