4 Coding the first version of our application

 

This chapter covers

  • Extracting software requirements from a design document
  • Setting up a Python virtual environment
  • Creating code stubs to lay out the application structure
  • Organizing a Flask web application
  • Running a simple Flask app for the first time

Ready or not, we’re diving headfirst into the wild world of developing software with AI in this chapter. By now, you’ve seen a taste of how AI can help us work better, and we’re just getting started. We will use it extensively in this chapter, and by the end, you’ll be even more comfortable with integrating these tools into your workflow.

We’re beginning our journey to building a useful application for HAM radio test preparation. We’ll explore ChatGPT and Gemini and show how each can assist us as we build our project. In the following chapters, we’ll use these and other new tools. As you progress, you’ll gain more of an understanding of how and when to use the tools. Let’s jump right in.

Creating software is like building a house. The foundation is the first step; you can't start without it. Building the rest of the house will be a struggle if the foundation doesn't meet the requirements. If you don’t have the time to be thoughtful and do it right, you don’t have the time to fix it later.

Figure 4.1 The foundation is the most crucial part of your project. Generated with Midjourney, a Generative AI image-building tool.

4.1 Stubbing: Building the Skeleton of Your Application

4.1.1 The benefits of stubbing

4.1.2 A Simple Code Example

4.2 Extracting Requirements from the Design

4.3 Setting up our development environment

4.4 Flask application structure

4.5 Stubbing out our Application

4.6 Running our application

4.7 Summary