Live data from Hacker News

Stop hating Java

andrzejonsoftware.blogspot.com

81–90 of 158 posts

Re: Stop hating Java

#81
post #8

All you need to do to experience this first hand is go to one Ruby meetup. The roundtable introductions at my local Ruby brigade are often seasoned with AA-like declarations of soberness such as "Hi, I'm So-and-so and I've been Java-free since 2006." As a Java pro (and someone who really does like Java) it's a little disheartening. On one hand I know they don't really mean to belittle the technology that pays my bill…

I recently went on an interview for a Python dev position. I've been a full time Java developer for the last 5 years, working on some cool shit. However I enjoy python more for my hobby projects, having many live python projects, shipped python code, and a github account with my python code. After some good natured ribbing that he 'doesn't hate Java developers, he just feels bad for them' He finally told me quite dir…

... Which he'd not bothered to read. Now ask, would you want to work for a manager who prefers preconceived notions to actually seeing what people produce?

Re: Stop hating Java

#82
post #71

Earlier quoted context omitted.

So your counter example is a relatively obscure language? I don't know Forth, but I'd imagine someone well-versed in it could handle the task. In any event I didn't say it was categorically the case. I said tends to be the case. We could go case / counter-case all day. I can bootstrap a project in Ruby or Python considerably faster than I can in Java. But when it comes time to scale, Java usually -- not always, but m…

If you honestly think there's no expressivity difference between Python and Java, you're still writing Java-in-Python. There are so many differences in expressivity I wouldn't even hardly know where to start describing them. The old 10-to-1 line advantage isn't a myth, line count matters (one of the only solid truths about software engineering we have proved with almost scientific rigor), and I've gotten more than 10…

I'm not suggesting how you feel comfortable writing code. Like I said, if you just prefer it because it's less verbose, that's fine. There's absolutely nothing wrong with that. But that doesn't mean you can't accomplish the same thing with Java or that verbosity has a long tail impact on productivity. At some inflection point in just about every project, you stop mashing the keyboard and focus on the non-typing aspects of the codebase.

Re: Stop hating Java

#83
post #55

Long live the JVM and here we go again comparing Java to Rails the framework. I've seen the pros and cons of both Java and Ruby. From an organizational standpoint it's hard to beat Java. The performance is there and in a team setting statically typed languages really shine. You can argue about the quality of programmers that flock to Java quoting pg ad nauseaum but we don't live in a lisp world. Elegant code is writt…

> Elegant code is written by good programmers—not the language.

But some languages make writing elegant code easier than others (compare C to Python, for example).

Re: Stop hating Java

#84

I've done a ton of Java work, server side and desktop apps. What really amuses me about Java advocates is how they don't realize that the XML is not there for "configuration", it's there to form a dynamic (non-statically typed) appendage to the language. The trick of Spring and similar tools is that under the covers they use the reflection API. It's sort of a joke to claim that you are using static typing, when the c…

Yeah... A lot of Java apps are really just runtimes for the actual app, which is written in a one-off language wrapped in XML tags.

Re: Stop hating Java

#85

Earlier quoted context omitted.

... architecture astronauts who hijacked the language in the last decade - J2EE/EJB, the GoF ... Thank you for writing this. When I first read the GoF Design Pattern Book I thought "this is the reason, why the code in my project is bloated, unmaintainable and shitty".

You are right. The GoF only promoted bloated code. Who in their right mind would use patterns like the Observer, the Adapter, or the Visitor? Not sure if you know the history, but the authors of the book really only collected the patterns that they had seen around them in Smalltalk and C++ code. They wrote a catalog so we could all refer to the same name instead of using different names for the same concept. They ide…

> Observer, the Adapter, or the Visitor

It depends on the programming language one uses, really. You won't find many references to these patterns on Python's mailing list (or at least I didn't when I was new to the language and used to spend a lot of time there, ~6-7 years ago). Also, when I've tried to learn Lisp or Erlang I didn't find any mentions to such particular patterns (or maybe only in passing), the focus was on something else. And I'm sure there are a lot of other languages outhere who don't bother with patterns.

Re: Stop hating Java

#86
We seem to have a rather short institutional memory. It wasn't that long ago (Java's only as old as Ruby) that Java was new and hailed as a savior from C++ and C. Java was widely seen as a great language, or at least a language that presented a great improvement over the existing mainstream languages. It gave GC to the masses for the first time. It delivered standard-sized primitives, an (almost) everything's-an-object design, a cross-platform runtime, JIT compilation, and a host of other improvements to mainstream programmers for the first time. Java has a lot of issues, but in the grand scheme of things, it's a pretty good language.

Stroustrup was dead on: "There are only two kinds of languages: the ones people complain about and the ones nobody uses." The more popular a language is, the more people will complain about it. (And the more people will build crappy software around it.)

Re: Stop hating Java

#87
post #85

Earlier quoted context omitted.

You are right. The GoF only promoted bloated code. Who in their right mind would use patterns like the Observer, the Adapter, or the Visitor? Not sure if you know the history, but the authors of the book really only collected the patterns that they had seen around them in Smalltalk and C++ code. They wrote a catalog so we could all refer to the same name instead of using different names for the same concept. They ide…

> Observer, the Adapter, or the Visitor It depends on the programming language one uses, really. You won't find many references to these patterns on Python's mailing list (or at least I didn't when I was new to the language and used to spend a lot of time there, ~6-7 years ago). Also, when I've tried to learn Lisp or Erlang I didn't find any mentions to such particular patterns (or maybe only in passing), the focus w…

Every language has design patterns. The patterns are different depending on the language, though. You don't use the observer pattern much when you've got proper delegates (or closures), for example. Design patterns are just the things you end up doing over and over in a language. MVC is a design pattern. Even something like Rails itself could be said to be a codifying and standardization of a set of design patterns.

Re: Stop hating Java

#88
post #81

Earlier quoted context omitted.

I recently went on an interview for a Python dev position. I've been a full time Java developer for the last 5 years, working on some cool shit. However I enjoy python more for my hobby projects, having many live python projects, shipped python code, and a github account with my python code. After some good natured ribbing that he 'doesn't hate Java developers, he just feels bad for them' He finally told me quite dir…

... Which he'd not bothered to read. Now ask, would you want to work for a manager who prefers preconceived notions to actually seeing what people produce?

Absolutely. We got a long great otherwise, but that one thing ended the interview on a sour note for me.

Re: Stop hating Java

#89
post #85

Earlier quoted context omitted.

You are right. The GoF only promoted bloated code. Who in their right mind would use patterns like the Observer, the Adapter, or the Visitor? Not sure if you know the history, but the authors of the book really only collected the patterns that they had seen around them in Smalltalk and C++ code. They wrote a catalog so we could all refer to the same name instead of using different names for the same concept. They ide…

> Observer, the Adapter, or the Visitor It depends on the programming language one uses, really. You won't find many references to these patterns on Python's mailing list (or at least I didn't when I was new to the language and used to spend a lot of time there, ~6-7 years ago). Also, when I've tried to learn Lisp or Erlang I didn't find any mentions to such particular patterns (or maybe only in passing), the focus w…

You did not hear about observer, but you probably heard about publisher/subscriber (most gui frameworks use this, even wxPython with pubsub).

Adapter is a generic name. Compatibility modules that enable python code to run with python 2 and python 3 are adapters. For example: https://github.com/bartdag/py4j/blob/master/py4j-python/src/...

As for the visitor pattern: http://docs.python.org/library/compiler.html#module-compiler...

Re: Stop hating Java

#90
post #66

Earlier quoted context omitted.

I love the term "architecture astronauts", and you get them everywhere in this field, not just programmers. I agree that it's not java the language (java's boring, but not unusable), it's the java culture from the last decade that drives people away.

No, there's a direct relationship between the architecture astronauts and Java-the-languages. Since Java is so simple and so lacking in abstraction mechanisms compared to almost anything else, you end up writing FactoryFactories and all the facades and all that code goop just to get any sort of halfway decent abstraction out of the language. Even things like the AOP libraries that directly muck with JVM bytecode are…

I do understand why there was a need for all these abstractions, but I just think it got way out of hand. "Programming" java became more about gluing frameworks together using XML than about writing code. The culture of enterprise java programmers directed people to bring in all these abstractions, "just in case" they might need them in the future. The language may be neutered, but the over-architects took the last bit of fun out of it.

I've really only been viewing this from the deployment side for quite a while, but when I'm trying to help you troubleshoot your relatively simple webapp, and I have thousands of lines of stacktraces that bubbled up through a half dozen frameworks, it's hard to blame just the language.

Post reply on HN