Refactoring with GitHub Copilot

Refactoring with GitHub Copilot

1h 1mIntermediate2025-01-21

Authors

Gary Kovar

Gary Kovar

Senior Back-End Developer and Software Engineer

Course details

GitHub Copilot can create code, but it can also help you improve, clean up, and remove existing code. Refactoring is a crucial but often challenging aspect of maintaining applications, and Copilot can make it easier for you to explore how code changes might look. In this course, instructor Gary Kovar takes you through using Copilot in a few different situations, working with different aspects of programming. Learn how Copilot might (or might not) fit your set of challenges.

Learning objectives
Learn how to make small refactors in your PRs.
Find out how to use GitHub Copilot to help refactor code.
Be ready to defend larger refactors to your management and team.

Skills covered

Github CopilotSoftware ArchitectureGitHubGenerative AIArtificial Intelligence FoundationsArtificial Intelligence (AI)Programming LanguagesSoftware DevelopmentOne-Off

Concepts

Introduction

  • Refactoring with the GitHub Copilot AI
  • Prerequisites
  • How to use Codespaces

GitHub Copilot and Refactoring Basics

  • What is GitHub Copilot
  • Chatting with Copilot
  • Refactoring explained
  • Code smells
  • Refactoring strategies
  • Refactoring with Copilot

Refactoring Techniques with AI

  • Simplifying functionality
  • Enhancing naming and readability
  • Removing dead code
  • Optimizing conditionals and loops
  • Refactoring data structures

Advanced Refactoring for Long-Lived Code Bases

  • Dealing with legacy code
  • Refactoring for performance
  • Considerations refactoring large code bases
  • Refactoring and automated testing

Refactoring in the Real World

  • How to convince your team to refactor
  • Pay down technical debt
  • Keep devs happy
  • Lower TCO on the project
  • The impact of ai on refactoring

Conclusion

  • Next steps
40,000 Toman