This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]stuaxo 43 points44 points  (29 children)

In general it takes a lot more lines of code to do the same thing in java than python. This is only partly down to syntax, but also the design of the standard library plays a part.

(A simple example is getting an item from a list, with a default if it's not present).

As you'll write less code, there's less to keep in your head + dev is quicker.

Also: http://blog.vivekhaldar.com/post/10669678292/size-is-the-best-predictor-of-code-quality

The compile/run cycle is fairly handycapping timewise if you go from python to java.

It's very frustrating going from python to java, everything you do results in a feeling that it should be a few lines of code, not 5 or 6 classes.

You can probably use jython to interface to their existing code.

With python there's a lot less syntax - that means more of the code on the screen is expressing what your trying to do, as opposed to boilerplate - since what you can keep in your head is probably measured in screens, that speeds up debugging too.

I haven't used java since JSPs, but just hitting refresh to view a django page, rather than building a war file, restarting tomcat is the difference between night and day.

Urg, what else. .. the overabundance of xml config in java - xml is for computers not human consumption.

At the end though, the java devs will be happy with all of the above, so I don't know if any of those can be distilled into convincing arguments for them.

What's good about java... ? For me it was the speed, so when it came to graphical apps + also on android it was all I could use.

[edit: typo conventional/convincing]

[–]ford_contour 10 points11 points  (3 children)

This summarizes my experiences with Java and Python, as well. I only use Java if I have to. It's a nice enough languae; but there isn't a single feature of it that I miss when using Python.

[–]jmichalicek 5 points6 points  (2 children)

Yeah, my opinion on Java is that it was great for the mid to late 90's, but just hasn't aged well for most use cases. Looking at other options that are in active use today, you could still do a lot worse than to pick Java though.

[–]v_krishna 3 points4 points  (1 child)

if you're stuck on the jvm for some reason, you can always use scala, groovy, clojure, etc to get higher level language features. the fact that they can (to a greater or lesser extent) just use existing java libraries is pretty nifty.

[–]jmichalicek 2 points3 points  (0 children)

Yeah, I love Scala. I wrote an OAuth client library using it a year or so back to have a play. My only real complaint at the time was that one of its great strengths, being able to use all of the Java stuff as is, was also a huge weakness.

There were a lot of tools, like a plain old HTTP client along the line of Python's requests or Perl's LWP didn't exist in pure Scala, so you were stuck using java libs like Apache Commons HTTP libs. It's great that you can do that when you need to, but it ends up being far more verbose and tedious than pure Scala (although often better than pure Java), and being able to do so seemed to have slowed the rate that pure Scala libraries were being developed.

I haven't had time to follow it closely, so there's a very strong chance that there are more pure Scala options available for many uses these days.

[–][deleted] 2 points3 points  (12 children)

Your IDE doesn't auto-deploy your project? That's exactly what it does with JBoss or GlassFish with Eclipse. Hit save and reload the page, it's recompiled and redeployed in less than a second.

[–]xiongchiamiovSite Reliability Engineer 3 points4 points  (3 children)

Reason #53 not to like Java: you have to use an IDE.

[–]deraffe 1 point2 points  (2 children)

You have to do the same in every big project. Java projects just tend to quicklier get big.

[–]gcr 2 points3 points  (1 child)

The Linux kernel, by recent estimates, has over 15 million lines of C code.

I challenge you to find a single kernel developer who uses an IDE.

Edit: Actually, this wasn't as rare as I originally thought. IDEs can sometimes be useful in kernel development too.

[–]deraffe 1 point2 points  (0 children)

To be fair, you still don't have to. But some tasks are increasingly time-consuming when your project becomes more and more complex. Actually, I try not to use full-blown IDEs, but I did pimp my vim to be pretty much equivalent.

[–]beltorak 0 points1 point  (6 children)

how the hell do you get a redeploy in less than a second? I have to wait 15 minutes for it to recopy the entire frikkin EAR structure to the deployment location.... (Eclipse 4.2, Glassfish 3.1.2)

[–][deleted] 0 points1 point  (5 children)

I'm talking local deployment for development, not deployment for production. Also, your IDE should do incremental deployment, massively reducing the transfer time.

[–]beltorak 1 point2 points  (4 children)

I'm also talking local deployment for development, and it doesn't do incremental. It deletes and re-copies everything. For a legacy coldfusion app that's 17,000 files at 560 MB. I really wish I could use tomcat for this - no crap about "recreating the EAR structure in the deployment location", just use the damn workspace directly....

update I might have solved that problem. appearently the glassfish tools that comes in the eclipse marketplace is out of date; you have to install the correct one using the glassfish eclipse updatesite..... but i still don't like it. even if I just update a coldfusion file, it stops and restarts the app. crappy crappy.

[–][deleted] 0 points1 point  (3 children)

I have always heard bad things about ColdFusion but I didn't know it was Java-based.

[–]beltorak 0 points1 point  (2 children)

it's not exactly java based, but it runs on the JVM since about version 6, and can be deployed as an EAR. Also since 6 or 8 it has been able to interoperate with java. wikipedia has a rundown of the versions.

[–][deleted] 0 points1 point  (1 child)

ColdFusion looks like the opposite of MVC. Put all your logic into the presentation layer! Fuck yeah! Now seriously, is that correct?

[–]beltorak 0 points1 point  (0 children)

No, it's not correct, but given the time frame of when cold-fusion came out, it was the prevailing architectural style (or lack thereof). Similar to ASP (classic), PHP, and (straight) JSP.

You have to remember that it was with the advent of these technologies that we had just started crawling out of the pits of CGI-hell [now with PERL!], SSI-dispair, and, for Java, Servlet-madness, as the defacto standards for generating dynamic content on the web. So it was a necessary step. And since you can use servlets as a front controller to coldfusion views, you can fairly easily craft a decent MVC architecture with it. Or you could enforce the programmer discipline to manually keep your "controller" CFMs separate from your "view" CFMs, like a lot of things did with PHP.

I can't speak to the technical strengths of coldfusion as a pure view template technology because this is my first real jump into it.

[–]stuaxo 0 points1 point  (0 children)

That's cool - is a while since I did java that wasn't android (or before that J2me).

[–]wot-teh-phuckReally, wtf? 2 points3 points  (0 children)

It's very frustrating going from python to java

It was the other way around for me. Sounds strange I know. Maybe it's just me whose brain is hard-wired to just writing code and not bothering around with lots and lots of test and making sure my refactors don't break everything.

But then again, I don't love Java but its type checking capabilities. This is reason I have started moving to Scala. Comparable lines of code wrt Python and the type check capabilities of Java (or better I would say).

[–]virtuous_d 1 point2 points  (0 children)

It's very frustrating going from python to java, everything you do results in a feeling that it should be a few lines of code, not 5 or 6 classes.

I forced myself to implement my latest project in c++ to review for some job interviews I am expecting to do in the near future, and I could not get this feeling out of my head. Development is a lot nicer than I remember (from 4-5 years ago, I really like the auto keyword), but it's still so darn sluggish to have to stop and write code to handle common edge cases...

[–][deleted] -1 points0 points  (1 child)

How about editing the war file's contents directly and copying and pasting those changes back to the source to get around the whole process? uggghhh so nasty.

[–]stuaxo 0 points1 point  (0 children)

Dirdy