I moved to the newest version of Ubuntu over the weekend: Feisty Fawn. I was having troubles getting my wireless working (Intel PRO/Wireless 3945) and I had heard it works in Feisty. The upgrade, um, took out my system. Yep. Everything was chugging along just fine until it tried to upgrade Tomcat and then I got a cryptic error message saying the update had failed and I should email them. No real indication of what to do next. So I tried to get the upgrade running again, but I'm not savvy enough with the Linux. Tried to restart the machine... Big mistake. Not so much with the booting. So I had to wipe that partition and reinstall. I didn't lose anything except time.
Then today when I was setting up my machine I couldn't get Tomcat5.5 to work (we use SOLR which uses Tomcat behind the scenes for fast searching). Lost more time trying to figure out what was wrong. Finally I thought maybe Aptitude's version was bad, so I removed it and got Tomcat straight from Apache. Everything works fine now. So if you're moving from Edgy to Feisty, maybe should remove Tomcat from the package management before upgrading.
Good news is that my wireless works now. Long way to go, however.
When you first start a project and you set up bug tracking software there tends to be 3 levels of bugs: Low, Medium, and High. After awhile you might notice there are now ‘critical’ bugs. Come back a little while later and there’ll be a ‘showstopper’ or ‘blocker’ bug level. And the funny thing is, most of the bugs will be logged at the highest levels. Literally 50% of bugs are given such a status as to make you think the app is in shambles. Except that when you actually open up qny of them to see what could possibly be so horrible, you find things like: missing fields, pages that should be pop-ups, and misspelled text. How is it that these things are given the highest level of importance?
Today, while I was working on a super ultra critical showstopper bug, I had some time to reflect on this phenomena. The bug was this: One of our models was missing a field. And the business wanted this field to be entered before the user could perform some task. Now, I should point out that nothing in the app was giving an error message, except that the user could get away without entering a field that had no functionality except to be displayed on the screen later. In my humble opinion, the app could have gone live without fixing this bug and nothing terrible would have happened.
But, you might say, it’s not my call to decide that. Absolutely right. But it’s also true that sitting next to it, at the same level of priority, were bugs that really were super ultra critical (such as the temporary inability to edit anything at all in our content management system – yipes!). So how do we let the business decide what gets done first but also have a rational system of ranking bugs? Well you need to have ranking system that actually means something. If high isn’t defined then everything gets rated as ‘high’ (especially cause manager X is gonna freak if it doesn’t get fixed – and every bug has a manager X) so we create ‘critical’ and then everyone calls things critical, and this continues until you have a very long list of bug ratings (and only the top two will ever get used). On a previous project we had the same problem and so moved to this rating system:
- Priority 1: The app is down. No part of the app runs at all.
- Priority 2: A large part of the app is not functional, but some parts still work.
- Priority 3: An important function does not work, but there is a workaround.
- Priority 4: Satellite functionality does not work.
- Priority 5: Cosmetic change.
This worked pretty well: important things got fixed and if the client wanted to get something moved up in priority it could always be played as a card (like while technically misspelling the name of the application is a cosmetic change and therefore priority 5, but still…)
So in a previous post I complained about not being able to mock/stub a partial from within a partial, but with Peter Ryan and Mike Ward's help we got it all figured out.
Normally in your test(spec) you call a partial like this:
render :partial => 'partial_name',
locals => {:page_variable => mock_page_variable }
But if you want to intercept all or some calls to render with partial, them you can't do that. But what you can do is call a partial like so:
render '_partial_name'
If you need some locals you can stub them out like so:
@controller.template.stub!(:page_variable).
and_return(mock_page_variable)
render '_partial_name'
So if I wanted to stub out all calls to render, and assert that the string "Blargh" appears on the page, it would look a little something like this:
@controller.template.stub!(:render)
@controller.template.stub!(:page_variable).
and_return(mock_page_variable)
render '_partial_name'
response.body.should include("Blargh")
Now why does that work while "render :partial =>..." does not? I, uh, really don't know. Ideas?
About Me
Obtiva (old job)
ThoughtWorks (old job)
Object Mentor (apprentice)
Apprenticeship at Object Mentor Blog
Blog Archive
- August 2012 (1)
- December 2010 (1)
- August 2010 (3)
- July 2010 (5)
- June 2010 (4)
- May 2010 (4)
- August 2009 (21)
- July 2009 (22)
- June 2009 (19)
- May 2009 (12)
- April 2009 (12)
- March 2009 (4)
- January 2009 (1)
- December 2008 (1)
- November 2008 (12)
- October 2008 (2)
- September 2008 (10)
- August 2008 (5)
- June 2008 (3)
- May 2008 (3)
- April 2008 (2)
- March 2008 (3)
- February 2008 (2)
- January 2008 (5)
- November 2007 (1)
- October 2007 (1)
- September 2007 (1)
- August 2007 (6)
- July 2007 (3)
- June 2007 (4)
- May 2007 (5)
- April 2007 (4)
- March 2007 (10)
- February 2007 (13)
- January 2007 (7)
Categories-
- Code (61)
- Apprenticeship (57)
- Rails (53)
- commentary (48)
- Ruby (31)
- RSpec (20)
- Metrics (17)
- metric_fu (13)
- Flog (9)
- complexity (9)
- testing (9)
- RailsConf2009 (8)
- git (8)
- RubyConf2008 (7)
- test_coverage (7)
- Bugs (6)
- Mocking (6)
- craftsman_swap (6)
- not_code (6)
- Agile2009 (5)
- Amazon (5)
- refactoring (5)
- ActiveRecord (4)
- JRuby (4)
- Linux (4)
- LoneStarRubyConf2008 (4)
- RailsConf2010 (4)
- Saikuro (4)
- XP (4)
- churn (4)
- design (4)
- Fixtures (3)
- LoneStarRubyConf2009 (3)
- Math (3)
- Obtiva (3)
- RailsConf2007 (3)
- Rake (3)
- Rcov (3)
- RubyKaigi2010 (3)
- RubyMidwest2010 (3)
- Svn (3)
- legacy_code (3)
- Flay (2)
- GLSEC (2)
- Mingle (2)
- SQuiD (2)
- TextMate (2)
- Windows (2)
- WindyCityRails (2)
- javascript (2)
- lean (2)
- Backstop (1)
- Bundler (1)
- DUST (1)
- EVDO (1)
- GC (1)
- IO (1)
- MacRuby (1)
- MongoDB (1)
- OSS (1)
- OSX (1)
- Routes (1)
- RubyWorks (1)
- Tomcat (1)
- attachment_fu (1)
- cache-fu (1)
- citcon (1)
- consulting (1)
- craftsmanship (1)
- css (1)
- db (1)
- iPhone (1)
- interview (1)
- mac (1)
- memcached (1)
- memprof (1)
- oracle (1)
- ord_sessions (1)
- ostatus (1)
- pairing (1)
- redis (1)
- restful_authentication (1)
- singleton_class (1)



