Erik Hatcher wrote:
Compile and ship it! :)
I didn't say unit tests were unnecessary.
Ah ha! Now we're to the fun stuff.... successful compilation is a
false sense of "correctness". So what if you got your syntax correct
- your program still could have logical flaws.
Does your compiler check that you've got your OGNL expressions
correct? Or if you have a typo even syntactically (not even
logically) will you still get a run-time error? <span
jwcid="@Insert" value="ognl:customer.nmae"/> - client's make the best
testers, that's for sure :)
As a matter of fact, it'd be great if it would! So, if I refactor my
model classes, and "ognl:customer.name" should turn into
"ognl:customer.person.name" (to say something that has already happenned
to me), what's better? Having a compiler check that
"customer.person.name" is wrong, or writing a new unit test for
something that... mundane?
Unit tests are for logic, not for simple expressions! I actually miss an
IDE plugin that tells me which expressions are wrong, that warns me if a
"public abstract getXX()" is not used on any pages, etc.
So, dynamic languages *do* tend to produce buggy code. It's just that
unorganized coders tend to prefer dynamic languages because... they give
more freedom, from their point of view. I'm actually amazed as how
someone did create an UNIX OS in Javascript.
As for freedom, I feel free when I can do a big refactoring in my app,
and have the compiler tell me if I screwed up, *before* I even need to
run the test suite.
(And yes, I do write unit tests. I just don't like writing them just
because my application language is not good enough to check some things
for me)
--
Ing. Leonardo Quijano Vincenzi
DTQ Software
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]