Long time no blog, huh? Actually, the 2nd book and the coming up talks eat up the time since I have a day job.
Now back to the blog post topic. I have noticed that it's sometimes fun to illustrate programming paradigms with real life examples instead of trying to explain them using a UML diagram - which also works, of course.
Most people, I noticed, like the car metaphors. IT is the engine, driver / co-driver and blah blah blah. I'm absolutely not into cars, even despite the fact that I'm currently working for a car rental company. I think, cars as such are just means of moving my torso from A to B in a protected way so that I don't get cold. That's basically it.
So I usually try to avoid examples and metaphors from this area and to invent more interesting ones. And recently trying to explain the tight coupling to a young colleague, I found a nice example from the real life which I would like to describe here briefly.
Imagine, you want to rename a city. This happened for example quite often in the former USSR - the city now called Volgograd has changed its name 3 times in one century.
So you now have a huge effort to modify the maps, addresses etc. But this is at least what concerns the city itself. Now you have a lot of companies having the city name in their names. What now? If you really want to get rid of the old name, those names have also to change, which is followed by a chain reaction.
And now even worse: it's a common practice to call streets or districts in other cities after a city - either these are partner cities or the renamed one is bigger or whatever. Now you can imagine the chain reaction you start since they also have to change maps, addresses and so on.
If the old city name really has to disappear, the effort to change the references to it everywhere is enormous. And now imagine the effort to change it in people's heads. This is an example of tight coupling.
Actually, you should avoid renaming cities. Really. Or, at least, the references to the city names shouldn't appear in company or street names which is very difficult since it's a common practice and can mean something special.
No comments:
Post a Comment