Not Yelling at Clouds, Episode 13: Refactoring and Accidental Domain Modeling
Автор: jbrains762
Загружено: 2025-11-01
Просмотров: 20
Описание:
Marya and J. B. ask Bolt to do some refactoring in order to learn what Bolt can and can't do well. In the process, Bolt consistently surprises them, sometimes pleasantly and sometimes less pleasantly.
0:43 J. B. clumsily undoes his own refactoring by hand, because he doesn't want to put this project on Github, which he would have to do in order to have version control available to this project in the Stackblitz environment. (OK... this is just a little bit of yelling at clouds. J. B. contains multitudes.)
1:30 They try to use Bolt as a refactoring tool with an English-language interface.
2:40 J. B. marvels at and criticizes Bolt's design choices.
4:30 They review what Bolt claimed to do and comment on it.
At 5:10 Marya and J. B. discuss the Domain Modeling consequences of Bolt's choice to destructure the SessionStats value before passing only the necessary parts into the newly-extracted function. Do these three values collectively represent some previously-unnamed domain concept that deserves its own named object? Is there perhaps some other subset of the SessionStats properties that could helpfully be packaged into their own named object? The degree to which J. B. stumbles over his own words underlines just how uncertain he feels about these questions in this situation. They are doing domain modeling together live and in real time.
At 6:35 J. B. reaches a conclusion that he feels confident in, so he starts to direct Bolt to refactor further, but Marya suggests asking Bolt to justify its choices. In the process, J. B. distinguishes two kinds of coupling: structural and logical. Logical coupling tends to create ongoing tension in the design, whereas structural coupling tends to be more obviously in the way and therefore more urgent to resolve.
At 10:42 J. B. struggles to justify his intuition about the design, so he admits that he's about to merely follow his intuition without justification and direct Bolt to refactor further, because he wants to and he's driving, so he can. At 11:03 he forgets not to bother being polite to Bolt when he directs Bolt to change how clients pass arguments to the newly-extracted function. Bolt surprises them with a choice that neither J. B. nor Marya would have made, but that they are surprised to learn they prefer.
13:33 Marya points out how LLMs can help people to learn programming languages, leading to a larger discussion about the role LLMs can play in learning.
16:33 They change the newly-extracted function not be `export`ed, since there are no clients outside of this module.
18:27 Marya asks J. B. how he feels about not having tests, then they discuss asking Bolt to write tests.
Finally, at 19:28 they discuss possible next steps, including trying to write tests Under the Skin, since that tends to put helpful stress on the design and bring coupling risks to the surface.
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: