![]() |
Java VS C++ || The Final Decision
Which does your team use, Java or C++?
I have searched through these forums and google for this answer and it is very wishy washy. If you want leave why you use it but vote for either. |
Re: Java VS C++ || The Final Decision
You forgot Labview.
(I'm not on a team, except as an alum, so I can't answer... but I would guess that you'll get a pretty even split between the three.) |
Re: Java VS C++ || The Final Decision
Java. Our school teaches Computer Science in Java, so naturally the programming team liked the idea of using Java to program the robot, since we didn't already have a base in Labview or C++ anyway (2010 team). Though I ended up being the only programmer in the end... so Java definitely was a good choice because I'd hate to be programming a robot solo in a language I'm not already familiar with.
|
Re: Java VS C++ || The Final Decision
C++. We've had 2 new programmers doing all of the work since the new control system came out and we're both already competent in C++, so we stick with that
|
Re: Java VS C++ || The Final Decision
LabVIEW is an irrelevant language here!
|
Re: Java VS C++ || The Final Decision
C++ I find Java to be a language that is similar to C++ but with traning wheels
|
Re: Java VS C++ || The Final Decision
Quote:
|
Re: Java VS C++ || The Final Decision
If I had to choose between C++ and Java, I would choose C++ for robot programming:
1. The gigantic advantage Java has over C++ is that it can make pretty GUI's. However, that is completely useless in cRio programming as there is no GUI interface. 2. This year, Java was on its first year and C++ was on its second, however the old control system has been using C since 2004. C/C++ is much more proven and tested in FRC robotics as of now then Java. 3. I already know C++. I don't already know Java. I also know and like LabVIEW. |
Re: Java VS C++ || The Final Decision
Quote:
|
Re: Java VS C++ || The Final Decision
Quote:
For what it's worth, Team 45 uses neither C++ nor Java. |
Re: Java VS C++ || The Final Decision
Quote:
I apologize for disregarding LabVIEW. Wasn't my focus. |
Re: Java VS C++ || The Final Decision
Quote:
2. With a new and different environment (the cRIO) you can hardly call it 'proven'. The (completely) new C libraries only have a year's head start on their Java equivalent, and having used both, I can say that both work very well. 3. A valid point, but I'd certainly recommend you give it a try- in most cases the syntax is identical or even simpler than a C/++ equivalent so the learning curve is actually quite small. Quote:
My opinion on LabVIEW: It may make coding convenient or easy, but that doesn't make it better than other tools. |
Re: Java VS C++ || The Final Decision
As much as I like C++, Netbeans was an easier IDE to use.
Some of the things that made it easier were: - Integrated Netconsole, Serial comms without a long cord, (connecting to the remote server never worked for us) - Automatic reboot on download, when not using the debug mode, this saved lots of time - Automatic file uploader, uploads the correct program file without going to a configuration page even when changing projects Though, it seemed that there was a memory leak somewhere which would limit us in how many times we could upload / minutes open before we would have to restart netbeans. And library support was a little lacking this year. Only the vision libraries that were needed to get the vision tracking were ported. To access any other parts of the NIvision libraries, JNA (Java Native Access) was required, (Writing a method in C++, compiling it in windriver, and then uploading it) CAN support for the closed loop modes (current, position, speed) for java was the last language implemented, with a gap between Labview and C++. But, even without all of the libraries, Java was perfectly capable language for programming the cRIO, and FRC robots. |
Re: Java VS C++ || The Final Decision
My biggest complaint with Java on the cRIO is that they ported a non-realtime version of Java, instead of a realtime version.
|
Re: Java VS C++ || The Final Decision
I would be overjoyed to use C++ for robot programming,
IF THEY TOOK THE TIME TO MAKE IT COMPILABLE FROM LINUX, FOR THE LOVE OF CHRIST ITS GCC edit: Wow, i was angry. could someone please <code> a makeFile from the C++ stuff? I think I can get C++ working on linux if i have a makefile. |
Re: Java VS C++ || The Final Decision
I believe that both C++ and Java are equally capable languages for the type of robot programming that we are doing in FRC. So what it comes down to is a matter of personal preference.
I personally have a dislike for all interpreted languages, it just seems like a clumsy to me. I have spent about the same amount of time working with C++ as I have with Java, and I personally find Java a more frustrating language to program in. I understand that part of the goal of Java was to force an object oriented design of the programmer, and while I like this concept, I dislike how restrictive it makes the Java language. I have had teachers that raved about Java, saying it's the best thing since sliced bread, and while I respect my teachers.... I have to respectively disagree. Java is possibly a good learning tool, but for making clean, efficient programs, it's just not the thing for the job. -Kit P.S. I would also have to disagree about the strong point of Java being it's GUI abilities. If you take and C++ compiler and add on a nice graphics library like QT, Java is no match. The language is just all around clumsy. |
Re: Java VS C++ || The Final Decision
Quote:
I'm fairly certain the uploading bit is just an FTP server, but most of the process for deploying that code is hidden away. I have a feeling they aren't doing anything too fishy behind the scenes, it's just that the documentation for what they're doing doesn't seem to exist. Otherwise it really wouldn't be that hard to do. Right now, though, the easiest way to do FRC dev on Linux or any of the *NIX OSes is to use the Java environment. No complaints from me though, NetBeans is a dream to use :D. |
Re: Java VS C++ || The Final Decision
Quote:
Java is certainly a pig of a language, but I also like using it for backends to an GUI. I use Flex (which is also a pig) but ports nicely now with Java since flash builder 4 and blazeds. I really like OO, especially from an architecture standpoint and flex brings OO development to web and desktop dev. So even though it is a pig, it is easier to debug and I find it easier to build with. Then again from my experiences, people who love c and c++ hate flex. (lets not get started on steve jobs.... ;) ) |
Re: Java VS C++ || The Final Decision
I don't really want to get involved in these food-fights about languages, but since LV came up, let me just clarify that the CPU usage of the dashboard is not something that you can blame on LV. Blame me instead. I made a mistake and the LV UI was dealing with overlapping controls the best way it could, doing offscreen drawing and extra redraws. That is what used the excess CPU.
Greg McKaskle |
Re: Java VS C++ || The Final Decision
Quote:
|
Re: Java VS C++ || The Final Decision
Quote:
|
Re: Java VS C++ || The Final Decision
My team used Java this year.
As a mentor, I did everything in my power to convince them to use labview, but in the end the students run the team. I think they realized how quickly a source can become convoluted and unreadable when its hacked together at the last second, which is why the mentors tried to advocate labview (less time typing/debugging, more time testing). Having coded in Java for about 5 years, I know the things that bug me the most about it (no native support for serial communication? no unsigned data type?). In that time though, I've programmed a wide variety of things, enough to understand the importance of interpreted languages (programming an xlet for one cable box, and it'll run on any, or any bluray player. Same with smart phones; runs even though the underlying architecture is completely different). I don't think that Java is the ideal solution for the cRio, although as far as I'm concerned its just syntax. |
Re: Java VS C++ || The Final Decision
397 used C++ since our mentor background is primarily in embedded systems and we felt most comfortable teaching C++.
2337 used Labview (I cannot recall the reason) A word on Java. One of Java's selling points has always been the write once run anywhere capability. This comes at a cost to the overall speed of the language. FIRST teams do not need the benefit of an interpreted language because we are writing for 1 operating system on 1 processor. Because of this I do not feel Java is the most effective tool for the job at hand. However, if you/your mentors know Java well but none of the other languages it is an effective tool. A quick word on that "power" of the languages. None of these languages are any more or less powerful than the others. Now, some of them may be simpler. Some of them may be faster. But given any problem that one of these languages could solve the others should be able to solve it too. The solution may not be as easy or as quick but it is a valid solution. |
Re: Java VS C++ || The Final Decision
Quote:
Two kids on the team have suggested using C++ or Java next year, but they were the only two kids on the team who understood it at that time, and were overruled by the head mentor. Endorsements? The HOT Team uses it. That's good enough for me. |
Re: Java VS C++ || The Final Decision
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.
One major issue is that each language provisions the CRIO slightly differently, which leads to different behavior on the part of sensors, and even something as simple as communication with the driver station. And as far as using Linux to program the bot, it is doable, but it's not simply setting up a makefile. You need to use the VxWorks compiler, and create a kernel module. Not sure that it's worth the work. |
Re: Java VS C++ || The Final Decision
Quote:
|
Re: Java VS C++ || The Final Decision
Quote:
|
Re: Java VS C++ || The Final Decision
<3
Your homegrown method works <3 |
Re: Java VS C++ || The Final Decision
To get back on the topic, I think that Java is good for prototyping the robot code so you can go in later with cpp and have the robot kick butt, like Dr. Tran!
|
Re: Java VS C++ || The Final Decision
Java is great for cell phones, not sure why we have it at all for the cRIO.
LabView is terrific for controlling bench instruments to take measurements, and for programmers that can't program or type. Let's assume that C++ is the core language. 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. LabView is off in it's own world of pretty pictures and it's good to have a radically different viewpoint from text based C++ and the dreadful Eclipse IDE. Presumably WindRiver is to blame for that choice of IDE and FIRST are stuck with it. Did anyone make a jEdit based IDE for the cRIO C++ environment? Like I said, Java can be useful. |
Re: Java VS C++ || The Final Decision
Quote:
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. |
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) |
Re: Java VS C++ || The Final Decision
Quote:
|
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. |
Re: Java VS C++ || The Final Decision
Quote:
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. |
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.) |
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 |
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.
|
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. |
Re: Java VS C++ || The Final Decision
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. |
Re: Java VS C++ || The Final Decision
Quote:
Quote:
|
| 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