On The Money

Ruby/Finance is finally available for public consumption. I released version 0.1.0 yesterday evening to a deafening roar of silence.

Currently, it handles basic Yahoo Finance stuff, such as currency conversions and stock data retrieval from the American, Australian, Asian and European markets. As such, it replicates some of the functionality of Perl‘s Finance::Quote and is somewhat based on its design. In fact, whilst running unit tests, I was amused to find that I had even managed to faithfully port one of Finance::Quote‘s bugs.

For the foreseeable future, I’ll be adding more of Finance::Quote‘s functionality to provide Ruby users with the same range of features that the Perl crowd enjoy. After that, who knows?

The next module I’ll be implementing is one to retrieve stock data from Amsterdam’s AEX exchange.

Posted in Ruby | Leave a comment

Take A Hike

We made another conscious effort to get out into nature on at least one day this weekend. We had planned to head up to Point Reyes, but that seemed like altogether too much effort on the day, so we drove over to Castle Rock State Park instead, where we went on a 7.7km hike and totally misjudged the heat.

The forestry was lovely and the views across the valley beautiful, but we could have done with more water for the trek. With all of the photos we took, it took a good few hours before we emerged, quite dehydrated and soaking wet with perspiration. Still, at least we were able to buy a couple of bottles of water from the ranger hut on the way out.

Castle Rock State Park lies in the Santa Cruz mountains, up behind Saratoga. It’s very scenic and I highly recommend it if you’re ever in the area.

Posted in Life | Leave a comment

The Bug Returns

I’ve been farting around, looking for another programming project to sink some time into. I haven’t felt like doing any programming for a couple of months now, and I needed something to get my teeth into enough that it would draw me back in and make me excited to play with my computer once more.

More and more, I find myself losing interest in computers, not just professionally, but to a lesser degree, personally, too. I hope that’s just a symptom of feeling jaded and burnt out. I’d hate to permanently lose interest in a hobby I’ve had for most of my life, but we all get older and some of us even get a little wiser in the process, so maybe that’s the direction I’m heading in. I don’t think so, though; I think this is just a temporary malaise.

Anyway, I released version 0.8.3 of Ruby/Amazon a few days ago, but that was hardly a major event. It’s already the most complete high-level language interface to Amazon’s Web Services, so this release was just to add support for HTTP proxy servers. Some poor unfortunates still have to use those, I suppose.

Now back to my story. With Sarah’s company (well, her employer’s company, to be precise) having gone public last week, I fished around on RAA for a library to help me write a stock price grabber. To my surprise, there wasn’t yet anything available.

Well, it didn’t take me long to hack up a few lines of code to grab the current price and plonk it in the sidebar on our front page, as well as e-mail a copy to Sarah at work when the integer dollar price changes.

That set me thinking, though. E-mail is all well and good, but I wanted some kind of scrolling applet on my desktop. Unfortunately, ruby-gnome2 doesn’t seem to support the GNOME panel yet, so that was out as a possibility. Oh well, I thought, there must be a GKrellM plug-in out there and, sure enough, I quickly found what I was looking for: GkrellStock.

Upon untarring the archive, it quickly became apparent that this software would need Perl’s Finance::Quote., which I vaguely remembered once having read a little about. Anyway, once I’d acquired that, I was up and running with GkrellStock.

Finally, I’m getting to the point of the story. With Sarah’s company already floated on the stock market and mine destined to do the same at some point in the coming months, the need for a Ruby library to handle one’s financial networking is greater than ever. And thus was begun the effort to port Finance::Quote to Ruby.

After a few hours of hacking, I have implemented about 15% of what Finance::Quote can do, but even this is enough to have GkrellStock now work via Ruby/Finance or whatever it ends up being called.

I don’t normally port things, as it’s too much like reinventing the wheel and thus usually strikes me as a poor investment of my time. However, since the Ruby world is so lacking in this area, it seemed appropriate to put some time into the project. Depending on how much time I can spend on it this week, I should have something I feel comfortable having the hoi polloi gawk at pretty soon.

It really is quite nice to be hacking again.

Posted in Ruby | Leave a comment

Big Spender

I’ve thus far neglected to mention that Sarah recently bought a Canon S500 5 megapixel point-and-shoot camera.

We found that we weren’t taking our big camera with us when we knew in advance that it would be cumbersome to have. Koninginnedag in Amsterdam was a good example of that. As a result, we didn’t take any photos, so it seemed justifiable to get a second, smaller camera, that we can be reasonably sure of feeling comfortable enough with to take it with us whenever there might be the slightest chance that we would want to take pictures.

It’s a great little camera, although I haven’t learned how to use it yet. Sarah’s taken it to Providence with her and I’ve been busy learning my way around our new A2.

Posted in Life | Leave a comment

While The Cat’s Away

Sarah’s out of town, visiting her parents in Providence for the weekend, before flying to Toronto for a couple of days’ work.

That left me at a loose end, so I went for a couple of coffees with Geoff and dug out a couple of great British DVDs, namely The Firm (no, not that one; the great BBC film with Gary Oldman) and Mike Leigh’s irrepressible protaganist, Johnny, in Naked.

Incidentally, it’s a mystery to me why Naked isn’t available in either the UK or US on DVD. I had to buy a region 4 copy from a shop in Australia a year or so ago. Another masterpiece not yet on DVD is Willy Russell’s brilliantly observed Shirley Valentine. I wish the studio would get its act together and commit this tale of domestic heroism to the digital medium. Oh well; I digress.

Anyway, apart from watching those films with Geoff, I also headed up to my once home of San Francisco again on Saturday to take some shots of the Golden Gate Bridge and, especially, to try out my new wide-angle lens. As usual, a new album of photos is the result. Unfortunately, the wide-angle lens can’t take filters, so it’s impossible to block out haze and achieve better colour saturisation through the use of a polariser, but the results are quite nice, nonetheless.

I’ve finally finished wading through the A2‘s 180 page manual and can finally start reading O’Reilly’s Digital Photography Pocket Guide by Derrick Story. That thing is small enough that I can cram it into the camera bag and refer to it while on holiday, which is one of the reasons I bought it.

One other book I have to read in fairly short order is Elio Pelzers’ Dutch Faerøer guidebook. Since The Lonely Planet published the 5th edition of their book on Iceland , they’ve dropped the coverage of the Faroe Islands (and Greenland, for that matter), leaving very little in print about those tiny, remote islands in the North Atlantic. We still have our copy of the 4th edition, which has decent coverage of the Faroes, but I wanted another perspective and a Dutch book will be good for that. Apart from that, there are a couple of German language guidebooks to the Faroes, but my German isn’t really good enough to elicit the full benefit from those.

Plenty to do and no sodding time. Business as usual, in other words.

Posted in Life | 3 Comments