CodeSOD: Check Out This Legacy App

This post was originally published on this site

The Daily WTF

VisualBasic was… an interesting beast. The language wasn’t great, and because object orientation was awkwardly bolted onto it, but it also was heavily integrated into Microsoft’s ActiveX libraries (heavily object oriented), there were all sorts of interesting ways to break your program with it. Even better: it was designed to be easy so that “anyone” could use it.

Which leads to some of this code, from Dave. A number of years back, Dave was asked to try and convert an ancient VB6 application into something modern. Like all such conversions, the brief was: “make a new application that does exactly what the old application does, but nobody actually knows what the old application does because we never documented any requirements, just read the code”.

Reading the code had some “fun” moments, like this one:

Public fun As Single Public funprime As Single

As well as a few code smells:

To read the full article click on the 'post' link at the top.