Skip to main content

Posts

Showing posts from 2006

Ruby on Rails: How to load session objects into console

This took a little bit of poking around, so I decided to post it here.Basically I was tracking down a bug, which resulted in a corrupt object (cart) in the web session. So I thought, it would be nice to play with this object in the console to see what's up... But how do I get it in there? There may be a more elegant way to do this but here is how I got it to load: Look in tmp/sessions and find the most recent file (ls -alrt on UNIX). Let's say the file is called 'tmp/sessions/ruby_sess.8eb9614a7e4e1e3b' Open console and type: >> session = Marshal.load(File.open('tmp/sessions/ruby_sess.8eb9614a7e4e1e3b')) => {"hash"=>{:cart=... >> cart = session["hash"][:cart] .... In this case I was trying to access a cart object in the session, which was placed in the session with:session[:cart] = Cart.new That's it!

Wanted: 11.3Tb flash drive to move house to a new location

Isn't it just great that these days you do not need a truck to move stuff? As long as the stuff you are moving is digital. I was thinking that in a pretty near future each house may include a giant mass storage that holds everything we own which can be digitized. Such are the books, photos, personal documents, bills, music, etc. All of those things are already available in a digital form, but what about furniture, kitchen counters, decorations, paintings, or the super-heavy piano for god's sake? What if... the house of the future is a completely configurable and intelligent hardware device that can reconfigure itself to it's owner's liking and create those items entirely from it's own supply of materials? What if the paintings can be built into walls and show digitized image, books are digital single-page fold-out with downloadable content, furniture can be created from built-in modules... Then - instead of moving your stuff you just have to download your e…

Married!

Yes, the rumors were true - Telene and I are now married! Holy cow! We both seem to have an afterglow following the wedding, together with a strong sense of how incredibly right and timely this is for both of us. The ceremony happened outside on the terrace at the Cliff House - a beautiful venue atop of San Francisco's never ending ocean beach. Our dear friend Donna conducted the ceremony with a graceful touch and purity. Even San Francisco's world famous fog was welcome (this may be a bit selfish - try wearing a three-garment tuxedo under the sun; I bet girls in open dresses had other things to say about the fog). The band performance was phenomenal, and the wedding reception lasted well over our original estimate. Which is a good thing, because we also managed to have a lot of fun along the way. Add the 2-night stay at the spectacular W hotel in SOMA that followed, with a pool and spa and unbelievable room service, and it's certainly going to be the weekend to r…

San Francisco Ruby Group Meetup - June 2006

Listened with interest to the July presentations at Ruby meetup in San Francisco. This is my fourth meetup and the group has more than doubled.Here is a review of actual presentations...The Danger of the Hype The hype is not receeding, in fact it is only increasing. People are reluctant to discuss shortcomings, and are all about hyping each other up. This is a dangerous ground to be on. I am surprised that at all meetups I've been to, and at the Canada on Rails conference there were exceedingly few mentions of issues, problems, pains. Sure Ruby solves some, but nothing's for free. What's the cost then?As I am coding through my third month in Ruby, I am starting to appreciate both the power and the weaknesses of the language, as well as the framework. It must be the non-conformist in me: I just can't follow the herd without questioning. The J2EE herd is all too fresh in my mind from only a few years ago, so a healthy doze of scepticism is what it is - healthy.…