Live data from Hacker News

Unsure if I understand TransactionAwarePersistenceManagerFactoryProxy

stackoverflow.com

61–70 of 80 posts

Re: Unsure if I understand TransactionAwarePersistenceManagerFactoryProxy

#61

Long names are a Good Thing as far as I'm concerned. Having spent FAR more time than I care to admit working with IBM crap that uses name like QXMGRTBL and QWRKQITM, I'll take TransactionAwarePersistanceManagerFactoryProxy any day... and twice on Sunday. The only bit about this that even strikes me as a little bit unreasonable is the "Proxy" bit at the end. Not sure why you need another level of Proxy on top of Trans…

The problem is not the name, but the ridiculous overdesign of which it is a symptom. At which point I bring you the story of the king's toaster [1] (which is a cautionary tale, not an aspirational story, just in case that should be unclear to anybody). ------------------------------------------------ Once upon a time, in a kingdom not far from here, a king summoned two of his advisors for a test. He showed them both…

>At run time, the program must create the proper object and send a message to the object that says, 'Cook yourself'.

the perceived elegance of this approach makes junior CS college student eyes glow when s/he first hears about it, and that glow continues for, in the best case, at least a decade after college.

Re: Unsure if I understand TransactionAwarePersistenceManagerFactoryProxy

#62
Who keeps changing the title, it was "And this, dear children, is why Java should stop taking drugs"?

Quoting part of an article as the title is not necessarily editorialization, and when the link is not actually an article, but a SO question, the original "title" may not be particularly interesting or informative.

Obviously inventing provocative titles simply to spark a flame-war is not on, but in this case the title was humorous (and interesting). The new title which is literally someones question on SO seems out of place on the front page, and not really the point of discussion.

Interesting titles can form part of the culture of a site like this, and over-zealous editing of titles damages the sense of community. It's probably the thing I dislike most about HN right now.

Re: Unsure if I understand TransactionAwarePersistenceManagerFactoryProxy

#63

Earlier quoted context omitted.

> Some problems are complex and require complex solutions. And yet some very complex solutions were solved with very simple languages, before Java was conceived.

Except they weren't solved. After fifty years of trying, the number of programs we've produced that work correctly (no bugs and certainly no "undefined behavior") is damn close to zero. So far the best any known language can do is statically rule out just a few classes of low-level mistakes.

So far the best any known language can do is statically rule out just a few classes of low-level mistakes.

And if we actually used those languages, we would probably be seeing much lower bug rates in production software already and we could start looking into what else could be improved next. Unfortunately, most of the popular industrial languages don't even get that far. :-(

Re: Unsure if I understand TransactionAwarePersistenceManagerFactoryProxy

#64
post #36

Earlier quoted context omitted.

> Some problems are complex and require complex solutions. And yet some very complex solutions were solved with very simple languages, before Java was conceived.

Java is not a complicated language. Something about its affordances pushes developers into these giant labyrinthine swamps of abstraction violation, but the language isn't that complicated, either syntactically or semantically.

Java is one of the most complex computor languages in existence, so unless your comparing it to English I really don't see where your comming from. Don't believe me try an make a compiler some time.

PS: THE Java® SE 7 Edition of The Java Language Specification describes all the features that have been added to the Java programming language in Java SE 7. It also integrates changes made to the Java programming language under maintenance since the Third Edition in 2005. http://docs.oracle.com/javase/specs/jls/se7/jls7.pdf. It's 670 pages long.

Re: Unsure if I understand TransactionAwarePersistenceManagerFactoryProxy

#65
post #36

Earlier quoted context omitted.

> Some problems are complex and require complex solutions. And yet some very complex solutions were solved with very simple languages, before Java was conceived.

Java is not a complicated language. Something about its affordances pushes developers into these giant labyrinthine swamps of abstraction violation, but the language isn't that complicated, either syntactically or semantically.

Java is not a complicated language.

Unfortunately, Java is also not a very powerful language. Many of those OO gymnastics are only relevant because the language isn't expressive enough to achieve the same results in a simpler, more direct way. Java is the language where design patterns in the Gang of Four sense first became popular, and it's often been suggested that design patterns indicate missing language features.

Re: Unsure if I understand TransactionAwarePersistenceManagerFactoryProxy

#66
post #42

knowing absolutely nothing about language design (and not many languages) other than occasional experiments in notepad... is there no language which attempts to allow spaces, maybe with quotes, for better legibility? like instead of org.springframework.orm.jdo.TransactionAwarePersistenceManagerFactoryProxy something like org.'spring framework'.orm.jdo.'transaction aware persistence manager factory proxy' or is that j…

In PHP you can have non-alphanumeric variables like so:

    $org->{'spring framework'}->orm->jdo->{'transaction aware persistence manager factory proxy'}
I'm not sure if you can do that with PHP namespaces though (and I'm too lazy to test this):

    use org\{'spring framework'}\orm\jdo\{'transaction aware persistence manager factory proxy'};

Re: Unsure if I understand TransactionAwarePersistenceManagerFactoryProxy

#67

Java does not own the monopole on this one... Ever heard of kBluetoothAMPManagerCreatePhysicalLinkResponseAMPDisconnectedPhysicalLinkRequestReceived or __AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 or cairo_atsui_font_face_create_for_atsu_font_id_REPLACED_BY_cairo_quartz_font_face_create_for_atsu_font_id ?

I'm not familiar with the first or the third, but the second example you cited is working as intended. No 3rd-party developer ever types this (and I don't know if anyone at all ever types this or if it's machine-generated), and the long name is meant as a form of documentation for anyone reading the header file.

Re: Unsure if I understand TransactionAwarePersistenceManagerFactoryProxy

#68
post #53

Earlier quoted context omitted.

If I had to pin down Java's problem on one thing, I would say that its problem is really C. Or more accurately, the problem is that Java was a new language shoehorned into being "like" a language that was never meant to hold the concepts that Java demands. In some cases this manifests itself in more syntactical ways; C's pragmatic but unsophisticated approach typing works well for C, but starts to become a real burde…

I don't think I agree with your analysis. C# was originally designed to look a lot more like Java than Java ever looked like C, but it hasn't been hampered by that and has evolved to be a much more advanced language than Java has. It also doesn't have the over-engineering culture that Java has (aside from a number of "Enterprise-Class" add-on libraries Microsoft has tried to push out.) The same could be said about Ru…

I would say that all of those languages, while "officially" C-like (as Go is), all stray much further from C than Java or C++ (as Go has). Particularly Perl, Python, and Ruby, which are dynamically typed which singlehandedly eliminates neutralizes a great deal of "C's baggage".

I wouldn't describe C# as a language that I like, but I think it too has benifited from breaking the mold of C more than Java did (though I attribute most of it's superiority to its designers simply making better decisions in several places). Named and optional arguments stand out in my mind as ways C# did something that had no precedence in C, while Java still has not. (There is that double squiggly bracket trick, but you have to admit that is pretty shoddy).

Re: Unsure if I understand TransactionAwarePersistenceManagerFactoryProxy

#69
post #62

Who keeps changing the title, it was "And this, dear children, is why Java should stop taking drugs"? Quoting part of an article as the title is not necessarily editorialization, and when the link is not actually an article, but a SO question, the original "title" may not be particularly interesting or informative. Obviously inventing provocative titles simply to spark a flame-war is not on, but in this case the titl…

The original title was garbage. The only thing at all it told me was that the article was somehow related to Java. I did click on it when it was the original title, and was very disappointed to see it was just a bad answer (which has at this point been deleted by the SO mods) to a stupid question.

The new title, on the other hand, tells me this is going to be about absurdly long factory classes, almost certainly using Java, and that I should probably be expecting humor rather than, say, a long article about an obscure interaction in Java that produces amusing results (which is what I had hoped I was getting with the original title).

It also happens to be the title of the linked "article" as well, which I believe is what HN says you should be using rather than editorialized titles.

Re: Unsure if I understand TransactionAwarePersistenceManagerFactoryProxy

#70
post #36

Earlier quoted context omitted.

Java is not a complicated language. Something about its affordances pushes developers into these giant labyrinthine swamps of abstraction violation, but the language isn't that complicated, either syntactically or semantically.

Java is not a complicated language. Unfortunately, Java is also not a very powerful language. Many of those OO gymnastics are only relevant because the language isn't expressive enough to achieve the same results in a simpler, more direct way. Java is the language where design patterns in the Gang of Four sense first became popular, and it's often been suggested that design patterns indicate missing language features…

> it's often been suggested that design patterns indicate missing language features.

Exactly right. In previous decades, had they been using modern terminology, calling conventions would no doubt be covered by plenty of "design patterns". We don't speak of calling conventions that way now because languages provide that for us.

Post reply on HN