TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Java: Real or Not?

183 pointsby mechazawaalmost 10 years ago

20 comments

overgardalmost 10 years ago
It never hurts to study the masters in serious enterprise software: <a href="https:&#x2F;&#x2F;github.com&#x2F;EnterpriseQualityCoding&#x2F;FizzBuzzEnterpriseEdition" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;EnterpriseQualityCoding&#x2F;FizzBuzzEnterpris...</a>
评论 #9671753 未加载
评论 #9671751 未加载
Nitrampalmost 10 years ago
The names are extremely predictable (as shown by this Markov chain), which is actually a Good Thing (tm). The bad thing is that things got complex enough to warrant these names.<p>It&#x27;s the knee jerk reflex of decoupling everything, to the point that you have 80% configuration&#x2F;wiring&#x2F;setup vs 20% of code that actually does something useful.<p>Each extension point in the framework is represented by a couple of these classes to handle the layer of indirection. Maybe Spring should run a study and see which of their extension points is actually used, at all, or by more than x % of users, and then cut down all the useless ones. I&#x27;m not too familiar with Spring these days, but I&#x27;d expect that the vast majority of indirections isn&#x27;t actually useful for anybody.<p>The other problem is that our mechanisms to introduce and handle these abstractions are too verbose. Each extension point spawns multiple classes where it&#x27;s really just one little method that needs to be called instead of another block of code. That makes software systems extremely hard to understand and use, and the overall bloat does actually slow things down - if not in production, then in deployment, startup, and build.
评论 #9671912 未加载
评论 #9672380 未加载
parasubvertalmost 10 years ago
This is sort of like making fun of German for using long combinations of smaller words to denote a concept.<p>Or making fun of medical jargon. (ha ha, you said subdermal hematoma not bruise)<p>Once you know what the individual words mean, you can use them in different places, and know right away what the class does. Do you need to use 80% of these? No, but they&#x27;re there, like parts in a car, in case you need to tinker.
评论 #9672455 未加载
soup10almost 10 years ago
Most of the atrocious stuff is in J2EE related frameworks (looking at you spring and hibernate).<p>I think core java libraries are amazingly designed and a good part of why the language became popular. You won&#x27;t find many FactoryFactories there, The land of c,c++ libraries that came before is incredibly fragmented, inconsistent and difficult to use by comparison, not to mention the documentation. Good lord the docs ;x.
mkozlowsalmost 10 years ago
It&#x27;s not surprising that a Markov chain could put together plausible sounding class names, because yeah, there are definitely patterns that class names fall into.<p>What&#x27;s surprising is that one third of the names it&#x27;s showing me are actually real. I mean, &quot;MetaMetaContextHierarchyConfig&quot; actually exists?
评论 #9671697 未加载
评论 #9672154 未加载
elevensiesalmost 10 years ago
Are the generated names verified to be non-real? There could be some overlap.
评论 #9672245 未加载
评论 #9672086 未加载
haddralmost 10 years ago
Some answers are not 100% right. I got:<p>- HttpServlet<p>- AbstractXmlWebMvcResultProcessingInterceptorAdapter<p>- MockJtaTransaction<p>While there is HttpServlet class, it is considered wrong, and 3rd option is considered correct :(
评论 #9671832 未加载
clamprechtalmost 10 years ago
Are you calling the Spring developers Markov chains?
tibiapejagalaalmost 10 years ago
I don&#x27;t like complaining about submissions not working in my browser, but this time I feel like I&#x27;m missing a lot of fun.<p>On Firefox DevEdition nothing past &quot;Pick the one that&#x27;s not made up!&quot; appears. On latest IE it&#x27;s every time &quot;ComplexPortletApplicationContext.EditController&quot; vs &quot;ModelMapBasedHandlerMethodProcessor&quot; vs &quot;AbstractPlatformTransactionAttributeSource&quot;. 16 times the same question. Well, this could be just bad luck if questions are random. With randomness you never know.
评论 #9671998 未加载
lkrubneralmost 10 years ago
&quot;The principle of least surprise&quot; is sadly missing from this API.
评论 #9673715 未加载
kaddaralmost 10 years ago
Note that some classes exist (even if not in Spring, at least in base Java) <a href="http:&#x2F;&#x2F;imgur.com&#x2F;sNk4mE2" rel="nofollow">http:&#x2F;&#x2F;imgur.com&#x2F;sNk4mE2</a><p>The key thing to keep in mind with generative models based on real data is that just because results were based on random generation doesn&#x27;t mean they can&#x27;t match something real.
dmcgalmost 10 years ago
Nice. We made fridge-magnets in my last project to help generate excellent names like these.
评论 #9673853 未加载
impostervtalmost 10 years ago
Spring is not the only framework with bad names; look at this class name from aspectj:<p>org.aspectj.weaver.patterns .HasThisTypePatternTriedToSneakInSomeGenericOrParameterizedTypePatternMatchingStuffAnywhereVisitor
billrobertson42almost 10 years ago
It&#x27;s utter bullshit to conflate Spring and Java like this.
ibejoebalmost 10 years ago
It&#x27;s been a few years since I&#x27;ve seriously used Spring, but I when I did, I used the hell out of it. I&#x27;m pretty surprised by how many times I was fooled.
dschiptsovalmost 10 years ago
Like any other primitive, dogmatic religion, Java will stay for ages, because there will never be a shortage of idiots to repeat the dogmas and mediocries to have a decent living by manipulating the crowd.<p>Java is triumph of the &quot;packers mindset&quot;.<p><a href="http:&#x2F;&#x2F;the-programmers-stone.com&#x2F;the-original-talks&#x2F;day-1-thinking-about-thinking&#x2F;" rel="nofollow">http:&#x2F;&#x2F;the-programmers-stone.com&#x2F;the-original-talks&#x2F;day-1-th...</a>
评论 #9673935 未加载
peterashfordalmost 10 years ago
Nice job blaming all of Java for Spring&#x27;s foibles
davelnewtonalmost 10 years ago
The chained names are often too long; I find it hard to believe that my very rusty Java&#x2F;Spring is the reason I got almost all of these right.
评论 #9677085 未加载
jhallenworldalmost 10 years ago
It amuses me that names in Verilog 1995 (a language with no structures) look pretty much the same: oc48_transp_decode_data.
ExpiredLinkalmost 10 years ago
HN goes reddit. Java, oink, oink, lol!