The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Rails App Without Tests = Guaranteed Fail

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Kurt Schrader

Posts: 80
Nickname: kschrader
Registered: Feb, 2008

Kurt Schrader is an entrepreneur and a ruby programmer.
Rails App Without Tests = Guaranteed Fail Posted: Feb 19, 2008 11:18 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Kurt Schrader.
Original Post: Rails App Without Tests = Guaranteed Fail
Feed Title: Schrade.Blog
Feed URL: http://kurt.karmalab.org/atom.xml
Feed Description: Tech and Business Ramblings by Kurt Schrader
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Kurt Schrader
Latest Posts From Schrade.Blog

Advertisement

My friend Jay wrote a few days ago:

I bet of you looked at the majority of Rails applications you would find empty test folders (or only the generated tests, which are never run). I'm quite sure that's true because I expect the conferences to attract the best of the Ruby developers, and several of the people I talk to at those conferences "simply don't have time" to write tests.

These people are idiots. Either that, or they don't have any sort of complexity in their apps and they're writing them in a far too simplistic and elementary way.

Quite often, doing a little meta-programming magic in Ruby can make you massively more productive and, in my experience, the only way to find the side effects of doing a lot of meta-programming is to have a comprehensive test suite. As this magic-level in your app increases, the number of side-effects of that magic will also inevitably increase.

Eventually, you will get burned by something if you're not ready for it.

Tests are your flame-proof suit in this case. They're not going to protect you against everything, but most of the time they do a damn good job of keeping you alive.

DHH wrote the other day:

We try to do a fairly good job at keeping our test suites current and exhaustive as well. Basecamp has a 1:1.2 ratio of test code (thanks to the persistence of Jamis!), Highrise has a ratio of 1:0.8 (bad me!).

At CDD, our current code to test ratio is 1:4.2.

Overtested? Undoubtedly.

However, we don't want to ever have to go in and fix the damage after someone tries to import 1,000,000 molecules to our system and something goes wrong. The repair work can take days in some cases, so we err on the side of caution.

I'll wrap this up with the following three easy points:

  1. If you're writing a Rails app, write tests for it.
  2. If someone who works for you "simply doesn't have the time" to write tests, fire them.
  3. If a consultant tries to give a Rails app without a test suite, fire them (and don't pay them, if at all possible, what they've given you is pretty much worthless, and is going to be a nightmare to maintain).

Read: Rails App Without Tests = Guaranteed Fail

Topic: Blasting the Myth of the Fold “There is an astonishing... Previous Topic   Next Topic Topic: When You Should Ignore Metrics

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use