Shifra Pride Raffel's blog
Agile...but not in the wrists
So many of my colleagues have some degree of trouble with their hands/wrists/arms. It's a serious occupational hazard. Agile coding is a slightly different ballgame for me in terms of wrist problems.
javascript_include_tag in Rails
Want to avoid feeling like a chump and spending countless hours troubleshooting a crazily-stupid-simple problem?
When you enter a .js in your javascripts directory and include it using a javascript_include_tag, take the <script> tags off the front and back.
You probably knew that already. Why didn't you tell me sooner?
Javascript thoughts of the day
Frankly, I used to disdain Javascript. I thought of it as a toy language (even though my friend Jim Davis implemented a huge nasty content management system in it and kept telling me that there was nothing toy about it). Proficiency in Javascript used to be a marker of low status in my eyes (well, except for Jim, who I just thought of as being perverse). Whenever I had to do anything with it, I swore about the constant errors, the lack of tools, and the general infernal twistedness.
Doing some more javascript and JSUnit stuff today, I'm quite impressed. Firebug allows you to console.debug any object and even to expand your command line to be a good usable size. I finally and reluctantly admit that Javascript is really worth knowing, and you can do serious TDD development with it using JSUnit. Sigh. If only I had listened to you, Jim.
OpenSocial
Okay, it's not ready for prime time. But it was entertaining digging into OpenSocial and making some gadgets for the Orkut sandbox. The ability to write arbitrary data easily to a feed stream from the client side is going to be very handy.
Now I just want someone to explain to me why there are already several projects on Rubyforge that claim to be Rails OpenSocial projects. Someone should just port from Shindig after it's ready.
Your Object Mama
I'm more and more convinced that Object Mothers are the way to go to manage test data. I owe my introduction to this pattern to David Goudreau.
A few users and items in fixture data so that you can start up your application and test without adding things from the UI... and then let your tests be self-sufficient: make an Object Mother that generates objects for you with sensible defaults. Instead of relying on fixtures, you know you have an object that nobody else will change. Excellent for reducing test fragility.
It can make builds a bit slower, but the test robustness is worth the tradeoff to me.
I'm busy adding it to my Selenium Tests today and basking in test robustness.







