BTW, I have another informal poll about a pedagogical thing. The main reason I've been thinking about Ruby is that I've been taking a MOOC that uses Rails. They go into Agile stuff about halfway through and the last big assignment is meant to teach TDD. This is a class for undergraduate students. In this assignment:
-They recommend writing tests first
-This is the first assignment using test-first development
-This is the first assignment featuring mocks/stubs/fixtures
-This is the first assignment that includes generating your own spec file
-This is the first assignment that requires writing unit tests at all
-This is also the first assignment involving a database migration, adding methods to a controller, and the attendant routes in RoR
I mean, even if you're a big fan of TDD this is pretty nuts, right? I noticed after the fact that one of the professors mentioned that unit testing was a sticking point for students in the course last time and I'm drafting an email explaining why I think that is. Just in case I'm about to say something stupid, here are the broad points I plan on making (which ones people object to tells me which ones I should spend more time justifying and/or reconsidering):
-If you're writing tests in a framework you've never written tests before, for tasks you've never performed before, writing tests first is more than twice as hard as the other way around
-This is because at such an experience level, writing tests is harder than writing the actual code. Not writing tests+code is harder, just writing tests is harder.
-Too many iterations of write test/write code/test fails/discover bug in test is probably the best possible way to turn someone
off of TDD
-The only way to notice a bug in simple test code is to write the code it's supposed to test and notice it's incorrectly failing. This provides an overwhelming disincentive for beginners to write tests unless either they write them after writing the code, or the assignment is specifically about tests and only about tests
-Therefore, regardless of the merits of testing first
in the general case, it's a complete failure pedagogically because for the sufficiently inexperienced it's objectively wrong
-They might want to fix their grader so that you can't get 100% test coverage by deleting all the tests.