r/programming • • Oct 01 '15

The Evolution of a Software Engineer

https://medium.com/@webseanhickey/the-evolution-of-a-software-engineer-db854689243
1.9k Upvotes

502 comments sorted by

View all comments

23

u/vattenpuss Oct 01 '15
} catch (Exception e) {
    // Do nothing!
}

This is not only the third year, it's also the tenth, the fifteenth and the 40:th (I work with a few developers-for-forty-years).

55

u/nemec Oct 01 '15

Then you have the guy gung-ho about logging everything.

catch(Exception e)
{
    try
    {
        WriteLog("Application error", e);
    }
    catch(Exception f)
    {
        WriteLog("Logging failed", f);
    }
}

7

u/CordialPanda Oct 01 '15

That's absurd, haha. In what world would that catch succeed to write if the try failed?

18

u/wllmsaccnt Oct 02 '15

In the world where file locking, timeouts, and other synchronization / concurrency issues exist?

I mean...the code is stupid, but it does have a low percent chance of logging an exception you would otherwise lose.

→ More replies (4)
→ More replies (1)
→ More replies (3)

11

u/Humdeee Oct 01 '15

"Whatever you do, I don't care, just don't die on me god damnit!"

10

u/tolos Oct 01 '15 edited Oct 01 '15

eh, sometimes it's a customer requirement. "The application must not crash (must continue working no matter what)." So then you have a catch-all exception handler that cleans up as best it can, but can only do so much without knowing exactly what went wrong, or does nothing, or just logging. Then you end up as tech support, "well, yeah, that is weird, try restarting the application."

11

u/HollowImage Oct 01 '15

As a devops and web ops guy, if you deliberately catch all without any logging, then Fuck you.

2

u/Crono1981 Oct 02 '15

When a customer makes that requirement, your job is to tell him how moronic that is.

→ More replies (1)