Live data from Hacker News

Fizz Buzz: Enterprise Edition

github.com

111–120 of 171 posts

Re: Fizz Buzz: Enterprise Edition

#111
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

Here's my python version that uses the y-combinator: https://gist.github.com/sirpengi/3443999

Re: Fizz Buzz: Enterprise Edition

#113
post #26

Earlier quoted context omitted.

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?

No. I honestly want to see some of this great code that I keep hearing about.

It's just hilarious to me when people think their shit doesn't stink and so I rub their faces in it.

Have you seen the code for Node.js? It's fucking disgusting. Yet everybody around here can't get enough of it. Seriously...I'd love to see how some of these developers would deal with enterprise requirements. I think the problem is that they just don't understand that business is chaos, it's not like building some pie-in-the-sky single-purpose social media application.

Re: Fizz Buzz: Enterprise Edition

#114
post #53

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…

I wonder too. I write a very atypical brand of Java (I like to think of it as "unencumbered Java"). I sometimes even use public fields instead of accessors (o, the heresy). My best guess would be that you often need to refactor you code to include some of the patterns showcased in the repo (factories, for instance). So developers try to future-proof their project by using those patterns everywhere. This is obviously…

> Now for the bitchy part, why does no one ever speaks about the good sides of Java?

Cause at some point most of them got tired to preach about Java and continue to do great work vs worrying what other people think.

Look around: NetFlix, Yammer, Twitter, Google are all using Java to power either their infrastructure or apps. Nobody blogs about it because "It Works" ;)

The rest blogs how they keep jumping between wagons :P

Re: Fizz Buzz: Enterprise Edition

#115
post #20

Please note that GitHub no longer supports Internet Explorer versions 7 or 8. How ironic. This covers so many enterprise programmers with locked down Windows PCs.

What are the chances that a company that locks down on IE will let them use github

In my case, it lasted for about 4 months.

Re: Fizz Buzz: Enterprise Edition

#116
post #44

Earlier quoted context omitted.

so overcomplicated javascript is not overcomplicated? i just started working on microsoft enterprise garbage. ever had to deal with sharepoint, dynamics? even microsoft developers say you're doomed when you're being put on a sharepoint project. I just codereviewed code for 2 different dynamics contractors. Both highly recommended by microsoft. both of them had high levels of abstractions, but the end result was tight…

Say what you want about the culture but I've found MS's stack to be quite good with the right team. It's got some great features. LINQ in particular springs to mind. There are plenty of terrific systems built atop that stock. StackOverflow is implemented in ASP.NET, for instance.

I agree

I'll take C# over Java any day. Hands down.

It has its warts, sure, but it's night and day. I can't pin it down, but the C# libraries seem much more natural to me.

Of course, if the team culture is not good, it's going to be messy, either in Java, C#, Python, etc

Re: Fizz Buzz: Enterprise Edition

#117

Earlier quoted context omitted.

Your comment offends me, but on a light note, for every 1 developer doing the enterprise overengineering crap, there is a dozen of us C# guys who are doing the opposite where I work.

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

No, C# best practices look nothing like this. I have no idea what happens in Sharepoint land or deep in the enterprise and MS Office stacks, but the core of .Net is not over-engineered to this level. Factories, FactoryFactories, and XML-configurable dependency interjection frameworks are nowhere to be seen.

Re: Fizz Buzz: Enterprise Edition

#118
How is anyone supposed to tell this is a spoof when things like this

  '  sum = sum + i
  Array.SetValue( Text.Append( "GetSum", GetSum_Locals), "sum", Array.GetValue( Text.Append( "GetSum", GetSum_Locals), "sum" ) + Array.GetValue( Text.Append( "GetSum", GetSum_Locals), "i" ) )
- http://wiki.smallbasic.com/Simulating%20Local%20Variables.as...

unironically exist in a language "aimed at bringing "fun" back to programming. By providing a small and easy to learn programming language in a friendly and inviting development environment, Small Basic makes programming a breeze"

?

Re: Fizz Buzz: Enterprise Edition

#119
post #20

Please note that GitHub no longer supports Internet Explorer versions 7 or 8. How ironic. This covers so many enterprise programmers with locked down Windows PCs.

Of course, a really industrial-strength FizzBuzz would be in an SVN repo.

Ha! You think any enterprise IT shop is going to trust an open-source product like Subversion with their mission-critical source code? It would be in Perforce or MS Team Foundation Server.

Re: Fizz Buzz: Enterprise Edition

#120

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…

From what I see it is usually well intentioned but not exceptional developers trying to write "good code".

They know some sort of abstraction is called for, but they end up picking abstractions which are actually a net negative for code complexity, rather than a positive. If you have enough of these developers then it devolves into code very much like the OP.

There is also a resistance to large refactorings which "clean house" of these sort of abstraction errors in enterprise teams and a lack of developers with the skill (and balls) to do it. So this cruft tends to accumulate.

Post reply on HN