OCCRA
Go to Post #TeamFrank - Libby K [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

 
Reply
Thread Tools Rate Thread Display Modes
  #31   Spotlight this post!  
Unread 05-15-2017, 08:22 PM
TimTheGreat's Avatar
TimTheGreat TimTheGreat is offline
ArchdukeTim
FRC #1418 (Vae Victis)
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Falls Church
Posts: 278
TimTheGreat is a splendid one to beholdTimTheGreat is a splendid one to beholdTimTheGreat is a splendid one to beholdTimTheGreat is a splendid one to beholdTimTheGreat is a splendid one to beholdTimTheGreat is a splendid one to beholdTimTheGreat is a splendid one to behold
Re: Programming Language selection Pro's and Cons

Quote:
Originally Posted by lriddick View Post
.
what i need is speed, flexibility, and debugging capability.
All languages will give you the speed you need unless you're doing something really advanced, or more likely, something wrong.


Debugging is a hard thing to compare. Print statements are great, but C++ doesn't give stack traces by default so a bit harder that way. Both java and python do.
__________________
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.



2012 - Gracious Professionalism - Greater DC
2014 - Regional Finalist - Virginia | Industrial Design - Virginia | Regional Finalist - Greater DC
2015 - Innovation in Control - Greater DC
2016 - District Event Winner - VAHAY | Innovation in Control - VAHAY | District Event Winner - MDBET | Industrial Design - MDBET | District Champion - CHCMP | Innovation in Control - CHCMP
Reply With Quote
  #32   Spotlight this post!  
Unread 05-15-2017, 08:30 PM
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,773
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: Programming Language selection Pro's and Cons

Quote:
Originally Posted by TimTheGreat View Post
Also, helping someone remotely is hard with labview. With text based languages you can type out some example code. You can't do that with labview.
That's not really true. Any pseudocode easy enough to type out is easy to wire up in LabVIEW.

Every year or two we see this thread started, and every one ends the same way. It's almost like political parties. Sheesh. (Not directed at you Tim, just at the general direction these threads always take).

Tim's last statement is truth. If you're looking for a competitive advantage in one language over another - there isn't.

Last edited by Tom Line : 05-15-2017 at 08:32 PM.
Reply With Quote
  #33   Spotlight this post!  
Unread 05-15-2017, 08:39 PM
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,680
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Programming Language selection Pro's and Cons

Quote:
Originally Posted by TimTheGreat View Post
helping someone remotely is hard with labview. With text based languages you can type out some example code. You can't do that with labview.
Quote:
Originally Posted by Tom Line View Post
That's not really true. Any pseudocode easy enough to type out is easy to wire up in LabVIEW.
Tim clarified his point in a subsequent post, and he seems to have a valid point:

Quote:
Originally Posted by TimTheGreat View Post
But that means I have to have labview installed, open it up, and create the code.

With python I can just type out what I need to in a few seconds. I can do it from any computer, including one that doesn't have python installed.
Reply With Quote
  #34   Spotlight this post!  
Unread 05-17-2017, 09:08 AM
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,835
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: Programming Language selection Pro's and Cons

I've been out of pocket and just catching up on this thread.

At almost every regional, I saw teams surprised by integration issues with coprocessors, in various languages. Can you please provide details that caused you to call this out with LV?

Greg McKaskle
Reply With Quote
  #35   Spotlight this post!  
Unread 05-17-2017, 09:33 AM
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,680
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Programming Language selection Pro's and Cons

Quote:
Originally Posted by Greg McKaskle View Post
I've been out of pocket and just catching up on this thread.

At almost every regional, I saw teams surprised by integration issues with coprocessors, in various languages. Can you please provide details that caused you to call this out with LV?

Greg McKaskle
For those of you not using threaded display mode, Greg seems to be referring to this post.



Reply With Quote
  #36   Spotlight this post!  
Unread 05-17-2017, 10:28 AM
marshall's Avatar
marshall marshall is offline
Discerning and exacting individual
FRC #0900 (The Zebracorns)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2003
Location: North Carolina
Posts: 1,846
marshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond repute
Re: Programming Language selection Pro's and Cons

Quote:
Originally Posted by Greg McKaskle View Post
I've been out of pocket and just catching up on this thread.

At almost every regional, I saw teams surprised by integration issues with coprocessors, in various languages. Can you please provide details that caused you to call this out with LV?

Greg McKaskle
So I'm not saying it is an issue because I know for a fact it isn't, having done it successfully for the past like 4 years BUT I suspect a lot of confusion comes from the fact that these embedded systems largely aren't targets for LV deployment.

A lot of LV teams seem to think that they can just use LV to program everything and that's not the case sadly. In general though, I feel like as more teams want external systems the number of examples for how to get teams to do that needs to increase. There isn't enough 1st party documentation for how to do it or at least it's not well known.

For what it's worth, I think ROS makes this A LOT less of a challenge compared to WPILib... not that those two are really comparable but I guess they kinda are?
__________________
"La mejor salsa del mundo es la hambre" - Miguel de Cervantes
"The future is unwritten" - Joe Strummer
"Simplify, then add lightness" - Colin Chapman
Clarke's Laws
Reply With Quote
  #37   Spotlight this post!  
Unread 05-18-2017, 06:58 AM
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,835
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: Programming Language selection Pro's and Cons

I agree that documentation would go a long way. I was just wondering where the stumbles and/or bugs are.

Greg McKaskle
Reply With Quote
  #38   Spotlight this post!  
Unread 05-18-2017, 09:09 AM
JesseK's Avatar
JesseK JesseK is offline
Expert Flybot Crasher
FRC #1885 (ILITE)
Team Role: Mentor
 
Join Date: Mar 2007
Rookie Year: 2005
Location: Reston, VA
Posts: 3,958
JesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond repute
Re: Programming Language selection Pro's and Cons

For C++ & Java, there are ways do address the shortcomings of each language when compared to the others. For example, great logging and a rock-solid build system can more than make up for C++'s lack of human-readable coding errors. It's enough to allow large groups of concurrent developers to program advanced science integrations for large systems like ships & planes. Proper object re-use, threading awareness, and JVM startup parameter tuning can lead to a Java program which is capable of low-footprint high frequency trading if it's left as raw Java (i.e. no JNI...).

At my prior job, I noticed one thing that C/C++ has, which Java does not, is a (paid) advanced programming API from Intel. This type of thing can also be a determining factor when choosing a language for something specific, like a mechatronic control framework I see some teams use.

If the desire is to get as close to real-time as possible in FRC, C++ is the eventual winner due to the Java wpilib JNI taking up a few dozen microseconds. Only the top 0.5% are concerned with it though, since understanding why it's important means a team needs to address the learning curve & time investment for the advanced control libraries in addition to the basics of programming.

With that said,

Quote:
Originally Posted by Jaci View Post
C++
Commonly seen as the "most difficult" programming language, that is easy to "shoot yourself in the foot" with, C++ is really not as bad as many people talk it up to be. Sure, there's more to be aware of, you can't just hand out heap memory willy-nilly, but this is a caveat that comes with low-level programming. C++ will give you the best performance, efficiency, and teach some very important coding practices for those that want to go into mechatronics, embedded systems engineering, or other related fields.

Java
Java is the most used language in the FRC community. Part of this success is related to its common use in schools, and its apparent ease of development. Although Java hogs memory and CPU time, most teams don't require extra performance or efficiency.

LabVIEW
LabVIEW is commonly seen as the outcast of the 3 official languages, being a proprietary visual language from National Instruments. As with many things, the loudest opinions on LabVIEW come from those who have no idea how it works or what it does. There are some benefits to LabVIEW, so let's take a look.
This is easily the most-concise differentiation from an FRC perspective I've seen.
__________________

Drive Coach, 1885 (2007-present)
Latest Project: Codex-based FRC Comms in Java

2017: Scoring Model | COPR Rank Simulator
1885: YouTube Channel | CAD Library | GitHub
Reply With Quote
  #39   Spotlight this post!  
Unread 05-19-2017, 08:22 AM
SamcFuchs's Avatar
SamcFuchs SamcFuchs is offline
Programmer
AKA: Sam Fuchs
FRC #0236 (TechnoTicks)
Team Role: Programmer
 
Join Date: Aug 2015
Rookie Year: 2014
Location: Old Lyme, Connecticut
Posts: 125
SamcFuchs has much to be proud ofSamcFuchs has much to be proud ofSamcFuchs has much to be proud ofSamcFuchs has much to be proud ofSamcFuchs has much to be proud ofSamcFuchs has much to be proud ofSamcFuchs has much to be proud ofSamcFuchs has much to be proud of
Re: Programming Language selection Pro's and Cons

Jaci's FRC programming boogaloo post was always my go-to for this question, but she has since taken it down. If anyone knows where we could find an archive of it, that would be great.
__________________
Sam Fuchs
236 TechnoTicks, Old Lyme, CT






2015 - Programming, Electrical
2016 - Lead Programmer, Co-Driver
2017 - Lead Programmer, Co-Driver
Reply With Quote
  #40   Spotlight this post!  
Unread 05-19-2017, 10:49 PM
Jaci's Avatar
Jaci Jaci is offline
http://imjac.in/ta/name
AKA: Jaci R Brunning
FRC #5333 (Can't C#) #5663 (Ground Control) | (OpenRIO, FRC West Aus)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Perth, Western Australia
Posts: 434
Jaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond repute
Re: Programming Language selection Pro's and Cons

Quote:
Originally Posted by SamcFuchs View Post
Jaci's FRC programming boogaloo post was always my go-to for this question, but she has since taken it down. If anyone knows where we could find an archive of it, that would be great.
I've taken it down since there have been a lot of changes in the FRC software pipeline since I first wrote it. I'm planning to write another one at some point but I did reply to this post earlier with a summary more geared towards what OP was asking
__________________
Jacinta R

Curtin FRC (5333+5663) : Mentor, Former [Captain | Programmer | Driver]
OpenRIO : Owner

Website | Twitter | Github
jaci.brunning@gmail.com
Reply With Quote
  #41   Spotlight this post!  
Unread 05-28-2017, 12:00 PM
DanChef DanChef is offline
Registered User
no team
 
Join Date: May 2017
Location: Poland
Posts: 1
DanChef is an unknown quantity at this point
Re: Programming Language selection Pro's and Cons

In my opinion if I have another change to choose programming language I will go for C++, its fast, popular and you will find a job if you know C++. I have few friend and they said that it's easy to learn and Another thing is if you know one of the programming language you will learn other easily, but its up to you
Reply With Quote
  #42   Spotlight this post!  
Unread 05-28-2017, 12:08 PM
TimTheGreat's Avatar
TimTheGreat TimTheGreat is offline
ArchdukeTim
FRC #1418 (Vae Victis)
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Falls Church
Posts: 278
TimTheGreat is a splendid one to beholdTimTheGreat is a splendid one to beholdTimTheGreat is a splendid one to beholdTimTheGreat is a splendid one to beholdTimTheGreat is a splendid one to beholdTimTheGreat is a splendid one to beholdTimTheGreat is a splendid one to behold
Re: Programming Language selection Pro's and Cons

Quote:
Originally Posted by DanChef View Post
In my opinion if I have another change to choose programming language I will go for C++, its fast, popular and you will find a job if you know C++. I have few friend and they said that it's easy to learn and Another thing is if you know one of the programming language you will learn other easily, but its up to you
In my opinion if I have another change to choose programming language I will go for Java/Python. They're fast, popular and you will find a job if you know Java/Python. I have few friend and they said that they're easy to learn and Another thing is if you know one of the programming language you will learn other easily, but its up to you

You could say this about lots of languages these days. There is a demand for every language if you know where to look.
__________________
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.



2012 - Gracious Professionalism - Greater DC
2014 - Regional Finalist - Virginia | Industrial Design - Virginia | Regional Finalist - Greater DC
2015 - Innovation in Control - Greater DC
2016 - District Event Winner - VAHAY | Innovation in Control - VAHAY | District Event Winner - MDBET | Industrial Design - MDBET | District Champion - CHCMP | Innovation in Control - CHCMP
Reply With Quote
  #43   Spotlight this post!  
Unread 05-28-2017, 10:15 PM
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: 848
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: Programming Language selection Pro's and Cons

Quote:
Originally Posted by JesseK View Post
If the desire is to get as close to real-time as possible in FRC, C++ is the eventual winner due to the Java wpilib JNI taking up a few dozen microseconds. Only the top 0.5% are concerned with it though, since understanding why it's important means a team needs to address the learning curve & time investment for the advanced control libraries in addition to the basics of programming.
real-time isn't about speed. It's about consistency. I forget who told me the story, but someone was working on a huge RT system. They had a deadline of 2.5 minutes, but could *not* miss that timing. That's just as real-time as a 1 khz control loop.

The challenge with Java in a RT environment is that you can't strictly bound the amount of time that the garbage collector takes. Most of the time, it's fast enough that you won't notice. Sometimes, it'll take 5-10 milliseconds. That lack of determinism is what makes it challenging. LV and C++ don't have that challenge. Python and most other non-compiled languages do.

That all being said, unless you are pushing the limits on the control system, you likely won't notice and should prioritize other things.
Reply With Quote
  #44   Spotlight this post!  
Unread 05-29-2017, 12:23 AM
AlexanderTheOK AlexanderTheOK is offline
Guy
no team
 
Join Date: Jan 2014
Rookie Year: 2012
Location: Los Angeles
Posts: 176
AlexanderTheOK has much to be proud ofAlexanderTheOK has much to be proud ofAlexanderTheOK has much to be proud ofAlexanderTheOK has much to be proud ofAlexanderTheOK has much to be proud ofAlexanderTheOK has much to be proud ofAlexanderTheOK has much to be proud ofAlexanderTheOK has much to be proud ofAlexanderTheOK has much to be proud ofAlexanderTheOK has much to be proud of
Re: Programming Language selection Pro's and Cons

Quote:
Originally Posted by TimTheGreat View Post
In my opinion if I have another change to choose programming language I will go for Java/Python. They're fast, popular and you will find a job if you know Java/Python. I have few friend and they said that they're easy to learn and Another thing is if you know one of the programming language you will learn other easily, but its up to you

You could say this about lots of languages these days. There is a demand for every language if you know where to look.
Perhaps my field is just a bit narrower, but I'm not seeing as much java any more in the data science community at least. Everything seems to be moving to a c/c++ Python workflow, with room for some more niche stuff like scala and Julia depending on what you're working on.
Reply With Quote
  #45   Spotlight this post!  
Unread 05-30-2017, 02:45 PM
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,228
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Programming Language selection Pro's and Cons

Quote:
Originally Posted by AlexanderTheOK View Post
Perhaps my field is just a bit narrower, but I'm not seeing as much java any more in the data science community at least. Everything seems to be moving to a c/c++ Python workflow, with room for some more niche stuff like scala and Julia depending on what you're working on.
"big" data stuff seems to almost entirely be done with Java/scala (hadoop, spark, etc).
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python), pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript), and lots more...

2017 Season: Teams #1973, #4796, #6367
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
Reply


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 10:00 PM.

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