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:

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