We hire a lot of developers straight out of school or working less than 3 years.
From what I have seen, TDD is viewed as a skill used on Greenfield projects, and refactoring is seen as something you do with legacy code. (And still gets confused with 'throw it away and start over')
I have to have more than one code review with them until it clicks that you do both together, always.
On Nov 25, 2019, at 4:20 AM, Roy Osherove <roy@...> wrote:
Teaching all three at the same time is hard. I've seen people try to just jump into TDD in places and failing because climbing this wall is too high in one go.
I've created courses separately for the design part and named them "refactoring skills for TDD" because even in a 5 days class, teaching the first two skills is difficult enough.
?
I particularly like this notion. We do encounter students who seem to lack even elementary notions of code clarity and expressiveness.
?
I'm not including here the skill of refactoring?LEGACY code into a testable state. I do teach that stuff, but there seems to be a distinction, at least to me between continuous refactoring during new code vs legacy (not tests) refactoring which is a much more dangerous state and might even require integration tests to begin. Perhaps we are really talking about 4 skills and not three.
?
At least some important details, since Michael Feathers wrote a million-page book on the topic. :)
Ron Jeffries
Impossible is not a fact. It is an opinion. ?-- Muhammad Ali
P.S. For some reason my mails don't come thru. Probably my email addresses.