I tried having ChatGPT do TDD to vectorize n-ary trees, but it made mistakes that indicated it didn't understand it's output:
- the expected vectors in the tests were the format it suggested for binary trees
- when asked to represent a vector as a tree, produced one correct tree and another incorrect tree. (Correctness as determined by how it chose to encode a tree as a vector).
It took some iterations to get it to fix the tests, but I grew weary of coaching it through each of the problems as we encountered them. Maybe if I was at my keyboard rather than on my phone I could have had it complete the task quicker.
So, what errors did you encounter along the way? How did you overcome them?
https://twitter.com/nudpiedo/status/1599444651462733824?s=20...
Do you have screenshots or did you save the chat log when creating this project? There are some really cool files and I would love to see how your coaxed chatGPT into producing this project. I had success using https://addons.mozilla.org/en-US/firefox/addon/save-page-we/ to save the whole chat long and then display it on my website.
I may upload them in the evening if you are interested when I am back home, but what I wrote there was basically it.
This is an interesting exercise and really adds to the sentiment that things will never be the same again with the implementation of this sort of AI tooling being made available for the masses. Truly revolutionizing.
https://twitter.com/nudpiedo/status/1599444651462733824?s=20...
Some of the errors I encountered, where an obsolete package, wrong, absolute import, a missing token, some president rule which was wrong, and it still was not compiling a time to leave, but I think the experiment proves what I wanted to: development as we know it will be soon gone.
If anyone has any questions, I hope the first lines of the README clarify the process, as it was just a 2 hour effort and I didn’t want to interest invest more time with it.
As for note, I am a python expert but I never truly used yacc or llvm. Just some minor versions needed to be fixed in the requirements.txt and with the import of the library.
The rest was generated and refactored as I explained it in the README.