Ramble On

Rambles of a University Systems Manager

Archive for February 22nd, 2007

Quote of the Day

without comments

Peter Lacey’s 2nd Law of Computing:

Whenever the word ontology is used in a technical context, what is being promoted is likely of limited practical value.

Ain’t that the truth.

Written by jayoung

February 22nd, 2007 at 8:09 pm

Posted in Uncategorized

Tagged with ,

Lightroom Direct Positive

with 5 comments

I had the opportunity to go to lunch with Ben and James earlier this week and for the first time in recent memory, our lunch conversation was actually not about work. Instead we talked for a bit about Photography.

There was curiosity about what the “Direct Positive” settings did that I mentioned for this photo:

Let there be light

We talked for a little bit about post-processed manipulation and similar. I did more post-processing (which consisted of mainly playing with Lightroom’s develop settings) than I think I ever really have. I was basically just playing - but I liked how the “Direct Positive” effect looked on that particular photo.

I wasn’t exactly sure what all it did - here’s the original:

OldChevy

It’s underexposed because of the -1EV setting - and a bit washed out - so that’s probably why the saturation settings took so well. I’ve see shots that look like the “Direct Positive” shot before online and in a number of magazines. I’m not exactly how you’d ever pull that off in camera. So I assume there was also some manipulation of things.

Here’s a shot of the Before/After split in Lightroom:

Adobe-Lightroomscreensnapz0

And for the curious - you can actually see the EXACT settings that the preset does (this is so cool for the software geek in me). I’ve seen mention that Lightroom uses Lua for it’s interface - so I’m guessing this might be a Lua structure/hash.

From:
~/Library/Application Support/Adobe/Lightroom/Develop Presets/Direct Positive.lrtemplate

s = {
       title = ZSTR "$$$/AgDevelopModule/Templates/DirectPositive=Direct Positive",
       internalName = "DirectPositive",
       type = "Develop",
       value = {
               settings = {
                       AutoBrightness = false,
                       AutoContrast = false,
                       AutoExposure = false,
                       AutoShadows = false,
                       AutoTone = false,
                       Brightness = 0,
                       Contrast = 0,
                       ConvertToGrayscale = false,
                       Exposure = 1.15,
                       FillLight = 0,
                       HighlightRecovery = 25,
                       HueAdjustmentBlues = 0,
                       HueAdjustmentCyans = 0,
                       HueAdjustmentGreens = 0,
                       HueAdjustmentMagentas = 0,
                       HueAdjustmentReds = 0,
                       HueAdjustmentYellows = 0,
                       LuminanceAdjustmentBlues = 0,
                       LuminanceAdjustmentCyans = 0,
                       LuminanceAdjustmentGreens = 0,
                       LuminanceAdjustmentMagentas = 0,
                       LuminanceAdjustmentReds = 0,
                       LuminanceAdjustmentYellows = 0,
                       Saturation = 0,
                       SaturationAdjustmentBlues = 55,
                       SaturationAdjustmentCyans = 75,
                       SaturationAdjustmentGreens = 0,
                       SaturationAdjustmentMagentas = 0,
                       SaturationAdjustmentReds = 0,
                       SaturationAdjustmentYellows = 25,
                       Shadows = 14,
                       SplitToningHighlightHue = 0,
                       SplitToningHighlightSaturation = 0,
                       SplitToningShadowHue = 0,
                       SplitToningShadowSaturation = 0,
                       ToneCurve = {
                               0,
                               0,
                               255,
                               255,
                       },
                       ParametricDarks = -20,
                       ParametricHighlightSplit = 75,
                       ParametricHighlights = 60,
                       ParametricLights = 10,
                       ParametricMidtoneSplit = 50,
                       ParametricShadowSplit = 25,
                       ParametricShadows = -60,
                       Vibrance = 0,
                       WhiteBalance = "As Shot",
               },
               uuid = "5410FFE9-3355-4A55-A1A5-582782F72BC5",
       },
       version = 3,
}

Basically - a kick up of the exposure and highlight recovery - and a lot of saturation settings (plus a change in the tone curve). This is a really cool way to pass around and apply settings.

Written by jayoung

February 22nd, 2007 at 7:34 pm

Posted in Uncategorized

Tagged with

Upgrading your Rails 1.1 application to Rails 1.2

with one comment

So, I’m in the process of getting our servers upgraded to Rails 1.2.

( We don’t freeze rails, because contrary to the cult of Rails, freezing is not the way to go in small, controlled shops with multiple applications. If say, you have to upgrade your Rails, NOW NOW NOW - it’s much better to upgrade the system, and not every copy of your application everywhere, but I digress)

That process, of course, involves making sure our applications work with Rails 1.2 and eating my own dog food - this is what a cursory run through of the application that I’m responsible for had me running into:

Deprecations

The biggest issue - which really isn’t an issue, which was cool - seems to be the deprecations coming in Rails 2.0. But for anyone playing along with the home game - deprecations are errors. (maybe I should start a “Cult of the Clean Log”).

The deprecations I had:

  • multiple references to @request, @params, @session…
  • references to @flash, including a really odd error that resulted from the fact that I had a partial named “_flash.rhtml”. Thankfully I wasn’t the only person that ran into that
  • a lot of start_form_tag and end_form_tag references. And while I to this day get a little squicked out by phrases like “syntactic sugar/vinegar” - I do very, very much like the block form for <% form_tag(:action => :blah) do %> ... <% end %>

Aggressive Unloading

In the famous words of Keith Jackson:

“Whoa, Nellie!”

So we are probably doing something incredibly stupid and against every known convention of Ruby and Rails - but, hey, it works. We have an class for application configuration that we use a class variable to store persistent configuration information (with a default set of values, merged with values loaded from a configuration file where appropriate). Prior to now, we’ve happily loaded this up on application startup in environment.rb to load the configuration - and even in development mode, the class stayed loaded throughout the lifetime of the mongrel process.

Well, apparently in development mode in Rails 1.2 - the automagic dependency management has significantly changed (ob. ref. Jonathan Weiss and the RoR weblog. That’s cool, it’s probably what it should be, and what I’m doing in this application probably isn’t “the right thing.” But the AppConfig class would unload, and be reloaded and because the load_config method was only called in environment.rb, it was Oops’ing all over the place. My hack was to load the config within the body of the class, so it would do it when the class was loaded (loaded might not be the right word here). If I continue with this AppConfig thing - what it probably should be doing on accessing the configtable is to have checks that when it’s nil - reload the config. I’ll solve that one later, thankfully for now, it works again.

If any Rails person that actually reads this has any kind of visceral - “why the heck do you guys do that?!?” - reaction - and know a better way of doing this (the whole persistent configuration-defined-at-run-time-not-in-code-or-the-db problem) please do share.

A HUGE “thanks!” to the Rails team for including Dependencies.log_activity = true as part of dependencies.rb. That helped a lot - and helped provide a glimpse into the automagic dependency management of Rails too.

Written by jayoung

February 22nd, 2007 at 10:37 am

Posted in Uncategorized

Tagged with

Site of the day

with one comment

If you aren’t following Jessica Hagy’s “indexed” site, you are missing out.

This is much, much, much, much better than the popular (and why, I don’t know) gaping void site.

Today’s gem:

Card689

(please note: this does not describe my boss. It does indeed describe some other bosses I know however :-) )

Written by jayoung

February 22nd, 2007 at 9:54 am

Posted in Uncategorized

Tagged with