|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA
Quote:
|
|
#2
|
||||
|
||||
|
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA
I have been in the programming business for some time and use all three languages. I always find this discussion very interesting. The battle of the languages. Who is faster, who is easier, who is used more, bla bla bla bla.
All three Languages eventually do the same thing in the end and that is they are compiled down to a much lower level set of instructions for the processor. That being said, I really don’t think any of the three is better than the other as far as the application of a First robot, as they all share the same LabView libraries which I believe are written in C. If this was an interstellar probe or a very large distributed application that might be a different story. For now would suggest the following: LabView for a rookie team with no programming experience or someone majoring in engineering Java for a team with someone who has experience with it or someone who is majoring in computer science/computer modeling C++ for a team with someone who has experience with it or someone who is majoring in information technology/programming |
|
#3
|
|||
|
|||
|
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA
several of the programmers on our team know how to use C++ but none of them want to teach it so we always end up using labview. Which works fine. Except for when no one bothers to clean up the diagrams. Then debugging is impossible.
|
|
#4
|
||||
|
||||
|
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA
I prefer Java as of now compared to C++ and Labview. First of all, the compatible IDE is available for linux also. This is a huge plus for me because I like being able to use my IDE on linux also.
Labview, I do not like GUI that much. I do not like having to navigate through menus to find stuff. Needing to clean graphics to know what is happening was not appealing to me either. I understand that Labview probably is the easiest language to use as of now. C++ the main offputting thing for me is the use of Windriver. I like Netbeans being available on multiple different operating systems too much. I would find it extremely pleasing if Python becomes an official option for 2012. I think there would be a high chance like java, to be available on multiple operating system probably because of being open-source and that I do not mind not having to use symbols to enclose blocks of code. Teaching programming is a very abstract thing. I find it best if you try to explore and ask mentor(s) if you are doing it right or clarify something. Programming for the robot is different from conventional programming since people took care of the lower level things so you could focus on getting the robot to do stuff. I would say the basics would need to be covered like how the basics of the language works and data types, functions, variables, arithmetic, case structures, and loops. |
|
#5
|
|||
|
|||
|
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA
To anyone thinking you may be interested in a programming career or a Computer Science or Engineering degree, I'd encourage you to be open to, and in fact get used to, learning new languages. Learn how to compare and evaluate the features looking for the weak and strong aspects of the language. It is also good to learn how to separate the language, library, and environment elements.
Greg McKaskle |
|
#6
|
||||
|
||||
|
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA
Personally java seemed to be the best fit. Being my first year as a programmer it would be natural the the first would be my favorite. But after seeing our programmers constantly struggle with the labview software it makes sense to go back to text based programming because it has more real world applications. The only problem I had with java was the unclear documentation of classes. Sometimes it was difficult to understand what exactly parameters were asking for. Otherwise it was very easy to code, simple to troubleshoot, and a breeze to build and run.
|
|
#7
|
||||
|
||||
|
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA
I can't say much in comparison with Java or C++, but I have threatened our LabView code into working with wire cutters...
|
|
#8
|
||||
|
||||
|
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA
Personally, i love C++.
But cant stand the windriver software >.> |
|
#9
|
|||||
|
|||||
|
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA
Java, since it was my first language. Plus it's easier to use. IMO Labview is only good for debugging, but ...different to use.
|
|
#10
|
||||
|
||||
|
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA
Quote:
(I don't mean to be argumentative; I'm simply curious why it seems to be considered the norm to begin programming with Java. I don't know anything about the language except that it's interpreted and has C-like syntax.) |
|
#11
|
|||
|
|||
|
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA
Quote:
Also, when there is an error in some Java code, it throws an exception with a nice stack trace, and then dies. This includes trying to dereference a null handle. C/C++ will typically just continue on after having written junk to a random spot in memory, or segfault, or even worse, segfault in an entirely different spot in your code. If you are good with your tools, this isn't that big an issue, but if you are just starting, segfaulting at a different random spot in your code is a royal pain to debug. I'm not sure I agree with your fluff statement. I interpret you to be talking about code density, and I've found that Java has pretty much the same density as C++, if not slightly better code density. FYI, Java gets compiled into a bytecode with a JIT compiler, which is pretty efficient. It runs fairly close to native speed. |
|
#12
|
|||
|
|||
|
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA
I'm impressed that you were disassembling the code, but the technology used for NXT and for the cRIO are quite different.
Also, while the issue you noticed is real, it isn't really the language or the NXT-G compiler, but the library differences. NXT-G libraries are kid-friendly and very high level. They are in fact written as subVIs in s simplified LV language. If you use the LV toolkit for the NXT, like they do for FTC, you can write much lower level statements and the overhead goes away. As an example, in LV, you have a while loop. To construct a While-its-dark loop, a subVI call is dropped and called each iteration of the loop. The subVI is the sensor, and it is wired to the termination. The compiler doesn't know anything about a While-its-dark loop, that is the library and the editor composing something higher level but likely less efficient than you can do if you know the underlying code. Ideally it wouldn't be less efficient, but the flexibility of making While-its-quiet, While-I-have-time, and other loop times usually means tradeoffs. With enough time and effort the template and compiler passes can match hand-coding. But if the language/machine meets the needs of the intended audience, why are you spending money making it faster -- ship it. As to the cost, ask a mentor how they value a day or week of their time. I believe I'm fully capable of making my own hammer, but I never have. If I want to drive a nail, I buy or borrow a hammer -- nails too. I guess it'd be cool if hammers were free, but wouldn't that really mean subsidized? How does free stuff really happen? The economics and politics is another interesting topic. Greg McKaskle |
|
#13
|
|||
|
|||
|
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA
I have about 4-5 years experience programming in java.
At the start of the build season, I gave our programming team 3 assignments related to the drive train (which, by the way, I'm considering writing a white paper on after the season). I told them not to worry about the language / syntax, and to worry about the pseudo code and the algorithm. After each task, I explained the "right" answer (one that worked anyhow). It gave me a chance to clarify the original assignment, and a chance for them to learn a little bit about how to go about solving these math problems. After the 3 assignments, I told them to code it however they pleased. Naturally, I coded mine in Java, and the programming team tried to do the same. I had no experience with Labview, and so another mentor and I went to "port" my code to labview. It took us 30 minutes to wire everything up, and then an hour to thoroughly debug everything. It took the others the better part of the week. It was nice too, because I had made some mistakes in my code (arctan(x) vs arcsin(x) vs arctan(x,y)), and we were able to spot them very quickly, graphically. The robot ended up getting programmed in Java, because the high schoolers rule the robot. I've looked at their code, and I have to say I'd much rather it be in labview for maintainability reasons. Labview for rapid development, easier debugging, and better maintainability. |
|
#14
|
|||
|
|||
|
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA
At the risk of offending the C/C++ faithful, I'll come right out and say: Java is better than C++ for this kind of work. Not a LOT better, because the languages are more alike than different, but there are a few important differences, and these by and large favor Java:
1) The plurality of errors (and debugging time) in any significant sized C/C++ programming project are always around memory management. There are still ways to make MM mistakes with Java, but the "bread and butter" MM work that used to be the application's responsibility in older systems is taken care of for you by the Java runtime. This is important at all levels of programming skill and experience. 2) Concurrency (i.e. threads or tasks) is a first-class part of the Java language rather than an add-on as with C/C++ based systems. This means if you learned how to write Java threads in a class, from a programming book, or on another platform, your knowledge comes with you to the cRIO. Concurrent execution will be part of the picture in any reasonably sophisticated FIRST robot. It's inherently tricky, but with Java it's easier to do and easier to get right. The theoretical "performance advantage" of C/C++ is largely myth/illusion. There are some VERY narrow situations in which it still applies, but Java compiler technology is quite good, and the compiler's runtime awareness gives it some performance advantages, too. The chances that your situation is one where C/C++ has a performance edge are quite small; the chances your situation is one where a Java program is more likely to be correct are much larger. I speak as an expert with many years' professional programming experience in both languages. Java is simply a more evolved programming system (it's not just the language, the runtime system is part of the picture too). One caveat is that the implementation quality of a system matters too. Even if Java is "better" as I've argued, a good C/C++ system may end up better than a poorly implemented Java. Having worked with C++/WR last year and Java this year in FIRST, both seem fine here. If you want to leverage existing C/C++ expertise and don't want to fool with Java, go for it, and you'll do fine. If you're starting from square one, I highly recommend Java over C/C++. |
|
#15
|
||||
|
||||
|
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA
Quote:
For me, my experience with WindRiver was just completely filled with errors about no robot code, licensing problems, building errors, RAM use, and everything else in between. I wish we had a better choice for C++... ![]() -Masoug |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Wind River Cds | Team1710 | C/C++ | 0 | 22-09-2009 10:57 |
| Uninstall Wind River | Lord_Jeremy | C/C++ | 0 | 15-01-2009 15:56 |
| SVN wind river | Mr.Macdonald | C/C++ | 3 | 13-01-2009 12:40 |
| Wind River Help | BenB | Programming | 3 | 02-01-2009 21:42 |
| Open Wind River | excel2474 | Programming | 12 | 31-12-2008 17:36 |