From the course: Pair Programming with AI

Unlock this course with a free trial

Join today to access over 24,100 courses taught by industry experts.

Using AI to generate comments and documentation

Using AI to generate comments and documentation

From the course: Pair Programming with AI

Using AI to generate comments and documentation

- [Instructor] Documentation is, at the same time, one of the most important and most frequently overlooked features of code. Documentation is vital, because it explains what code is doing both to people who come to your code later and to yourself when you come to your code later and ensures that you can capture things like why a certain decision was made or what a specific piece of code is doing. Now that said, writing documentation is both tedious and challenging, because you have to communicate what a piece of code is doing to a human being. The good news is AI pair programmers make easy work of writing documentation. Now, you've already seen me do this with GitHub Copilot before, but I want to focus in on it a bit here, because there's some really cool features you can take advantage of here. The first one is, anytime you're writing, for example, a function in JavaScript, if you simply add the start of a comment…

Contents