The Logic Behind Modern Maintenance

When the big merger was announced, the IT staff of both corporations was a little bit nervous, and with good reason: The day after the announcement, many redundant positions were eliminated. Miraculously, the IT staff on both sides was left almost untouched. With the integration of two disparate code bases, there was a lot of work ahead.

The Odd Couple
During this process, Doyle discovered that his development group inherited a widely used enterprise-level suite of Visual Basic 6 client-based apps from "the other side." Doyle and his team were used to working in VB.NET, C# and ASP.NET; they felt a little taken aback at this news. But no matter, they thought -- it was only Visual Basic.

So, after procuring enough copies of Visual Studio 6.0 from various online auctions for the entire office, and applying 10-plus years worth of updates, they were ready to get their integration show on the road. They were just in time, because enhancements were rolling in by the truckload.

Doyle needed to add another country-code checkbox for Mexico to a user configuration screen. It turned out that the program got data about what company information a user could view by reading in a registry entry (a three-bit field):

If iChkBx And 100 Then chkUS.Value = 1 Else chkUS.Value = 0
   If iChkBx And 10 Then chkCanada.Value = 1 Else chkCanada.Value = 0
   If iChkBx And 1 Then chkOther.Value = 1 Else chkOther.Value = 0
   'If not visible then uncheck in case it got checked above.
   If chkUS.Visible = False Then chkUS.Value = 0
   If chkCanada.Visible = False Then chkCanada.Value = 0
   If chkOther.Visible = False Then chkOther.Value = 0

After some inspection, it was found that many UI input controls were controlled by this "bits in the registry" method.

To the developers who maintained the application before the merger, this was how they did things; but to those in Doyle's department, this method -- though functional -- made them cringe. They knew they could do it better. After all, with all the enhancements coming, they would be allowed to make improvements along the way, right?


"Hold on!" declared the project leads. Enhancements, like adding a new checkbox, were completely valid. But changing existing base logic -- no matter how flawed -- added risk to a process that, up until a few weeks prior, never needed to take into account that "other" might not suffice as a category for users residing in Mexico.

Hooray for Status Quo
In the end, the original caretakers of the app didn't feel too bad about this decision. They could go ahead and keep up the programming habits that they'd honed during the past decade. Now, Doyle and his team spend their time adding and swapping bits in the registry, learning the "other" way of doing things, and biding their time until the merger train pulls out of the station.

About the Author

Mark Bowytz is a contributor to the popular Web site The Daily WTF. He has more than a decade of IT experience and is currently a systems analyst for PPG Industries.

comments powered by Disqus


  • Customize Your Own Audio Test Cues in Visual Studio 2019 v16.9 Preview 3

    Yes, developers can be alerted to a failed test with a fart sound.

  • Progress Touts New Third-Party Blazor UI Components

    Third-party dev tool specialist Progress announced an update to its .NET-centric offerings, touting new controls for Blazor, Microsoft's red-hot project for creating web apps with C#.

  • Entity Framework Core 6: What Developers Want

    Microsoft outlined its plan for Entity Framework Core 6, which in November will take its place as the data access component of the landmark .NET 6, a long-term support (LTS) release that will mark Microsoft's transition from the Windows-only .NET Framework to an open source, cross-platform umbrella offering of all things .NET.

  • AWS Open Sources .NET Porting Assistant GUI

    After previously open sourcing components of its Porting Assistant for .NET, Amazon Web Services open sourced the tool's GUI.

Upcoming Events