Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Java VS C++ || The Final Decision (http://www.chiefdelphi.com/forums/showthread.php?t=85982)

mwtidd 05-06-2010 12:56

Re: Java VS C++ || The Final Decision
 
Quote:

Originally Posted by oddjob (Post 965338)
Java is so similar to C++ that I guess it's fairly easy to offer it as an option, but then again, as it's so similar, there's no compelling reason for it.

Here's a comparison link between Java and C++
http://en.wikipedia.org/wiki/Compari...va_and_C%2B%2B

There are many differences between Java and C++, I'm not sure if FIRST supports it yet but a big thing is that Java is reflective. I do a lot of programming on the Google App Engine and I can't tell you how nice it is to be able to keep my server running, and just make small changes. Not having to restart the server just to test the changes saves me a good deal of time. Similar could be true for the cRIO, I'm not sure if it is or could be supported.

There are many factors that make Java easier for a beginning programmer who wants to use OO including type safety, garbage collection, and lack of pointers.

I think there are many compelling reasons for FIRST to offer Java alongside C++, especially considering their no team left behind philo, and the results of this poll reflect that it was probably a good move to offer Java.

I also don't think it FIRST was the source of the option, but rather it was a senior project at WPI in cooperation with Sun that made the option possible.

apalrd 05-06-2010 18:15

Re: Java VS C++ || The Final Decision
 
The poll does not reflect LabVIEW.
I have no direct experience with Java. I am very familiar with C and C++, and have seen Java a little bit, so I am probably very biased to C and C++.

LabVIEW is far easier to learn then C++, I have no experience in Java but based on what I have heard/seen LabVIEW is still easier for beginning programmers.

Many people have said that Java is awesome because it has GUI stuff and uber-cross-platform because it is compiled into bytecode. Guess what? The cRio is one platform. You are never developing on another, so what difference does C++ vs Java make there?

Another comment. I like pointers in C and C++, so without them, I would be very sad. I also like how C++ is not strictly object oriented, so I can have functions that are just hanging out on their own without a class to be in, and write certain parts procedurally (e.g. autonomous routines)

timothyb89 06-06-2010 05:57

Re: Java VS C++ || The Final Decision
 
Quote:

Originally Posted by oddjob (Post 965338)
Did anyone make a jEdit based IDE for the cRIO C++ environment? Like I said, Java can be useful.

It's actually somewhat trivial to setup other IDEs to work with the C/C++ environment. If you manage to concoct a decent Makefile, any text editor will play nicely with your code, and any IDE worth its salt should be able to configure code completion for it. Personally I'd recommend NetBeans (with the C/C++ addon) due to its awesome code completion, but Eclipse works fine as well.

slavik262 06-06-2010 07:01

Re: Java VS C++ || The Final Decision
 
<sigh />

Each language is powerful in its own right and is a completely capable choice for coding a robot. Don't base your decision on what other teams use. Base your decision on the strengths and past experiences of your coders, your mentor support, and the preferences of your coders. I've always coded the robot in C++ because I'm from the C days from three years ago and do lots of PC development in C++, but what's right for my team isn't right for another. Just pick the one you can do the best in.

LavaEagle 06-06-2010 11:14

Re: Java VS C++ || The Final Decision
 
Quote:

Originally Posted by slavik262 (Post 965551)
<sigh />

Each language is powerful in its own right and is a completely capable choice for coding a robot. Don't base your decision on what other teams use. Base your decision on the strengths and past experiences of your coders, your mentor support, and the preferences of your coders. I've always coded the robot in C++ because I'm from the C days from three years ago and do lots of PC development in C++, but what's right for my team isn't right for another. Just pick the one you can do the best in.

This is what we're figuring out here, not which language to learn in general, which one that is "ideal"(arguably) for programming the robot between the 2 written programming languages.

My teacher in light of this poll called our "Sno-Isle Skill Center"(Technical College) and spoke with their robotics teacher and asked her out of Java, LabVIEW and C++ which one would be best for programming the robot in general.

She replied:
Java, no.
LabVIEW is easy to use and is very supported by FRC.
C/C++ is the most ideal because it is an industry standard, most large internships in the area require C/C++ knowledge(Microsoft, yadda, yadda).

So as far as the future is concerned for my team members C++ will be the way we go.

Dillon Carey 06-06-2010 12:02

Re: Java VS C++ || The Final Decision
 
we have used labview.
I personally like it because it was very easy to pick up and almost anyone on the team can help with it as long as they understand some simple algebra. (they may not know where to get the icons or where to put them, but if the programmer needs help with some math, anyone should be able to help.)

Greg McKaskle 06-06-2010 20:58

Re: Java VS C++ || The Final Decision
 
If this poll is geared towards an internship or college application, which would catch your eye?

"I couldn't decide which language to learn. I asked the teachers and they said I should learn language X. I programmed our first robot in it."

OR

"In the offseason I went through tutorials for languages X, Y, and Z. Once the contest was announced, I decided to use --- for our robot because ..."

Both are better than referencing your high score in video game xyz, but which puts you ahead of the pack.

Greg McKaskle

slavik262 07-06-2010 18:36

Re: Java VS C++ || The Final Decision
 
Exactly. My point was that you should make the decision based on what the programmer is most comfortable in. Play around and try them out. Again, let me restate that there is no "ideal" (even arguably) language. All have pros and cons as well as comparable performance on the cRIO.

frasnow 12-06-2010 19:42

Re: Java VS C++ || The Final Decision
 
As a mentor for FIRST, I think it's important students learn skills they can use in the future. Although their methods are a bit suspect I think it's worth looking at Tiobe software’s programming community index (http://www.tiobe.com/index.php/conte...ci/index.html). For June 2010 Java is ranked 1st with an 18.033% rating, C++ is ranked 3rd with an 10.757% rating, and LabVIEW is 35th with a 0.333% rating.

When students are applying for jobs, which languages do you think will look better on a resume? Another factor is college, which languages will computer science students be studying in their college classes and could use a head start? The answer to both of these questions is probably Java and C/C++. Another factor is the AP Computer Science test, which is in Java. For this reason, Team 997 used Java this year.

I am not saying LabVIEW is not used in the real world. Many of the Electrical Engineers I work with use it and I think it is a good language for EEs to learn. However, software engineers don’t use it much and most employers will be looking for Java and/or C++. In fact, the software engineers I know that have used it say LabVIEW is great for small programs like those running many FRC robots. Problems arise when a LabVIEW program gets large, because it is easily convoluted, difficult to read, and difficult to maintain.

In preparing students for their future, I believe either Java or C++ is an excellent choice.

Chris is me 12-06-2010 20:04

Re: Java VS C++ || The Final Decision
 
Quote:

Originally Posted by mjcoss (Post 965202)
I have the team program the robot is all three languages. We then use the software that a) has the lead programmer at the event, and b) works the best. Each language has it's place. I personally believe that Java is not appropriate for embedded systems. Labview is great for debugging, and we use Labview as a diagnostic tool. Labview is easy for many people to grasp, and they can get up and running quickly. Java is what is taught in a lot of high schools in the AP classes. So at the end of the day, you use what the students, and mentor feel comfortable with.

I thought Java's original intended use was for embedded systems?

I've been on teams that used both, and Java had less issues, but it's hard to isolate programming skill from reliability here. I would say you can't really go wrong with either. Pick the one that you will have the easiest time training others to use.

Alan Anderson 12-06-2010 21:15

Re: Java VS C++ || The Final Decision
 
Quote:

Originally Posted by Chris is me (Post 966381)
I thought Java's original intended use was for embedded systems?

Sort of. Back before Oak got renamed Java, it was meant specifically for "entertainment appliance" systems with video displays.

Quote:

I've been on teams that used both, and Java had less issues, but it's hard to isolate programming skill from reliability here. I would say you can't really go wrong with either. Pick the one that you will have the easiest time training others to use.
If ease of training is the primary goal, LabVIEW is hard to beat. Of course, that assumes the trainer has experience with it in the first place. :)


All times are GMT -5. The time now is 23:17.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi