Chapter 6

Formatting and Improving Your Code

IN THIS CHAPTER

Bullet Using AI for code formatting

Bullet Refactoring with AI

Bullet Making your code more readable

Bullet Making your code more understandable

No software developer or team of software developers gets it right the first time. The software may function perfectly now, but often decisions made during the writing of the software or in the gradual process of upgrading the software that will cause problems later on.

In this chapter, you learn how to use AI coding assistants to help clean up your code.

Using AI Tools for Code Formatting

How your code is formatted and the decisions you make in the design of software directly affect how maintainable it is and how easy it will be to improve it in the future. Having good and consistent design and formatting also means that you don't need to think as hard to figure out what's going on in a program. An experienced programmer can look at blocks of well-written code, even if they've never seen it before, and quickly start to figure out what it does.

The first step in making your code more readable is to properly ...

Get Coding with AI For Dummies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.