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.

FizzBuzz Enterprise Edition

135 pointsby hglaserover 10 years ago

15 comments

userbinatorover 10 years ago
The sad part is that many Java programmers would probably not realise that this is supposed to be a parody, because there are even more ridiculous-looking things in real, &quot;production&quot; Java code:<p><a href="http://ws.apache.org/xmlrpc/apidocs/org/apache/xmlrpc/server/RequestProcessorFactoryFactory.html" rel="nofollow">http:&#x2F;&#x2F;ws.apache.org&#x2F;xmlrpc&#x2F;apidocs&#x2F;org&#x2F;apache&#x2F;xmlrpc&#x2F;server...</a><p><a href="http://docs.spring.io/spring-framework/docs/2.5.x/api/org/springframework/aop/framework/AbstractSingletonProxyFactoryBean.html" rel="nofollow">http:&#x2F;&#x2F;docs.spring.io&#x2F;spring-framework&#x2F;docs&#x2F;2.5.x&#x2F;api&#x2F;org&#x2F;sp...</a> (this one is somewhat famous - maybe it wins the &quot;most number of design patterns in a class name&quot; award?)<p>The impression I get whenever I come across code like this is that its authors were more interested in &quot;creating architecture&quot; than solving a real problem - and creating many classes containing short methods whose only function is to create more objects or pass existing ones around is a particularly insidious form of busy-work.<p>GNU Hello (<a href="http://www.gnu.org/software/hello/" rel="nofollow">http:&#x2F;&#x2F;www.gnu.org&#x2F;software&#x2F;hello&#x2F;</a> ) is basically the same sort of thing done to a Hello World program.
评论 #8779091 未加载
评论 #8779134 未加载
SmileyKeithover 10 years ago
This was a lot funnier before GitHub introduced the current folder mechanics. Since you previously had to dig into each level.
评论 #8779209 未加载
syncsynchaltover 10 years ago
They rejected my pull request to migrate their markdown docs to docbook.<p><a href="https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition/pull/125" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;EnterpriseQualityCoding&#x2F;FizzBuzzEnterpris...</a>
评论 #8779188 未加载
ahmacleodover 10 years ago
I was trained in Java, but I never had to do any Big Enterprise Java coding. Can anyone summarize why and when this style of development began?
评论 #8779072 未加载
评论 #8779070 未加载
imronover 10 years ago
I love that there is a commit to &#x27;remove redundant import&#x27;. <a href="https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition/commit/3732e43bc59070e5f1c9e826d07b6313453d42cd" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;EnterpriseQualityCoding&#x2F;FizzBuzzEnterpris...</a><p>Being enterprise software, the last thing they need in the codebase is clutter.
评论 #8779023 未加载
peetersover 10 years ago
The sad part is that there is actually an advantage to abstracting out the printing of fizz and buzz, and that is it will be easier to test. But the authors didn&#x27;t even swap in a testable printing strategy, they just changed System.out.
评论 #8780528 未加载
评论 #8780520 未加载
jdludlowover 10 years ago
<a href="https://news.ycombinator.com/item?id=5395215" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=5395215</a><p><a href="https://news.ycombinator.com/item?id=8046186" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8046186</a><p><a href="https://news.ycombinator.com/item?id=6712425" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=6712425</a>
评论 #8778922 未加载
developer1over 10 years ago
The main thing I look for with FizzBuzz solutions in general is how many modulus operators are used. The junior end of the spectrum tends to use four (% 5 &amp;&amp; % 3; % 5; % 3), while intermediate&#x2F;seasoned developers will either use three (% 15; % 5; % 3), or two (storing % 5 and % 3 in variables, then comparing the combinations).<p>My personal preference in terms of demonstrating maintainable code is using two modulus operations with variables. However, I fully understand the argument that an additional % 15 is preferable compared to the overhead of storing two variables on each iteration. Both are valid approaches IMO, and the debate can roar on for eternity. Micro-optimizations and whatnot.<p>I just don&#x27;t like to see four modulus operations, which IMO shows a lack of basic willingness or ability to refactor while coding. It&#x27;s fine to initially write the four modulus operations, but if someone doesn&#x27;t immediately catch the duplication and do something about it, it screams &quot;I write code until it works and then move on without cleaning anything up.&quot;<p>Strangely enough, only once have I seen someone use the % 15 optimization <i>and</i> add a short comment along the lines of &quot;&#x2F;&#x2F; least common multiple, divisible by both 3 and 5&quot;. Spotting the optimization is nice; placing a short comment explaining why % 15 when the test is about % 5 and % 3 is a nice touch. Explains something that might not be immediately obvious to the next person coming to the code.<p>Aside: it astounds me how many people, when asked to write a short snippet of code during an interview, have basic formatting problems and inconsistent code style. I&#x27;ve seen two lines of code inside an if() block indented at different levels, with no excuse for &quot;different opinions on formatting&quot;. Not a wrapped line continued on the next, but just two simple statements inexcusably indented at say 8 and 12 spaces. Don&#x27;t call us, we&#x27;ll call you...
评论 #8779588 未加载
评论 #8779394 未加载
评论 #8782061 未加载
评论 #8781224 未加载
adambatkinover 10 years ago
This makes me hurt inside.
jonahover 10 years ago
&quot;Enterprise-strength&quot; stack trace: <a href="https://plus.google.com/+JeanBaptisteQueru/posts/9oHHUMpwYhG" rel="nofollow">https:&#x2F;&#x2F;plus.google.com&#x2F;+JeanBaptisteQueru&#x2F;posts&#x2F;9oHHUMpwYhG</a>
GilbertErikover 10 years ago
I don&#x27;t get why all you kids love these obfuscation competitions. ;-)
101914over 10 years ago
&quot;... necessary tools such as if-&#x2F;else-statements and loops&quot;<p><a href="https://en.wikipedia.org/wiki/Array_programming" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Array_programming</a>
foobarianover 10 years ago
Enterprise programming is like Hadoop. Huge startup overhead, but once workers start up, progress shoots up at a pace faster than possible with less thought out systems.
WasSlowbannedover 10 years ago
Verbose way to express that a lot of enterprise Java code is verbose. I wish I had as much free time.
eklavyaover 10 years ago
ahahahahahahahahaha nice :D