Real world refactoring
The tram stop next to my apartment has been completely rebuilt during the last few weeks. They removed every part of the old one, including the actual little shelter, the fence, the curb, the pavement — everything. A pretty major change as far as tram stop remakes go. It could be seen as a clear improvement. Tram Stop 2.0, if you wish.

They also created a new pedestrian crossing next to the tram stop. And there was one thing about it that I noticed. One side of the crossing was connected to the tram stop and the curb there was just rebuilt. The other side of the street had a perfectly fine curb, and it would have been no problems to just paint lines on the street and be done with the crossing. But they didn’t.
Instead, they ripped up the street, curb and part of the sidewalk on that side too. Why? The reason is that they wanted to improve that side of the crossing too. They’re making the sidewalk about half a meter wider and thereby narrowing the street. That makes it a little bit clearer that it is a crossing and therefore makes the crossing safer. They’ll lower the curb for a meter or so which makes crossing by bike or wheel-chair easier. That’s about it, as far as I know.
While arguably better, it didn’t really enable anything that wasn’t possible before. And it did cost money. Money that could have been spent elsewhere. And they had already spent a lot of money on rebuilding the tram stop. So why did they do it? I’m not sure, but I think whatever the reasons were, the same reasons could be used to motivate refactoring of software.
(Alright, that was possibly a crappy metaphor… but it’s my blog, and I’ll post what I want.
)