Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Is Java struggling?


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.

  • You cannot reply to this topic
22 replies to this topic

#1 wood_brian   Banned   -  Reputation: 197

Posted 16 April 2012 - 12:44 PM

I got an email today with the following

· 3-5 years of UNIX experience
· Experience in standard lifecycle development methodology
· Will be hands on and required to cross train java developers to learn c++

I'm not sure of the company, but it looks like another company coming back to C++ after wandering around for awhile.

Sponsor:

#2 smr   GDNet+   -  Reputation: 1681

Posted 16 April 2012 - 01:39 PM

I don't have figures but on as a hunch I'd say no, it isn't, especially since Android has become one of the most dominant OSes on mobile platforms and Android development is done mostly in Java.

#3 alnite   Crossbones+   -  Reputation: 2132

Posted 16 April 2012 - 02:32 PM

No, it isn't.

One particular company opinion of using C++ does not mean that Java is struggling globally.

#4 Don Carnage   Members   -  Reputation: 636

Posted 16 April 2012 - 02:35 PM

>> ...cross train java developers to learn c++

Ahahahaha! ...oh wait, they're probably serious?! This is how to learn C++: forget all about java (maybe using shock therapy), learn C/Pascal/Assembler, then write small programs in C++ to be sure you're not doing it wrong. Then you can take what you knew in Java and apply it in C++.

No Java is alive and kicking, for JEE web apps and Android especially. But also many embedded devices these days should support Java, since it was originally built for embedding into coffee machines and the like.
It is I, the spectaculous Don Karnage! My bloodthirsty horde is on an intercept course with you. We will be shooting you and looting you in precisely... Ten minutes. Felicitations!

#5 GAMEXPO   Members   -  Reputation: 100

Posted 16 April 2012 - 07:21 PM

It's all about what popular mobile device best supports nowadays...But C++ is never a bad thing to learn in my opinion....

#6 Krohm   Crossbones+   -  Reputation: 3245

Posted 17 April 2012 - 12:55 AM

From Java... to C++?
Portability is going to be seriously fun.
I still recall last time I shared some work with a "native" Java programmer. No delete. Never. That was good. The solution? Use a garbage collected language. Ok...

#7 kunos   Crossbones+   -  Reputation: 2207

Posted 17 April 2012 - 12:59 AM

Looks like somebody is falling for all the "C++ Renaissance" thing.
Stefano Casillo
Lead Programmer
TWITTER: @KunosStefano
AssettoCorsa - netKar PRO - Kunos Simulazioni

#8 Bacterius   Crossbones+   -  Reputation: 9262

Posted 17 April 2012 - 01:36 AM

I still recall last time I shared some work with a "native" Java programmer. No delete. Never. That was good. The solution? Use a garbage collected language. Ok...

I can't stand garbage collection. Is it really that hard to clean up after yourself? If you can't match up allocation/deallocation pairs perfectly then your code design failed and you need to rethink it. But that's just a pet peeve of mine about a specific feature, can't say anything about Java itself. I still hear from it everywhere so I assume it's still well alive. And apparently Java is everywhere "in my car" and "in my fridge" and "in my smoke detector" so I guess whenever I feel Java is about to die I can just cheer myself up by looking at any of those items (or cheer myself down knowing Java isn't actually powering any of those, lol)

The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.

 

- Pessimal Algorithms and Simplexity Analysis


#9 wood_brian   Banned   -  Reputation: 197

Posted 17 April 2012 - 02:00 AM

It's all about what popular mobile device best supports nowadays...


So far there's a lot about Android and little about data centers.

But C++ is never a bad thing to learn in my opinion....



#10 way2lazy2care   Members   -  Reputation: 782

Posted 17 April 2012 - 06:43 AM

I can't stand garbage collection. Is it really that hard to clean up after yourself? If you can't match up allocation/deallocation pairs perfectly then your code design failed and you need to rethink it. But that's just a pet peeve of mine about a specific feature, can't say anything about Java itself. I still hear from it everywhere so I assume it's still well alive. And apparently Java is everywhere "in my car" and "in my fridge" and "in my smoke detector" so I guess whenever I feel Java is about to die I can just cheer myself up by looking at any of those items (or cheer myself down knowing Java isn't actually powering any of those, lol)

Garbage collection isn't about whether or not you are capable of cleaning up after yourself; especially when the primary non-garbage collected language allows you to redefine everything that lets you clean up after yourself. After all, you don't drive all your garbage to the dump/recycling center despite probably being perfectly capable.

#11 mdwh   Members   -  Reputation: 901

Posted 17 April 2012 - 07:49 AM

I believe there are about 2 billion Java mobile devices out there (J2ME), as well as the Android flavour of Java on top of that, Android being the largest platform after S40 (S40 being a platform that uses J2ME anyway).

Even if we restrict to traditional non-mobile uses of Java[*], I don't see any evidence of a decline.

[*] I do find it a bit sad that, given Java's originally intent of being write once run anywhere, we now have three incompatible flavours of Java, which I believe aren't even source compatible due to different libraries. Ironically even C++ can be more portable between desktops and mobiles like Android and Symbian if you use a toolkit like Qt. But still, as a language, Java is still perfectly viable.
http://erebusrpg.sourceforge.net/ - Erebus, Open Source RPG for Windows/Linux/Android
http://homepage.ntlworld.com/mark.harman/conquests.html - Conquests, Open Source Civ-like Game for Windows/Linux

#12 Cornstalks   Crossbones+   -  Reputation: 6991

Posted 17 April 2012 - 08:56 AM

I got an email today with the following

· 3-5 years of UNIX experience
· Experience in standard lifecycle development methodology
· Will be hands on and required to cross train java developers to learn c++

I'm not sure of the company, but it looks like another company coming back to C++ after wandering around for awhile.


Brian
Ebenezer Enterprises
http://webEbenezer.net

So you got an email about a job posting looking for Java and C++ developers, and you got "Java is struggling" from that? Because one posting is looking to cross train Java and C++ developers, you seriously came to that conclusion?

And do you really manually type "Brian Ebenezer Enterprises http://webEbenezer.net" into your posts? (this isn't an attack... it's just... weird when people manually type a signature... seeing as there's a signature option on your profile...)
[ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]

#13 wood_brian   Banned   -  Reputation: 197

Posted 17 April 2012 - 09:53 AM

So you got an email about a job posting looking for Java and C++ developers, and you got "Java is struggling" from that? Because one posting is looking to cross train Java and C++ developers, you seriously came to that conclusion?
[


I wondered based on the part about training people with Java experience to learn C++. In the past it was the other way around!

#14 Bacterius   Crossbones+   -  Reputation: 9262

Posted 17 April 2012 - 02:56 PM

Garbage collection isn't about whether or not you are capable of cleaning up after yourself; especially when the primary non-garbage collected language allows you to redefine everything that lets you clean up after yourself. After all, you don't drive all your garbage to the dump/recycling center despite probably being perfectly capable.

The analogy would work except that taking my trash to the end of my street is more efficient that driving it to the nearest recycling center, whereas automatic garbage collection is in general less efficient that manual memory management (not that there's a huge gap, GC's are getting better but it's still unacceptable to have an app randomly freeze for two seconds like I constantly see in java apps) since you know exactly what needs to be deleted at any given time and don't need to rely on more or less advanced heuristics to work it out for you.

I see your point though, and it also depends how the OS handles memory management itself. There's a lot of variables involved but in general GC's are just one more incentive for poor programming design and crappy performance. Perhaps if people understood garbage collection is not a feature but a tool to be used only when needed it would be better.

The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.

 

- Pessimal Algorithms and Simplexity Analysis


#15 alnite   Crossbones+   -  Reputation: 2132

Posted 18 April 2012 - 06:19 AM

The analogy would work except that taking my trash to the end of my street is more efficient that driving it to the nearest recycling center


If we are going to use that analogy, garbage collection would be like having a robot that is constantly watching for trash in your house, pick it up, and eat it -- which would be more efficient than having to look through your house for trashes manually, pick it up, put it in the bin, and taking it out to street.

not that there's a huge gap, GC's are getting better but it's still unacceptable to have an app randomly freeze for two seconds like I constantly see in java apps)


Where did you see this? Having been using Java professionally for the past 6 years, working across multitude of devices from 200KB Nokia cellphones to 8GB PCs, I have never seen a Java app freezes for 2 seconds because of GC. With the exception of one Samsung cellphone (one, out of 1000 cellphones out there I have worked on), but that's because of poor JVM implementation. Not Java's fault, not certainly GC's fault, but Samsung's fault.


since you know exactly what needs to be deleted at any given time and don't need to rely on more or less advanced heuristics to work it out for you.


GC is not just about deleting your unused objects. As a matter of fact, I wouldn't call it a garbage collector anymore, but more like a "memory manager". It handles memory fragmentation for you.


There's a lot of variables involved but in general GC's are just one more incentive for poor programming design and crappy performance. Perhaps if people understood garbage collection is not a feature but a tool to be used only when needed it would be better.


It is a tool, and it is needed all the time, because if you wait until your 4GB memory is full then garbage collect it, then I'd probably see that 2 seconds hiccups. GC doesn't just sit there and run until it's needed. It's constantly working -- not just erasing your stuff, but the JVM's stuff, other people's stuff. What are you going to do if you find out that three-D engine you bought for $10K turns out having a memory leak when used in certain ways, and you are running close to the deadline? Call and get angry and demand a fix in a day? Not happening in the real world.

#16 Yrjö P.   Crossbones+   -  Reputation: 1412

Posted 24 May 2012 - 05:26 AM

From Java... to C++?
Portability is going to be seriously fun.
I still recall last time I shared some work with a "native" Java programmer. No delete. Never. That was good. The solution? Use a garbage collected language. Ok...

Funnily, the absence of deletes in C++ code would normally indicate the code is very high quality, and is not written by someone stuck in C mindset.

I haven't used Java in a couple of years. I dislike it because it's weak (in expressive power) while being frustratingly verbose and cluttered. I know it has a number of strengths, most importantly its ecosystem and userbase. And I have the impression that it is one of the best languages to minimize the damage a low-skilled programmer can do in a project. Give me either a more expressive and productive language, or a special-purpose one.
Fortunately it looks like the Java ecosystem now has options, e.g. Clojure and Scala, so you don't necessarily have to suffer Java itself to take advantage of the ecosystem.

#17 Alpha_ProgDes   Crossbones+   -  Reputation: 4692

Posted 24 May 2012 - 06:03 AM

Funnily, the absence of deletes in C++ code would normally indicate the code is very high quality, and is not written by someone stuck in C mindset.


I take it that means that someone is actually using the SC++L properly as opposed to hand-crafting all of their own memory management.
Beginner in Game Development? Read here.
 
Super Mario Bros clone tutorial written in XNA 4.0 [MonoGame, ANX, and MonoXNA] by Scott Haley
 
If you have found any of the posts helpful, please show your appreciation by clicking the up arrow on those posts Posted Image
 
Spoiler

#18 frob   Moderators   -  Reputation: 22692

Posted 24 May 2012 - 11:09 AM

The analogy would work except that taking my trash to the end of my street is more efficient that driving it to the nearest recycling center, whereas automatic garbage collection is in general less efficient that manual memory management (not that there's a huge gap, GC's are getting better but it's still unacceptable to have an app randomly freeze for two seconds like I constantly see in java apps) since you know exactly what needs to be deleted at any given time and don't need to rely on more or less advanced heuristics to work it out for you.

I see your point though, and it also depends how the OS handles memory management itself. There's a lot of variables involved but in general GC's are just one more incentive for poor programming design and crappy performance. Perhaps if people understood garbage collection is not a feature but a tool to be used only when needed it would be better.

I'm with allnite on this one.

I've worked on and off with Java since 1996.

I've never seen a properly written app "randomly freeze for two seconds" for garbage collection, not even in the beginning of the language, not even on the old slow Nokias.

That said, I have seen bad programmers. I have seen stupidly-written apps that leak resources at an incredible rate --- 'leak' should probably be replaced with 'flood' --- where the app produces so much garbage that there is a noticeable cleanup time. I have also seen stupidly-written apps that force the GC to run during the middle of their heavy work cycle. I have seen stupidly-written apps where individual objects have massive amounts of resources to clean up yet provide no way method such as dispose() to free up their resources at a more convenient time.

None of those are the fault of the language, and you can see similar effects in any language by committing similar stupid mistakes. I've seen similar problems in C++ where collections grow to massive sizes and then are destroyed, or where programmers ignore rules of lazy construction and lazy destruction and end up creating very expensive temporaries that grind the app to a halt.

Left to run on it's own garbage collectors run at a low priority in the background and do not interfere with your work. In my experience they have BETTER performance than memory cleanup in C++ since C++ must run the cleanup in the middle of processing, yet garbage collectors run it later during idle times.


I'm currently working on yet-another-expansion for Sims 3. The game is written in C#, which uses the same style garbage collection as Java. The game has been a massive seller for three years yet there are no complaints that the app will "randomly freeze for two seconds" for garbage collection.


I could list off a dozen other major AAA titles written in garbage collected languages. There are probably millions of apps for phones and devices ranging from older BREW apps to modern Andorid apps. And we can look at the major corporations relying on Java EE to run major servers and backends. None of these suffer from the problems you describe.



Your claim about "poor design and crappy performance" are completely false in the real world.

Bad programmers can produce bad code in any language, don't blame the language for the bad programmer's mistakes.

Edited by frob, 24 May 2012 - 11:14 AM.
Add another counterexample to the unfounded assertions.

Check out my book, Game Development with Unity, aimed at beginners who want to build fun games fast.

Also check out my personal website at bryanwagstaff.com, where I write about assorted stuff.


#19 Krohm   Crossbones+   -  Reputation: 3245

Posted 25 May 2012 - 12:42 AM


From Java... to C++?
Portability is going to be seriously fun.
I still recall last time I shared some work with a "native" Java programmer. No delete. Never. That was good. The solution? Use a garbage collected language. Ok...

Funnily, the absence of deletes in C++ code would normally indicate the code is very high quality, and is not written by someone stuck in C mindset.

Good revive.

The runtime surely agrees with you. Running out of address space in less than half an hour (IA32) is surely a very good quality indicator. Of course we can hide ourself behind nice concepts and terms it does not change reality: in the end someone must use delete. Maybe a library, maybe some compiler construct but someone has to use it. It's not like memory releases don't happen just because we don't see them in code... but again I trust the runtime and the runtime appeared to not like it.

I've never seen a properly written app "randomly freeze for two seconds" for garbage collection, not even in the beginning of the language, not even on the old slow Nokias.

That said, I have seen bad programmers. I have seen stupidly-written apps that leak resources at an incredible rate --- 'leak' should probably be replaced with 'flood' --- where the app produces so much garbage that there is a noticeable cleanup time. I have also seen stupidly-written apps that force the GC to run during the middle of their heavy work cycle. I have seen stupidly-written apps where individual objects have massive amounts of resources to clean up yet provide no way method such as dispose() to free up their resources at a more convenient time.

100% agreed!

#20 Dmytry   Members   -  Reputation: 1148

Posted 25 May 2012 - 01:26 AM

I still recall last time I shared some work with a "native" Java programmer. No delete. Never. That was good. The solution? Use a garbage collected language. Ok...

I can't stand garbage collection. Is it really that hard to clean up after yourself? If you can't match up allocation/deallocation pairs perfectly then your code design failed and you need to rethink it. But that's just a pet peeve of mine about a specific feature, can't say anything about Java itself. I still hear from it everywhere so I assume it's still well alive. And apparently Java is everywhere "in my car" and "in my fridge" and "in my smoke detector" so I guess whenever I feel Java is about to die I can just cheer myself up by looking at any of those items (or cheer myself down knowing Java isn't actually powering any of those, lol)


Well, the issue with garbage collection is that it does not mean automatic deallocation of items that you don't need allocated. People create memory leaks in garbage collected languages all the time. Here's example:
http://developers.slashdot.org/story/07/11/17/0552247/c-memory-leak-torpedoed-princetons-darpa-chances

Now, there's the semantical discussion as of how it is 'not memory leak' if you can still walk through the pointers, but as long as you don't have the code that actually will access the data, that's the data sitting here which will never be accessed, which programmer is probably unaware of, and which will lead to necessity of reboots. Every single feature of a memory leak.

Other issue is that garbage collected languages often also go like 'yay finally we can use heap for everything' and the books and example code teaches very heap-heavy way of doing things. Simple example: you can have some sort of game bot class that has members like position, velocity, etc etc, which are vectors. The typical way of writing this in Java will have those members all allocated separately on the heap. You should use final keyword to avoid that, AFAIK, but few people do this. Hence very heap-heavy code.
My game The Polynomial is now available on Steam. | The Polynomial homepage | Cloud and terrain rendering |Everything i said in that post is obviously ABSOLUTE TRUTH my unhumble opinion.




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