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.
Surface boilerplates and common patterns
From the course: Pair Programming with AI
Surface boilerplates and common patterns
- [Instructor] Unless you write code all day, every day, and quite frankly, even if you write code all day every day you will find yourself in situations where you need to use a boiler plate, or a specific function set up, or using a method or some sort of pattern, and you just can't remember exactly how it's structured. In those circumstances, you need to go through the documentation to look it up, or you need to look up code examples, or previous code you've written yourself. Or if you have an AI pair programmer, you can simply ask the AI pair programmer to surface that common pattern, or boiler plate, or function expression or whatever it is you need. Let me show you two examples of this, one in ChatGPT, and one in GitHub co-pilot. We'll start in ChatGPT by prompting it. Generate the code for index.jsx, and app.jsx in a React project. These are the two core files of any React project. And then we wait. ChatGPT has…