Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (483)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (550)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2 3 ... 6
  ignore  |  Print  
  Java is pretty cool  (Read 12697 times)
0 Members and 1 Guest are viewing this topic.
Offline SkyAphid
« Posted 2012-10-18 03:08:14 »

So, I've been bro's with Java and I've been hanging out here for maybe a year or two now, and I have to say Java is great.

Recently I tried playing around with Python and C because I'm constantly reminded by older more experienced people that both are superior languages. To my surprise, C ran literally at about the same speed, and most importantly generally required longer code. Not to mention the fact I have to explicitly manage memory use. Python had its own kinks, while I personally found it better than C due to the fact it was relatively more fluent, I still found the code to look ugly. For example,

1  
2  
if a = 0: 
print "Python!"


For one, there are no brackets, but instead a single colon. I found it to bother me extremely that there was no strict closure on a piece of code, and that it kind of "hanged". I need that closure that you get with the enclosing brackets because of that simple security it gives me! Hahah. I may be wrong, there may be a way to "close" if statements that I don't know about, as I only played with Python for a day or two.

Nonetheless, not only does Java work simply, look beautiful in code, and take care of garbage for me, it also works on pretty much any device, and most of the libraries built for Java give me every option I could possibly want.

Enough advertising though, I'm done. Hahah.

Anyway, I guess all of this was leading to the question of why people seem to dislike Java so much? Most coders don't consider it a "real" programming language for some reason.

“Life is pretty simple: You do some stuff. Most fails. Some works. You do more of what works. If it works big, others quickly copy it. Then you do something else. The trick is the doing something else.” ~Leonardo da Vinci
Offline actual

JGO Coder


Medals: 23



« Reply #1 - Posted 2012-10-18 03:33:46 »

Anyway, I guess all of this was leading to the question of why people seem to dislike Java so much? Most coders don't consider it a "real" programming language for some reason.

1. The "Java is slow" meme which isn't nearly as relevant anymore as people think are, is still popular.
2. People's opinions are colored by early Java (slow balky applets, ugly AWT apps)
3. There has been a backlash in the blogosphere around OOP in favor of things like FP.
4. Likewise there has been a backlash in the use (and overuse) of Design Patterns which many people (accurately or not) associate with Java.
5. Because Java is so prevalent in the Enterprise space it's uncool, is associated with grunt ("blub") programmers.

Some more reasonable reasons:
1. Java is missing constructs that even average programmers are getting more comfortable with such as first class functions and traits/mixins.
2. Java can be verbose compared to languages like lisp and python. Some of it is due to a lack of type inference, some of it is due to culture. Java programmers tend to give much longer names to things than programmers in other languages.
3. Java isn't as well suited to writing quick scripts as other languages (although you can get around this with libraries).
3. Some people just prefer dynamic languages

I'm sure there are others.

Offline ctomni231

JGO Wizard


Medals: 99
Projects: 1
Exp: 7 years


Not a glitch. Just have a lil' pixelexia...


« Reply #2 - Posted 2012-10-18 03:34:13 »

This topic covers a lot about the likes and dislikes of Java..

http://www.java-gaming.org/topics/does-really-game-development-on-java-suck-why-are-we-still-here/26039/view.html

Java is only disliked because its beginning iterations had a buggy interface and ambitious technologies that did not integrate well, like Applets and JNLP. It is a sulking ghost that continues to haunt Java to this day. Those people still believe that Java is a slow beast that can't compete with today's faster technologies.

Today, I think it is becoming more myth than anything else. Just like you sipped a bit of Python and C, it is impossible to know what a language really is like until you dive into it at least for a month (or however long it takes for you to write a basic program in it.) They probably take a look at the 5 line Java "Hello World" and say... "Man! you can do this in 1 line in <insert computer language here>."

It is nothing against anyone, we obviously are the few people that took the leap to find out what Java is really like. In my opinion, it isn't half bad...

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline DrHalfway
« Reply #3 - Posted 2012-10-18 04:09:04 »

This is the same thing we asked each other when we started our project, Java or C++, we chose Java with a toss of a coin and I'm secretly glad that we did.

I have to admit that I was one of those programmers who thought "Java is slow" and that 5x slow is still stuck in my head, which haunts me to this day.

Unfortunately, the horrible truth is that C/C++ itself has potential for optimization which are currently not possible in Java, especially optimization targeted for Games Programming specifically, however the gap is closing and closing mighty fast. The truth is that to make these optimization requires time and manpower, which is something that we, as indie programmers lack, so we are back to square one, a project made in C++ (which arguably will take at least 2-3 times longer than in java WITHOUT said optimization) is just as fast as same project made in JAVA.

I remember reading somewhere there are future plans to have the Java run on openCL to take advantage of parallel computing. If i'm mistaken, this is huge, especially for graphics programmers. If it is what I think it is, I wouldn't be surprised to hear games companies jumping ship to Java instead.

Here is the link I think..

http://www.extremetech.com/computing/137628-project-sumatra-improves-java-performance-with-opencl-graphics-card-acceleration

Offline davedes
« Reply #4 - Posted 2012-10-18 05:38:47 »

You've only played with Python for a couple days -- you are in no position to be saying it's a bad language.

I've worked with Python extensively; for general purpose programming it's absolutely beautiful and blows Java out of the water. For software development, I'd much rather use Python and Qt than Swing/Java.

--

Why am I still here, then? Java wins on a few fronts:

  • Java IDEs are awesome and seamless across platforms. Much nicer to work with than any Python IDE.
  • Installing/building/linking third party libraries is a breeze.
  • Performance is reliable. Some "pythonic" syntax sugar may be less verbose but exponentially slower than equivalent Java code. This is important in a game loop.
  • Readability. Java is not a functional language; there are no cool syntax tricks that you can use to shorten your method by three lines at the expense of readability. Also, Java coding standards are strictly enforced: if you use method_name instead of methodName, an angry mob of pitchfork-wielding Java devs will hunt you down and destroy your soul.
  • Third party libraries, e.g. LWJGL. One of the better OpenGL wrappers I've worked with (things like glGenTextures() are a nice touch). There are an absurd amount of open source libraries for Java out there, and thanks to Java's readability, they are generally very easy to dive into and pick apart.

Offline lhkbob

JGO Knight


Medals: 32



« Reply #5 - Posted 2012-10-18 06:04:05 »

Reasons why I don't like Python, and why Java blows it out of the water:
1. Global interpreter lock, makes multithreading a huge pain. You could just fork, but their GC model breaks the copy-on-write policy used to make forking worth it.
2. Not statically typed. It is a huge pain to work in 50,000 lines of python with multiple people and not have static type checking.
3. I hate their dependency/library management system.

Reasons why Python is cool:
1. Duck-typing is pretty nifty
2. First class functions
3. List comprehensions

Offline concerto49

Junior Member





« Reply #6 - Posted 2012-10-18 07:16:30 »

I find it is the IDE and support for me that makes Java cool.

Eclipse, Netbeans and Intellij stand out. I don't another language (maybe besides C/C++) with such a big community and support over usability and the like. There are plugins, addons, modules, tips and tricks everywhere.

It's also ease of use - don't have to fiddle with mak efiles and random things. Java installs fine most of the time and IDE works. Java performs great and has all the libraries and things most users will need now. Rarely a need to go lower level.

High performance, fast network, affordable price VPS - Cloud Shards
Available in Texas, New York & Los Angeles
Need a VPS Upgrade?
Offline sproingie

JGO Kernel


Medals: 202



« Reply #7 - Posted 2012-10-19 01:06:28 »

Lots of people get really strong opinions about the indent thing in python, but it really is one of the least interesting things about the language.  By that I'm not saying you get used to it or that you get to love it, or tolerate it or whatever, I'm saying that when you've used python for a few years, you pretty much stop noticing the whole indent thing at all.  

Python has lots of other problems besides a layout rule that some people dislike, and that includes duck typing without even so much as a keyword to distinguish introduction from assignment, fairly pokey performance, the GIL, and an intolerably over-opinionated screechy and self righteous IRC and mailing list culture.  I decided I had enough of that culture a couple years back, and while I still prototype a lot of stuff in python, I still don't have a lot of use for it in production.

When I do want lack of type declaration boilerplate plus enough syntax sugar to give you diabetes, I reach for Scala.  It's not all roses of course: scala compiles so slowly it makes C++ look zippy, but just leave the incremental compiler running and you usually do okay.
Offline SkyAphid
« Reply #8 - Posted 2012-10-19 01:29:55 »

Lots of people get really strong opinions about the indent thing in python, but it really is one of the least interesting things about the language.  By that I'm not saying you get used to it or that you get to love it, or tolerate it or whatever, I'm saying that when you've used python for a few years, you pretty much stop noticing the whole indent thing at all.  

Python has lots of other problems besides a layout rule that some people dislike, and that includes duck typing without even so much as a keyword to distinguish introduction from assignment, fairly pokey performance, the GIL, and an intolerably over-opinionated screechy and self righteous IRC and mailing list culture.  I decided I had enough of that culture a couple years back, and while I still prototype a lot of stuff in python, I still don't have a lot of use for it in production.

When I do want lack of type declaration boilerplate plus enough syntax sugar to give you diabetes, I reach for Scala.  It's not all roses of course: scala compiles so slowly it makes C++ look zippy, but just leave the incremental compiler running and you usually do okay.


I'm googling it now. I've never heard of it.

Yeah, Python isn't bad by any means, I just honestly didn't like the way it felt, because I'm so used to more strict forms of programming, it's painful to just drop those habits. I agree with you on the users as well.

“Life is pretty simple: You do some stuff. Most fails. Some works. You do more of what works. If it works big, others quickly copy it. Then you do something else. The trick is the doing something else.” ~Leonardo da Vinci
Offline Jimmt
« League of Dukes »

JGO Kernel


Medals: 128
Projects: 4
Exp: 3 years



« Reply #9 - Posted 2012-10-19 02:25:20 »

Python, is not so great of a language. C is more respectable but very different.

Yeah people seem to think that Java compiles at toaster speeds. Don't know why.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline masteryoom

JGO Coder


Medals: 5
Projects: 2


If you look closely, you might see it turning...


« Reply #10 - Posted 2012-10-28 05:21:56 »

I used to program in c++, except I dropped it because it didn't offer easy graphics. I wanted to make a game, you see. Things take FOREVER to write in it. Angry C++ is the same as C, except more "modern".  Huh

Smiley
Offline matheus23

JGO Kernel


Medals: 106
Projects: 3


You think about my Avatar right now!


« Reply #11 - Posted 2012-10-28 08:13:58 »

I think the VERY big difference between C and C++ is, that C++ got classes?
I "never touched C" (but you can't actually say that, because I programmed C++ without classes sometimes too...), but I think it's much worse than C++, because you can structure code much better, if you've got Classes.

But I didn't like C++ too much either... you can't understand any of the Compiler errors you get, somtimes. It's just.. :& ... Also, in java you get "ArrayIndexOutOfBoundsException"s,  "NullPointerException"s, and if you've got no memory left, you get a "OutOfMemoryException", wheras in C++ you get NULL... Also, in java null is an object, an instance of a class, wheras in C++ NULL is simply 0, and when you try to get something from a NULL-pointer which is supposed to be an object, you get a segmentation fault...

And lastly, BufferOverflow and Format String ... (Exploits...)

See my:
    My development Blog:     | Or look at my RPG | Or simply my coding
http://matheusdev.tumblr.comRuins of Revenge  |      On Github
Offline gouessej
« Reply #12 - Posted 2012-10-28 08:16:45 »

Unfortunately, the horrible truth is that C/C++ itself has potential for optimization which are currently not possible in Java, especially optimization targeted for Games Programming specifically, however the gap is closing and closing mighty fast. The truth is that to make these optimization requires time and manpower, which is something that we, as indie programmers lack, so we are back to square one, a project made in C++ (which arguably will take at least 2-3 times longer than in java WITHOUT said optimization) is just as fast as same project made in JAVA.
Think about optimizing your algorithms before complaining about the limitations of the language.

Offline gouessej
« Reply #13 - Posted 2012-10-28 08:21:03 »

But I didn't like C++ too much either... you can't understand any of the Compiler errors you get, somtimes.
Sometimes it wrongly indicates an error in another file (when you forget a ";" for example). It is over-complicated, I hate "const", I waste tons of time in finding which keyword I have forgotten. Operator overload gives me headache. Tons of things are not explicit enough in C++ and in my humble opinion the "freedom" you get is not worth the time you may waste when something does not work as expected.

Offline DrHalfway
« Reply #14 - Posted 2012-10-28 08:27:57 »

Unfortunately, the horrible truth is that C/C++ itself has potential for optimization which are currently not possible in Java, especially optimization targeted for Games Programming specifically, however the gap is closing and closing mighty fast. The truth is that to make these optimization requires time and manpower, which is something that we, as indie programmers lack, so we are back to square one, a project made in C++ (which arguably will take at least 2-3 times longer than in java WITHOUT said optimization) is just as fast as same project made in JAVA.
Think about optimizing your algorithms before complaining about the limitations of the language.

Did you even read what you quoted? If I had anything to complain about Java I wouldn't be a member of this excellent forum, nor would I be wasting my time trying to write games in it.

Offline matheus23

JGO Kernel


Medals: 106
Projects: 3


You think about my Avatar right now!


« Reply #15 - Posted 2012-10-28 08:29:51 »

But I didn't like C++ too much either... you can't understand any of the Compiler errors you get, somtimes.
Sometimes it wrongly indicates an error in another file (when you forget a ";" for example). It is over-complicated, I hate "const", I waste tons of time in finding which keyword I have forgotten. Operator overload gives me headache. Tons of things are not explicit enough in C++ and in my humble opinion the "freedom" you get is not worth the time you may waste when something does not work as expected.
Agree, intresting...
Unfortunately, the horrible truth is that C/C++ itself has potential for optimization which are currently not possible in Java, especially optimization targeted for Games Programming specifically, however the gap is closing and closing mighty fast. The truth is that to make these optimization requires time and manpower, which is something that we, as indie programmers lack, so we are back to square one, a project made in C++ (which arguably will take at least 2-3 times longer than in java WITHOUT said optimization) is just as fast as same project made in JAVA.
Think about optimizing your algorithms before complaining about the limitations of the language.

Did you even read what you quoted? If I had anything to complain about Java I wouldn't be a member of this excellent forum, nor would I be wasting my time trying to write games in it.

Agree.

See my:
    My development Blog:     | Or look at my RPG | Or simply my coding
http://matheusdev.tumblr.comRuins of Revenge  |      On Github
Offline masteryoom

JGO Coder


Medals: 5
Projects: 2


If you look closely, you might see it turning...


« Reply #16 - Posted 2012-10-28 08:57:21 »

I think the VERY big difference between C and C++ is, that C++ got classes?
C++ does not have classes, not in the way Java does.

Smiley
Offline matheus23

JGO Kernel


Medals: 106
Projects: 3


You think about my Avatar right now!


« Reply #17 - Posted 2012-10-28 09:00:17 »

I think the VERY big difference between C and C++ is, that C++ got classes?
C++ does not have classes, not in the way Java does.
Yes, I haven't even talked about how I hate the C++ classes... even if there are some things I like about them... some...

See my:
    My development Blog:     | Or look at my RPG | Or simply my coding
http://matheusdev.tumblr.comRuins of Revenge  |      On Github
Offline masteryoom

JGO Coder


Medals: 5
Projects: 2


If you look closely, you might see it turning...


« Reply #18 - Posted 2012-10-28 09:03:43 »


But I didn't like C++ too much either... you can't understand any of the Compiler errors you get, somtimes.
Sometimes it wrongly indicates an error in another file (when you forget a ";" for example). It is over-complicated, I hate "const", I waste tons of time in finding which keyword I have forgotten. Operator overload gives me headache. Tons of things are not explicit enough in C++ and in my humble opinion the "freedom" you get is not worth the time you may waste when something does not work as expected.
Yeah, I HATE error messages. They don't make sense.  Shocked

Smiley
Offline gouessej
« Reply #19 - Posted 2012-10-28 15:04:05 »

Unfortunately, the horrible truth is that C/C++ itself has potential for optimization which are currently not possible in Java, especially optimization targeted for Games Programming specifically, however the gap is closing and closing mighty fast. The truth is that to make these optimization requires time and manpower, which is something that we, as indie programmers lack, so we are back to square one, a project made in C++ (which arguably will take at least 2-3 times longer than in java WITHOUT said optimization) is just as fast as same project made in JAVA.
Think about optimizing your algorithms before complaining about the limitations of the language.

Did you even read what you quoted? If I had anything to complain about Java I wouldn't be a member of this excellent forum, nor would I be wasting my time trying to write games in it.
Lol I already saw some people here telling that JavaScript and HTML5 are wonderful...

Offline ra4king

JGO Kernel


Medals: 345
Projects: 2
Exp: 5 years


I'm the King!


« Reply #20 - Posted 2012-10-28 15:21:10 »

Also, in java null is an object, an instance of a class
Errr....null is not an object Pointing

Offline gouessej
« Reply #21 - Posted 2012-10-28 15:27:22 »

But I didn't like C++ too much either... you can't understand any of the Compiler errors you get, somtimes. It's just.. :& ... Also, in java you get "ArrayIndexOutOfBoundsException"s,  "NullPointerException"s, and if you've got no memory left, you get a "OutOfMemoryException", wheras in C++ you get NULL...
In C and C++, you can get a segmentation fault by attempting to create an array with a negative size or by attempting to go over the bounds of an existing array.

I assume he meant that null is treated like an object when using instanceof even though you're right.

Offline appel

JGO Wizard


Medals: 50
Projects: 4


I always win!


« Reply #22 - Posted 2012-10-28 15:52:56 »

Java is quickly evolving into a legacy technology like Cobol.

At my workplace we're turning away from Java to simpler more productive-focused solution-oriented technologies  Cool

There's a bigger chance you'll be writing your "enterprise" code in javascript than in java within 5 years. With the advent of technologies like NodeJS, json, HTML5, REST, and even database systems like MongoDb then the use of Javascript is obvious.

I dread opening up my Java project at work, it's so heavy, it's so difficult, it's so nightmarish, legacy, difficult to debug, difficult everything. I scream in my head. The project is a multi module maven project, which I cannot even open in Eclipse, I'm forced to use IntelliJ, which is dead slow and I can't use in a productive manner. It reminds me of a huge enterprise legacy project that I used to work on in IBM's WebSphere, where all the code was intermingled in some JSP and servlet classes. Honestly, I can't be arsed with a museum codebase like that.


And remember, Java vs. Javascript vs. C vs. C++... it's not about the technology and how good it is from a computer engineering perspective. These languages only exist to deliver results, to make a good product efficiently.

Although Java may seem like a good language, it's not very efficient to make stuff in it. I can do much more in Javascript in shorter time.

And let's not forget, client PC's are getting very powerful, the browsers themselves are pretty good powerful virtual machines with good rendering capabilities. Obviously the language of choice in those VM's is javascript. And for the sake of simplicity, programmers would write both their backend and frontend in javascript.

And already, javascript is the most used programming language in the world.

Check out the 4K competition @ www.java4k.com
Check out GAMADU (my own site) @ http://gamadu.com/
Offline ctomni231

JGO Wizard


Medals: 99
Projects: 1
Exp: 7 years


Not a glitch. Just have a lil' pixelexia...


« Reply #23 - Posted 2012-10-28 16:12:06 »

Well, I can see that occurring since everything is moving straight to web now. With the advent of smartphones and tablets, laptops and desktops are becoming more obsolete. The technology that is the best for working on these devices, JavaScript.

If only Java didn't have to hulk around the JVM on its back, it probably would have been accepted into a lot more companies. The Java Applet was actually years ahead of its time, but just didn't get the right support. Reminds me a lot of why the Sega Dreamcast failed dooming that company.

I hope that the various efforts done here to try and keep Java relevant would spark interest. I definitely would not like to see Java become legacy. The idea behind Java is a little too good for that.

Offline nsigma
« Reply #24 - Posted 2012-10-28 17:09:49 »

I assume he meant that null is treated like an object when using instanceof even though you're right.

Er, what???  instanceof doesn't treat nulls like objects - null is never an instanceof anything.

And already, javascript is the most used programming language in the world.

OK, I'm going to get all WikiPedia on your ass now and scream CITATIONGrin

I agree with a lot of what you envisage mind you.  Still can't stand JavaScript though!  Smiley

Praxis LIVE - open-source intermedia toolkit and live interactive visual editor
Digital Prisoners - interactive spaces and projections
Offline Rorkien
« Reply #25 - Posted 2012-10-28 18:01:48 »

1  
2  
3  
String a = new String();
a = null;
System.out.println(a);


>mfw it prints "null"
Offline Danny02
« Reply #26 - Posted 2012-10-28 19:13:26 »

1  
2  
3  
String a = new String();
a = null;
System.out.println(a);


>mfw it prints "null"
I don't think this proves anything it is just an implementation thing,
1  
if the argument is null, then a string equal to "null"
Offline Sickan

Senior Member


Medals: 9



« Reply #27 - Posted 2012-10-28 19:19:08 »

After using C# for a few weeks, I definitely would like to see more C# features get introduced into Java, or have proper cross-platform game libraries available for C#.
Offline Danny02
« Reply #28 - Posted 2012-10-28 19:42:45 »

wait another few weeks^^
Offline ra4king

JGO Kernel


Medals: 345
Projects: 2
Exp: 5 years


I'm the King!


« Reply #29 - Posted 2012-10-28 19:57:27 »

wait another few years^^
FTFY

Pages: [1] 2 3 ... 6
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

CopyableCougar4 (15 views)
2014-08-22 19:31:30

atombrot (28 views)
2014-08-19 09:29:53

Tekkerue (25 views)
2014-08-16 06:45:27

Tekkerue (23 views)
2014-08-16 06:22:17

Tekkerue (15 views)
2014-08-16 06:20:21

Tekkerue (22 views)
2014-08-16 06:12:11

Rayexar (61 views)
2014-08-11 02:49:23

BurntPizza (39 views)
2014-08-09 21:09:32

BurntPizza (31 views)
2014-08-08 02:01:56

Norakomi (37 views)
2014-08-06 19:49:38
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!