I've had repeated experiences showing that explaining TDD to beginner programmers makes a lot of sense for them.
Building on solid ground is much easier than writing a bunch of code and hunting for problems later.
I believe therefore that programming education should start from TDD.
Even to learn a new programming language: show them the minimal constructs necessary to write tests, write a failing test, ask them to write the code as they find natural, and then explain how the language actually works and, when possible, why
This way of learning creates an engaging experience, puts them in flow, allows them to find errors fast, and creates good habits
I also hypothesize that this way of learning will grow the design sense faster than the traditional ways, due to a very fast feedback cycle.
Here's the challenge: people who can teach programming this way have limited time because they are doing professional coaching or programming, while people who teach have limited knowledge or trust in TDD.
I don't know how to solve this other than by a collaboration with a University or non-profit willing to invest in an experiment, and I have no idea how to start that. But who knows, maybe Twitter is good at something :)
After a few replies:

For a beginner in programming, writing a test requires much less knowledge than solving problems, and it provides an excellent safety net that tells them when they made a mistake in code.
You can follow @alexboly.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled:

By continuing to use the site, you are consenting to the use of cookies as explained in our Cookie Policy to improve your experience.