Time To Reorg – An Intro to Refactoring

Facebook
Twitter
LinkedIn
Pinterest
WhatsApp

Organizations reorg all the time. And again. Why do they do that? Setting cynicism aside, organizations reorg to adapt to new realities, to new demands. A team of 5 people that grew to 20 people needs to split to smaller teams. A business group dealing with a fast-growing market needs to come up with a new strategy to cope with the demand. A startup of 20 people will need a different structure than that of a company of 100 people. As business demands change there is a need to adapt the organization’s structure.

Reorg is an expensive venture, yet organizations do it again and again. Because they have to do it – they have no choice.

In a similar manner, the codebase of a product needs to be reorganized again and again to adapt to changing circumstances. A class that has more and more methods needs to split into smaller classes, otherwise, it will be very difficult to maintain it. A conditional (If-Else statement) that grew up to a monster needs to be shrunk again, otherwise, it will be prone to defects. A once simple interface that grew and expanded needs to have some wrapper to make clients’ work bearable.

In fact, taking a hike on Conway’s Law it makes sense that refactoring will somehow be related to reorg, at least in the sense that a change in the organization structure is related to adaptations in the codebase.

We call the process of adapting the codebase “refactoring” – changing the structure of the code not to get new functionality but to make the code better adapted to our new demands, business and technical alike.

Unlike reorgs, refactoring is part of the ongoing work of every developer. Every time a developer is handling code she needs to think about whether she should change the structure of this code. Should the method be renamed? Should a new interface be extracted? Should she replace the conditional with subclasses?

Just like dev doesn’t work without test, dev and test don’t work without refactoring. There are many cases where refactoring is a key player in making the code testable (but I’ll write about it some other time).

I’ve never been in a scouts’ camp but I hear they’re supposed to leave it in better shape than they found it. In the same spirit, a developer should leave the code in a cleaner state than she found it.

Two issues immediately arise, though: First, refactoring takes time. Correct. Reorgs also take time, yet we do them. Refactoring takes less time and provides faster results.

The second issue is that constant refactoring will make the system change all the time. Changing names, changing structure. Won’t that be counterproductive? Won’t that inhibit maintenance? “I’m used to looking for method err4get and now someone renamed it”. The idea is that refactoring should make the system more maintainable. If it makes it less maintainable – don’t do it. Names should be clearer, the structure should be easier to understand, and easier to test and change. Getting into a state of mind that we’re not afraid to make changes in our code is a healthy thing.

Every time your organization goes through another reorg you should ask yourself when did you invest such efforts in your codebase. Codebase reorg should happen all the time, on small scale, getting the code ready for the coming business challenges.

Subscribe for Email Updates:

Categories:

Tags:

Spotify
POPM
User stories
Achieve Business Agility
Program Increment
Nexus Integration Team
Agile Project
Confluence
Agile and DevOps Journey
Amdocs
Agile Marketing
Atlassian
RTE
chatgpt
SPC
lean agile change management
Sprint Retrospectives
Lean Agile Leadership
Introduction to Test Driven Development
Implementation of Lean and Agile
Retrospectives
Process Improvement
Development Value Streams
Lean Software Development
SAFe DevOps
QA
Portfolio for Jira
AI
LeSS
Agile Techniques
Risk Management in Kanban
Nexus vs SAFe
A Kanban System for Software Engineering
Agility
AgileSparks
Accelerate Value Delivery At Scale
What Is Kanban
EOS®
Enterprise DevOps
Lean Risk Management
WIP
Lean-Agile Budgeting
System Team
Legacy Enterprise
Professional Scrum Product Owner
Continuous Improvement
Kanban Kickstart Example
System Integration Environments
Coaching Agile Teams
IT Operations
Jira Plans
Elastic Leadership
Agile Risk Management
Story Slicing
Advanced Roadmaps
Agile Community
Lean Agile Management
Hybrid Work
Kanban
PI Planning
Daily Scrum
Lean Startup
Agile India
Planning
NIT
Systems Thinking
Slides
Games and Exercises
Agile Contracts Best Practices
ScrumMaster Tales
Sprint Iteration
LAB
Lean Agile
Atlaassian
Continuous Integration
Iterative Incremental Development
Jira
Lean-Agile Software Development
Risk-aware Product Development
Managing Projects
Scrum Values
Scrum and XP
Effective Agile Retrospectives
PI Objectives
Scaled Agile Framework
AI Artificial Intelligence
Keith Sawyer
Sprint Planning
Lean and Agile Principles and Practices
Product Management
Scrum Guide
Value Streams
Kanban 101
Rovo
ROI
LPM
Managing Risk on Agile Projects
Built-In Quality
SAFe
GanttBan
Pomodoro Technique
Nexus
Self-organization
Agile Basics
Certified SAFe
Rapid RTC
Agile Assembly Architecture
Applying Agile Methodology
Nexus and SAFe
RSA
Software Development
Lean Agile Basics
Agile Project Management
TDD
Release Train Engineer
RTE Role
speed at scale
Agile Games and Exercises
Agile Israel Events
Certification
ATDD
Kaizen
Lean Budgeting
Webinar
Lean and Agile Techniques
Scrum.org
Jira Cloud
predictability
Business Agility
ART Success
Continuous Deployment
Agile Development
Team Flow
Agile for Embedded Systems
Product Ownership
Implementing SAFe
Professional Scrum Master
ARTs
System Archetypes
ATDD vs. BDD
Frameworks
Software Development Estimation
Code
The Agile Coach
Agile Product Development
Professional Scrum with Kanban
Tools
Legacy Code
Agile
Agile Release Management
Covid19
Engineering Practices
Artificial Intelligence
Quality Assurance
Lean Agile Organization
SAFe Release Planning
Video
Test Driven Development
Risk Management on Agile Projects
speed @ scale
Manage Budget Creation
Large Scale Scrum
Acceptance Test-Driven Development
Agile Exercises
Introduction to ATDD
Change Management
Agile Mindset
agileisrael
ALM Tools
Scrum With Kanban
Agile in the Enterprise
Limiting Work in Progress
Continuous Planning
Scrum Master
Agile Games
Agile Israel
Kanban Game
Tips
Agile Testing Practices
transformation
Reading List
Scrum Master Role
Agile Outsourcing
Releases Using Lean
BDD
Perfection Game
Agile Delivery
Nexus and Kanban
Entrepreneurial Operating System®
Kanban Basics
Agile Product Ownership
Presentation
An Appreciative Retrospective
SA
The Kanban Method
Operational Value Stream
Agile Release Planning
Principles of Lean-Agile Leadership
Jira admin
DevOps
Continuous Delivery
Agile Program
Scrum Primer
Scrum
AgileSparks
Logo
Enable registration in settings - general

Contact Us

Request for additional information and prices

AgileSparks Newsletter

Subscribe to our newsletter, and stay updated on the latest Agile news and events

This website uses Cookies to provide a better experience
Shopping cart