
In a couple earlier posts I discussed three alternatives for handling changes to business rules in an object-oriented development environment. Now we come to the last approach, deprecation. We use deprecation when we want to "take back" a previously distributed method; we want to completely replace its implementation with something new and different.
Rather than reusing the same method name, we create (within the same class) an entirely new method with a new name. Then in meta-compiler statements we deprecate the old method (we prepend the "Obsolete" directive) so that if a developer attempts to use it they will receive a pop-up that recommends that they use the new method name instead. Unlike an overload, it may not be possible for to modify the old method to call the new method with nulls in the new arguments. Do it however if a safe way can be found to "translate" between the two methods.
The only drawback with deprecation is that once a team becomes accustomed to certain common method-names it becomes a hassle to have to relearn them. Usually when you deprecate a method you will make an extra effort to communicate this change to the development staff with a global notice; you may even make the effort to search the source code library for any routines that used the old method and then schedule some working time to update them.
In summary then, handle change by overloading, inheriting, propertizing, and deprecating, but use the approach that is appropriate for your situation.
Tuesday, June 5, 2012
Artful Deprecation
Saturday, May 12, 2012
Artful Culture
In some development efforts, our goal is to deliver software that is "fun." In other words the purpose of the software is to Entertain. In most workplace environments however the goal is to deliver software that helps people get stuff done; in other words the software has Utility.
In actual cultural practice however, most developers strive to make their software a little bit of each: you want to make your software "fun enough" that folks don't get bored out of their skulls when using it while they are getting stuff done. In fact, you generally want to hit a certain sweet spot such that in addition to its Utility, what you produce is:
Culturally Appropriate, Fun, Inexpensive, Courteous, Accurate, Responsive
Unfortunately these "cultural" aspects of development are seldom if ever captured in an Analyst's "Requirements" document. They also fall a bit outside the realm of what IT management might normally consider as platform based "non- functional" requirements.
How does this culture get baked into the software then? Well it usually takes culturally aware developers.
Monday, April 16, 2012
Artistic Utilities
One item designers consistently overlook during the redesign of a legacy system is capturing the hundreds of small utility programs in use to perform the mundane and necessary dirty work: one shot fixes, bug patches, cyclical clean up, ad hoc requests, et cetera. I suppose the consensus might be that the old utilities should be irrelevant for the new design.
Just the fact they exist however shines a light into the dark corners of workarounds and the prolific ability to bend to the flexibility of user demands and their processing errors. When redesigning a system therefore, at least pay attention to the general circumstances and conditions where utilities get invoked, and plan to support a similar panoply of solutions in the new environment.
