Representative Line: Destroying the Environment

This post was originally published on this site

The Daily WTF

Andrew H sends a line that isn’t, on its own, terribly horrifying.

Utilities.isTestEnvironment = !”prd”.equals(environment);

The underlying reason for this line is more disturbing: they’ve added code to their product which should only run in the test/dev environments. Andrew doesn’t elaborate on what that code is, but what it has done is created situations where they can no longer test production behavior in the test environment, as in test, the code goes down different paths. Andrew’s fix was to make this flag configurable, but it reminds me of some code I dealt with in the bad old days of the late 2000s.

The company I was with at the time had just started migrating to .NET, and was stubbornly insistent about not actually learning to do things correctly, and just pretending that it worked just like VB6. They also still ran 90% of their business through a mainframe

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