[This is a short byte. Short bytes are random twitter threads and opinions I tweet]
Software development as construction is a bad metaphor. In construction, architects design the plan, engineers build as per the plan, people move in and live happily ever after.
Software is moreover like gardening.
In gardening, first you have assumptions about your soil and space. This is the initial requirements gathering in software.
Then you plant the seeds and let it grow slowly as per your assumptions. This is the development part in software and of course it’s a continuous process.
The season changes, you realise some plants need more sunlight and others need more shade, some doesn’t like rain at all. Now you move around plants to make sure each plant’s need is addressed. Some plants need extra care with more fertilisers, while others can survive.
You realise grouping few plants together will be effective as they can make use of the soil contents efficiently without wasting resources. Same as using infra effectively. The garden grows huge to maintain as plants gets intertwined, you need to split the garden.
The bad weeds grow along with the plants, affecting the plants, those needs to be removed.
You group similar color plants as its aesthetically pleasing. Clean/Readable code!
This whole process is refactoring & it needs to be done continuously as part of writing code. The first best time to refactor your code was when you said you didn’t have time, second best time is now. The maintenance in code starts from day 1 like gardening.
So next time when someone says software is like construction, give them this gardening metaphor.
People love to use construction metaphor because it’s more relatable, has standard steps where you can estimate the time taken and bound by real world constraints. But software doesn’t have physical constraints. It needs constant care & maintenance and has only ballpark estimates.
Always remember the “soft” in software, it keeps changing, it has to, it should be structured in a way to embrace changes. Never hesitate to refactor the code you wrote few weeks back if it makes the whole system better.