Live data from Hacker News

Fizz Buzz: Enterprise Edition

github.com

151–160 of 171 posts

Re: Fizz Buzz: Enterprise Edition

#151
post #146

Earlier quoted context omitted.

they don't contain more information. they contain more explicit declarations of that information. dynamically typed languages leave that information hidden because it is inferrable (or irrelevant).

>dynamically typed languages leave that information hidden because it is inferrable (or irrelevant). So do good, high-level statically typed languages, i.e. the kind with type inference. Like Scala or ML.

indeed. Scala's type inference system is truly beautiful. lets hope it catches on and becomes a widely adopted feature of the next generation of languages.

Re: Fizz Buzz: Enterprise Edition

#152

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…

Honestly, I'm not sure where it comes from... I tend to bypass/rip out this kind of obfuscated crap from projects wherever possible... "Microsoft Enterprise Library" is about the bane of my existence... I've only seen two projects in the 11 or so years of .Net development where it was a good use case.

Lately, for smaller one-offs, utility scripts etc.. NodeJS is my tool of choice. Even where it isn't the fastest choice, it tends to be one of the easier choices without going to a language the rest of the systems don't use (JS is used on the web, so web devs need to know it anyway)...

/fizzbuzz.js/ for(var i=1;i<=100;i++)console.log(!(i%3)&&!(i%5)?'FizzBuzz':!(i%5)?'Fizz':!(i%3)?'Buzz':i);

Re: Fizz Buzz: Enterprise Edition

#153
post #28

Earlier quoted context omitted.

What if you have projects in other jvm languages?

never having been in such a situation, I wouldn't know, but this is the first time i'm hearing of people putting java within the package name (for something that's not part of the java namespace)

scala!

Re: Fizz Buzz: Enterprise Edition

#154

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…

Part of it is "customers want it", part of it is because people are taught "abstraction is good", rather than "abstraction can be useful". So folks abstract everything, because they don't stop to think about whether it makes sense. You know, just in case the day comes when they need to send requests using carrier pigeons instead of TCP. They never stop to think whether "in a world where we need carrier pigeons, would…

Have to agree there... but without having to support/supplant multiple systems simultaneously, or in support of rigid testing, it doesn't make much sense.

In the former case, it's usually easier to rewrite than write a new, compatible abstraction... in the latter, with simpler more custom interfaces, testing can be smoother than a lot of frameworks for these things.

Re: Fizz Buzz: Enterprise Edition

#155
post #142

Earlier quoted context omitted.

Last week my colleagues and I realized that the official, Zend-provided, XML-based communication system that allows our PHP middle-end to talk to our RPG-based backend doesn't allow you to return any character string that includes a less-than symbol. One of our routines returns a SQL string. Sometimes SQL strings contain less-than symbols. After much handwringing and an official bugfix that fixed nothing whatsoever,…

why not just use 'where bar > foo'?

Ugh, I really don't feel like explaining. :P

Long story short: bureaucracy.

Re: Fizz Buzz: Enterprise Edition

#157

Can someone tell me why Java seems so to have developed into this kind of chaos? It isn't just enterprise java, has anyone looked at the Apache java projects lately? Tens of thousands of lines of dependency xml (that often doesn't even work because of incompatible common dependencies), three different built systems (ivy, ant and maven), abstraction for classes that have just a single concrete version, dependencies th…

Your fallacy here is that:

Enterprise programmer -> Java Developer

Java Developer -/-> Enterprise programmer

The correct question is: What madness has infected Enterprise developers (and why do they all use Java)?

Re: Fizz Buzz: Enterprise Edition

#158

Earlier quoted context omitted.

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

No metaclasses or descriptors though, still needs some work.

Oh, you want metaclasses? How about this?

print(type("",(),{"__call__": lambda self, start, end: [(n, (lambda x: ("fizz" if x % 3 == 0 else "") + ("buzz" if x % 5 == 0 else ""))(n)) for n in range(start,end+1)] })()(1,50))

Re: Fizz Buzz: Enterprise Edition

#159

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…

You need a certain mindset to start using a newer technology, and that mindset won't make you prone to write enterprizy code.

Or, in other words, the place that makes that kind of architecture won't allow the developers to touch anything that's not Java or .Net.

Post reply on HN