CodeSOD: Do Fiasco

This post was originally published on this site

The Daily WTF

Consuela works with a senior developer who has been with the company since its founding, has the CEO’s ear, and basically can do anything they want.

These days, what they want to do is code entirely locally on their machine, hand the .NET DLL off to Consuela for deployment, and then complain that their fancy code is being starved for hardware resources.

Recently, they started to complain that the webserver was using 100% of the CPU resources, so obviously the solution was to upgrade the webserver. Consuela popped open ILSpy and decompiled the DLL. For those unfamiliar with .NET, it’s a supremely decompilable language, as it “compiles” into an Intermediate Language (IL) which is JIT-ed at runtime.

The code, now with symbols reinserted, looked like this:

private static void startLuck() { luck._timer = new Timer(30000.0); luck._timer.Elapsed += delegate { try { luck.doFiasco().ConfigureAwait(true); } catch (Exception) { } }; luck._timer.Enabled

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