RSS The Daily WTF

CodeSOD: A Highly Paid Field

In the past, Rob's employer rented computer time and used batch processing in COBOL, which was sufficient at the time. As computing became more important and rental costs increased, the company bought its own AS/400 computer and needed to migrate its COBOL code to RPG. To do this, they hired a Highly Paid Consultant (HPC). The results of the migration were not great, but the code is still in use today, albeit with many updates and modernizations. One example of the HPC's work is a block of code that checks for valid fields, but it stores numbers as text and uses lexical comparisons, leading to incorrect results. The goal of the comparison was to require values between 1 and 5, but it doesn't enforce that. The field is not used anywhere in the system, raising questions about why it exists. The HPC's work was often questionable, and when users reported discrepancies in reports, the HPC blamed the users for changing the data to make them look bad. The company's experience with the HPC was typical of the problems that can arise from such conversions. The legacy of the HPC's work can still be seen in the code today.
thedailywtf.com
thedailywtf.com
Create attached notes ...