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
21Comment deleted
That's not real enterprise Java. A proper implementation would first pass the object through an AnimalToPatternableAnimalAdapterFactory before attempting a cast
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.”
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
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
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
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
C devs cast and conquer; Java devs summon a protected final PatternFactory just to peek at the tiger
> ));;;;;;;;;;; Comment deleted
we kinda sometimes have to, to some extent Comment deleted
we need image of c developer code from java developers view Comment deleted
BufferAbstractFactory Comment deleted
mov aex, bex je cx Comment deleted
int main(int argc, char** argv) { asm { MOV EAX, argc XOR EAX, argv MOV &argc, EAX } return argc; } 👌 Comment deleted
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) Comment deleted
In addition to the fact that java OOP is FILLED with patterns Comment deleted
Servant of Mr Mahyar Comment deleted
Your wish is my command Comment deleted
And what c-dev is wrong about? Comment deleted
How Java devs actually code: *literally the same pic* Comment deleted
is this a char (*(*x())[5])() reference? Comment deleted
its more like Java Comment deleted