From the course: Accelerate DevOps and Software Development with AI: Modern Tools and Workflows for Enhanced Software Delivery
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Coding project: AI-powered docstrings for developers
From the course: Accelerate DevOps and Software Development with AI: Modern Tools and Workflows for Enhanced Software Delivery
Coding project: AI-powered docstrings for developers
- Next, let's move to documentation. Documentation is one of the foundations of well-written software. Unfortunately, it also happens to be one of those things that is often overlooked. In our current project, let's use AI to add documentation to our book service class. My prompt says, "Write a short module docstring for this BookService that explains the four methods and includes one usage example." Accept the suggestion. This looks pretty good. I would've ideally liked it to add this description within the BookService class, but this works too. Next, let's move to the individual methods. I'm going to highlight all the methods and then use a prompt that says, "Write clear Google-style docstring for each method. Add precise type hints to the method signature. Use built-in Python types only." You're going to have to go through all of the suggestions and accept the ones that you like, but we'll keep them all for now.…
Contents
-
-
-
-
(Locked)
What powers GitHub Copilot and ChatGPT?4m 20s
-
(Locked)
Prompt engineering for developers2m 38s
-
(Locked)
Role-based prompting for better code reviews2m 31s
-
Iterative prompting to guide AI to better code3m 35s
-
(Locked)
Coding project: Plan and test with AI tools1m 59s
-
(Locked)
Coding project: Speed up Python coding with smart prompts2m 26s
-
(Locked)
Coding project: Create AI-assisted test cases in Python2m 31s
-
(Locked)
Coding project: AI-powered docstrings for developers2m 18s
-
(Locked)
Coding project: Review Python code with AI1m 55s
-
(Locked)
Coding project: Navigating code with AI59s
-
(Locked)
Coding project: Refactor Python code with AI4m 6s
-
(Locked)
Case studies: AI wins and fails4m 22s
-
(Locked)
-
-
-