Some interesting thoughts about testing and python found among gnome developers. Joe Shaw was explaining how most new gnome apps these days are written in either python or C#. They choose C# for their app (Beagle) because "[they] wanted a strongly typed language" (I think he meant static typing but we get the point). Joe claims to have been burned by not having the compiler find "bugs".
His next two sentences are very telling:
Writing real applications in Python requires a discipline that unfortunately most people (including myself) are unwilling to adhere to, and this easily leads to buggy and hard to maintain programs. You have to be very diligent about unit tests and code coverage for every line of code, because you can’t rely on the compiler to catch errors for you.. If I read this with my cynical glasses on, I'm assuming that many java/c# developers think that testing consists of compiling the program. How sad.
In a rebuttal to Joe's dislike of dynamic typed languages, Thomas Vander Stichele claims that any language should have tests and coverage. And provides two reasons for it:
One wonders why all those redhat and canonical developers aren't on the static typed bandwangon for their apps, why weren't they distracted by the mono diversion?....
I love Python.. so I would personally use Python over any language for a
Gnome based app..
Wow, that's really sad that they rely on compiling to fix their bugs. I
know some people who work in java shops - testing is every bit as important
there as it is anywhere else. Actually, didn't unit testing hit java
before it hit python? WTF.
For the record, I have written several "real" applications in Python and
they do not have unit tests. (I've been lazy too.) They run just fine and
the people that rely on them are happy.
Of course, Joe also replied to Thomas's posting and explained his position
a bit better.
Bruce Eckel's article Strong
Typing vs. Strong Testing is very relevant here. Static type checking
alone is a very poor substitute for comprehensive unit and functional
tests.
Hi,
wmix- there's still some uncertainty (perhaps it's FUD) around IP issues
and Mono. I was hoping Joe would post the reasons he chose C#. I'm not
convinced of the static typing argument yet....
Hi again,
They choose C# for their app (Beagle) because " wanted a strongly typed language"
Joe- I didn't mean to selectively quote you. I apologize for any offense.
My interest (and reason for the blog post itself) was because of the
typing/compilation issue, which wreaked of FUD to me. It's fine (and
quite reasonable) that you don't to use C for desktop apps. I like using
new technology too, so I applaud you for living on the edge.
> Miguel is very good about getting people excited about things