Sorry to be somewhat off-topic as far as economics goes. This is another one of my biases about systems development–not that I am a qualified professional at it. But on an earlier post, a commenter wrote,
code sent messages to customers by e-mail, phone, text, etc., for flight notifications (on time, late, cancel, gate change, etc.). Just for frequent flyers, the decision making on whether to send a message that a flight was delayed ran past 1000 lines of code. It depended on whether messages had been sent before already, plus results from multiple databases with customer contact details, timezones, whether the flight was a connection or originating, time-of-day, saved preferences, plus legal issues such as whether the customer had triggered telco opt-out for text messages.
My claim is that none of that should be written into computer code. Instead, think of a list of conditions that might trigger a message. Put those into a database and write code that constantly checks against those conditions. Then think of a list of conditions for sending a message by phone, a list of conditions for sending a message by email, etc. Put those into a database, and when “might trigger a message” is true, check these conditions and if they are satisfied, send a message.
My point is that business rules should reside as much as possible in data, not in code. That way, you know where they are, and you do not have the maintenance problems that come with large amounts of code.
One of the advantages I see in rewriting software is that you take the business rules that have crept into the code out of the code and into data.