Photo Cat
8:20 PM 7/7/2009Yes, alright: My photographs are not particularly well organized on this site. I even post different photos on Facebook sometimes to attract the people I know there to come here and take a look. Although, I'm not sure if they do. At least one person looked, because they discovered a broken link (I typed the filenames too fast...), and then asked if I had an RSS feed.
I used to have an RSS feed. With the old blog format. But all those posts are stored in a database... And, all the photos are in directories on the server... Maybe there's an idea lurking there.
As much as I like the scripting language Ruby, it doesn't seem to have a graceful way to interface with databases on a web server. Somebody noticed this, and Rails was born. I've talked about this several times in the past, there's no use in belaboring the point. Just suffice it to say that Rails is Rails: A very long list of extensions to Ruby. Namespaces and classes; Methods and constants. Any given Rails "application" includes dispatching scripts, configuration files, "rake" files for automating deployment with the rake utility, "gems" which must be managed with the gem utility (you better make sure all the current versions are installed, or that there are no conflicts...)
People say Rails is powerful and easy. I agree that it's powerful. I might even understand it after I've written a few hundred Ruby scripts. You see: that's called learning. It isn't ever easy in the strictest sense. When I opened up Ruby files from my old blog, I couldn't make sense of them. The language was easy enough, but I possessed no explanation for what any of the names referred to.
But, I digress... The point here is:
I wrote a Ruby script to show off all the photos from the blog still living on this server. It's called Photo Cat. It's a pun on the Unix/Linux 'cat' command, and the fact that the Internet is little more than a bunch of cat photos... Whoops, did I say that out loud?
In a way, it's boring: The script you see is not particularly dynamic. When I add photos to the server, I'll run the back-end version, which compiles a list in YAML format. (That Rails blog was full of YAML files. You don't have to know what it means. It's for storing and retrieving arbitrary data structures in text files. You just have to know that I thought it was important for me to practice using some.)
Looking at all the thumbnails together on one page, I discovered two things: 1) It took a few months for me to settle in on a standard size, and 2) I didn't used to tinker with the images so much in Photoshop.
Anyway... Go on and take a look. It's in reverse order, close enough to how they originally appeared.