Broken_robot_wide

Collected Writings

Handle Legacy Semester Naming With Ease

Thursday, January 07, 2010

If you’re at Cornell University, that is. Cornell used to use an archaic numeric coding system to designate different semesters, 70 = Fall, 20 = Spring, etc. But a few years ago, the University switched from that system to a new one, using letters: F = Fall, S = Spring, U = Summer. [...]
Read Full Post

Ruby Trick Of the Day

Tuesday, November 24, 2009

I was browsing through the Rails source code, and came across this nice little snippet. To paraphrase: ["val1","val2","val3"] * '&' # returns => "val1&val2&val3" Yes, multiplying an array by a string does the equivalent of an array join() method. So the above is equivalent to: ["val1","val2","val3"].join('&') # returns => "val1&val2&val3"
Read Full Post

Using Google To Host Your Javascript Assets

Wednesday, November 18, 2009

Well, not all of them, but some big ones. I noticed the other day, via Google’s AJAX Libraries page, that they host a variety of popular JS frameworks that you can load directly via the standard <script/> tag. So instead of hosting, say, JQuery, on my own server, I can just reference Google’s copy like this: <script [...]
Read Full Post


The Morning Read

Monday, November 16, 2009

Metaprogramming in Ruby seems to be today’s topic: Understanding Ruby Singleton Classes – a.k.a. “anonymous classes”, these are not to be confused with the singleton pattern, which was news to me. Metaprogramming in Ruby: It’s All About the Self – details the subtle differences in the “self” object during runtime and the effects of Ruby’s “metaclass” structure. The [...]
Read Full Post

CU Web Forum Talk Up on SlideShare

Sunday, November 15, 2009

For any interested parties, I posted my recent talk where I presented about Ruby on Rails to the Cornell Web Development community. The talk is two parts, the first being a background to Ruby on Rails, and the second covering the challenges and payoffs that came from integrating Rails into our PHP/Oracle environment. You can [...]
Read Full Post

Oracle ENV Vars in Phusion Passenger

Wednesday, November 11, 2009

Rails’ oracle adapter needs to see your Oracle environment variables in order to hook up to the database. In an old post, I described how to do that before Phusion Passenger could handle it naturally. As of 2.2.3, Passenger can now pass server ENV variables to the Rails environment directly, via the “PassEnv” [...]
Read Full Post