this post was submitted on 10 Feb 2026
187 points (95.2% liked)

Programmer Humor

29635 readers
2143 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 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] red_tomato@lemmy.world 66 points 16 hours ago* (last edited 16 hours ago) (1 children)

Hold on, I’m in the middle of drawing an inheritance graph so I know how Dog is related to AircraftCarrier.

[–] blackn1ght@feddit.uk 53 points 16 hours ago (2 children)
public interface ICanTravelThroughTheAir
{

}

public class Flea : ICanTravelThroughTheAir
{

}

public class AircraftCarrier
{
  private List<ICanTravelThroughTheAir> _aircraft = new();

  public void AddAircraft(ICanTravelThroughTheAir flyingThing)
  {
    _aircraft.Add(flyingThing);
  }
}

public class Dog : AircraftCarrier
{
    public void Woof()
    {
        Console.WriteLine("Bitch I'm an aircraft carrier!");
    }
}

public static class Program
{
  public int Main(string[] args)
  {
    var dog = new Dog();
    
    for (var i = 0; i < 10000; i++)
    {
        dog.AddAircraft(new Flea());
    }

    dog.Woof();
  }
}
[–] jenesaisquoi@feddit.org 47 points 16 hours ago (1 children)

Needs more AbstractDefaultProxyBeanFactoryFactories

[–] Supercrunchy@programming.dev 13 points 12 hours ago (1 children)

And dependency injection!

Every class needs to use DI for calling other classes, even though we'll have anyway just a single implementation for all of them, and we won't be using this flexibility at all (not even for tests where it might be useful for mocking dependencies).

[–] jenesaisquoi@feddit.org 6 points 12 hours ago

Methods calling other methods? Heresy! There needs to be two or three interceptors on there, and some indirection over RabbitMQ using spring-integration, at the very least.

This is how you write proper enterprise-level software: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition

[–] Valmond@lemmy.dbzer0.com 7 points 12 hours ago

Not even unnecessarily templated, B- at best