this post was submitted on 24 Apr 2024
60 points (98.4% liked)

Programmer Humor

18958 readers
1013 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 

Hey folks! I think this request is right up this comm's alley. I'm sure that we all know bogo sort but, what other terrible/terribly inefficient algorithms, software architecture, or design choices have you been horrified/amused by?

I, sadly, lost a great page of competing terrible sorting algorithms, but I'll lead with JDSL as a terrible (and terribly inefficient) software architecture and design. The TL;DR is that a fresh CS guy got an internship at a company that based its software offering around a custom, DSL based on JSON that used a svn repo to store all functions in different commits. The poor intern had a bad time due to attempting to add comments to the code, resulting in customer data loss.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 5 points 3 months ago (1 children)

Sounds like you should look at a few years of https://thedailywtf.com entries. Enough to make the staunchest man (or woman) weep.

[โ€“] [email protected] 5 points 3 months ago

https://thedailywtf.com/articles/gotta-catch-em-all

Dear God.

try
{
    /* ... some important code ... */
} 
catch (OutOfMemoryException exception)
{
    Global.Insert("App.GetSettings;", exception.Message);
}
catch (OverflowException exception)
{
    Global.Insert("App.GetSettings;", exception.Message);
}
catch (InvalidCastException exception)
{
    Global.Insert("App.GetSettings;", exception.Message);
}
catch (NullReferenceException exception)
{
    Global.Insert("App.GetSettings;", exception.Message);
}
catch (IndexOutOfRangeException exception)
{
    Global.Insert("App.GetSettings;", exception.Message);
}
catch (ArgumentException exception)
{
    Global.Insert("App.GetSettings;", exception.Message);
}
catch (InvalidOperationException exception)
{
    Global.Insert("App.GetSettings;", exception.Message);
}
catch (XmlException exception)
{
    Global.Insert("App.GetSettings;", exception.Message);
}
catch (IOException exception)
{
    Global.Insert("App.GetSettings;", exception.Message);
}
catch (NotSupportedException exception)
{
    Global.Insert("App.GetSettings;", exception.Message);
}
catch (Exception exception)
{
    Global.Insert("App.GetSettings;", exception.Message);
}