Go to Post So yeah, everyone please remember that lathes are one of the most dangerous machine tools you'll encounter. And keep your hand on the chuck key whenever it's in the chuck. If you never let it go till it's out of the chuck, it's stupendously less likely to take flight. - Kevin Sevcik [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 15-03-2013, 14:09
ykarkason ykarkason is offline
21st Century Schizoid Man
FRC #3316 (D-Bug)
Team Role: CAD
 
Join Date: Dec 2012
Rookie Year: 2013
Location: Israel
Posts: 63
ykarkason will become famous soon enoughykarkason will become famous soon enough
Switching a Programming Language

Hi,
I'm the main programmer for my team 3316, and I've written most of the code for this season.
We were writing it in LabView.

It took me a while to get the hang of LabView but as soon as I caught it it was as easy as pie, and it was fun to write it in LabView.

Some of the past-years programmer's of my team actually looked at the code and told me it was "too elegant for Labview", and that you "should have written it in C++" and I kinda agree.

LabView is structured in a way that I'm not really used to, and my team's captain approached me and asked if I want us to switch to C++ for the next season, mainly for the new students.

I'm not pretty sure what should we do.
I know C pretty well, and learning the extras of C++ shouldn't be the problem. But I can also write a good LabView code in less of the time I would've spent in learning/relearning the WPI in C++.

However, C++ is way more used in real life then LabView and it's always good to use thing that you know that will give you a real-world skill, plus it'll be more impressive to the new students to learn C++.

So... What do you think?
  #2   Spotlight this post!  
Unread 15-03-2013, 14:21
AlexBrinister AlexBrinister is offline
Registered User
AKA: Alex Brinister
FRC #1768 (RoboChiefs)
Team Role: Alumni
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Bolton, MA
Posts: 93
AlexBrinister will become famous soon enough
Re: Switching a Programming Language

If you're fine with putting in time to learn the necessary level of C++, then go for it! It's not much though... if you use the Command-based robot template, it's ridiculously easy. You don't even need to know C++. You just copy-pasta a bunch of files...

Alex Brinister
  #3   Spotlight this post!  
Unread 15-03-2013, 16:30
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: Switching a Programming Language

LabVIEW IS used professionally, in many places. It dosen't end up in mass production things you are likely to use on a daily basis, but it's all over one-off or low volume industrial, rest, and research stuff. It's also promoted as a means for engineers who are not programmers to write code relating to things they need to do, and it's quite good at it.

That said, I use C professionally and I do like it. I personally don't like the C++ and Java programming methods we use in embedded FRC programming. If we were ever to switch to C, we would likely rewrite the majority of the library as purely procedural code (the procedural interface is wrappered around the object oriented code, not a more native interface). We've talked about this a lot and always go back to LabVIEW.

There really isn't anything that's too elegant for LabVIEW.

I suggest you stay with what you know and are good at, because you know it well and are good at 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
  #4   Spotlight this post!  
Unread 15-03-2013, 16:33
AmoryG AmoryG is offline
Registered User
FRC #2423 (KwarQs)
Team Role: Alumni
 
Join Date: Mar 2008
Rookie Year: 2008
Location: Watertown, MA
Posts: 221
AmoryG has much to be proud ofAmoryG has much to be proud ofAmoryG has much to be proud ofAmoryG has much to be proud ofAmoryG has much to be proud ofAmoryG has much to be proud ofAmoryG has much to be proud ofAmoryG has much to be proud of
Re: Switching a Programming Language

As far as I know anything you've programmed the robot to do in labview can be done in C++. I doubt switching will hold you back, so it wouldn't hurt to try. Plus, being able to code in an object oriented language is a great skill to have for any programmer! And if you're looking to become a computer science major or something similar if you go to college, learning C++ would be practical to say the least.
__________________
KwarQs 2423

2008 Boston Regional Rookie Allstars

http://whsrobot.blogspot.com/

Last edited by AmoryG : 15-03-2013 at 16:37.
  #5   Spotlight this post!  
Unread 15-03-2013, 18:28
JohnGilb JohnGilb is offline
Programming Mentor, Drive Mentor
FRC #0488
 
Join Date: Mar 2011
Rookie Year: 2003
Location: Redmond, WA
Posts: 116
JohnGilb has a spectacular aura aboutJohnGilb has a spectacular aura aboutJohnGilb has a spectacular aura about
Re: Switching a Programming Language

If you're looking to switch programming languages, the best advice I can give you is to re-program your entire robot in the new language during the off-season.

Having to ramp up on a new language's foibles while the Electrical/Mechanical teams need things tested _right away_ will lead to a lot of stress and complication. Your team will be more competitive if you enter the season forearmed with the power to program a robot in your chosen language.
  #6   Spotlight this post!  
Unread 15-03-2013, 18:39
MrRoboSteve MrRoboSteve is offline
Mentor
AKA: Steve Peterson
FRC #3081 (Kennedy RoboEagles)
Team Role: Mentor
 
Join Date: Mar 2012
Rookie Year: 2011
Location: Bloomington, MN
Posts: 582
MrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond repute
Re: Switching a Programming Language

Using this year's robot as a test bed for learning another language is an excellent idea.

If you're interested in software, it's good to know a variety of languages. LabVIEW's core scenario is in industrial and scientific scenarios.

Learning either C++ or Java as another language will introduce you to the family of textual languages descended from C. You're then positioned well for using C, C++, Java, or C#, which are used in a much larger set of scenarios than LabVIEW. I'd recommend learning Java (or C#, if you're doing something other than FRC robotprogramming) first as it's a bit more forgiving than C++.
  #7   Spotlight this post!  
Unread 16-03-2013, 05:58
Ido_Wolf's Avatar
Ido_Wolf Ido_Wolf is offline
LabVIEW Addict
AKA: Ido
FRC #2230 (General Angels)
Team Role: Alumni
 
Join Date: Feb 2011
Rookie Year: 2011
Location: Israel
Posts: 42
Ido_Wolf is an unknown quantity at this point
Re: Switching a Programming Language

As apaird said, LabVIEW is used professionally for many different purposes, personally I once had a job interview in a telecommunications hi-tech company where they use LV to test all sort of things, so my experience in LabVIEW acquired by being a FRC programmer was much more well received than the average knowledge in written programming languages of a geeky high-school graduate.

To the OP, I've noticed you're from Israel and so I'd like to point out that we've had these discussions quite a few times in some regional-centric Facebook groups. My general conclusion is that LabVIEW would probably be ideal for beginning teams (unless their head programmer is an extremely competent C++ programmer or something), and other than that it's completely up to you. Some teams may prefer LabVIEW as visual representation of the program's "flow" might make things easier when dealing with robotics, others may prefer C++ because written language makes more sense to them as a programmer (not counting the new RobotBuilder thingy that I've yet to experiment with), of course there's a bunch of pros and cons for each.

The bottom line is - our regional just ended, which means you have almost a year to experiment. Just play around with both and consider which one feels better to program with, and which one you feel more comfortable with during the testing and integration phase. If you somehow feel limited by LabVIEW, C++ might be a better choice for you. Also, if your rookie team members have some background in C++, take a month and try to teach half of the new members to write robot code in LabVIEW and the other half in C++, and see if one group does better than the other. It's important to point out that it's hard to tell which of them would be more useful in the long run, after graduating from FIRST and high school, in case you choose to continue in engineering and/or robotics.
  #8   Spotlight this post!  
Unread 16-03-2013, 10:37
ykarkason ykarkason is offline
21st Century Schizoid Man
FRC #3316 (D-Bug)
Team Role: CAD
 
Join Date: Dec 2012
Rookie Year: 2013
Location: Israel
Posts: 63
ykarkason will become famous soon enoughykarkason will become famous soon enough
Re: Switching a Programming Language

Thanks everybody,
You're right, We've got almost a year 'till next season, so I guess I'll be exprimenting until then.

Thanks!
  #9   Spotlight this post!  
Unread 16-03-2013, 11:28
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,756
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: Switching a Programming Language

Computer Science should be, and typically is, more focused on language concepts than on a particular language or tool.

I've been programming for over thirty years and I've used C/C++ more often than any other language. But C was just one introductory semester of my degree plan. Other languages were simply better for studying other concepts. Learning additional languages will often round out your view of a concept by seeing different approaches to the same concepts. The result of this approach is that you are prepared to learn and adopt new languages, even invent or extend languages if needed. There is no single ideal language, so the ability to learn and compare language features and avoid dogma and fads is a key skill to develop.

As an example, LV makes it very easy to do multitasking with less syntax and more safety. Make a parallel loop or branch a wire and you've specified that you will allow both operations to occur simultaneously. Merge the data back at a node and you have expressed a synchronization point. These operations are far more difficult and error prone using thread libraries. But of course there are concepts that are more elegant in C/C++ or in Java than in LV. Alan Turing described the elements of completeness many decades ago. All of these languages and libraries are equivalent in capability but differ in what they choose to make simple.

My advice is not the same for each person. If you want to go into computer science, try to learn two of the languages and focus on the concepts more than the syntax. If you plan on a different major, then learn one of the languages. A computer is an extremely useful tool. If you know how to program it, it is a far more useful tool. If you are a computer scientist/engineer, it is not only your tool, but also your raw material that you integrate and shape into whatever you need to deliver.

While the materials for FRC may be sufficient, good books are worth their weight in precious metals. I won't attempt to recommend a particular book, but if you are wanting to learn LV and how it is used in engineering, here is a somewhat dated, but still valuable list. http://hannahsmac.magnet.fsu.edu/lab...viewbooks.html

If you are able to program a robot in both LV and C, you are off to a great start, and your desire to teach others on you team is a great approach to building a sustainable team. Good luck with it, and if you have any other questions please ask.

Greg McKaskle
  #10   Spotlight this post!  
Unread 17-03-2013, 12:38
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,113
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: Switching a Programming Language

Quote:
Originally Posted by ykarkason View Post
However, C++ is way more used in real life then LabView and it's always good to use thing that you know that will give you a real-world skill, plus it'll be more impressive to the new students to learn C++.
C++ might be more common in the real world among professional (and amateur) programmers, but LabVIEW is certainly widespread. It's used in many applications by engineers who aren't necessarily programmers by trade or training. Knowledge of LabVIEW is sort of a "hidden" skill that doesn't show up in a lot of job requirements, because it's not understood as anything special by the people who write the requirements.

If you're planning to enter the job market as a programmer, you should certainly know C++. But you should just as certainly know languages in other categories, like Python and LabVIEW.
  #11   Spotlight this post!  
Unread 17-03-2013, 15:45
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: Switching a Programming Language

For programmers, I also highly suggest learning multiple programming paradigms. Object-oriented programming isn't good for everything, there are some cases where it is in fact a very bad choice of programming method. LabVIEW is considered data-flow (quite similar to functional programming), C++ and Java are both object-oriented, and C is procedural. All three types are good to know. You can then pick the right software architecture for your application and write clean, efficient code in whatever method and language is right for your application.

I still personally think LabVIEW is great for what we do in FRC. It might not be the best option for some other programming projects, but it fits well with the architecture and requirements we see in FRC.
__________________
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
  #12   Spotlight this post!  
Unread 17-03-2013, 20:42
mlbernardoni mlbernardoni is offline
Registered User
FRC #2704
 
Join Date: Mar 2011
Location: Batavia, IL
Posts: 11
mlbernardoni is on a distinguished road
Re: Switching a Programming Language

This year we started the switch to C++ (Team 2704). We have set up a training curriculum using NXT robots. (At any given time, we don't have robots for all students to have a robot to program. We developed this training program so every student would have a robot to code.).

The training program was very successful. Everything in the curriculum was directly applicable to FRC C++ programming. In fact, we made the switch this year and the robot is programmed in C++.

It was so successful, we posted our curriculum on www.firstplusplus.com for anyone to use it.

Please respond on that site if you have any questions.
  #13   Spotlight this post!  
Unread 17-03-2013, 20:54
apples000's Avatar
apples000 apples000 is offline
Registered User
no team
 
Join Date: Mar 2012
Rookie Year: 2012
Location: United States
Posts: 222
apples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant future
Re: Switching a Programming Language

Since the introduction of the cRIO in 2009, our team has been changing languages almost every year. In 09-10 we used LV, then we switched to C++ in 11, back to LV in 12, and finally to Java in 2013. In the offseason, we experiment with all three. Since our programming mentors are fluent in all three languages and enjoy programming in each, we enjoy changing languages every year. It gives the students much more experience and they learn different styles of programming very easily. In my opinion, since the idea is to educate/inspire students, switching languages is a good thing. If you are testing a language in the off season and you don't like it, you can always switch back.
  #14   Spotlight this post!  
Unread 17-03-2013, 21:02
mathking's Avatar
mathking mathking is offline
Coach/Faculty Advisor
AKA: Greg King
FRC #1014 (Dublin Robotics aka "Bad Robots")
Team Role: Teacher
 
Join Date: Jan 2005
Rookie Year: 1999
Location: Columbus, OH
Posts: 642
mathking has a reputation beyond reputemathking has a reputation beyond reputemathking has a reputation beyond reputemathking has a reputation beyond reputemathking has a reputation beyond reputemathking has a reputation beyond reputemathking has a reputation beyond reputemathking has a reputation beyond reputemathking has a reputation beyond reputemathking has a reputation beyond reputemathking has a reputation beyond repute
Re: Switching a Programming Language

Thank you Greg for this paragraph:

Quote:
Originally Posted by Greg McKaskle View Post
As an example, LV makes it very easy to do multitasking with less syntax and more safety. Make a parallel loop or branch a wire and you've specified that you will allow both operations to occur simultaneously. Merge the data back at a node and you have expressed a synchronization point. These operations are far more difficult and error prone using thread libraries. But of course there are concepts that are more elegant in C/C++ or in Java than in LV. Alan Turing described the elements of completeness many decades ago. All of these languages and libraries are equivalent in capability but differ in what they choose to make simple.
Greg McKaskle
__________________
Thank you Bad Robots for giving me the chance to coach this team.
Rookie All-Star Award: 2003 Buckeye
Engineering Inspiration Award: 2004 Pittsburgh, 2014 Crossroads
Chairman's Award: 2005 Pittsburgh, 2009 Buckeye, 2012 Queen City
Team Spirit Award: 2007 Buckeye, 2015 Queen City
Woodie Flowers Award: 2009 Buckeye
Dean's List Finalists: Phil Aufdencamp (2010), Lindsey Fox (2011), Kyle Torrico (2011), Alix Bernier (2013), Deepthi Thumuluri (2015)
Gracious Professionalism Award: 2013 Buckeye
Innovation in Controls Award: 2015 Pittsburgh
Event Finalists: 2012 CORI, 2016 Buckeye
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 03:20.

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