Live data from Hacker News

Fizz Buzz: Enterprise Edition

github.com

91–100 of 171 posts

Re: Fizz Buzz: Enterprise Edition

#91
post #56

I had a bunch of fun coming up with terrible ways to write FizzBuzz a little while back. My favorites, in Python https://gist.github.com/daeken/1e3c680c20da98c680c4 and C https://gist.github.com/daeken/15769d83b66974335f78

# That inspired me to have a bit of my own fun. Here's my awful Python take on it.

[(n, (lambda x: ("fizz" if x % 3 == 0 else "") + ("buzz" if x % 5 == 0 else ""))(n)) for n in range(1,51)]

Re: Fizz Buzz: Enterprise Edition

#92

I've often wondered - is it the language that spawns this or the mindset of the developer (or both?) I see this primarily in Java or .NET shops - massive layer upon layer, code generation, factories, classes, etc. - when a simple architecture would be best. Why do we get these insane things to begin with? What's going on? It feels sort of like premature scaling (what if we have millions of programmers - we need more…

It's environmental, largely driven by a) the need for cost certainty, and thus the susceptibility of non-technical management to the allure of the Bag Of Magic Beans sales pattern (see also: the fungibility of skilled work fallacy); and b) the need for risk abatement in large organizations.

I've always found it most useful to think of this sort of garbage as an effort to hedge against terrible communication. Sure, it's likely to be a load of blood sweat and tears spent on useless tangential silliness; but one time in a hundred, the plastering of abstraction over ill-definied abstraction will allow a team to anticipate one step ahead in the chain of ever-shifting requirements, and thus, earn back a few hours and a tiny shred of dignity.

Nobody really likes this crap. But the life of the mean programmer is a grim one, indeed. Ultimately, the problem is that nobody really knows how to write software.

Re: Fizz Buzz: Enterprise Edition

#93

I've often wondered - is it the language that spawns this or the mindset of the developer (or both?) I see this primarily in Java or .NET shops - massive layer upon layer, code generation, factories, classes, etc. - when a simple architecture would be best. Why do we get these insane things to begin with? What's going on? It feels sort of like premature scaling (what if we have millions of programmers - we need more…

[deleted]

Re: Fizz Buzz: Enterprise Edition

#95
post #43

Earlier quoted context omitted.

So, you should be able to show me dozens of tools that are the default choice within these ecosystems, that make programmers build things in this way. Can you please name some tools and tell us how they say this is the right way to do things?

Really? Eclipse, Netbeans, Maven, JUnit, JLog J2SE libraries - pretty much all of them Apache libraries Hibernate J2EE libraries The list is endless Even Google App Engine manages to be way more convoluted in Java than in Python or Go, it's not even funny

I use Netbeans[1] and Eclipse all the time, and I don't write Java code like that. Then again, I write GUI's by hand in swing, so .... there is that.

[1] edited from Netflix. I use Netflix all the time, too!

Re: Fizz Buzz: Enterprise Edition

#96
post #56

I had a bunch of fun coming up with terrible ways to write FizzBuzz a little while back. My favorites, in Python https://gist.github.com/daeken/1e3c680c20da98c680c4 and C https://gist.github.com/daeken/15769d83b66974335f78

That python code made me cringe. decorators, parsing, compiling and evals? You win.

Re: Fizz Buzz: Enterprise Edition

#97
This seems to be implemented in a single programming language without any dependencies on legacy systems. A truly enterprise-grade system talks to PL/SQL stored procedures. Or it would, if the DBAs had written the stored procedures. But they haven't responded to your ticket request yet. And when they do, it will be with a mostly irrelevant question delaying actual work for another week. by which time their manager will be offsite at OracleWorld and won't be able to approve the changes.

Re: Fizz Buzz: Enterprise Edition

#98

I've often wondered - is it the language that spawns this or the mindset of the developer (or both?) I see this primarily in Java or .NET shops - massive layer upon layer, code generation, factories, classes, etc. - when a simple architecture would be best. Why do we get these insane things to begin with? What's going on? It feels sort of like premature scaling (what if we have millions of programmers - we need more…

Not to defend the indefensible, but why not make a couple of discussion points...

If you have a huge application and a high staff turnover you want to minimise the amount of information in your developers' heads. Strictly architected code can do this to some extent, and can go some way to reducing need for that other 'enterprise bane' - documentation. This is less of a problem in a startup type environment were you can find out about a particular piece of code by walking over to the kid that wrote it and having a chat.

Code generation (mentioned elsewhere on the thread) is another example of something that is less necessary in a small environment. Matching an enum to the contents of a database table or whatever can be done by convention to begin with, but it's less practical if your development team is spread across three timezones. Better to invest the time in letting computers do the work.

Re: Fizz Buzz: Enterprise Edition

#100
post #26

Earlier quoted context omitted.

it shouldn't, it has nothing to do with you, as much as it has something to do with best practice in c#

Show us the best practice that resembles this FizzBuzz solution. Also, I'll be waiting to see some code that you think is great.

You're really taking this personally, aren't you?
Post reply on HN