News for hackers. Stuff that matters.
Re:How (not) to write Factorial in Java by swannodette on Wednesday January 26, 2011 @12:40PM (#2144062)
Yeah experienced developers building scalable "bullshit" like GMail et al, ITunes Store, Android, etc.
Re:How (not) to write Factorial in Java by rbanffy on Wednesday January 26, 2011 @01:22PM (#2144297)
For every example of well used Java, I can easily come up with a dozen counter-examples of insanely complex, unreliable and unmaintainable messes I have encountered in my professional life.

It's not worth it.

Re:How (not) to write Factorial in Java by mseebach on Wednesday January 26, 2011 @01:39PM (#2144389)
To be relevant to the thread, those systems must be insanely complex, unreliable and unmaintainable, because the Java developers who made them has these habits that Java developers apparently have.

To the extent Java correlates with bad software, IMHO the causation is more likely to be that the environments (in the vein of clueless corporate management, waterfall, http://www.halfarsedagilemanifesto.org/) are more likely to pick Java for their development.

Re:How (not) to write Factorial in Java by dhimes on Wednesday January 26, 2011 @11:01PM (#2146522)
Well, maybe, but the cultural argument is also applicable. With my first Java app I did this kind of stuff because the examples of Java I found implied that this was a good thing to do. I didn't have a lot of experience in this area, so I thought, "these folks have been around the block, experienced the pain, and now have words for the wise." So I did it too.

I wonder if I will actually ever use one of those factories again in that app.

Re:How (not) to write Factorial in Java by rbanffy on Thursday January 27, 2011 @04:55AM (#2147286)
One of the things that annoys me in Java books is that every meaningful example is a couple pages long, most of it giving context to a function or method. The process of writing a meaningful may be so painful and risky Java programmers defend themselves by starting with code so generic they believe it won't need rewriting in the future.
Re:How (not) to write Factorial in Java by rbanffy on Wednesday January 26, 2011 @03:14PM (#2144923)
> because the Java developers who made them has these habits that Java developers apparently have.

That's the point. Java, it seems, make it tempting to "overarchitect" applications into excessively generic and modular beasts early in their lives when a much simpler implementation would be perfectly adequate and much simpler to extend and maintain.

Re:How (not) to write Factorial in Java by jbooth on Wednesday January 26, 2011 @03:07PM (#2144881)
You can do that in any language. Java's ubiquitousness means that there's a lot more bad code, especially when you look at some of the places it's become ubiquitous.

But you know what? Once we've established that you can write bad code in any language.. I'd prefer to deal with bad code in Java than almost any other language I can think of (and I've seen a fair bit). Maybe Python wins out, but I'd rather debug bad Java code than bad C++ or bad Ruby for sure.

Re:How (not) to write Factorial in Java by eru on Wednesday January 26, 2011 @05:45PM (#2145598)
I did not have to deal with bad Haskell, yet. But I wonder, how it would turn out. The type-system can give you some pretty strong guarantees (if you abstain from using back-doors), and thus make interfaces much less leaky. I.e. if a function has the type String -> Int, you know that it takes a String and gives an Int, and doesn't have any strange side-effects, like setting some random variable or sending away your credit-card data.
Re:How (not) to write Factorial in Java by nostrademons on Wednesday January 26, 2011 @06:59PM (#2145897)
Bad Haskell usually involves poor type abstractions, eg. instead of defining new data types for inputs that are logically distinct but physically identical, you just re-use existing types and add new constructors. Or you end up using tuples for everything. Or (horror!) you encode a bunch of things as strings instead of using the type system at all.

The nice thing about Haskell is that it's really, really hard to write things that accidentally ignore purity, which eliminates a whole class of errors and bad designs. The type system only helps you if you let it, though.

Re:How (not) to write Factorial in Java by eru on Thursday January 27, 2011 @08:35PM (#2150424)
Yes, that's sounds plausible.

I've looked at a friend's Haskell program for Huffman encoding, that used raw recursion in a undisciplined way instead of abstracting the control flow out into, say, filters, folds and maps. That was the closed I ever got to ugly Haskell.

Re:How (not) to write Factorial in Java by munificent on Wednesday January 26, 2011 @05:32PM (#2145521)
What programming language is that not the case for?
Re:How (not) to write Factorial in Java by rbanffy on Wednesday January 26, 2011 @06:50PM (#2145863)
Messes, perhaps, may be more frequent in PHP/ASP applications, but insanely convoluted and overarchitected solutions with unrequired levels of indirection and never used configuration XML files that have to be generated by an IDE are much more frequent in the Java/C# camp than, say, in the Python/Ruby/Perl/Smalltalk camp.
Re:How (not) to write Factorial in Java by joshwa on Thursday January 27, 2011 @02:04PM (#2149025)
c.f. Spring, EJB, JBoss, anything J2EE, etc.
Re:How (not) to write Factorial in Java by Zev on Wednesday January 26, 2011 @02:40PM (#2144726)
I've heard that Apple still maintains WebObjects for Objective-C for the iTunes Store (and for Radar).
Re:How (not) to write Factorial in Java by GeneralMaximus on Wednesday January 26, 2011 @09:56PM (#2146379)
That has nothing to do with the language and everything to do with the developers. What if the same developers used Common Lisp or Smalltalk or Haskell?

Gut feeling says they'd be even more productive. Terrifyingly so, in fact. The sad fact is, though, that we'll never be able to conclusively prove a statement like that.