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:

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