... Correction: it's convincing *anybody* to write tests when they haven't learned to on their own that's tricky. I've also noticed it's rather difficult to...
Ed Grimm
ed@...
Feb 2, 2002 2:31 am
19
Well, as a new convert to writing tests I can attest to your hypothesis. In general I have not sat down and written a good test suite when coding something...
... How about some brainstorming then? Here are several benefits of writing tests, in no particular order: - to clarify the intent of the code - to enforce...
... Well, based on some work I did last night I have a prime example. I had written some modules previously that worked and are currently in production. Since...
... I like to distinguish between acceptance and unit tests. For unit tests, I would add: - to validate the API - to enable refactoring - to keep the cost of...
Could you explain a little more about the two types of tests you mention below? Specifically the acceptance tests, and how they would relate to web apps. I'm...
... There are many different kinds of tests including performance and load testing. In XP we're mostly concerned about unit and acceptance testing. ... What...
... How do you do that? I've only heard of tools that allow you to create a script and then playback that script. This is semiuseful, but what happens if you...
... If it's hidden, it's not hidden very well. :) Here's my take. Programmers don't want to write tests because: - it's not their job - it's not "real"...
... All your points are right on the money. I would venture to guess that most "good" programmers would not be against writing tests. IMHO, it's usually ...
Hi all, ... [snip] ... See attached. I once had to fly to seven or eight different countries over a period of several weeks to fix a $0.25 problem in a couple...
Ged Haywood
ged@...
Feb 8, 2002 1:11 am
29
... The first step is to make sure your interface has structure. If you are testing arbitrarily constructed templates, you're going to have a rough time. If...
... Rob, Can you upload an example of a filled-in story card? I'm curious about the level of detail you're using in these. We always have a problem of getting...
... Since you are talking about testing apps against webserver, I'd plug in the new Apache::Test framework which most Apache::* modules' and frameworks'...
Stas Bekman
stas@...
Feb 21, 2002 11:37 am
32
Chris et al, Sorry for the delay... I uploaded some story cards. They are from the book. My real story cards are a mess. The payments-planning-game card is...
For some reason writing unit tests in Perl feels really weird. I feel like Perl code is simply not supposed to be OO in the same way as Python and Java are. OO...
... For practical reasons, we manage all data through classes. This simplifies the calling convention (we always use -> when calling an API). Classes can...
Hey Rob, ... What do you mean by "declarative tests"? Could you give an example? Asim __________________________________________________ Do You Yahoo!? Yahoo!...
... A declarative language allows you to specify your intent and the interpreter executes the program in whatever order it sees fit. SQL is a declarative...
I'm trying to get an idea what people consider useful refactorings. The following refactoring is a very simple one, but I consider it useful to demonstrate how...
... RN> [..snip..] RN> TITLE: Replace Conditional with Modifier RN> SYNOPSIS RN> You have an if statement with a one-line then clause. RN> Use a Perl statement...
Cool! I didn't know this trick. Hmmm, now I have one more reason I can give my coworker to use emacs instead of vi. ;-) Thanks Ilya! Since you seem to be the...
... DT> Cool! I didn't know this trick. Hmmm, now I have one more reason I DT> can give my coworker to use emacs instead of vi. ;-) Thanks Ilya! DT> Since you...
Hi there, ... Very simple ones. ... I suppose it's my age. I HATE Perl's statement modifiers. And I REALLY REALLY HATE "unless". ... Like I said. ... ...
Ged Haywood
ged@...
Jul 29, 2002 6:52 pm
43
... Every refactoring can be implemented in reverse. This is an important part of design by refactoring. This is the "art" of refactoring imo. The goal is...
... I like this one, especially if you demonstrate that it's reversable. I only have one nitpick. ... if 'undef' is intended to return a demonstrably false...
... I hope to avoid showing the reverse of every refactoring. It maybe makes sense to show one or two explicitly. ... No, you need to check if it is undef....
... That's fine. It's important to demonstrate that you don't always go in one direction. ... The bare return operator respects the calling context: sub false...