Tools for Coding banner

Let’s face it: coding can be frustrating at times! Minor errors can cause big problems, and learning the correct syntax can be challenging. This can sometimes lead to frustration! If you haven’t already, you will almost certainly encounter error messages, and some of those can be intimidating and hard to decipher. In this module, we will intentionally introduce several common errors and help you fix them. Part of learning to program is learning how to read error messages and figure out how to fix the issue.

We will explore several tools, such as using Google or another search engine to search for the error, consulting the popular website Stack Overflow, and using tutorials to learn proper syntax and see working code.

The release of OpenAI’s ChatGPT in 2022 transformed how the world saw AI and thrust large language models (LLMs) into the spotlight. Code generation is one task where language models had previously seen limited success, but it is now a task that LLMs are pretty good at. In the short time since the release of ChatGPT, the Practicum AI team has evaluated several LLMs and found that, with some important caveats, AI-powered coding assistants are a new, powerful tool that can dramatically accelerate your ability to start working with applied AI tasks. With the basic understanding of Python you have gained in Modules 1 and 2, you are well-positioned to formulate prompts for an AI coding assistant and evaluate the output. We cannot stress enough the importance of assessing the output! But, the reality is that we are now in the era where AI tools can reliably generate much of the code you will need. This dramatically changes the landscape of who can write code, what skills are required, and who can participate in building, using, and evaluating AI tools. We are excited and hope you will be, too, as you work through this module!

Objectives

By the end of this module, students will be able to:

  • Use several strategies to interpret error messages.
  • Identify good online resources for finding help with errors.
  • Practice using AI-powered tools to solve errors and generate code.

Practice and Apply

Read and practice the following Notebooks in Jupyter

  • Using the repository you created and cloned in Module 1, work through the notebook 03_what_went_wrong.ipynb.
    • Stuck or need to see this in action?
      • Part 1: Watch the walkthrough of the error handling section of the 03_what_went_wrong.ipynb notebook. (coming soon!)
      • Part 2: Watch the walkthrough of the AI coding tools section of the 03_what_went_wrong.ipynb notebook. (coming soon!)