You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
are a diagnosis of a common problem in software development,
74
74
whereby higher-level abstractions fail in subtle ways,
75
75
and the complexities of the underlying system leak through.
@@ -84,7 +84,7 @@ In a similar way, AI offers us a new, higher-level abstraction around writing co
84
84
but we can already see the "leaks" in the form of hallucinations and poor code quality.
85
85
And by analogy to the 3GLs, the programmers who are going to be most effective with AI
86
86
are going to be the ones who "know what good looks like",
87
-
both in terms of code quality, test structure and so on,
87
+
both in terms of code quality, test structure, and so on,
88
88
but also in terms of what a safe and reliable workflow for software development looks like.
89
89
90
90
@@ -97,6 +97,10 @@ Its ability to write that _first_ test,
97
97
the one where, as we'll see, a lot of the design (and thinking) happens in TDD,
98
98
was much more mixed.
99
99
100
+
// SEBASTIAN: Idea for a frame with actionable advice: "Make sure there are at least few examples of tests before you'll make AI assistant write more. Show it what 'good' looks like."
101
+
102
+
// SEBASTIAN: Another idea for a frame with actionable advice: "Simple things like writing a meaningful test name or describing in comment what you want to test can help immensely AI working in autocomplete mode."
103
+
100
104
Similarly when working in a less "autocomplete" and more "agentic" mode,
101
105
I saw AI tools do very well on simple problems with clear instructions,
102
106
but when trying to deal with more complex logic and requirements with ambiguity,
* Start with a _User Story_ and map it to a first _functional test_.
14
+
15
+
* Start with a _user story_ and map it to a first _functional test_.((("cheat sheet", "project setup")))((("Django framework", "set up", "project creation")))
17
16
18
17
* Pick a test framework—`unittest` is fine, and options like `py.test`,
19
18
`nose`, or `Green` can also offer some advantages.
@@ -33,30 +32,22 @@ Relevant chapters:
33
32
<<chapter_02_unittest>>,
34
33
<<chapter_03_unit_test_first_view>>.
35
34
36
-
35
+
[role="pagebreak-before less_space"]
37
36
=== The Basic TDD Workflow: Red/Green/Refactor
38
37
39
-
((("cheat sheet", "TDD workflow")))
40
-
((("Test-Driven Development (TDD)", "overall process of")))
41
-
42
-
* Red, Green, Refactor
43
-
38
+
[role="two-col"]
39
+
* Red, Green, Refactor((("cheat sheet", "TDD workflow")))((("Test-Driven Development (TDD)", "overall process of")))
44
40
* Double-loop TDD (<<Double-Loop-TDD-diagram2>>)
45
-
46
41
* Triangulation
47
-
48
42
* The scratchpad
49
-
50
43
* "3 Strikes and Refactor"
51
-
52
44
* "Working State to Working State"
53
-
54
45
* "YAGNI"
55
46
56
47
57
48
[[Double-Loop-TDD-diagram2]]
58
49
.Double-loop TDD
59
-
image::images/double-loop-tdd-simpler.png["An inner red/green/refactor loop surrounded by an outer red/green of FTs"]
50
+
image::images/tdd3_0405.png["An inner red/green/refactor loop surrounded by an outer red/green of FTs"]
0 commit comments