PhotoFriday: Golden
Well, I figured I'd better throw down for the PhotoFriday challenge. I was also considering this picture but it was a little too literal, and not as good of a photo.
Well, I figured I'd better throw down for the PhotoFriday challenge. I was also considering this picture but it was a little too literal, and not as good of a photo.
I have been loving work recently.
A fellow geek and I have embarked on a voyage splicing a new technology into a legacy system and it's mosaic or underlying programs. Our architecture is a little funny, in the strange way, not the humorous way. Therefore, I've been presented with a never ending set of hurdles in making rails do what I need it to do.
Which is just the way I like it.
The first order of business was to get rails to talk to several different dataservers and to connect to different databases within each one. It would appear that the magic to make it all happen is to create your own base record that will connect to different databases. To show how easy it is:
# cat lib/different_database_base.rb
class DifferentDatabaseBase < ActiveRecord::Base
establish_connection (:host=>"some_other_server",
:database=>"another_database",
:username=>"jsmith",
:password="letmein")
end
# cat app/model/some_class.rb
class SomeClass < DifferentDatabaseBase
end
That's all you need. Now in your controllers and views, any SomeClass objects will be retrieved through the connection to another_database. We didn't just come to this conclusion, there was a lot of bad before it got this good.
And now, I'm a believer.
I have managed to pull in a couple feature length pictures. I started off with Jackson's King Kong, flew through my old favorite The Incredibles, and finished up with Burton's Corpse Bride.
Kong, was a plesant surprise. I was expecting the worst, considering the usual serial crap that Hollywood has been putting out, but Pete pulled off a spectacular series of events that made for some good entertainment. Although, even I could not suspend my disbelief far enough to believe that you can break a sealed bottle of chloroform against anything organic. Don't agree? Then I would suggest your try breaking a beer bottle over your head without opening it.
The Incredibles is still one of my all time favorites. Pixar, has it all figured out, and that's final.
Burton's view flows along with the view that his other movies portray. I'm glad I didn't see this picture when the hype was at it's highest, as I don't believe I would have enjoyed it as much as I have. At another time, or in different company, the movie wouldn't have been the same. Some people just don't appreciate musicals.
I've posted a set images to Flickr from my recent trip to see Canada on Rails. I'm not sure if the slides will be much use to those who were not at the conference, but they sure work as a great reminder to me.
As I was heading home this evening, I noticed that the sky was getting some nice colour. I pulled into Nose Hill Park just off 64th, set up my tripod and camera (yes, I did just happen to have it with me).
Sunsets are notoriously hard to meter, but we do get a little leeway using digital. The original, manual, way was to bracket your shot, so that you were sure that you would get at least one that was the correct exposure. Now that same old trick is the cornerstone for the new digital hotness.
High Dynamic Range is a trick that was developed to help deal with the fact that digital cameras can't encapsulate as much of a dynamic range than film. The result is much more detail in your blacks and whites, and some amazing colours.
First you need to get some bracketed shots. Most cameras do this automagically, but if you can't figure it out, you just need to use the manual mode to create a set of shots where one is overexposed, one what you believe to be right, and one overexposed. Be sure to use a tripod, or it's all for naught.
Next, you need to load up Photoshop. Select Tools->Automate->Merge to HDR... Browse for your photos and be sure to check off the automatic align source images. Here you can set the colourdepth per channel. I usually run with 16, because my poor PC hates 32, and 8 bit doesn't really gain you much. Now move the slider until you have a good contrast within your shot, then continue. Next you will get to set your exposure and gamma. I usually play them against each other to get the details where I want them in the photo. If you turn your exposure up, you can pull your gamma down in order to maintain the overall greyness of your photo. Vice versa if you want to bring up the details in your blacks and not blow out the whole picture.
You will now have a beautiful image to continue with your normal Photoshopping.