Jump to content

  • Log In with Google      Sign In   
  • Create Account


How do people stand Java?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • This topic is locked This topic is locked
50 replies to this topic

#1 Storyyeller   Members   -  Reputation: 212

Like
1Likes
Like

Posted 07 July 2011 - 10:05 PM

I don't have much experience in Java (I've mostly done C++). However, whenever I try it, it seems very awkward to program in. A lot of common features like operator overloading and first class functions are missing, so it seems to require unnecessarily complicated constructs and boilerplate code to accomplish simple tasks. This isn't a necessary difference with high level languages either. I've done a little C# and Python programming, and they are much nicer to work with.

But Java is a commonly used language. So I feel I'm missing something. Perhaps due to my unfamiliarity with the language, I don't understand all the tricks and idioms that people use in Java to make programming easier. So the question is, how do people stand Java?
I trust exceptions about as far as I can throw them.

Sponsor:

#2 Varine   Members   -  Reputation: 128

Like
0Likes
Like

Posted 07 July 2011 - 10:15 PM

I don't like it either. Stupid language, IMO.

#3 SimonForsman   Crossbones+   -  Reputation: 5765

Like
0Likes
Like

Posted 07 July 2011 - 10:28 PM

I don't have much experience in Java (I've mostly done C++). However, whenever I try it, it seems very awkward to program in. A lot of common features like operator overloading and first class functions are missing, so it seems to require unnecessarily complicated constructs and boilerplate code to accomplish simple tasks. This isn't a necessary difference with high level languages either. I've done a little C# and Python programming, and they are much nicer to work with.

But Java is a commonly used language. So I feel I'm missing something. Perhaps due to my unfamiliarity with the language, I don't understand all the tricks and idioms that people use in Java to make programming easier. So the question is, how do people stand Java?


Java is commonly used for pretty much the same reasons as C++, momentum, prior to Microsofts release of .Net and C# there wasn't that many languages to choose from if you wanted a high level c-style language that was easy to work with.
I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#4 zacaj   Members   -  Reputation: 643

Like
1Likes
Like

Posted 07 July 2011 - 10:30 PM

Had to take a college course on it, and hated every minute of it. I cant see how they thought some of the stuff was a good idea. The only satisfaction I get from java is bending its bad design to act like C++, confusing the professor constantly. Especially operator overloading, and not having [] for vectors/strings. Really?

#5 ApochPiQ   Moderators   -  Reputation: 14265

Like
2Likes
Like

Posted 07 July 2011 - 10:41 PM

I have the same question.

#6 Hodgman   Moderators   -  Reputation: 27585

Like
1Likes
Like

Posted 07 July 2011 - 10:46 PM

so it seems to require unnecessarily complicated constructs and boilerplate code to accomplish simple tasks

I had a boss once, who measured lines-of-code-per-hour Posted Image as an indicator of performance...

#7 6510   Members   -  Reputation: 151

Like
0Likes
Like

Posted 07 July 2011 - 11:37 PM

I've done a little C# and Python programming, and they are much nicer to work with.

What exactly is so much nicer in C# ?

But Java is a commonly used language. So I feel I'm missing something. Perhaps due to my unfamiliarity with the language, I don't understand all the tricks and idioms that people use in Java to make programming easier. So the question is, how do people stand Java?


You miss considering the entire development environment, available frameworks, IDEs, etc.
The last time I looked into Visual Studio for instance, it felt like being years behind Eclipse, IntelliJ or Netbeans. The overall productivity is just much higher in Java.
Naturally, choosing the language AND environment that suits your tasks best is what professionals do. And for commercial business applications that is definitely not C++ with its ugly and error prone features (like operator overloading).
Java is far from being perfect, compare it to more modern languages, but C++ or its cloned sibling C# are for sure no ideal models to follow.

#8 Ashaman73   Crossbones+   -  Reputation: 6685

Like
2Likes
Like

Posted 08 July 2011 - 12:02 AM

I'm a java coder (work) and C++ coder (hobby gamedeveloper) for more than a decade. The basic idea behind java was to supply a C++ like object oriented programming language without the more complicated (an therefore error prone) features like operator overloading, multiple inhertiance, templates etc. but with a strong out-of-the-box framework which works on multiple plattforms. When you talk about java, you talk about a framework not a programming language alone. Over the years some borders between intial goal and reality blurred and java approaches C++ more and more (generics ~ templates) and got too many features in too man external projects (jXYZ project ....), but still java provides a very robust , feature rich and almost plattform indepedent framework ( you can write a client-server application with java6 with 20 lines of code in about 15 minutes).

Which language to choose depends on your goals. Java is really strong at server development, on the other hand writing a game with heavy use of math (operators) or memory manipulation would be easier with C++. But a support tool for multiple plattforms could be done in java really quickly.

.Net (which introduced C#) is Microsofts answer to Java to get a bigger slice of the server market (enterprise application development). Over the last years .Net and Java develops more or less the same features, still java seems to be first choice for server side development (hardware/os independent) and .Net for client/windows only desktop applications.

#9 iMalc   Crossbones+   -  Reputation: 2258

Like
1Likes
Like

Posted 08 July 2011 - 12:09 AM

Yeah being primarily a C++ programmer myself, I don't much care for it either.
"In order to understand recursion, you must first understand recursion."
My website dedicated to sorting algorithms

#10 Krohm   Crossbones+   -  Reputation: 2960

Like
1Likes
Like

Posted 08 July 2011 - 12:21 AM

However, whenever I try it, it seems very awkward to program in. A lot of common features like operator overloading and first class functions are missing, so it seems to require unnecessarily complicated constructs and boilerplate code to accomplish simple tasks.

I have used it in the past with mixed results. People don't like it much around here but I think it's rather good. Sure some design choice in the library rather than the language are odd. And the "if it can be abused, then we don't support it" attitude is hateful for someone coming from the freedom of C/C++.
But in general, I don't feel the need for operator overloading (I don't use it anymore even in C++ after it bite me some years ago). While first-class function may look useful, they are really not so much (I'd say less than 1% of the code I have is not in some class) and the simple workaround (static functions) delivers.

I guess it's mostly subjective. I cannot stand Python for what it counts, whitespace indent? Really? oh sure, let the flaming begin
In general, I don't think Java "by itself" to be easier than other languages. By sure it isn't "harder", whatever this means.

A key thing is the garbage collection. Since stuff such as "object management" and "lifetime" and "ownership" are difficult to explain, a good way to work around this is to just take 'em out of the equation. Everybody is happy: teachers get a "modern" feel (you don't have to manage memory! nor resources!) and people get to screw up systems horribly with insane memory usage while still cashing in.
I could mention at least a case in which GC screwed up a high-level behavior big way, the point is that sometimes lifetime is important, which is why I don't trust managed languages.

Point out a language which does not suck in some way...

#11 Nypyren   Crossbones+   -  Reputation: 3678

Like
2Likes
Like

Posted 08 July 2011 - 02:35 AM

What exactly is so much nicer in C# ?


Operator == for strings.
Delegates.
LINQ.
The tendency for libraries to be named based on what they DO, rather than meaningless names that are somehow related to a caffinated beverage.
Interoperability.

#12 Tiblanc   Members   -  Reputation: 552

Like
0Likes
Like

Posted 08 July 2011 - 06:10 AM

Java is dummy friendly. In big development teams, you usually end up with some of them. If you give them C++, you will need a squad to track and fix all the problems that come up. With Java, it's harder so you can get some productivity out of them. This may not be relevant for one-man projects, but it is for projects with a lifetime counted in decades.

As a bonus, compilation time is much shorter than a C++ equivalent project. When I modify a class somewhere, I don't need to recompile the whole application.
Developer for Novus Dawn : a Flash Unity Isometric Tactical RPG - Forums - Facebook - DevLog

#13 Serapth   Crossbones+   -  Reputation: 5179

Like
6Likes
Like

Posted 08 July 2011 - 06:23 AM


I've done a little C# and Python programming, and they are much nicer to work with.

What exactly is so much nicer in C# ?

But Java is a commonly used language. So I feel I'm missing something. Perhaps due to my unfamiliarity with the language, I don't understand all the tricks and idioms that people use in Java to make programming easier. So the question is, how do people stand Java?


You miss considering the entire development environment, available frameworks, IDEs, etc.
The last time I looked into Visual Studio for instance, it felt like being years behind Eclipse, IntelliJ or Netbeans. The overall productivity is just much higher in Java.
Naturally, choosing the language AND environment that suits your tasks best is what professionals do. And for commercial business applications that is definitely not C++ with its ugly and error prone features (like operator overloading).
Java is far from being perfect, compare it to more modern languages, but C++ or its cloned sibling C# are for sure no ideal models to follow.



You sir, are insane. Having just finished working in Eclipse on an Android project, I will say that Visual Studio is not even in the same league as Eclipse, its hundreds of times better. The only place Eclipse ever had the edge was refactoring tools and now that is moot as well. Regardless to the language, Visual Studios is hands down the best IDE on the market by a country mile.
Also I cannot think of a single way that Java is superior to C#, although the opposite is not true. This makes sense though, as C# came later it got to learn from Java's mistakes, and it did.

#14 way2lazy2care   Members   -  Reputation: 782

Like
2Likes
Like

Posted 08 July 2011 - 07:10 AM

You sir, are insane. Having just finished working in Eclipse on an Android project, I will say that Visual Studio is not even in the same league as Eclipse, its hundreds of times better. The only place Eclipse ever had the edge was refactoring tools and now that is moot as well. Regardless to the language, Visual Studios is hands down the best IDE on the market by a country mile.
Also I cannot think of a single way that Java is superior to C#, although the opposite is not true. This makes sense though, as C# came later it got to learn from Java's mistakes, and it did.

Eclipse's intellisense isn't as balls as VS imo. With visual assist I think VS is better, but then you are comparing like a $300+ product to a free product and it's still a lot closer than it should be.

On the language itself, Java's primary selling point is being cross platform friendly. If you ignore that because coding in it is different than another language you are doing it wrong. C# has a couple bonuses over Java, but they're so similar I'd hardly call it a landslide in either direction; though I do prefer C#.

Java's whole concept is around being simple and multi-platform. In that regard it succeeds. I would say operator overloading would be nice, but at the same time it makes it easy for developers to know exactly what every operator should do at any given time.

Had to take a college course on it, and hated every minute of it. I cant see how they thought some of the stuff was a good idea. The only satisfaction I get from java is bending its bad design to act like C++, confusing the professor constantly. Especially operator overloading, and not having [] for vectors/strings. Really?

If you are doing this, your java code is probably horrible.

edit: bare in mind that I don't even like java that much. It's just that the reasons given for not liking it are doing exactly what you shouldn't be doing as a software engineer; trying to fit a round peg into a square hole. They teach java first in university because it's easier and safer than C++ for people just starting. It's used in enterprise software because it's cross platform and very friendly to rapid iterative development while still having great performance for enterprise software needs.

Programming languages are different and they shouldn't act the same, so don't expect them to act the same.

double edit: if you really want something to complain about program actionscript in the flash ide.

#15 Telastyn   Crossbones+   -  Reputation: 3718

Like
0Likes
Like

Posted 08 July 2011 - 07:21 AM


I don't have much experience in Java (I've mostly done C++). However, whenever I try it, it seems very awkward to program in. A lot of common features like operator overloading and first class functions are missing, so it seems to require unnecessarily complicated constructs and boilerplate code to accomplish simple tasks. This isn't a necessary difference with high level languages either. I've done a little C# and Python programming, and they are much nicer to work with.

But Java is a commonly used language. So I feel I'm missing something. Perhaps due to my unfamiliarity with the language, I don't understand all the tricks and idioms that people use in Java to make programming easier. So the question is, how do people stand Java?


Java is commonly used for pretty much the same reasons as C++, momentum, prior to Microsofts release of .Net and C# there wasn't that many languages to choose from if you wanted a high level c-style language that was easy to work with.


This.

In ~1995 it was the best thing since sliced bread. Now there's a whole lot of it we need to maintain, and the tooling for it exists pretty much everywhere.

#16 smr   Members   -  Reputation: 1553

Like
0Likes
Like

Posted 08 July 2011 - 08:07 AM

I think Java is pretty good... It's not perfect but the Java VM is wicked fast compared to others and there isn't much you can't do with it. I think the Java language's biggest problem is that it stopped evolving. After it got generics support (which it only did because C# 2 had it and people began to see how great type safety really is), not much has changed while C# has since gotten LINQ, dynamic type support, co/contravariance in generics, etc.

#17 Aldacron   GDNet+   -  Reputation: 3055

Like
1Likes
Like

Posted 08 July 2011 - 10:18 AM

I have a strong background in C and I don't hate Java. It was created with specific design goals and, to a large extent, meets them. It certainly falls short in some areas, but overall it's a very useful tool for a number of domains. Even games.

Errors in C or C++ don't always come from stupidity. C++ is a complex language with very few safeguards. Hence the proliferation of C++ coding standards among different shops, permitting and forbidding different features, in an attempt to reduce the chance of costly errors. And programmers *will* make mistakes. Java provides built-in safeguards which go a long way to reducing the common errors C and C++ programmers make. There are other errors you can make in Java, but (for the most part) they aren't on the same scale as things such as buffer overruns and pointer corruption. The benefit of this can be seen in the lack of a proliferation of Java coding standards among different shops.

I love C for the simple fact that I know what's happening with each line of code and I have the freedom to do pretty much anything. But I've got a lot of plumbing to protect myself from the mistakes I will inevitably make during one of those long coding sessions where the code I just wrote looks great and runs perfectly during testing, but blows up in the wild. I love Java for letting me forget about all the internals and allowing me to just get on with building my app, slapping me on the wrist when I make one of those mistakes during a long coding session so that my app *doesn't* blow up in the wild.

That's how I can stand Java. The fact that I've been paid to use it may have something to do with it, too.

#18 loom_weaver   Members   -  Reputation: 325

Like
0Likes
Like

Posted 08 July 2011 - 11:43 AM

I've been working with Java for about 10 years.

As long as you have a decent IDE with good auto-completion Java's verbosity is easy to manage. I've used both IntelliJ and Eclipse.

It maps well to 'enterprise' software where you have many, many developers of wildly different talent across multiple locations. The verbosity and rigidity of the Java language itself makes it easy to quickly grok new unfamiliar code-bases and have decent tools that'll mostly work out of the box.

In this kind of environment certain C/C++ 'advantages' e.g. the preprocessor and operator overloading usually end up being more trouble than they are worth.

When it comes to development time I find Java definitely adequate. The performance is "good enough". Most of the systems I work on don't have strict realtime performance requirements and thus memory usage and disk space is not a concern (just throw more hardware at it). The amount of time I save from not having to troubleshoot memory leaks, memory corruption, buffer overruns, etc. is more time available cranking out business requirements.

A few other advantages of Java is that it's probably the best cross-platform (e.g. Solaris, Mac, Windows, Linux) language if your needs include GUI and/or web application stacks, more third-party libraries than you could ever imagine, and finally just about anyone either knows Java or can learn it making hiring easier.

It boils down to using the right tool for the right job.

#19 Dragonion   Members   -  Reputation: 131

Like
0Likes
Like

Posted 08 July 2011 - 02:40 PM

I had a boss once, who measured lines-of-code-per-hour Posted Image as an indicator of performance...

Your boss was measuring performance based on how many lines of code you wrote per hour!? Lol, I would have been fired after two days XD It's really a mystery how obvious retards like that end up in the software industry ...

#20 Moe   Crossbones+   -  Reputation: 1248

Like
2Likes
Like

Posted 08 July 2011 - 03:02 PM

so it seems to require unnecessarily complicated constructs and boilerplate code to accomplish simple tasks

I had a boss once, who measured lines-of-code-per-hour Posted Image as an indicator of performance...


"Measuring software productivity by lines of code is like measuring progress on an airplane by how much it weighs." - Bill Gates




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS