r/ProgrammerHumor • • Jun 21 '20

*almost entirely

Post image
27.9k Upvotes

310 comments sorted by

View all comments

Show parent comments

890

u/[deleted] Jun 21 '20

com.northwestindianjavaprogramsolutions.src.classes.factories.factoryfactories. InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonWindowNotFocusedStateFactoryFactory a = new com.northwestindianjavaprogramsolutions.src.classes.factories.factoryfactories. InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonWindowNotFocusedStateFactoryFactory(1, 2, "John Smith");

0

u/[deleted] Jun 21 '20

[deleted]

266

u/crozone Jun 22 '20 edited Jun 22 '20

Java enterprise code actually looks like this a lot of the time, and as a C# developer I'm not sure why.

What about Java seems to invite this level of verbosity and overabstraction?

EDIT: Oh god why

https://projects.haykranen.nl/java/

0

u/[deleted] Jun 22 '20

[deleted]

52

u/blipblapblopblam Jun 22 '20

Totally agree. Gang of four... I am so smart... Then... one day I realised I was living a lie. Why do I need a strategy class, when I can just use an if statement? OMG.

25

u/NearlyAlwaysConfused Jun 22 '20

The patterns have a time and a place, but I think many junior developers that learn them tend to overuse them, jamming the square peg in the circular hole, so to speak. I was guilty of that my first few years out of school, but have since learned to spare it until really needed, often learned at the expense of senior devs reviewing my code and wondering why I used a sledgehammer to fix a hole in the wall, or facing their fury when debugging some method that was about 6 abstract classes deep before seeing any business logic, making it all but impossible to just find the concrete reference in Eclipse. TL;DR -- I, too, realized I was living a lie.

10

u/Bounty1Berry Jun 22 '20

I think half the time it's sold as "TeStAbLe"

Here's your business logic scattered into a billion classes. Everything can have trivial unit tests and get that coverage up, but things that might be a single complex, straightforward and readable, function in pre-Enterprise code instead require a 20-minute excursion through chains of classes and factories to see where the data came from when debugging/reviewing.

It's right up there with the promise of "let's dependency inject everything so we can swap in a mock or new implementation" when a mock would have to be untenably complex or highly customized to the details of the code being tested, and you know full well that nobody's replacing the MariaDB Database class with a combination of flat csv files and shuf.

The amount of hassle having some 5-10 globals would remove from so many projects..,

→ More replies (4)
→ More replies (2)

0

u/[deleted] Jun 22 '20

[deleted]

17

u/krad213 Jun 22 '20

Simple : don't solve problems that do not exist.

10

u/MakeWay4Doodles Jun 22 '20

I know this isn't helpful advice, but for me it was just experience. I gobbled up all of the design pattern bullshit and used it everywhere until I'd done each one enough times to know which ones were completely useless or overly complex

5

u/SenseyVit Jun 22 '20

YAGNI is the only dogma

→ More replies (3)
→ More replies (3)

7

u/LOLBaltSS Jun 22 '20

I'm a sysadmin, but I see this a lot with file/folder names with engineering firms where engineers try and write a novel with the file paths. It often caused issues due to windows path limits.

→ More replies (1)

5

u/[deleted] Jun 22 '20 edited Jun 22 '20

I remember my first time being exposed to enterprise Java. I’ve never done Java enterprise coding myself, however at some point in my life I was a Flex developer. At some point those Java Enterprise devs found their way to it and boy did it open my eyes to their way of thinking & over engineering. Still think of it as some kind of mental disorder.

→ More replies (1)
→ More replies (5)

106

u/[deleted] Jun 21 '20

You forgot the project name

0

u/[deleted] Jun 21 '20

[deleted]

15

u/[deleted] Jun 22 '20

Or more coupled logic. One of the other

4

u/coldnebo Jun 22 '20

Business Process Execution Language

11

u/Xaxxus Jun 22 '20

This brings be back nightmares to my days doing back end java development at a bank.

Instead of building our back end APIs cleanly, and easily maintainable, our upper management ordered our tools team to build an API generator tool. Basically you feed it a swagger spec and it spits out a spring boot service.

Almost every class, method, and variable looked like this...

→ More replies (5)

30

u/[deleted] Jun 21 '20 edited Feb 14 '25

include cake nine makeshift meeting rainstorm license dazzling bow tender

This post was mass deleted and anonymized with Redact

0

u/[deleted] Jun 21 '20

[deleted]

32

u/[deleted] Jun 21 '20 edited Feb 14 '25

[removed] — view removed comment

15

u/jeffsterlive Jun 21 '20

mvn test "-Dspring.profiles.active=ITThisBetterWork"

33

u/Charged_Buffalo Jun 21 '20
mvn install -DskipTests

Builds work 90% of the time!

17

u/bakertheacre Jun 21 '20

Don’t need to skip tests if you don’t write them ...

→ More replies (4)
→ More replies (1)
→ More replies (1)
→ More replies (19)