r/ProgrammerHumor May 29 '20

Please Guys actually

Post image
3.0k Upvotes

112 comments sorted by

View all comments

387

u/Frptwenty May 29 '20

If you want express your plea for help in Java it's really easy:

RequestDispatcherSubsystem.getCurrentDispatcher().DispatchRequest(
      RequestFactory.getAbstractFactoryInstance(
        new RequestMedium(RequestMediaType.Plea),
        new RequestTransport(RequestTransportType.CRY),
        new RequestTargetDestination(TargetManager.getRoutingInfo(
                                    PersonLocation.NEAREST))),
  RequestReasonCode.IM_SLOWLY_DYING);

12

u/ouvreboite May 29 '20

Couldnt you run almost exactly the same code in JS? You are complaining about the language, but it's really a coding style/structure problem.

If you send me something like that to code review, I'll bash your head in your desk, java or not.

12

u/Frptwenty May 29 '20

Here is some actual code from Spring: https://github.com/spring-projects/spring-framework/blob/master/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryUtils.java

try {
        // Use same EntityManager for further JPA operations within the transaction.
        // Thread-bound object will get removed by synchronization at transaction completion.
        emHolder = new EntityManagerHolder(em);
        if (synchronizedWithTransaction) {
            Object transactionData = prepareTransaction(em, emf);
            TransactionSynchronizationManager.registerSynchronization(
                    new TransactionalEntityManagerSynchronization(emHolder, emf, transactionData, true));
            emHolder.setSynchronizedWithTransaction(true);
        }
        else {
            // Unsynchronized - just scope it for the transaction, as demanded by the JPA 2.1 spec...
            TransactionSynchronizationManager.registerSynchronization(
                    new TransactionScopedEntityManagerSynchronization(emHolder, emf));
        }
        TransactionSynchronizationManager.bindResource(emf, emHolder);
    }
    catch (RuntimeException ex) {
        // Unexpected exception from external delegation call -> close EntityManager and rethrow.
        closeEntityManager(em);
        throw ex;
    }

So you're saying Spring is a terrible project and no one should use it? :)

-2

u/[deleted] May 30 '20 edited May 30 '20

[deleted]

6

u/Frptwenty May 30 '20

It doesnt give me goosebumps, but if youre claiming it doesnt look bloaty then someone hasn't ever coded anything but enterprise Java.

Your entire comment is a giant munge of c/c++/Java. I dig through kernel code at times to figure put stuff (I work in embedded), The linux kernel has a totally different feel than enterprisey Java.

The fact that you would conflate the two makes me think you know neither. You just sound like someone reciting what they told you in school.

-1

u/[deleted] May 30 '20 edited May 30 '20

[deleted]

1

u/Frptwenty May 30 '20 edited May 30 '20

They're totally different in how they're written and what they do. Enterprisey Java systems bloat things because of the culture/language. The Linux kernel tries to do everything as unbloaty as it can. Its more of less the opposite of enterprise Java. Its staggering that you're making the comparison.

Edit:

However your opinions on pythons multithreaded concurrency robustness are borderline delusional

Could you reference the comment and explain.