Once upon a time, a company had several huge Delphi applications. These applications were pretty fundamental to company operations. And then those developers left, as they often do. Which means Darren has inherited multi-decade old Delphi code.

Most of the problems in the code are structural. The average procedure itself is usually pretty okay, but the way they get strung together is an obscene nightmare of kruft. But this little snippet gives us a picture of what life is like here:

try
  if not Unzipper.CheckArchive then
  begin
    raise EBadZipFile.Create('Corrupt Zip file.');
  end; {if}
except
  raise EBadZipFile.Create('Corrupt Zip file.');
end;

If a zip archive isn't valid, we raise an exception, catch the exception, then raise the same kind of exception with the exact same message.

Why? Presumably once upon a time, this maybe did more? It has the aura of code that changed many times, with once useful segments becoming vestigial. And thus it sat, with probably several developers scrolling past it, perhaps thinking, "I should clean that up someday," but with no one doing anything about it.

<

[Advertisement] Continuously monitor your servers for configuration changes, and report when there's configuration drift. Get started with Otter today!

Remy Porter

Source link

You May Also Like

Dad, hey DAD…internet made JOKES for you (32 Photos)

Rick Source link

Little Known Fact About Cats

The post Little Known Fact About Cats first appeared on Crazy Funny…

My Family Was Doing Matching Outfits Before It Was Cool

“My mom sewed clothes for the family when I was growing up.…

Sisyphus Meme: Are You Familiar With Syphilis?

This Sisyphus meme shows what happens when you don’t listen at school…