Go to Post There is no MILSPEC standard for pool noodles. - Rick TYler [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 01-04-2010, 22:44
davidthefat davidthefat is offline
Alumni
AKA: David Yoon
FRC #0589 (Falkons)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2010
Location: California
Posts: 792
davidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud of
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.
Just cout or printf() or System.out.print() out the stuff you need, that has proven to do me well, no need for fancy GUI
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.
  #2   Spotlight this post!  
Unread 01-04-2010, 22:52
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 davidthefat View Post
Just cout or printf() or System.out.print() out the stuff you need, that has proven to do me well, no need for fancy GUI
I challenge you to tune a PID loop with only numbers streaming by. It's probably slower than writing code to plot what's happening yourself and then use the plotting software.

I agree with you that some problems can be easily debugged with prints, but there are other problems that are incredibly hard to debug with prints.
  #3   Spotlight this post!  
Unread 01-04-2010, 22:55
davidthefat davidthefat is offline
Alumni
AKA: David Yoon
FRC #0589 (Falkons)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2010
Location: California
Posts: 792
davidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud of
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

Quote:
Originally Posted by AustinSchuh View Post
I challenge you to tune a PID loop with only numbers streaming by. It's probably slower than writing code to plot what's happening yourself and then use the plotting software.

I agree with you that some problems can be easily debugged with prints, but there are other problems that are incredibly hard to debug with prints.
fstream it, write it into a txt file and read it after to debug... But still lots of numbers
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.
  #4   Spotlight this post!  
Unread 01-04-2010, 23:05
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

Quote:
Originally Posted by davidthefat View Post
fstream it, write it into a txt file and read it after to debug... But still lots of numbers
Or you could use LabVIEW and draw a graph of the data vs time in real time. Or just probe the variables as you want to see them.

As for your next post, as for the usefulness of C++, many tasks are being replaced by different languages. Look at the Unreal Engine. It does most of the work in UnrealScript, not C++. Look at some Source mods (notably Gmod) - they use Lua for scripting on top of a C++ back end - so the end user only ever works with the Lua end. Real things use a variety of languages, trying to argue that yours is "more used" is useless. Each language is used where appropriate, and will be determined by the user. If you like C++, use it. Don't complain about having to sift through all of the printf's that come with it.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
  #5   Spotlight this post!  
Unread 01-04-2010, 23:08
davidthefat davidthefat is offline
Alumni
AKA: David Yoon
FRC #0589 (Falkons)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2010
Location: California
Posts: 792
davidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud of
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

Quote:
Originally Posted by apalrd View Post
Or you could use LabVIEW and draw a graph of the data vs time in real time. Or just probe the variables as you want to see them.

As for your next post, as for the usefulness of C++, many tasks are being replaced by different languages. Look at the Unreal Engine. It does most of the work in UnrealScript, not C++. Look at some Source mods (notably Gmod) - they use Lua for scripting on top of a C++ back end - so the end user only ever works with the Lua end. Real things use a variety of languages, trying to argue that yours is "more used" is useless. Each language is used where appropriate, and will be determined by the user. If you like C++, use it. Don't complain about having to sift through all of the printf's that come with it.
Well, those are different, they are game engines, I wanna be the ones making the engines... There is a difference, even if its scripted in Lua, its core is C++, its the C++ that uses the Lua SCRIPTING (Note SCRIPTING) language to interpret the game.
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.
  #6   Spotlight this post!  
Unread 01-04-2010, 23:17
kgzak's Avatar
kgzak kgzak is offline
Registered User
AKA: Kris
FRC #4392 (Decievers) FRC #2075 (Enigma)
Team Role: College Student
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Grand Rapids, Michigan
Posts: 418
kgzak is a splendid one to beholdkgzak is a splendid one to beholdkgzak is a splendid one to beholdkgzak is a splendid one to beholdkgzak is a splendid one to beholdkgzak is a splendid one to beholdkgzak is a splendid one to behold
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

I use LabView but I also know C++. I started programing in Visual Basic, joined the robotics team knowing very little about programing. My second year I picked up LabView and programed a basic robot in 3 hours. All it did was drive and shoot and had timers for the shooter but it took us to nationals. This was last year, now we have very advanced code that helped us win the Quality award at West Michigan.
  #7   Spotlight this post!  
Unread 01-04-2010, 23:19
davidthefat davidthefat is offline
Alumni
AKA: David Yoon
FRC #0589 (Falkons)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2010
Location: California
Posts: 792
davidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud of
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

Quote:
Originally Posted by kgzak View Post
I use LabView but I also know C++. I started programing in Visual Basic, joined the robotics team knowing very little about programing. My second year I picked up LabView and programed a basic robot in 3 hours. All it did was drive and shoot and had timers for the shooter but it took us to nationals. This was last year, now we have very advanced code that helped us win the Quality award at West Michigan.
The judges judge your code too? They never came over and asked me to show them my code...
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.
  #8   Spotlight this post!  
Unread 01-04-2010, 23:55
Azores's Avatar
Azores Azores is offline
Registered User
AKA: Andrew
FRC #3161 (Tronic Titans)
Team Role: Mentor
 
Join Date: Mar 2010
Rookie Year: 2010
Location: Toronto, Ontario
Posts: 40
Azores has a spectacular aura aboutAzores has a spectacular aura aboutAzores has a spectacular aura about
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

I programmed our bot this year in Java because it's what I already knew best, so I figured I would use it so I'm not spending time learning to use another language instead of actually writing code or helping to actually construct the robot. Originally the programming team for us was planning on using C++, but when everyone else ended up not doing any programming...
__________________
3161 Software Mentor + Photographer
  #9   Spotlight this post!  
Unread 02-04-2010, 00:20
Radical Pi Radical Pi is offline
Putting the Jumper in the Bumper
AKA: Ian Thompson
FRC #0639 (Code Red Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York
Posts: 655
Radical Pi has a spectacular aura aboutRadical Pi has a spectacular aura aboutRadical Pi has a spectacular aura about
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

We have 2 programmers (including me), both of us were already fluent in C++ when we joined the team, so there was no argument over what language to use. I have done a fair amount of work in LabVIEW though (dashboard, some NXT programming before I discovered NXC), and I still prefer C++ and other text-based languages too.

On the argument over which language is better, I'd still have to go with C-style. In terms of useability, LabVIEW winds (it's by far the easiest to pick up), however in the more technical aspects it starts to fail. Have you ever looked at a disassembly of a LabVIEW program? I have (for NXT), and it does not look very good. I compared it side-by-side to a disassembly of an NXC program that does the exact same thing, and, even on a VM specifically designed for LabVIEW, the C code is so much simpler. The problem? No optimization. Lots of messy things show up in the LabVIEW that are just totally unnecssary for the operation of a simple program.

This of course, is not meant as a disrespect to LabVIEW. I'd imagine that during the switch from ASM to C there was the exact same argument of asm being so much more efficient than the C equivalents. What made the final difference? We figured out how to optimize the assembly so that the advanced structures of C took as little code as possible, and now it is super-hard to outperform C code in asm and still get a great program.

LabVIEW certainly has a future. It just needs that same time to mature and be able to match the output of the more established languages. Simple numbers can show this need. Earlier in the topic, I saw people talking about ~3 minute builds and downloads for LabVIEW. In C, I don't think I've clocked a full build and download in more than 45 seconds. Usually much less (on a pentium III to boot). Give LabVIEW time to become a high-performance language. Maybe not for the current generation of programmers, but give it 20 years, and I wouldn't be surprised to find dataflow languages creeping into our game engines (assumming the GNU guys get their hands on the language. It's a bit too pricey at the moment)
__________________

"To have no errors would be life without meaning. No strugle, no joy"
"A network is only as strong as it's weakest linksys"
  #10   Spotlight this post!  
Unread 02-04-2010, 22:49
kgzak's Avatar
kgzak kgzak is offline
Registered User
AKA: Kris
FRC #4392 (Decievers) FRC #2075 (Enigma)
Team Role: College Student
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Grand Rapids, Michigan
Posts: 418
kgzak is a splendid one to beholdkgzak is a splendid one to beholdkgzak is a splendid one to beholdkgzak is a splendid one to beholdkgzak is a splendid one to beholdkgzak is a splendid one to beholdkgzak is a splendid one to behold
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

Quote:
Originally Posted by davidthefat View Post
The judges judge your code too? They never came over and asked me to show them my code...
Kind of, We told them how we used the camera to track the goal and how we can go an exact distance in autonomous.
  #11   Spotlight this post!  
Unread 02-04-2010, 23:31
Chris Hibner's Avatar Unsung FIRST Hero
Chris Hibner Chris Hibner is offline
Eschewing Obfuscation Since 1990
AKA: Lars Kamen's Roadie
FRC #0051 (Wings of Fire)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1997
Location: Canton, MI
Posts: 1,488
Chris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond repute
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

What is "easiest" and "best" is really a matter of what it is that you're trying to do and where your experience lies.

Experience is a huge factor. Ask anyone in the world what the easiest spoken language is, and I'm sure almost everyone will answer that their native language is the easiest, because that's what they have the most experience in, and that is the language that they "think" in.

I know more computer languages than I have fingers to count them on. I have enough experience with languages to know that a) every language is "illogical" or "difficult" or "hard to follow" in many ways just because you're not used to thinking that way when you're new to it, b) every language becomes pretty cool in its own way once you learn the ins and out, and c) there are "different horses for different courses".

So what is "easiest"? It depends on the task at hand. If you have absolutely no programming experience and you want to be able to do some simple things on your robot, LabVIEW wins hands down (at least in the three choices given here). There aren't a lot of syntax peculiarities that you have to learn before you can get going. If you want to do some ultra-complicated stuff, then you can have a debate that no one will ever win.

If I have any advice, it's this: if you have a group of people that are highly experienced in one language, stick with it since that will be the easiest for you. If you have no experience whatsoever, go with LabVIEW.
__________________
-
An ounce of perception is worth a pound of obscure.
  #12   Spotlight this post!  
Unread 03-04-2010, 08:31
gvarndell's Avatar
gvarndell gvarndell is offline
Software Engineer
AKA: Addi's and Georgie's Dad
FRC #1629 (GaCo)
Team Role: Parent
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Grantsville, Maryland
Posts: 350
gvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond repute
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

Quote:
Originally Posted by davidthefat View Post
The judges judge your code too? They never came over and asked me to show them my code...
The judges want to know if (at least) some of the student team members know anything about that machine that's playing on the field -- including the software.
For obvious reasons I think, it doesn't reflect well on the team if none of them do.
And it goes beyond the technical.
At one regional we attended, a judge came up into the bleachers and asked me (I am old and my team affiliation was apparent owing to the team T-shirt I was wearing) if I had picked our alliance partners for the eliminations.
I told her she'd have to talk to the captains about it because I had given it very little thought.
Somehow, I think that was the answer she was hoping for (and it was the truth).
__________________
Robots never, ever, ever, ever break -- The Robot Repairman (Backyardigans)

Last edited by gvarndell : 03-04-2010 at 08:49.
  #13   Spotlight this post!  
Unread 03-04-2010, 14:51
FRC4ME FRC4ME is offline
Registered User
FRC #0339
 
Join Date: Feb 2008
Rookie Year: 2007
Location: Fredericksburg, VA
Posts: 324
FRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant future
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

My team switched to Java this year, primarily because it is the language taught in high school CS courses around here, and I am very glad we did. It is so nice to not have to explain memory management to the students or spend hours debugging a null pointer problem when the best the compiler can do is say, "something went wrong somewhere...probably." Most of the things you do in Java just "make sense," with very few syntactic quirks that seem unnecessary or silly to new students.

My main gripe with C++ is that it gives you far too many options. Should you pass by reference, pointer, or value? Here a hint; none of the three options do everything you want. The 2010 revision of the C++ spec will add another one: move reference (denoted by var&&)...this is getting a bit ridiculous. When defining a new class, you better write the copy constructor, destructor, and assignment operator (and move constructor in the new revision), or the compiler will do it for you (almost always incorrectly). Be sure to maintain exception safety in your constructors - 20% of my favorite C++ book is devoted to that subject. Put declarations in the header file and definitions in the source file; unless they're inline or templates.

And if that's not complex enough for you, with a Turing-complete preprocessor and template system, you can effectively rewrite the language (see: Boost libraries).

Java seems to be much better in the straightforwardness regard. Although I wish we weren't limited to CLDC 1.1: it has some idiosyncrasies of its own. ((Integer)vector.elementAt(index)).intValue is not an intuitive way of extracting an int from an array.
__________________
Go directly to queue. Do not pass pit.
  #14   Spotlight this post!  
Unread 03-04-2010, 23:28
wireties's Avatar
wireties wireties is offline
Principal Engineer
AKA: Keith Buchanan
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Rockwall, TX
Posts: 1,170
wireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond repute
Send a message via AIM to wireties
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

I've been doing this (software/hardware design) for 25 years using languages from assembly through C/C++/Pascal/Modula to PHP/Python and Perl. I've also used a few code generators which is what I think LabView really does. I am pretty sure LabView actually produces C (and maybe C++) source then compiles it. I know it did 15+ years ago. Albeit at a higher level, I too think LabView is really a language (and a very complex one at that) and NI is an awesome company.

Bottom line - you use different languages for different reasons at different times. To mitigate technical risk, it is wise for FIRST teams to use the supported language the mentors know best. Otherwise use LabView because you'll get the best newbie support from NI.

Languages like C and C++ are more powerful and normally faster in embedded systems. They make good programmers better but bad programmers intolerable. The VxWorks kernel is written in C and one can make C literally do anything on a FIRST robot. Java and LabvIew are another step removed, Java goes through the J2ME and LabView is (at least partially) a code generator. These abstractions have potential huge benefits but nothing is free. They are (at least a little bit) slower than C.

That is my 2 cents.
  #15   Spotlight this post!  
Unread 04-04-2010, 07:57
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

Quote:
I've been doing this ...
I agree with your overall post, but to correct a few details -- LV 1.0 was interpreted, but ever since LV2.0 released in 1990, it has been compiled. It compiles to machine code for various architectures. It doesn't need to generate C source. It doesn't do so primarily because C is such an unfriendly language for multitasking.

NI does sell an add-on module which allows targeting a wide variety of 3rd party embedded devices by generating C source and then using the vendor's C compiler. It was introduced maybe eight years ago, well after RT. That is not how RT works or how the desktop works.

Greg McKaskle
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