Skip to content
DevMeme
3600 of 7590
Languages Post #3937 · source on Telegram

A Java Developer's Casting Call

Description

The image displays a snippet of Java code under the heading 'How C Developer think' and above the footer 'Java Developers Code'. The code itself defines a method 'removePatterntiger' that takes an 'Animal' object. The core of the humor lies in the ridiculously verbose and nested type casting: '((Patternable) ((PatternableAnimal) (((Animal)) (Entity) animal)))'. This line is followed by an excessive number of semicolons (';;;;;;;;;'). The meme satirizes the stereotype of enterprise Java being overly complex, verbose, and reliant on deep, often convoluted, inheritance hierarchies and design patterns. The text 'How C Developer think' is likely a misdirect or a clumsy attempt to contrast this with the perceived simplicity of C, but the punchline is firmly aimed at the verbosity and over-engineering often associated with Java development culture

Comments

21
Anonymous ★ Top Pick That's not real enterprise Java. A proper implementation would first pass the object through an AnimalToPatternableAnimalAdapterFactory before attempting a cast
  1. Anonymous ★ Top Pick

    That's not real enterprise Java. A proper implementation would first pass the object through an AnimalToPatternableAnimalAdapterFactory before attempting a cast

  2. Anonymous

    We promised the auditors every critical path had type safety; the C dev opened removePatternTiger(), counted seven explicit casts, and said, “congratulations, you’ve reinvented void* with runtime penalties.”

  3. Anonymous

    The real pattern here is how C developers implement 17 layers of abstraction to remove a Tiger, while Java developers just let garbage collection eat it during lunch break

  4. Anonymous

    This perfectly captures the Java architect who read the Gang of Four book once and decided every animal needs to implement Patternable, PatternableAnimal, Entity, and Animal interfaces - because clearly, a simple Tiger.removePattern() would violate seventeen SOLID principles they can't quite remember. The eight extra semicolons are there to ensure the garbage collector knows they're *really* done with that statement

  5. Anonymous

    In C you cast to hush the compiler; in Java, thanks to type erasure, you cast after instanceof to reassure it - then prod ships a ClassCastException. Polymorphism was cheaper than all those parentheses

  6. Anonymous

    If your Java needs a cast ladder this tall, Liskov’s already broken and the compiler has delegated to runtime - see you at ClassCastException o’clock

  7. Anonymous

    C devs cast and conquer; Java devs summon a protected final PatternFactory just to peek at the tiger

  8. Deleted Account 4y

    > ));;;;;;;;;;;

  9. @RiedleroD 4y

    we kinda sometimes have to, to some extent

  10. @Infinitelineman 4y

    we need image of c developer code from java developers view

    1. @affirvega 4y

      BufferAbstractFactory

    2. @tarasssssssssssssss 4y

      mov aex, bex je cx

      1. @SamsonovAnton 4y

        int main(int argc, char** argv) { asm { MOV EAX, argc XOR EAX, argv MOV &argc, EAX } return argc; } 👌

  11. @karim_mahyari 4y

    Isn't that so? I've got used to the pain of C and honestly don't like to waste my time resolving java dependencies (though my idea might be immature and my java experience is limited)

    1. @karim_mahyari 4y

      In addition to the fact that java OOP is FILLED with patterns

    2. @Alizare1 4y

      Servant of Mr Mahyar

      1. @karim_mahyari 4y

        Your wish is my command

  12. Алексей 4y

    And what c-dev is wrong about?

  13. @LionElJonson 4y

    How Java devs actually code: *literally the same pic*

  14. @affirvega 4y

    is this a char (*(*x())[5])() reference?

  15. @callofvoid0 4y

    its more like Java

Use J and K for navigation