Alan Keefer
Posts: 29
Nickname: akeefer
Registered: Feb, 2007
|
|
Re: imperative, and functional, and oo, ...
|
Posted: Jul 10, 2007 11:16 AM
|
|
> That's an interesting statement. > > It seems to me that ease of testing doesn't have much to > do with the language and everything to do with the > programmer. A developer who is sensitive to the > importance of testing will always come up with highly > testable code, regardless of the language they program > in. > > I think that we're seeing more testable Ruby code than > testable C++ code because Ruby is more recent, and > developers who use it are part of a more recent generation > that has been exposed to the importance of testing. > > Can you think of any features of certain dynamic languages > that make them inherently more testable than, say, C++? > (I can't at the moment, but I'll think about it some > e more) > > -- > Cedric
I'd also be interested in any thoughts on this. I have a lot of experience with testing Java; my company has around 32,000 unit tests (= 32,000 test methods, not test classes), and as the number of tests have gotten larger it's become more and more of a maintenance issue. I've always thought that was more of an inherently difficult part of testing, though, rather than something specific to Java: it's just hard to have the discipline and foresight (especially when you're testing experience is limited at first) to structure your tests in such a way that they're tolerant of the right kind of changes and easy to modify when behavior/API changes are necessary. Preventing tests from being coupled to the wrong bits of code (i.e. code other than what's being tested) just gets hard in a large system.
My testing experience in Ruby is pretty non-existent; I've never built a large enough system in it (or any other dynamically typed language) to run into those sorts of coupling problems. But if there's some fundamental features about dynamic languages that make those problems easier to deal with, that would probably do a lot to change my opinions.
|
|