Our AI writing assistant, WriteUp, can assist you in easily writing any text. Click here to experience its capabilities.

Introduction

Summary

This article discusses the challenges and strategies used by the frontend chapter at ProntoPro when they had to refactor a large portion of their legacy codebase. It explains how the team used a monorepo, micro frontends, code duplication, feature flags, and continuous delivery in staging to refactor the code. Additionally, the article explains how the team allocated enough engineer capacity, found acceptance criteria, sliced tasks, and performed strict code reviews. Finally, the article emphasizes the importance of culture in the success of the project.

Q&As

What are some of the technology, process, and people enablers that helped ProntoPro refactor its in-app chat?
Some of the technology, process, and people enablers that helped ProntoPro refactor its in-app chat include using a monorepo, micro frontends, code duplication, feature flags and continuous delivery in staging, ensuring sufficient engineer capacity, searching for acceptance criteria, slicing tasks, and strict code review on small PRs.

How did ProntoPro use feature flags and continuous delivery in staging to help with the refactoring process?
ProntoPro used feature flags and continuous delivery in staging to incrementally deliver small, functional pieces of the chat to staging, allowing their QA team to also incrementally perform manual tests. This allowed them to respond to defects more quickly, avoid hogging QA engineer capacity, have their QA engineer be more involved in the building process, and avoid catching a logic flaw too late.

What is the AHA principle and how did ProntoPro apply it to the refactoring process?
The AHA principle is an acronym for "avoid hasty abstractions". ProntoPro applied this principle by duplicating code to avoid hasty abstractions due to an engineer’s limited context in a particular team, and to move faster during their product cycle.

How did ProntoPro use slicing to divide tasks and break down the refactoring project into smaller, more manageable tasks?
ProntoPro used slicing to divide tasks based on UI components, and have each task correspond to a single pull request, including as much implementation level detail as possible. This made it easy to knowledge share and onboard new engineers, and also allowed them to distinguish between features required to go to production and “nice to have” features.

What role did ProntoPro's engineering culture play in the successful completion of the refactoring project?
ProntoPro's engineering culture played a key role in the successful completion of the refactoring project by allowing them to not feel additional pressure from other stakeholders when they went over the initial estimates, and by providing an enjoyable environment to work in with colleagues.

AI Comments

đź‘Ť This article offers a great insight into the process of refactoring legacy code and provides helpful tips on how to do it efficiently and effectively.

đź‘Ž This article lacks concrete examples and is too general to be useful for someone actually trying to refactor legacy code.

AI Discussion

Me: It's about the process of refactoring legacy code. The author talks about how they refactored their in-app chat, and the implications of the process. They discuss the benefits of using a monorepo, micro-frontends, feature flags, and continuous delivery in staging. They also talk about the importance of allocating sufficient engineer capacity, creating acceptance criteria, slicing tasks, and having strict code reviews on small pull requests. Finally, they discuss how culture can influence the process, and how it's important to have people that are enjoyable to work with.

Friend: Wow, that's a lot of information! It sounds like refactoring legacy code can be a long and complex process.

Me: Absolutely. It requires a lot of planning and careful execution. It's also important to consider the implications of refactoring on the product. You might end up throwing away some logic that no longer serves a purpose, or uncovering some unexpected challenges. It's definitely worth taking the time to do the research and plan out the process thoroughly before you dive in.

Action items

Technical terms

Refactoring
The process of restructuring existing computer code without changing its external behavior.
Legacy Code
Code written in an outdated programming language or for an outdated system.
Monorepo
A single repository that contains all the code for a project.
Micro Frontends
A software architecture pattern where a single application is composed of multiple, independently deployable services.
Single Responsibility Principle
A software design principle that states that every module or class should have responsibility over a single part of the functionality provided by the software, and that responsibility should be entirely encapsulated by the class.
WET
An acronym for “Write Everything Twice”, a programming practice that encourages developers to copy and paste code instead of writing it from scratch.
AHA Principle
An acronym for “Ahead of Time Abstraction”, a programming practice that encourages developers to think ahead and abstract code before writing it.
Feature Flags
A software development technique that allows developers to enable or disable certain features in their code without having to deploy a new version of the software.
Trunk-Based Development
A software development practice that encourages developers to commit their code to a single branch (the “trunk”) instead of creating multiple branches for different features.
Nx
A toolkit for monorepos that provides a set of tools and libraries for building, testing, and deploying applications.
Example Mapping
A software development practice that encourages developers to map out user stories and acceptance criteria before writing any code.
Behavior-Driven Development
A software development practice that encourages developers to focus on the behavior of the software rather than the implementation details.
Basecamp’s ShapeUp Method
A software development practice that encourages developers to focus on the user experience rather than the implementation details.
Asana
A task management system that allows teams to track and manage tasks.
Single Responsibility Principle
A software design principle that states that every module or class should have responsibility over a single part of the functionality provided by the software, and that responsibility should be entirely encapsulated by the class.
Brooke’s Law
A software development principle that states that “adding manpower to a late software project makes it later”.

Similar articles

0.84861344 Culture & Methods Trends Report March 2023

0.83910674 Herding Elephants

0.8350372 How a startup loses its spark

0.8334303 How the nation's largest transit ad company transformed its customer support with AI

0.83136314 Non-Traditional Project Planning

🗳️ Do you like the summary? Please join our survey and vote on new features!