Hi Folks. Cool! DBC-ers are from Mars and TDD-ers are from venus ;) Throwing exceptions in the supplier when a pre-condition is not satisfied is "defensive...
4370
Keith Nicholas
keithatcompac
Jul 2, 2003 10:10 pm
Also... Do it in small steps, that way you don't end up with a huge test then have to write lots of code to get it to work. They should "evolve" together....
4371
George Dinwiddie
gdinwiddie
Jul 2, 2003 11:19 pm
... And how do you enforce "not allowed?" -- ... George Dinwiddie agile programmer for hire Baltimore/Washington area gdinwiddie@......
4372
yahoogroups@...
jhrothjr
Jul 3, 2003 12:43 am
... From: "George Dinwiddie" <programminglists.at.alberg30.org@...> To: "testdrivendevelopment@yahoogroups.com" ...
4373
Dave Astels
astelsd
Jul 3, 2003 1:33 pm
Hi everyone, I just wanted to let you know that my book is now in print and should be making it's way to various booksellers over the next few weeks. So...
4374
Roger Jack
bookstore_junky
Jul 3, 2003 2:12 pm
Congratulations on publishing your book. I have read Kent Beck's TDD book. Can you please compare and contrast? Roger Jack Elegance Technologies, Inc. ...
4375
Dave Astels
astelsd
Jul 3, 2003 2:34 pm
... Certainly. The two are very complimentary. Kent's is higher level, more language independant, more conceptual. Mine is very "practical", pragmatic, and...
4376
Peter van Rooijen
tailcall
Jul 3, 2003 4:03 pm
From: <walter@...> To: <testdrivendevelopment@yahoogroups.com> Sent: Sunday, June 22, 2003 8:45 PM Subject: [TDD] Speed Optimizations...require more...
4377
Peter van Rooijen
tailcall
Jul 4, 2003 7:49 pm
... From: "Ron Jeffries" <ronjeffries@...> To: <testdrivendevelopment@yahoogroups.com> Sent: Saturday, June 28, 2003 1:17 PM Subject: Re: [TDD] Design by...
4378
Chris Eyre
chriseyre2000
Jul 6, 2003 9:13 am
How about measuring how long the operation took (for say 100 calls)? That is a test that could be made to fail before making the change and be expected to pass...
4379
designpatterns2003
designpatter...
Jul 6, 2003 5:05 pm
You write the client code so that it never happens. That's what DbC is all about. If a pre-condition is broken then your code is wrong. We don't throw...
4380
designpatterns2003
designpatter...
Jul 6, 2003 5:09 pm
Are we going in circles? By all means use assertions to check pre- conditions in testing and debugging, but don't throw EXCEPTIONS in released code to tell...
4381
Ron Jeffries
ronaldejeffries
Jul 6, 2003 5:16 pm
... This is all very well in a language with full DbC support, of which there are few. In more common languages, and I use the term advisedly, what happens? ...
4382
designpatterns2003
designpatter...
Jul 6, 2003 5:25 pm
They won't thank me for saying this, but can anyone else see the similarities between TDD and Formal Methods? Jason Gorman http://www.objectmonkey.com ... ...
4383
Ron Jeffries
ronaldejeffries
Jul 6, 2003 5:29 pm
... What does an assertion do at run time if the precondition is not met? Ron Jeffries www.XProgramming.com Find the simple path to what works and follow it, ...
4384
Ron Jeffries
ronaldejeffries
Jul 6, 2003 5:30 pm
... Please say more about what you mean by "formal methods", and the similarities you see. Thanks, Ron Jeffries www.XProgramming.com You don't want to sell me...
4385
Jim Weirich
jimweirich
Jul 6, 2003 5:43 pm
... In a common language, we would write client code so that it never happens. -- -- Jim Weirich jweirich@... http://onestepback.org ... "Beware...
4386
Jim Weirich
jimweirich
Jul 6, 2003 6:10 pm
... Your choice of ... a) Throw and exception b) Startup the debugger c) Halt the program with a core dump d) Reformat your hard disk e) Nothing f) Something...
4387
Ron Jeffries
ronaldejeffries
Jul 6, 2003 6:34 pm
... I would suppose that everyone would write client code so as not to break any contracts. I'm not clear on how DbC would be different in kind or style. So...
4388
Ron Jeffries
ronaldejeffries
Jul 6, 2003 6:39 pm
... So I asked what happens when an assertion isn't true. You replied with six things several of which seem semantically equivalent to throwing an exception. ...
4389
Al Chou
HotFusionMan
Jul 6, 2003 6:55 pm
... To go off on another tangent, isn't defensive programming necessary when calling library code to which you have no source code access? A very common ...
4390
Jim Weirich
jimweirich
Jul 6, 2003 8:16 pm
... Yeah, I don't think we are communicating here. I'm not sure how else to say it without just repeating. ... Your definition of semantically equivalent is a...
4391
Ron Jeffries
ronaldejeffries
Jul 6, 2003 8:35 pm
... I consider that /in production/ a, b, c, (and possibly d) are semantically equivalent to hurling. e certainly is not and f is, um, uninformative. With you,...
4392
George Dinwiddie
gdinwiddie
Jul 6, 2003 9:13 pm
... I would grant you that there are only 5 things in your list semantically equivalent to hurling. The 6th, Do Nothing, is equivalent to silently swallowing...
4393
Steve Freeman
smg_freeman
Jul 6, 2003 9:50 pm
Sure. (very loosely) One way to look at the unit tests is as a poor man's formal spec. Each test is a spec of some feature of the code. It's not as "rigourous"...
4394
Phil Barnes
pbarnes714
Jul 7, 2003 2:27 am
My apologies for being a bit off-topic. I'm desperate. I need to learn HOW to learn how to test my work. I've always tested very randomly, without structure...
4395
Keith Nicholas
keithatcompac
Jul 7, 2003 2:38 am
I think the thing here is that undefined = doesn't really matter as long as it does something, the important thing being that it broke its contract. ie.......
4396
Phlip
phlipcpp
Jul 7, 2003 2:49 am
... TDD is a saturation technique. If you write your whole program using it, then no feature won't have a test of some kind, however small or remote. But TDD...
4397
Keith Ray
attkeithray
Jul 7, 2003 2:59 am
... I find this statement confusing. No matter if we're using Eiffel, assertions in another language so we're pretending to be something like Eiffel, or prayer...
4398
Jim Weirich
jimweirich
Jul 7, 2003 4:28 am
... Sorry. I misread your response. I was trying to make the point that the DbC assertions != throwing exceptions. I thought you missed the distinction that...