Skip to Content
View all events

Hands-On Refactoring

Published by O'Reilly Media, Inc.

Intermediate content levelIntermediate

Driving incremental and measurable improvements to your codebase

Code is written once, but it’s read and reworked thousands of times. Routine refactoring is an opportunity to improve the internal design of code while preserving its external behavior—an essential part of sustainable Agile development. Fortunately, most developers understand why refactoring is important; the real challenge lies in how to effect change without disruption to working code.

Join expert Venkat Subramaniam to learn the why and the how of refactoring. You’ll explore this necessary process by approaching refactoring incrementally, in small steps, keeping the overall goal in sight and quickly verifying, via feedback loops, whether the change improves existing functionality. You’ll examine code examples from real-world projects and then get hands-on, refactoring existing code and measuring its quality before and after changes.

What you’ll learn and how you can apply it

By the end of this live online course, you’ll understand:

  • How to evaluate whether a code should be refactored
  • How to approach refactoring
  • How to identify and analyze code smells
  • How to devise a plan for refactoring and measure its results

And you’ll be able to:

  • Spot code that needs refactoring
  • Build tests for refactoring
  • Keep your codebase running while refactoring

This live event is for you because...

  • You’re a developer, technical lead, architect, or hands-on manager.
  • You work with a large, unwieldy codebase and want to better manage its complexity and reduce defects.

Prerequisites

  • Familiarity with programming in any language

Recommended preparation:

Recommended follow-up:

Schedule

The time frames are only estimates and may vary according to how the class is progressing.

Day 1

Refactoring: The what and why—Part I (90 minutes)

  • Presentation: Refactoring steps, challenges, benefits, and impacts; identifying refactoring candidates; preparing to refactor
  • Group discussion: The feedback loop
  • Hands-on exercise: Refactor a ball of mud
  • Break

Refactoring: The what and why—Part II (90 minutes)

  • Presentation: Analyzing code for design and code smells; principles to consider when refactoring; dos and don’ts
  • Group discussion: Key elements for refactoring
  • Hands-on exercise: Refactor a poor design
  • Q&A

Day 2

Refactoring: The how—Part I (90 minutes)

  • Presentation: Measuring code quality; from qualitative to quantitative; things to measure; degree of measurement; tools for measuring quality
  • Group discussion: Metrics-driven refactoring
  • Hands-on exercises: Measure quality before and after refactoring
  • Break

Refactoring: The how—Part II (90 minutes)

  • Presentation: How to approach refactoring; 10 practices for better refactoring; toward an incremental change; seeking continuous constructive feedback; the refactoring flow
  • Group discussion: Keeping code releasable; committing frequently
  • Hands-on exercises: Separate concerns; reduce state
  • Q&A

Your Instructor

Venkat Subramaniam

Venkat Subramaniam is the founder of Agile Developer Inc., creator of Agilelearner.com, cofounder of the dev.next software conference, and an instructional professor at the University of Houston. Venkat helps his clients effectively apply and succeed with sustainable Agile practices on their software projects. He’s trained and mentored thousands of software developers in the US, Canada, Europe, and Asia and is a regularly invited speaker at several international conferences. He’s also the author or coauthor of a number of technical books, including the 2007 Jolt Productivity Award-winning Practices of an Agile Developer.

linkedinXlinksearch

Skill covered

Refactoring