Live data from Hacker News

Why Java? Tales from a Python Convert

sookocheff.com

21–30 of 102 posts

Re: Why Java? Tales from a Python Convert

#21
post #5

Earlier quoted context omitted.

IMHO, C#'s tooling and is definitely ahead. Java is starting to get there, and I can see why the JVM is still popular. But given the actions of Oracle and MS as of late, I think I'd take MS. VS starter projects are easy to setup and run... Every Java application I've worked on has been an exercise in frustration just getting the environment setup.

I'm also a fan of C# but deploying .NET has been a sticking point. I'm hopeful that Microsoft's open source efforts fix this.

It's not completely free, and not completely open source, but we've been very happy with Octopus Deploy https://octopus.com/

That and Topshelf https://github.com/Topshelf/Topshelf have made deploying Windows services very easy. Topshelf is slowly adding some Linux/mono support, and OctopusDeploy supports SSH as a deployment option, but unsurprisingly things aren't as nice if Windows isn't your target.

Re: Why Java? Tales from a Python Convert

#22
post #7

Earlier quoted context omitted.

I'm seriously tired of this argument against getters and setters, just generate them with the IDE some also support collapsible regions with a start and end comment, and forget about them. So considering you can just generate and forget why is it tedious?

If it can be generated, why doesn't the compiler do it for you? This shouldn't be done at the IDE level.

Because it's not about tooling, it's about being explicit vs implicit. Though, there is something to be said about having a nice default that you can easily invoke at the code-level.

Re: Why Java? Tales from a Python Convert

#23
I don't see any valid arguments that make Java 8 strictly better than any of the alternatives. These languages are all in the same rough ballpark. Your particular use case/environment will determine mostly which Language you should be pick.

Re: Why Java? Tales from a Python Convert

#24
post #4

The one thing keeping me away from Java still is the awful experience around modeling data. Compared to something like a case class in Scala or even autoproperties in C#, writing classes with a bunch of getter and setter methods just to keep state is really tedious.

Meijer or Oderski advised to use Kotlin / Ceylon to lift the burden of Java POJO. They have enough syntactic sugar and type niceties to make you happy again.

Probably Meijer ...

Re: Why Java? Tales from a Python Convert

#25

Take a look at Kotlin https://kotlinlang.org/ I know there is also Scala and other JVM languages. But I'm also an Android developer and Kotlin works really fine with Android-Studio (both from JetBrains).

kotlin definitely looks like a drop-in replacement for java. fairly conservative set of extensions, seamless interop, and fixes a bunch of annoyances.

Re: Why Java? Tales from a Python Convert

#26
"the JVM has excellent support for production logging and production monitoring, allowing you to easily monitor performance metrics down to an individual thread"

Is it "excellent" compared to z/OS and mainframe (SMF and RMF, specifically)? I sincerely doubt it, but I would like to know if there is someone who can compare. I don't think any platform can match z/OS in the visibility into the system, but I am not enough expert in Java to really compare.

Re: Why Java? Tales from a Python Convert

#27
post #5

Earlier quoted context omitted.

IMHO, C#'s tooling and is definitely ahead. Java is starting to get there, and I can see why the JVM is still popular. But given the actions of Oracle and MS as of late, I think I'd take MS. VS starter projects are easy to setup and run... Every Java application I've worked on has been an exercise in frustration just getting the environment setup.

Could you elaborate? Java has maven archetypes that allow that, create a base project with no effort and the right dependencies in place. From there on compiling is just a command away, and running it usually too.

My experience with Java has been frustrating, I think it has a lot to do with what you need to know to get started. If you want to play with a language, check out how to build a quick API, you need to know a lot more than Ruby, Python or NodeJS. You need to know at least a little about Maven, a little about the build process, and for me it was more than I really wanted to do.

I pushed through learning a little about the JVM to learn some Clojure but I felt like I was troubleshooting things that I frankly didn't want to learn about. The pros didn't out number the cons for me.

Re: Why Java? Tales from a Python Convert

#28

i don't care what lipstick you put on that pig: when something as simple as writing to stdout requires that i first create a new class, i'm not interested. Edit: i do consider this a legitimate issue with how Java 'does' OO. i'd be curious to understand downvoters' thoughts. One more edit: wow, tough crowd. for those not familiar, i'd suggest reading Steve Yegge's essay "Execution in the Kingdom of Nouns"

It's basically just a namespace for the function.

Re: Why Java? Tales from a Python Convert

#29
post #7
post #4

The one thing keeping me away from Java still is the awful experience around modeling data. Compared to something like a case class in Scala or even autoproperties in C#, writing classes with a bunch of getter and setter methods just to keep state is really tedious.

I'm seriously tired of this argument against getters and setters, just generate them with the IDE some also support collapsible regions with a start and end comment, and forget about them. So considering you can just generate and forget why is it tedious?

Because it's actually useless, having the work been done by someone else or something else means the work is still done, and you still depend on that 3rd-party.

Re: Why Java? Tales from a Python Convert

#30
post #10
post #4

The one thing keeping me away from Java still is the awful experience around modeling data. Compared to something like a case class in Scala or even autoproperties in C#, writing classes with a bunch of getter and setter methods just to keep state is really tedious.

That's because Java is object-oriented. Data and the functions that operate on that data are not supposed to be separated. A clean object-oriented design has no plain getters and setters.

A point (x,y) or (x,y,z) class seems to be the obvious exception.

Anonymous objects can also be really useful.

Post reply on HN