News for hackers. Stuff that matters.
Re:GitHub Copilot Generated Insecure Code in 40% of Circumst... by discreteevent on Friday September 03, 2021 @10:08AM (#28404433)
The TDD movement came from smalltalk programmers (not that I think it has anything to do with smalltalk, just the programmers came from there). In my experience it was in Ruby and javascript code where I have seen the most inane micro(nano?)-unit tests. Some of this was partly because the unit tests were testing what a static typechecker could verify automatically (at the cost of a little verbosity).

I don't see how you figured there is a relationship between DDD and "make everything unit testable". DDD is about high level architecture. It's at the opposite end of the spectrum.

Re:GitHub Copilot Generated Insecure Code in 40% of Circumst... by mumblemumble on Friday September 03, 2021 @10:27AM (#28404653)
Also, smalltalkers didn't mean the same thing by "unit". What would be called unit tests in one context may mostly be considered integration tests in another.

I agree, the crazy mock- and stub-heavy unmaintainable micro unit testing thing seems to have been an innovation that came out of the Ruby scene.

Re:GitHub Copilot Generated Insecure Code in 40% of Circumst... by moonchrome on Saturday September 04, 2021 @05:27AM (#28413512)
Maybe I shouldn't call it TDD camp, but the people that were prothletising TDD were also selling onion/DDD in C# world, so I just bunch those together, it's more about onion, layered architectures, testing at different layers and mocking them, etc.

While I consider TDD the wrong approach in 90% of scenarios, in dynamic languages it works out much better because the object model is so flexible you can mock just about anything trivially. In C# and Java it's just boilerplate on top of boilerplate.