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 24,900 courses taught by industry experts.
Coding project: Speed up Python coding with smart prompts
From the course: Accelerate DevOps and Software Development with AI: Modern Tools and Workflows for Enhanced Software Delivery
Coding project: Speed up Python coding with smart prompts
- So we just finished planning the validation and error checks for the book service. Now, instead of typing all the boilerplate myself, I'll let AI do the heavy lifting. We'll start with the shape of the class, method names, arguments, return types. Then we'll fill in the details together. So I'm going to use this prompt in Cursor, which says, "Generate a Python class called BookService with four methods: create_book, get_book, list_books and delete_book. Just return type hints and docstrings for now, no implementation." That was insanely fast and that looks pretty good. This is exactly what I meant by boilerplate. The AI saved us about five minutes of typing and helped us standardize docstrings and type hints. Now let's start filling in the actual logic one method at a time. We'll start with the constructor. Every service needs state. We'll store books in a list and keep a counter for the next ID. So I'll now use this…
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)
-
-
-