Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Re: Mock Objects

by theguvnor (Chaplain)
on Apr 12, 2002 at 00:22 UTC ( [id://158448]=note: print w/replies, xml ) Need Help??


in reply to Re: Mock Objects
in thread The Joy of Test

You've just cracked the thought barrier that leads to formal methods. For each chunk of code, you create a list of assertions that impose constraints on what the code should do. Then you go through and make sure your code actually obeys those assertions. Formal methods take the idea a step farther by writing the assertions in mechanically-readable form, then running them through a postulate-matching engine to do the gruntwork of making sure everything checks. ... When you code to the assertions, you find yourself structuring programs so that no given operation can possibly fail. Ususally, you end up with a framework like so: ...

This is cool. Very cool. I admit that I didn't truly grasp your first paragraph at first read, and am still processing it. BUT, with the tutorial/example you gave, I saw the light! I will definitely try this! Thanks mstone - you have cracked my thought barrier, and I am looking forward to eliminating vast multi-level conditionals!!

..Jon

Update: Thanks again mstone for providing links to (what I'm sure will be) some great resources. And BTW I could not imagine pronouncing 'Z' anything but 'zed'... ; )

Replies are listed 'Best First'.
Re3: Mock Objects
by mstone (Deacon) on Apr 12, 2002 at 17:43 UTC
    I admit that I didn't truly grasp your first paragraph at first read, and am still processing it.

    *snort*

    You should see the forehead-shaped dents in my wall. ;-)

    Really good ideas -- the ones that change the way you think because they change the way you look at things -- take time to absorb. I just happened to find this particular wall before you did.

    One paper you should definitely read before getting too far into the whole business is: What's Wrong With Formal Programming Methods? (PDF, 15 pages, 56K). It's a nice summary of the history and ideas behind formal methods, but doesn't beat you into the ground with impossible-to-type-on-a-regular-keyboard formalisms like the language Z (pronounced 'zed'). It's also a nice antidote to the full-gonzo 'more correct than thou' attitude some formal methods types can acquire.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://158448]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-16 04:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found