From the course: AI-Powered Software Development: Coding, Testing, and System Design

Unlock this course with a free trial

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

Generating functions

Generating functions

- [Instructor] All right, so now that we've seen how to write simple scripts with these tools and some of the strategies that can be used for doing this, let's move on to see how we can write more structured code. And to do this, we're gonna talk about the basics of writing functions with these tools. So first of all, one thing that I wanna say here is that the code that we wrote here with our random password script, it definitely works, and it's not necessarily bad code, but the problem with this code is that it's fairly long-winded, and it's not really divided up into modular pieces. Now one rule of thumb that you're gonna want to pay attention to when doing AI-powered software development is that generally the more modular and self-contained you can make your code, the better the AI tool is going to be at doing what you want. So let me show you what I mean by this. What I'm gonna do here is I'm gonna create a new file…

Contents