Softpedia
 


SCRIPTS CATEGORIES:



NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Koken 0.8.2
  • ContentBox 1.5.2
  • jQPlayer 0.5.2
  • SPOILER ALERT! 0.0.2
  • jQuery Mask Plugin 0.9.0
  • Easing Slider 2.1.2
  • Btapp.js 0.2.0
  • WiiFlash 0.4.5
  • Breeze.js 1.3.3
  • TinyMCE Templates 3.0.2
  • Home > Scripts > Programming Methods and Algorithms

    FailFast 1.1.0

    Download button


    Downloads: 369  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    Website:

    License / Price:

    Platforms:

    Databases:

    Language:

    Last Updated:

    Category:
    Avdi Grimm | More scripts
    fail-fast.rubyforge.org
    Other Free / Open Source License - MIT License 

    Windows / Linux / Mac OS / BSD / Solaris
    N/A
    Ruby
    July 20th, 2009, 08:42 GMT
    C: \ Programming Methods and Algorithms

     Read user reviews (0)  Refer to a friend  Subscribe

    FailFast description

    This Ruby script is a collection of assertion methods intended for lightweight contract-assumption checking

    It will check the document and point to the assertion point of failure brought down by nils or bad values in the code.

    Judicious use of FailFast assertions to check the assumptions can ensures that the program will end as soon as a contract violation is detected.

    One of the primary goals of FailFast is to make assumption-checking declarative. Assumption checking should be simple and concise so that it can get to the meat of a method without getting blocked down in verifications.

    At the same time, FailFast is lightweight. It is not a metaprogrammed Design-by-Contract DSL. It is a simple set of shorthand methods for validating values.

    It is not the intent of FailFast to have specialized assertions for every eventuality.

    Rather, it seeks to cover a few common cases where there is a potential for significantly increased clarity and declarativeness.

    Here are some key features of "FailFast":

    · Fully spec’d/tested.
    · In most cases assertions return their last argument. This makes it easy to check values inline. For instance: assert_exists(obj).foo()
    · Most assertions can take a block where a further boolean check can be performed. For instance, use assert_exists(x) { x.predicate? } to check first that x is not nil, and then that it satisfies a predicate.
    · AssertionFailure derives directly from Exception so that it will never be silently eaten by no-argument catch statements.



    TAGS:

    assertion method | error checking | assumption checking | error | checking | assumption

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM