Test legat de ghid · Ușor Nivel
Cum să depanați codul cu testul AI
Exersați să citiți urmele stivei, să construiți exemple minime reproductibile și să cereți AI pentru ipoteze testabile în loc de rescrieri oarbe de cod.
Întrebare 1 de 8
În loc să ceară AI să rescrie întregul fișier, ce recomandă ghidul să ceară?
Previzualizează fiecare întrebare8 întrebări
Răspunsurile și explicațiile apar pe măsură ce susțineți testul.
- În loc să ceară AI să rescrie întregul fișier, ce recomandă ghidul să ceară?
- A longer version of the same code
- The most likely causes and how to check each one
- A translation of the code into another language
- More comments throughout the file
- Într-o urmărire Python, unde găsiți tipul și mesajul excepției?
- On the very first line
- In the middle of the trace
- On the final line, because the most recent call is printed last
- It is not shown in the traceback
- Care este un exemplu minim reproductibil?
- The smallest code and data that still shows the problem
- The entire project compressed into one file
- A screenshot of the error
- A list of all installed library versions
- Care descriere de eroare oferă AI cele mai utile informații?
- It doesn't work
- Please fix my code
- My code is broken again
- I expected 10 rows, I get 0, and there is no error
- De ce să comiteți sau să ascundeți codul înainte de a aplica o remediere sugerată de AI?
- It makes the AI's answers more accurate
- So you can revert if the suggestion makes things worse
- It automatically deletes old bugs
- It uploads your code to the AI
- Why is the line named in an error message not always where the bug is?
- Error line numbers are random
- Compilers often count lines incorrectly
- The bug is often earlier, where the bad value was created, not where it was used
- Bugs are always inside third-party libraries
- After applying a fix, what should you do to confirm it?
- Close the chat and move on
- Ask a different AI whether it looks right
- Assume it works if no error appears
- Rerun the original failing case plus some normal cases
- What does the guide suggest doing with your reproduction once the bug is fixed?
- Turn it into an automated test
- Delete it to keep the project clean
- Post it publicly as a tutorial
- Comment it out for later