Go to Post IMHO, [the driver's] job is to drive the robot. The coaches job is to monitor everything in a match that isn't your robot. - CalTran [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 23-05-2011, 13:09
lemiant's Avatar
lemiant lemiant is offline
the Dreamer
AKA: Alex
FRC #4334 (Alberta Tech Alliance)
Team Role: Leadership
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Calgary, AB, Canada
Posts: 562
lemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond repute
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

Quote:
Originally Posted by byteit101 View Post
Like the ZomB Dashboard! (Its in C# and uses graphs!)
http://www.chiefdelphi.com/forums/sh...t=82612&page=2
http://firstforge.wpi.edu/sf/projects/zombdashboard

We used these graphs to tweak our drive system to perfection
Is there something like this for Java? It is probably my favorite language, but I'm considering labview just for the awesome debugging capabilities
  #2   Spotlight this post!  
Unread 20-01-2011, 17:50
riptide's Avatar
riptide riptide is offline
The Software Dude... LabView and VB
AKA: Jeff
FRC #1165 (Paradise)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Pasadena
Posts: 24
riptide will become famous soon enough
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   Spotlight this post!  
Unread 24-01-2011, 18:43
fyrefrost fyrefrost is offline
Registered User
FRC #1245
 
Join Date: Oct 2009
Location: Dever
Posts: 15
fyrefrost is an unknown quantity at this point
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   Spotlight this post!  
Unread 24-01-2011, 19:51
MagiChau's Avatar
MagiChau MagiChau is offline
Registered User
AKA: Michael Chau
FRC #0085 (B.O.B. (Built on Brains))
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Zeeland, Michigan
Posts: 875
MagiChau is just really niceMagiChau is just really niceMagiChau is just really niceMagiChau is just really nice
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   Spotlight this post!  
Unread 01-04-2010, 23:00
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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   Spotlight this post!  
Unread 03-04-2010, 03:23
Imadapocalypse's Avatar
Imadapocalypse Imadapocalypse is offline
The Walking Contradiction
AKA: Bryce Ribucan
FRC #2443 (Blue Thunder)
Team Role: Leadership
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Hawaii
Posts: 40
Imadapocalypse is an unknown quantity at this point
Send a message via AIM to Imadapocalypse
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.
__________________
The needs of the many out-weigh the needs of the few and the one

  #7   Spotlight this post!  
Unread 13-04-2010, 17:05
Kyler386's Avatar
Kyler386 Kyler386 is offline
I'm software, it's not my problem.
AKA: Ky
FRC #0386 (Team Voltage)
Team Role: Programmer
 
Join Date: Apr 2010
Rookie Year: 2009
Location: Melbourne, FL
Posts: 13
Kyler386 is an unknown quantity at this point
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...
__________________
Funny, the part of our LV code that looks nice doesn't work, but the code that is so horrid, you can't tell what's going on, works perfectly...
  #8   Spotlight this post!  
Unread 14-04-2010, 19:48
DjMaddius's Avatar
DjMaddius DjMaddius is offline
Registered User
AKA: Matt Smith
FRC #2620 (Southgate Titans)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Southgate, Mi
Posts: 161
DjMaddius is an unknown quantity at this point
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

Personally, i love C++.
But cant stand the windriver software >.>
  #9   Spotlight this post!  
Unread 25-05-2011, 19:46
Kusha's Avatar
Kusha Kusha is offline
Crimpin' ain't easy
AKA: Kusha Gharahi
no team (Looking for a team)
Team Role: College Student
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Dallas, Texas
Posts: 207
Kusha is a jewel in the roughKusha is a jewel in the roughKusha is a jewel in the roughKusha is a jewel in the rough
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.
__________________
https://kusha.me
  #10   Spotlight this post!  
Unread 02-04-2010, 02:12
Al3+'s Avatar
Al3+ Al3+ is offline
ARTist
AKA: Anthony
FRC #0840 (Aragon Robotics Team)
Team Role: Programmer
 
Join Date: Oct 2009
Rookie Year: 2008
Location: San Mateo, CA
Posts: 58
Al3+ is a jewel in the roughAl3+ is a jewel in the roughAl3+ is a jewel in the rough
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

Quote:
Originally Posted by AustinSchuh View Post
I generally recommend C++ to people who are experienced with programming, and Java to most everyone else. My experience with Java has been that it's design choices make bugs in Java code easier to find. My biggest complaint about Java and C++ is that it's hard to get data back from them in a visually easy way to use.

We've been using text files to store constants recently. So, it's really easy to change constants and they stick across reboots. Edit it on the local machine, and run a script to FTP it up into place.
My first impression of Java (and this will remain my impression until I have to learn it for some reason) was that Java code contains lots of fluff. What is the real difference and what makes it better for newbies? Is it just the fact that it's easier to make memory problems in C++?

(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.)
__________________
cout << "Hello, robotics. Goodbye, world." << endl;

"The two-axis accelerometer provided in the kit of parts (shown in the picture below) is a two-axis accelerometer." - WPILib User's Guide
  #11   Spotlight this post!  
Unread 02-04-2010, 02:42
AustinSchuh AustinSchuh is offline
Registered User
FRC #0971 (Spartan Robotics) #254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 1999
Location: Los Altos, CA
Posts: 803
AustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond repute
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

Quote:
Originally Posted by Al3+ View Post
My first impression of Java (and this will remain my impression until I have to learn it for some reason) was that Java code contains lots of fluff. What is the real difference and what makes it better for newbies? Is it just the fact that it's easier to make memory problems in C++?
Java hides the idea of pointers. When I'm working with new programmers, the hardest things for them to learn how to work with are pointers. And not having to worry about pointers gets rid of the entire class of problems that you can get into with pointers. Java also does inheritance with objects nicer than C++. I have come away with a more "friendly" feel of Java after having worked with it as compared to C++.

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   Spotlight this post!  
Unread 02-04-2010, 08:19
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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   Spotlight this post!  
Unread 02-04-2010, 08:48
efoote868 efoote868 is offline
foote stepped in
AKA: E. Foote
FRC #0868
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2005
Location: Noblesville, IN
Posts: 1,406
efoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond repute
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.
__________________
Be Healthy. Never Stop Learning. Say It Like It Is. Own It.

Like our values? Flexware Innovation is looking for Automation Engineers. Check us out!
  #14   Spotlight this post!  
Unread 02-04-2010, 10:12
buchanan buchanan is offline
Registered User
FRC #2077 (Laser Robotics)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2007
Location: Wales, WI
Posts: 66
buchanan is just really nicebuchanan is just really nicebuchanan is just really nicebuchanan is just really nice
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   Spotlight this post!  
Unread 14-04-2010, 20:35
masoug's Avatar
masoug masoug is offline
Food Consumer
FRC #0114
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Planet Earth
Posts: 78
masoug is an unknown quantity at this point
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

Quote:
Originally Posted by davidthefat View Post
C++ is my favorite language, but I never used windriver, but I heard to was a $@#$@#$@#$@#$@# to use...
I SO TOTALLY agree with that!!!

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
__________________

JabbaScript
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT -5. The time now is 03:38.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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