Go to Post Focus on solving the problem, not on being deliberately creative. If you effectively solve the problem, creativity is naturally leveraged as part of finding a great solution. - Jim Zondag [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 05-03-2012, 12:19
cierra_shawe's Avatar
cierra_shawe cierra_shawe is offline
Registered User
FRC #3995 (Automata)
Team Role: Leadership
 
Join Date: Oct 2011
Rookie Year: 2004
Location: Bend, Oregon
Posts: 10
cierra_shawe is an unknown quantity at this point
Advantages of each programming language

Hi everyone!

Although it is only 3 days until our first regional, we have yet to solidify what programing language will be used. I was wondering what the advantages of each would be, and availability of teams who would be able to help at the regional. Also any other tips to help our rookie team out would also be great!

__________________
+ =
  #2   Spotlight this post!  
Unread 05-03-2012, 16:16
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Advantages of each programming language

Use whatever language you're most comfortable with. What did you program with while you were developing and testing your robot?
  #3   Spotlight this post!  
Unread 05-03-2012, 16:54
basicxman basicxman is offline
Emily Horsman
FRC #2200 (MMRambotics)
Team Role: Programmer
 
Join Date: Oct 2007
Rookie Year: 2007
Location: Burlington, Ontario
Posts: 971
basicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant future
Send a message via AIM to basicxman Send a message via MSN to basicxman Send a message via Yahoo to basicxman
Re: Advantages of each programming language

Quote:
Originally Posted by cierra_shawe View Post
Although it is only 3 days until our first regional, we have yet to solidify what programing language will be used.
I sincerely hope you've already programmed your robot


Quote:
Originally Posted by cierra_shawe View Post
I was wondering what the advantages of each would be, and availability of teams who would be able to help at the regional. Also any other tips to help our rookie team out would also be great!
There are tons of threads out there on this, but I'll offer some quick points
  • There's a fair amount of support at regionals in all three official languages, but LabVIEW seems to take a majority
  • I'm not American, but I believe many American high school comp sci courses (specifically AP level) teach Java
  • Java and C++ have a fair amount of similar syntax
  • SmartDashboard can be extended with Java, default Dashboard can be extended with LabVIEW

EDIT: If you need specific real-time help, PM me
  #4   Spotlight this post!  
Unread 05-03-2012, 16:58
andreboos andreboos is offline
Registered User
FRC #3021 (The Agency)
Team Role: Programmer
 
Join Date: Dec 2009
Rookie Year: 2010
Location: San Diego
Posts: 132
andreboos is a jewel in the roughandreboos is a jewel in the roughandreboos is a jewel in the roughandreboos is a jewel in the rough
Re: Advantages of each programming language

Java and C++ compile and deploy much faster than LabVIEW, or at least that was the case last year. We use C++, and it takes 5-10 seconds to compile and 3 to deploy our code, which really cuts down on programming development time. LabVIEW takes several minutes. That said, LabVIEW is far easier for beginners at programming.
  #5   Spotlight this post!  
Unread 05-03-2012, 16:59
basicxman basicxman is offline
Emily Horsman
FRC #2200 (MMRambotics)
Team Role: Programmer
 
Join Date: Oct 2007
Rookie Year: 2007
Location: Burlington, Ontario
Posts: 971
basicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant future
Send a message via AIM to basicxman Send a message via MSN to basicxman Send a message via Yahoo to basicxman
Re: Advantages of each programming language

Quote:
Originally Posted by andreboos View Post
Java and C++ compile and deploy much faster than LabVIEW, or at least that was the case last year. We use C++, and it takes 5-10 seconds to compile and 3 to deploy our code, which really cuts down on programming development time. LabVIEW takes several minutes. That said, LabVIEW is far easier for beginners at programming.
LabVIEW also has some very nice debugging tools.

Disclaimer: That being said, I use C++ for the robot and this year quite a bit of Java for the dashboard and won't be switching anytime soon.
  #6   Spotlight this post!  
Unread 05-03-2012, 23:20
Ziv Ziv is offline
Has code to be writing...
FRC #0125 (Nutrons)
Team Role: Alumni
 
Join Date: Mar 2010
Rookie Year: 2009
Location: Boston
Posts: 39
Ziv is a glorious beacon of lightZiv is a glorious beacon of lightZiv is a glorious beacon of lightZiv is a glorious beacon of lightZiv is a glorious beacon of light
Re: Advantages of each programming language

Code:
if(youKnowAnyLanguage) {
    use(theLanguageYouKnow);
} else {
    read(WPILibCookbook);
    if(youUnderstoodAnyOfThat) {
        use(java); // C++ is an option, but it's a bit fiddly.
    } else {
        use(labview);
    }
}
An experienced FRC programmer using Java (and presumably any other language) can get a passable program running in a matter of hours, not days. Nevertheless, start learning and/or coding ASAP!
  #7   Spotlight this post!  
Unread 05-03-2012, 23:22
basicxman basicxman is offline
Emily Horsman
FRC #2200 (MMRambotics)
Team Role: Programmer
 
Join Date: Oct 2007
Rookie Year: 2007
Location: Burlington, Ontario
Posts: 971
basicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant future
Send a message via AIM to basicxman Send a message via MSN to basicxman Send a message via Yahoo to basicxman
Re: Advantages of each programming language

Quote:
Originally Posted by Ziv View Post
// C++ is an option, but it's a bit fiddly.
Care to elaborate?
  #8   Spotlight this post!  
Unread 05-03-2012, 23:26
Ziv Ziv is offline
Has code to be writing...
FRC #0125 (Nutrons)
Team Role: Alumni
 
Join Date: Mar 2010
Rookie Year: 2009
Location: Boston
Posts: 39
Ziv is a glorious beacon of lightZiv is a glorious beacon of lightZiv is a glorious beacon of lightZiv is a glorious beacon of lightZiv is a glorious beacon of light
Re: Advantages of each programming language

Quote:
Originally Posted by basicxman View Post
Care to elaborate?
If I were teaching someone to program and I had a choice as to whether or not I had to explain memory management, I would choose not having to. But it's not that big of a deal. Besides, every language has its own special problems .
  #9   Spotlight this post!  
Unread 05-03-2012, 23:27
basicxman basicxman is offline
Emily Horsman
FRC #2200 (MMRambotics)
Team Role: Programmer
 
Join Date: Oct 2007
Rookie Year: 2007
Location: Burlington, Ontario
Posts: 971
basicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant future
Send a message via AIM to basicxman Send a message via MSN to basicxman Send a message via Yahoo to basicxman
Re: Advantages of each programming language

Quote:
Originally Posted by Ziv View Post
If I were teaching someone to program and I had a choice as to whether or not I had to explain memory management, I would choose not having to. But it's not that big of a deal. Besides, every language has its own special problems .
Memory management is an important topic in Java, the severe memory leak in SmartDashboard this year is a perfect example.
  #10   Spotlight this post!  
Unread 06-03-2012, 00:03
carrillo694's Avatar
carrillo694 carrillo694 is offline
Alex Carrillo
FRC #0694 (Stuypulse)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: New York, NY
Posts: 66
carrillo694 is a jewel in the roughcarrillo694 is a jewel in the roughcarrillo694 is a jewel in the roughcarrillo694 is a jewel in the rough
Re: Advantages of each programming language

Quote:
Originally Posted by basicxman View Post
Memory management is an important topic in Java, the severe memory leak in SmartDashboard this year is a perfect example.
For the purposes of programming a robot in only three days and not testing it until practice day, memory management probably is not their primary concern

cierra_shawe, what programming languages are you or those on your team familiar with? If the answer is "none," I am leaning towards recommending LabVIEW. Not because it is necessarily easier, but because its control structures seem more intuitive than the syntax that comes with Java or C++. If the answer is "some," then I would go with Java, because its WPIlib implementation seems simpler than the C++ implementation, which makes it easier to learn. But I could be wrong about that, since my team uses Java. At least you will not need to be concerned about memory management if you are unfamiliar with it, unless you are doing computer vision, which I do not recommend if you are testing your robot for the first time in a few days!
  #11   Spotlight this post!  
Unread 06-03-2012, 11:51
basicxman basicxman is offline
Emily Horsman
FRC #2200 (MMRambotics)
Team Role: Programmer
 
Join Date: Oct 2007
Rookie Year: 2007
Location: Burlington, Ontario
Posts: 971
basicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant future
Send a message via AIM to basicxman Send a message via MSN to basicxman Send a message via Yahoo to basicxman
Re: Advantages of each programming language

Quote:
Originally Posted by carrillo694 View Post
If the answer is "none," I am leaning towards recommending LabVIEW. Not because it is necessarily easier, but because its control structures seem more intuitive than the syntax that comes with Java or C++.
I really think this depends on your background. LabVIEW control structures can be intimidating and non-obvious at first. The way a LabVIEW program executes is quite a bit different than a C++/Java program. If a student has a background or enjoys math or algorithms they might find C++/Java more intuitive to them. If a student has a background in electrical they might find LabVIEW more intuitive to them.

Quote:
Originally Posted by carrillo694 View Post
If the answer is "some," then I would go with Java, because its WPIlib implementation seems simpler than the C++ implementation, which makes it easier to learn.
I don't think this is entirely correct, the components inside the WPILib for Java and C++ are abstracted at essentially the exact same level - it's really about which ever language you're more comfortable with.
  #12   Spotlight this post!  
Unread 06-03-2012, 11:57
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,077
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Advantages of each programming language

I would argue that starting from scratch, it is easier for a student programmer to use Java (for FRC) than C++ (for FRC).

I cannot count the number of times I have been asked to help a team with C++ and seen problems like the following...

Code:
Victor myVictor(1);

myVictor->set(0.0); // Error!
Code:
Victor *myVictor = new Victor(1);

myVictor.set(0.0); // Error!
Code:
Victor *myVictor;

myVictor->set(0.0); // Error!  You declared, but did not substantiate, your Victor!
Code:
void SomeFunction(Victor victor)
{
victor.set(0.0);
}

Victor *myVictor = new Victor(1);

SomeFunction(myVictor); // Error!
Code:
void SomeFunction(Victor victor)
{
victor.set(0.0);
}

Victor myVictor(1);

SomeFunction(myVictor); // Still an Error!  You are making a copy of your Victor!
In Java you don't have to worry about objects on the stack vs. the heap (they are all on the heap), pass by reference vs. pass by value (always pass by value, even if your "value" is itself a reference to an object), memory leaks, C++ name mangling in compiler errors, initializing static class members outside of the class declaration, etc.

Last edited by Jared Russell : 06-03-2012 at 16:21. Reason: Java does not pass by reference
  #13   Spotlight this post!  
Unread 13-03-2012, 23:38
blackflame2996's Avatar
blackflame2996 blackflame2996 is offline
Alumni
AKA: David Donahue
FRC #2996 (Cougars Gone Wired)
Team Role: Alumni
 
Join Date: Nov 2011
Rookie Year: 2011
Location: Colorado springs, CO
Posts: 67
blackflame2996 is a name known to allblackflame2996 is a name known to allblackflame2996 is a name known to allblackflame2996 is a name known to allblackflame2996 is a name known to allblackflame2996 is a name known to all
Re: Advantages of each programming language

Quote:
Originally Posted by Ziv View Post
Code:
if(youKnowAnyLanguage) {
    use(theLanguageYouKnow);
} else {
    read(WPILibCookbook);
    if(youUnderstoodAnyOfThat) {
        use(java); // C++ is an option, but it's a bit fiddly.
    } else {
        use(labview);
    }
}
An experienced FRC programmer using Java (and presumably any other language) can get a passable program running in a matter of hours, not days. Nevertheless, start learning and/or coding ASAP!
nice.
__________________
2009 Regional Winners
2011 Regional Chairman's Award
2012 Regional Winners
2013 Regional Chairman's Award
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


All times are GMT -5. The time now is 01:22.

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