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

In this chapter, we’re diving headfirst into the wild world of developing software with AI. By now, you’ve gotten a taste of what AI can do, and we’re just getting started. We will use AI extensively in this chapter, and by the end, you’ll be even more comfortable with integrating these tools into your workflow.

We begin our journey by 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 develop a clearer sense of how and when to use the tools.

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 (figure 4.1). If you don’t have the time to be thoughtful and do it right, you won’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.
A cartoon of a house on stilts

Description automatically generated

4.1 Stubbing: Building the skeleton of your application

4.1.1 A simple code example

4.2 Extracting requirements from the design

4.2.1 Step 1: Extract the requirements using ChatGPT

4.2.2 Step 2: Gathering requirements from Gemini

4.3 Setting up our development environment

4.4 Flask application structure

4.5 Stubbing out our application

4.6 Running our application

Summary