Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   What programming Language To Use?? (http://www.chiefdelphi.com/forums/showthread.php?t=98215)

13or13 11-11-2011 12:48

What programming Language To Use??
 
Hey guy i have a question
what program language should we use this year.
our programer is very good in C Language but he is the only one who know how to use it so what your opinion should we use LabView this year or C++.

theprgramerdude 11-11-2011 13:01

Re: What programming Language To Use??
 
So, to be clear, is there only one programmer? If that's the case, and he knows C very well, then it's logical to use C++ instead of something else that he's not as good with.

In the end, there really aren't that many differences between the functionality of each language, so it's best to use whatever the programmer(s) are comfortable using.

Ashley Painter 12-11-2011 12:54

Re: What programming Language To Use??
 
If anyone on your team has played with Lego Mindstorm then LabView is not very hard to use or to learn. But basically whatever langue you use, make sure your programmers learn it before kickoff.
Oh also if your programmer/s have only programmed in text based programming languages then LabView is not a good choice. Because while there are a lot of similarities between the two styles programming in a picture based programming language requires thinking about the programming differently. LabView programming ends up being very similar to making a tiered cake while text based programming is more like writing an instruction manual.

Foster 12-11-2011 18:15

Re: What programming Language To Use??
 
This is one of the more popular questions asked on Chief Delphi. Try using the search function for looking at threads in the last three years that discuss the pros and cons of Labview, Java, C++, Python, Lua and my favorite Robot COBOL. (Ok, so there isn't a robot COBOL).

But in prior years people have written about the issues around Mentors that know/don't know the languages, mentors that are new to robot programming, and the same set about students.

Take a look at them and then come back and ask your specific questions.

Thanks!

rzoeller 12-11-2011 23:16

Re: What programming Language To Use??
 
Although my answer is biased (We use LV), I would say use whatever the majority of your programming team is familiar with. If it is just him, have someone younger shadow him - so that when he is gone your programming team isn't. One of the worst things that could happen IMO is that he leaves the team and not a single person can utilize and read the past code - especially if you want to modify something for off-season or use the code as a base later on. Labview allows us to focus on programming concepts and getting the ideas down - we aren't forced to deal with debugging syntax errors (and as someone who programs in C++ regularly, I can tell you that you will spend a lot of time doing just that.)

Andrew Lawrence 12-11-2011 23:38

Re: What programming Language To Use??
 
Your ONE programmer knows C.

If this ONE programmer is the only ONE who will program this year, then C++ is the way to go.

If you are planning on having more programmers, especially those who haven't programmed much before, then LABView is an easy language to learn, so I hear.

OR, if your current ONE programmer is capable and willing, they could teach others how to program C++, however it is tough to find a good teacher in most students when it comes to programming C++.

Notice the ONE word I put in all caps? My little bit of advice to you: If you can, have more than ONE programmer. It's an important job that requires lots of work and skill, and for some strange reason robots won't run without it. :p

13or13 13-11-2011 09:48

Re: What programming Language To Use??
 
Quote:

Originally Posted by SuperNerd256 (Post 1084864)
Your ONE programmer knows C.

If this ONE programmer is the only ONE who will program this year, then C++ is the way to go.

If you are planning on having more programmers, especially those who haven't programmed much before, then LABView is an easy language to learn, so I hear.

OR, if your current ONE programmer is capable and willing, they could teach others how to program C++, however it is tough to find a good teacher in most students when it comes to programming C++.

Notice the ONE word I put in all caps? My little bit of advice to you: If you can, have more than ONE programmer. It's an important job that requires lots of work and skill, and for some strange reason robots won't run without it. :p

we know we need more than one programmer we have one and more three that need to learn we wanted to know what program is easier to learn

Jon236 13-11-2011 09:56

Re: What programming Language To Use??
 
With the templates provided, you will find that you can program a robot easily in any of the 3 languages supported. I have found that debugging is easier in Labview. You should also look to the teams nearby. It is important for FRC teams to help each other, so ask!

13or13 13-11-2011 10:10

Re: What programming Language To Use??
 
ok thank you

ahollenbach 13-11-2011 10:27

Re: What programming Language To Use??
 
Because the language you choose is [usually] the first language your programmers will learn in, I would recommend against LabView, but if you can't get a mentor or student who knows a different language, then LV is the way to go until you train students in a different language.

Ether 13-11-2011 12:36

Re: What programming Language To Use??
 
Quote:

Originally Posted by ahollenbach (Post 1084892)
Because the language you choose is [usually] the first language your programmers will learn in, I would recommend against LabView

Why? The conclusion doesn't follow logically from the premise. It seems you've left a step or two out of your argument.



Chris27 13-11-2011 16:39

Re: What programming Language To Use??
 
Quote:

Originally Posted by Ether (Post 1084898)
Why? The conclusion doesn't follow logically from the premise. It seems you've left a step or two out of your argument.


The programming paradigms imposed by the first language a programmer learns solidifies a certain mindset in how that programmer approaches programming problems. Speaking as a computer scientist, I found learning a functional programming language (SML) a completely bizarre experience (pretty much all values, data structures are immutable, there is no iteration, all functions and data structures are recursively defined, functions are 1st class values and then you have continuations, currying, closures, lazy evaluation etc). Basically, SML turned my view of programming upside down and I had to unlearn a lot of the different strategies and concepts I had picked up using C, C++, and Java to effectively use this new tool. I would say the difference between Labview (data flow programming) the C (procedural), or Java C++ (Object oriented programming) or SML, LISP (functional) is quite a bit greater then the differences then these languages have between themselves (especially concerning C like languages). OOP languages are used much more often in both academic and industry environments then Labview. The opinion I hold now as a software engineer is that it would have been a mistake if I had started my venture into the programming world with Labview.

To address the original poster, I vote for Scala :p.

Ether 13-11-2011 17:27

Re: What programming Language To Use??
 
Quote:

Originally Posted by Chris27 (Post 1084908)
I found learning a functional programming language (SML) a completely bizarre experience ... I had to unlearn a lot of the different strategies and concepts I had picked up using C, C++, and Java to effectively use this new tool.

Isn't the converse also true ? Had you learned SML first, you would have had the same issue when learning C, C++, Java ? So if you're going to have to learn both, does the order matter ?



Ether 13-11-2011 17:30

Re: What programming Language To Use??
 
Quote:

Originally Posted by Chris27 (Post 1084908)
The programming paradigms imposed by the first language a programmer learns solidifies a certain mindset in how that programmer approaches programming problems ... I had to unlearn a lot of the different strategies and concepts I had picked up ... OOP languages are used much more often in both academic and industry environments then Labview.

@ ahollenbac: Is this what you had in mind Andrew?

Or did you have something else in mind?




Chris27 13-11-2011 18:03

Re: What programming Language To Use??
 
Quote:

Originally Posted by Ether (Post 1084911)
Isn't the converse also true ? Had you learned SML first, you would have had the same issue when learning C, C++, Java ? So if you're going to have to learn both, does the order matter ?


I'm still much more comfortable with Java (OOP) so I would say yes it does matter. Also, being skilled in using Java holds a lot more weight then an obscure language such as SML. Not being comfortable with C, C++, or Java will make scoring an internship at a software company much harder. In the current job climate, graduating from a CS or Software Engineering program without any industry experience is not going to make finding a job easy. As an interviewer, a candidate without any industry experience would make me uneasy. I'd say that being comfortable with an OOP language is much more of a necessity then a functional language although learning a functional language does help expand on a lot of CS concepts.

Jon236 13-11-2011 18:29

Re: What programming Language To Use??
 
Folks,

Bear in mind here that the object of FIRST is not to produce software engineers; it is to inspire kids to get interested in STEM careers. If we can get them hooked with Labview or Java, that's all to the good. I think the key here is not to let the kids founder. The team needs to pick a programming tool that is well supported and that a mentor can help them with. FIRST does a great job producing tools in all 3 supported languages. Every team should have a mentor (either close or on-line) that can help them succeed.

Ether 13-11-2011 18:46

Re: What programming Language To Use??
 
Quote:

Originally Posted by Ether (Post 1084911)
Isn't the converse also true ? Had you learned SML first, you would have had the same issue when learning C, C++, Java ? So if you're going to have to learn both, does the order matter ?
Quote:

Originally Posted by Chris27 (Post 1084916)
I'm still much more comfortable with Java (OOP) so I would say yes it does matter.


And you've spend the same amount of time learning/using SML as you did Java?



Chris27 13-11-2011 18:55

Re: What programming Language To Use??
 
Quote:

Originally Posted by Jon236 (Post 1084923)
Folks,

Bear in mind here that the object of FIRST is not to produce software engineers; it is to inspire kids to get interested in STEM careers. If we can get them hooked with Labview or Java, that's all to the good. I think the key here is not to let the kids founder. The team needs to pick a programming tool that is well supported and that a mentor can help them with. FIRST does a great job producing tools in all 3 supported languages. Every team should have a mentor (either close or on-line) that can help them succeed.

FIRST is also an excellent opportunity to give high school students a head start in the stem fields. If a student is thinking about doing programming for a living and going into a CS or similar program when he/she graduates, then giving them an opportunity to start learning a standard programming language such as C++ or Java will enable them to hit the ground running when college comes around much more so then having them learn Labview.

Chris27 13-11-2011 18:57

Re: What programming Language To Use??
 
Quote:

Originally Posted by Ether (Post 1084926)
And you've spend the same amount of time learning/using SML as you did Java?


No. But If I had spent my early years at college working with SML over a language such as Java, it would have made getting an internship really hard.

Ether 13-11-2011 19:07

Re: What programming Language To Use??
 
Quote:

Originally Posted by Chris27 (Post 1084929)
If a student is thinking about doing programming for a living and going into a CS or similar program when he/she graduates, then giving them an opportunity to start learning a standard programming language such as C++ or Java will enable them to hit the ground running when college comes around much more so then having them learn Labview.

If that had been stipulated at the outset the dialog would have been a bit different I think.


Ether 13-11-2011 19:12

Re: What programming Language To Use??
 
Quote:

Originally Posted by Chris27 (Post 1084934)
No.

I think that, rather than the order in which the languages were studied, would explain why you are still much more comfortable with Java (OOP).


Quote:

Originally Posted by Chris27 (Post 1084934)
But If I had spent my early years at college working with SML over a language such as Java, it would have made getting an internship really hard.

Likely true, but not germane to the "order" question.


Chris27 13-11-2011 19:38

Re: What programming Language To Use??
 
Quote:

Originally Posted by Ether (Post 1084939)
I think that, rather than the order in which the languages were studied, would explain why you are still much more comfortable with Java (OOP).

A large part of it is that OOP is what I use on a day to do basis. Also, the various routine algorithms and data structures I have learned through getting a CS degree has for the most part been through the lens of OOP and shapes how I understand them. To think about these concepts in another programming paradigm would take more effort.

Quote:

Likely true, but not germane to the "order" question.

Switching from one programming paradigm to another requires a period of "unlearning" things. Accomplishing a routine task in the new paradigm could very well make the old way you are use to doing it invalid or not optimal and it will take some effort to break the habit.

Ether 13-11-2011 19:52

Re: What programming Language To Use??
 
Quote:

Originally Posted by Chris27 (Post 1084950)
A large part of it is that OOP is what I use on a day to do basis. Also, the various routine algorithms and data structures I have learned through getting a CS degree has for the most part been through the lens of OOP and shapes how I understand them. To think about these concepts in another programming paradigm would take more effort.

Switching from one programming paradigm to another requires a period of "unlearning" things. Accomplishing a routine task in the new paradigm could very well make the old way you are use to doing it invalid or not optimal and it will take some effort to break the habit.

Nothing I've posted here previously was intended to take issue with anything stated above. I think we are in agreement on those points.

Person "A" learns SML as a first language (for one year) and then studies C++ for three years.

Person "B" learns C++ as a first language for three years, then studies SML for one year.

I'd say order doesn't matter, or if it did, then it's arguable which Person is better off.




Chris27 13-11-2011 20:06

Re: What programming Language To Use??
 
Quote:

Originally Posted by Ether (Post 1084952)
Nothing I've posted here previously was intended to take issue with anything stated above. I think we are in agreement on those points.

Person "A" learns SML as a first language (for one year) and then studies C++ for three years.

Person "B" learns C++ as a first language for three years, then studies SML for one year.

I'd say order doesn't matter, or if it did, then it's arguable which Person is better off.



If both person A and B are both first venturing into programming, they will not be able to learn a language in a year. Being able to code something in a language is much short of having a deep understanding of it. One year isn't a whole lot of time so yes, there probably won't be that great of a difference between person A and B. However, If say person A started with SML for 3 years and then continued with C++ for 3 years and person B did the converse, I guarantee you that if you posed the same programming problem to each person afterwards, they would approach the problem in very different ways.

Ether 13-11-2011 20:26

Re: What programming Language To Use??
 
Quote:

Originally Posted by Chris27 (Post 1084955)
If both person A and B are both first venturing into programming, they will not be able to learn a language in a year.


Person C uses LabVIEW for FRC programming for three years, then goes to college and studies C++ for four years.

Person L uses C++ for FRC programming for three years, then goes to college and studies LabVIEW for four years.




Jon236 13-11-2011 21:10

Re: What programming Language To Use??
 
To move the conversation away from the particular, think about programming languages as just that, languages. The universal language is, of course, mathematics. Each programming language is another way to express those relationships. Granted they are different, but I disagree that learning another language requires 'unlearning'. I think the power of learning additional languages is the capacity to get your mind around problems in different ways. Different problems require different tools. I would think a company would rather hire a multi-lingual programmer who can find the best solution for a given problem.

My son, a FIRSTer who is now an ME at Electric Boat, learned C for FIRST, Labview at WPI, then used an Arduino for his capstone project. When a certain problem required a unique approach, he was the only ME in his group with the requisite programming skills to handle the problem.

So look at learning a number of programming languages as building a toolkit for your future!

Alan Anderson 13-11-2011 21:26

Re: What programming Language To Use??
 
Quote:

Originally Posted by Chris27 (Post 1084955)
If both person A and B are both first venturing into programming, they will not be able to learn a language in a year.

Do you really think it takes that long to learn a programming language, Chris? That would explain a lot of why you think it's a bad idea to learn what you consider a "nonstandard" language.

Learning the fundamentals of any programming language (not counting things like BEFUNGE or Kipple) can be done in a few days, and it shouldn't take more than a month of appropriate exercise for someone to become productive. In my experience as a team mentor, learning enough LabVIEW to program an FRC robot takes less than two weeks for someone who wants to learn but has no previous programming experience. I've never watched anyone use C++ in the same situation, but I can't imagine it taking much longer.

The biggest thing I think you're missing is that learning two markedly different languages is a good thing. I agree with whoever it was who said that the most important programming language someone can learn is their second one.

Chris27 13-11-2011 23:38

Re: What programming Language To Use??
 
Quote:

Originally Posted by Alan Anderson (Post 1084979)
Do you really think it takes that long to learn a programming language, Chris?

To master an entirely new language, I would say it typically requires a lot more then a year. When I mean "learn" a language, I'm not talking about just learning the syntax. I would say to really master a language you need to have a much deeper understanding of that e.g. the libraries and tools that exist for the language, knowing the various nuances and pitfalls/traps of the language. Knowing a lot about how the language is implemented, what is happening in the back end etc. For instance, I wouldn't say someone knows Java if they couldn't give an in depth explanation how the Java garbage collector is implemented.

Chris27 13-11-2011 23:43

Re: What programming Language To Use??
 
Quote:

Originally Posted by Ether (Post 1084963)
Person C uses LabVIEW for FRC programming for three years, then goes to college and studies C++ for four years.

Person L uses C++ for FRC programming for three years, then goes to college and studies LabVIEW for four years.



Seriously? You believe both will graduate from college with the same set of qualifications/skill sets?

Greg McKaskle 14-11-2011 09:13

Re: What programming Language To Use??
 
In Atlanta a few years ago, I said that the most important language a CS student would learn would be their second. Without belaboring the topic, here is my justification.

By the time I started college, I only knew one language, BASIC. I had rather extensive experience in computer math, solving sets of equations using various linear algebra approaches, plotting polynomials on a screen or printer; not CS, but CM. My first college course taught C, and while I sort of knew what pointers were, I saw no real value in them until I learned C. Wow. Then I thought I knew it all. Follow-on courses were in Pascal, FORTRAN, and assembly, and honestly weren't differentiated enough to displace C as the reference language in my head.

Then I had an AI course and we were given problems that would be near impossible in C. Fortunately, we were learning lisp as the course language, and it became apparent that computers were capable of being far more than procedural machines.

As others have said, any of the languages offered in FIRST are capable and offer good learning experience. The libraries are distributed in source form, and using similar terminology and implementation. This was done to allow easier comparisons and to allow students using different tools to hopefully communicate at the level of the problem rather than at the level of the tool, thus being exposed to more tools.

In all, I'm happy that FIRST now has multiple languages actively supported. I see teams being successful in all of them and transitioning to gain different experiences.

To the original poster -- there are no bad choices. Balance the opportunities with the risks, and invest as much time and energy as you can afford into this program.

Greg McKaskle

Greg McKaskle

Ether 14-11-2011 09:30

Re: What programming Language To Use??
 
Quote:

Originally Posted by Chris27 (Post 1084987)
Seriously? You believe both will graduate from college with the same set of qualifications/skill sets?

No.

You had staked out the position that learning LabVIEW as a first language was a bad thing. The scenarios I presented were intended to illustrate the point I have been trying to make: that it's not what language you learn first that matters... it's what language you have studied in more depth and used more extensively and recently.



nssheepster 14-11-2011 09:52

Re: What programming Language To Use??
 
Guys, occasionally the long term is important. Right now, your programmer is good in C. Eventually though, he won't be on your team anymore. Java is the easiest language to use, in the long term. Windows, Mac, doesn't matter, Java will work. In addition, I've tried to work with both, and C is much harder to learn fresh than Java. If you use Java now, you can get people accustomed to it and its effects, before it becomes neccasary. If you use C, and then that guy leaves, you either need somebody to use C, or switch over your entire team. Which is less jarring? In the ed, it's your teams decision, but my vote, if I was you, would be for Java.

Alan Anderson 14-11-2011 11:00

Re: What programming Language To Use??
 
Quote:

Originally Posted by Chris27 (Post 1084950)
To think about these concepts in another programming paradigm would take more effort...Switching from one programming paradigm to another requires a period of "unlearning" things.

If you have the programming knack, it shouldn't be something that you have to do each time you "switch" between programming paradigms. It's a one-time thing that you must work through when you first encounter a novel paradigm.

Before I knew LabVIEW existed, I programmed in assembly, Fortran, BASIC, Pascal, Tcl, and C. There was indeed a bit of unlearning that I had to do before I could comfortably program with LabVIEW, but it wasn't actual programming knowledge I had to lose. I just had to give up some of my assumptions about how programming languages work. It's no harder for me to program in C++ now that I also know how to program in LabVIEW.

With my long-time and wide-ranging programming experience, I think LabVIEW is by far the easiest FRC-supported language for a beginner to use, and I see absolutely no downside to it (other than requiring a capable computer). A good mentor with experience in a different language can tip the balance to C++ or Java. With the comprehensive support provided by NI, a mentor who's willing to learn LabVIEW along with the students might be even better.

maxwellt 14-11-2011 11:27

Re: What programming Language To Use??
 
if that programmer knows C code then he should train the rookies to use it as well as himself::rtm::

virtuald 14-11-2011 13:56

Re: What programming Language To Use??
 
Do it in Python, its way easy to learn and definitely usable in the real world. :yikes:

ahollenbach 14-11-2011 14:33

Re: What programming Language To Use??
 
@Chris, yes, I hold a similar viewpoint.
Oh, and:
Quote:

Originally Posted by Chris27 (Post 1084908)
To address the original poster, I vote for Scala :p.

^ditto :P

ahollenbach 14-11-2011 14:38

Re: What programming Language To Use??
 
Quote:

Originally Posted by virtuald (Post 1085049)
Do it in Python, its way easy to learn and definitely usable in the real world. :yikes:

In a way, Python is one of the easiest languages to hit the ground running, in that it's syntax is often like English.

Ether 14-11-2011 15:07

Re: What programming Language To Use??
 
Quote:

Originally Posted by ahollenbach (Post 1085059)
In a way, Python is one of the easiest languages to hit the ground running, in that it's syntax is often like English.

The issue, as discussed on other threads concerning this same topic, is support:

#1 LabVIEW

#2 C++

#3 Java

#4 Python (distant 4th)



apalrd 14-11-2011 22:01

Re: What programming Language To Use??
 
I don't know why I'm weighing in on this discussion, as there are so many other threads about this topic, but the concept of which language to learn first, and the intent of FRC programming in general, intrigued me.

The first language I ever used was VBscript (to write message boxes in infinite loops for unfortunate people who left their computers logged on), and around the same time I learned Mindstorms NXT-G (a cousin of LabVIEW). Learning both right after each other taught me a lot about program structure, but that still didn't mean I really knew a lot about good code.

Fast forward to now. I've used various languages, including LV, Simulink, Matlab, Perl, various forms of embedded C (easyC, PIC C, HCS12 C, and a bit of C for Linux/Windows terminal programs), and a little bit of Java.

That said, I have worked with three programming paradigms (Graphical/Data Flow, OOP, and Procedural). As I used each language, I gradually found specifics in some of them that made implementing some things much easier (I never really got this far with any OOP language, I'll admit). I found which languages made sense for my projects (usually either C/Matlab or LabVIEW/Simulink), and used it as much as I could. But, I always start with the software design in my notebook, looking at what the goals of the software, any special mathematical equations, and the general structure before I look at language specifics.


If you understand the concepts, then it's just a matter of knowing the syntax.

While different languages are different in their implementation, the same basic math and same goal of the software is usually the same, and can be implemented in any of the FRC languages available. Whenever I teach programming to FLL students (and freshmen), I always start with the ideas and concepts of programming. These fundamentals are much more important for basic programming skills than the actual language syntax. Knowing how you want the program to operate, how to use logical operations, math, state machines, and various other control strategies is (to me) the key to FRC programming, not the language itself.

That said, if you have a mentor with significant knowledge of any language, you should pick that language, as the mentor will be able to help you tremendously. If you don't and will be relying on community support, LV has a great support group (and the NI guys and CD community will help you out).


All times are GMT -5. The time now is 18:54.

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