Welcome Guest [Log In] [Register]
We hope you enjoy your visit.


You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.

Join our community!

If you are already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
What's on your mind?; Your daily crap.
Topic Started: Jul 29 2010, 05:18 AM (64,018 Views)
skarik
Member Avatar
kitten eating scum
[ *  *  *  *  *  * ]
Post whatever is on your mind at the moment. It doesn't matter what, just post it!
Blog|EHS
Offline Profile Quote Post Goto Top
 
Replies:
Monty
Member Avatar
Forum Leader
[ *  *  *  *  * ]
Thinking of switching to java, now that I am not writing performance-heavy 3D games anymore. Any reason why I shouldn't switch? It seems much safer, and it seems like it's quite an easy transition from c++
Offline Profile Quote Post Goto Top
 
Gandalf20000
Member Avatar
Geek
[ *  *  *  *  *  * ]
Monty
Jun 6 2013, 04:21 AM
Thinking of switching to java, now that I am not writing performance-heavy 3D games anymore. Any reason why I shouldn't switch? It seems much safer, and it seems like it's quite an easy transition from c++
Oh, yay, I get to make a rant! :D
Reasons not to use Java (if at all possible):

  • Slower than C++ because it's interpreted.
  • "Cross-platform" only if the other computer has Java installed (most do, but it's not unheard of). In other words, no native applications or executables.
  • EVERYTHING is passed by reference. You must have a copy or clone function in any object you wish to duplicate.
  • Unless your external libraries were written in Java, linking is a pain in the butt and requires Oracle's JNI bindings.
  • Java enforces OOP, but it doesn't enforce good OOP. There are, quite simply, times when procedural programming is better, such as quick prototyping or proofs of concept that aren't going to necessarily be extensively modified.
  • Automatic garbage collection isn't always your friend. For example, in game development, you most certainly want control over when that 1024x1024 RGBA image eating 4 MB in memory is released.

Let's be fair, though. There might be times when Java is useful.
Reasons to use Java (if any):

  • Easy.
  • Testing code is fast because of the JIT compiler.
  • Automatic garbage collection means you don't have to worry about deleting pointers and references.
  • Cross platform if the other computer has an up-to-date JVM.

I like to think of Java as "C++ for dumb people by dumb people."
Offline Profile Quote Post Goto Top
 
zelda4evr
Member Avatar
Forum God
[ *  *  *  *  *  * ]
Gandalf20000
Jun 6 2013, 05:51 AM
I like to think of Java as "C++ for dumb people by dumb people."
Well that means I should be able to learn it...right?
Honestly how long would it take to learn java from nothing.
Aside from gml I've used python. I mean I've used c++ but with a lib for creating nintendo ds games.

Basically I need to learn the language that would have the highest turnout(money) I've put off learning extensively because I don't want it to be a waste of time when I could be doing something much better. Right now selling 3d graphics online has made the most money out of everything I've done(ads on website bring in no revenue) What do some of you suggest is the best thing to do?

Posted Image
Offline Profile Quote Post Goto Top
 
luenardi
Member Avatar
Cofee Machines Rock
[ *  *  *  *  *  * ]
Gandalf20000
Jun 6 2013, 05:51 AM
Monty
Jun 6 2013, 04:21 AM
Thinking of switching to java, now that I am not writing performance-heavy 3D games anymore. Any reason why I shouldn't switch? It seems much safer, and it seems like it's quite an easy transition from c++
Oh, yay, I get to make a rant! :D
Reasons not to use Java (if at all possible):

  • Slower than C++ because it's interpreted.
  • "Cross-platform" only if the other computer has Java installed (most do, but it's not unheard of). In other words, no native applications or executables.
  • EVERYTHING is passed by reference. You must have a copy or clone function in any object you wish to duplicate.
  • Unless your external libraries were written in Java, linking is a pain in the butt and requires Oracle's JNI bindings.
  • Java enforces OOP, but it doesn't enforce good OOP. There are, quite simply, times when procedural programming is better, such as quick prototyping or proofs of concept that aren't going to necessarily be extensively modified.
  • Automatic garbage collection isn't always your friend. For example, in game development, you most certainly want control over when that 1024x1024 RGBA image eating 4 MB in memory is released.

Let's be fair, though. There might be times when Java is useful.
Reasons to use Java (if any):

  • Easy.
  • Testing code is fast because of the JIT compiler.
  • Automatic garbage collection means you don't have to worry about deleting pointers and references.
  • Cross platform if the other computer has an up-to-date JVM.

I like to think of Java as "C++ for dumb people by dumb people."
java has become the corner stone of all devices
submit your mind and understand that it's no longer that silly language but has become much greater.
Posted Image

For your perception no.
But my universe has no such limits.


www.recall.co.nr
Offline Profile Quote Post Goto Top
 
Gandalf20000
Member Avatar
Geek
[ *  *  *  *  *  * ]
zelda4evr
Jun 6 2013, 06:11 AM
Gandalf20000
Jun 6 2013, 05:51 AM
I like to think of Java as "C++ for dumb people by dumb people."
Well that means I should be able to learn it...right?
Honestly how long would it take to learn java from nothing.
Aside from gml I've used python. I mean I've used c++ but with a lib for creating nintendo ds games.

Basically I need to learn the language that would have the highest turnout(money) I've put off learning extensively because I don't want it to be a waste of time when I could be doing something much better. Right now selling 3d graphics online has made the most money out of everything I've done(ads on website bring in no revenue) What do some of you suggest is the best thing to do?
Java takes very little time to learn. Its syntax is almost (read: not exactly) the same as C++, so there is a very short learning curve for C++ programmers. Here are some major differences, though:
  • In C++, a class method must be marked as "virtual" so it can be overwritten. In Java, all public and protected methods can be overwritten.
  • Traditional C++ practice means most methods are declared in a header file, but are defined in a separate .cpp file (although this is just a design standard, not an enforced rule). This helps with cyclical inclusion, since .cpp files are competely independent from the .h files. Java, on the other hand, enforces a strict standard: One file, one class (except inner classes). Methods must be defined in their class file unless the class is marked as abstract or is an interface. I'm not sure how Java handles cyclical inclusion (I've only ever used cyclical inclusion once, and it was for a C++ project).
  • Almost everything in Java is handled by an automatic garbage collecter, as opposed to the manual memory management in C++.
  • C++ uses "bool" to designate a Boolean value. Java uses "boolean" instead.
  • Java passes everything by reference. A traditional C++ method might be declared as "Foo& getFoo(const Bar&);," but a Java method would be declared as "Foo getFoo(const Bar);" instead.
  • In Java, all classes in the same package are automatically linked to each other. C++, on the other hand, uses #include <blah> or #include "blah.h" to include separate header files.
  • C++ provides much greater flexibility in design architecture because it has no strictly enforced design standard. Java requires that any well-designed program follow OOP techniques because of its strongly enforced design standard.
  • While constants in C++ are always declared "const," constants in Java are declared "final." Don't ask me why. I think Java's "enlightened" design scheme has a problem with any keyword being used to refer to more than one thing.
  • Java has no operator overloading. As a practical example, you cannot create a linear algebra package and overload the arithmetic operators for your vectors and matrices. Have fun typing "MatrixA.mult(MatrixB)" for the rest of your life.
Offline Profile Quote Post Goto Top
 
Dr. Best
Member Avatar
Administrator
[ *  *  *  *  *  * ]
Gandalf20000
Jun 6 2013, 08:07 PM
I'm not sure how Java handles cyclical inclusion (I've only ever used cyclical inclusion once, and it was for a C++ project).
Speaking in C++ terms everything is forward-declared (references only) so cyclic inclusion is not a problem.

Generally Java is a fine language but it is simplistic. This has the practical advantage that people do not screw up quite as badly as with C++. It can be a little restrictive at times but still it's popular and probably quite a good language to learn for people in search of a job.
Offline Profile Quote Post Goto Top
 
Monty
Member Avatar
Forum Leader
[ *  *  *  *  * ]
This is good information thanks. By "thinking of switching to" I really just meant "thinking of learning" actually. Just trying to stir up a good response ;)

If you look at the popularity of programming languages, it appears that most people don't even like to use OOP anyways. If they do choose to use OOP, Java seems to be the first choice. But the next three down the list are extensions of C. If you combined them they would blow java out of the water.

To me though it's just annoying that I'm not using the number 1 OOP option. Also annoying that I can't take the AP programming test in C++, only Java and Python. Ah well
Offline Profile Quote Post Goto Top
 
Gandalf20000
Member Avatar
Geek
[ *  *  *  *  *  * ]
Monty
Jun 7 2013, 12:17 AM
This is good information thanks. By "thinking of switching to" I really just meant "thinking of learning" actually. Just trying to stir up a good response ;)

If you look at the popularity of programming languages, it appears that most people don't even like to use OOP anyways. If they do choose to use OOP, Java seems to be the first choice. But the next three down the list are extensions of C. If you combined them they would blow java out of the water.

To me though it's just annoying that I'm not using the number 1 OOP option. Also annoying that I can't take the AP programming test in C++, only Java and Python. Ah well
When I took AP Computer Science in 2010 (and made a 5 :D ), it was just Java. They haven't changed the curriculum yet, have they?

Also, if you look at that programming popularity, Java actually has a general decreasing trend. Objective-C has a giant spike halfway through 2009, which coincides with the iPhone 3GS pretty well. Objective-C really only has one purpose: to develop for the Apple ecosystem. Technically it is cross-platform, but most people will just use C++ because the interface is less cryptic and is not being developed solely by Apple. Therefore, it is safe to assume Objective-C's jump is due to iOS. However, the decrease in Java is rather curious to me. Perhaps Java programmers are harder to count or estimate because Google and Oracle do not require a license to develop for Android using Java. Apple developers, on the other hand, are required to pay an iOS development fee, which makes users of Objective-C infinitely easier to track.
Offline Profile Quote Post Goto Top
 
Dr. Best
Member Avatar
Administrator
[ *  *  *  *  *  * ]
Gandalf20000
Jun 7 2013, 06:57 AM
However, the decrease in Java is rather curious to me.
It might also be due to the fact that such statistics are not worth the bandwidth it takes to look at them.

Programming languages should be chosen by the field you need them for, not by some ambiguous overall popularity measure.

There are other statistics of popular programming languages, which are always completely complementary to the TIOBE index.
Offline Profile Quote Post Goto Top
 
zelda4evr
Member Avatar
Forum God
[ *  *  *  *  *  * ]
what languages would you prefer to use for these jobs:
1)Small freelance programs.
2)Game production.
3)Larger complex programs.
4)Something you may already be doing in a certain language.

Posted Image
Offline Profile Quote Post Goto Top
 
Dr. Best
Member Avatar
Administrator
[ *  *  *  *  *  * ]
zelda4evr
Jun 7 2013, 07:43 PM
what languages would you prefer to use for these jobs:
1)Small freelance programs.
2)Game production.
3)Larger complex programs.
4)Something you may already be doing in a certain language.
This question is too unspecific to be answered.
1) What kind of programs?
2) What platform, what type of game?
3) Complex in which sense and running in what context?
4) What language?
Offline Profile Quote Post Goto Top
 
zelda4evr
Member Avatar
Forum God
[ *  *  *  *  *  * ]
1)For when people need a program written for them to perform a certain function like converting file types, personalized exporting, or something like a personalized notepad with their own features. Freelance, anything from a simple graphical representation of a design(like a running motor) to a simple graphical presention.
2)I guess platform greatly narrows down your options, but lets say windows and/or android.
3)Complex as in fully featured programs that don't just convert files, full fledged editor. Complex graphical representations that allow the user to not only view something like how an internal combustion engine would function but also build their own design.
4)This was meant as an, "other" section for whoever replies to put in something they may already be programming for someone.

Posted Image
Offline Profile Quote Post Goto Top
 
Dr. Best
Member Avatar
Administrator
[ *  *  *  *  *  * ]
For file conversion stuff the language of my choice is clearly Python (unless it's files in the magnitude of gigabytes, then C++ would be better for performance reasons). Simple GUI stuff can be done quickly with Java frameworks. Personally I find most Java GUIs quite ugly, but I guess it is a matter of taste. Qt for Python might also be a good choice, but I never tried it. Also, for a personalized notepad the most effective thing to do would be to write plugins for existing solutions like Notepad++. Generally, it is often better to build upon something good that is in existence than to start from scratch.

You did not say anything about the type of the game. The complexity of simulations and rendering greatly effects the appropriate choice of the language.

So for 3) you would want to have hardware-accelerated rendering? In this case that's a very good reason to go for C++.

To make one thing clear. Most widely used languages can accomplish any of the things you mentioned in one way or the other. Though, if you know multiple languages you might want to use one language for one purpose and another one for another purpose. Also, it is not only a matter of languages, but also a matter of APIs. For games you need an engine, for GUIs you need a GUI toolkit. Often such engines or toolkits also provide interfaces for multiple languages. The choice of the API may have a bigger impact on your workflows than the choice of the programming language.
Offline Profile Quote Post Goto Top
 
Reikyrr
Forum God
[ *  *  *  *  *  * ]
Dr. Best
Jun 8 2013, 12:56 PM
Simple GUI stuff can be done quickly with Java frameworks. Personally I find most Java GUIs quite ugly, but I guess it is a matter of taste.
I don't think that's java's fault or your taste, probably just lazy programmers. Because I created a couple of Java GUI's (Swing framework) for a school robotics project and the styling is just like any other windows application.
Note: I spend little time on the GUIs. And there is a typo, android should be arduino.
Posted Image
Posted Image

Also multithreading in java isn't that hard. I "learned" multithreading in one evening. (as in able to use it for my goal, perhaps not correctly).
Attached to this post:
Attachments: gui_2.jpg (23.18 KB)
Attachments: gui_1.jpg (57.19 KB)
Edited by Reikyrr, Jun 8 2013, 02:57 PM.
~Inspirational quote~
Offline Profile Quote Post Goto Top
 
Dr. Best
Member Avatar
Administrator
[ *  *  *  *  *  * ]
Reikyrr
Jun 8 2013, 02:50 PM
and the styling is just like any other windows application.
No, it's not.
Offline Profile Quote Post Goto Top
 
Go to Next Page
« Previous Topic · Off-topic · Next Topic »
Add Reply