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:

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