Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Preferred Programming Language (http://www.chiefdelphi.com/forums/showthread.php?t=138935)

FrankJ 05-11-2015 14:26

Re: Preferred Programming Language
 
If you want to pick a language that is going to help you in the real world. It doesn't matter. By the time you get there they will have all changed. :ahh: They all have uses & chances are you will have to learn multiple languages in your programming career. Work on developing logic behind the program. Developing good work habits such as organization and documentation. Learn how to communicate with people. Programming is really a means to an end. Work to understand the end. Programming languages is more about syntax than anything else.

BTW I hear NASA is looking for a few good FORTRAN programmers for a project that is literally at the edge of the solar system.

Ben Martin 05-11-2015 15:12

Re: Preferred Programming Language
 
From a purely competitive/functional point of view, I'd go with Java for two reasons:
- It seems that more top teams publicly release code in Java than in other languages (purely based on observation of CD, I have no data for this)
- The build and deploy times are quick enough that you can change and deploy code if you're crunched for time on the field

Rangel 05-11-2015 15:37

Re: Preferred Programming Language
 
I would go with Java or C++. Although the popular languages industries use will change over time, these two are likely to be around for many years to come. Knowing these languages could also help short term in securing internships whether in college or high school.

MamaSpoldi 05-11-2015 15:53

Re: Preferred Programming Language
 
There is lots of good information being offered on this thread. I will add that our team uses C++ both because our programming mentor (me) has expertise in C++. But I also chose C++ because it is very similar syntactically to Java but gives the programming a few more tricks and improved run-time performance. The other key element to the decision was that many high schools teach Java (often since the AP Programming test is in Java). C++ is not a huge leap from Java so it is a great opportunity to help these students take that next step and learn another language.

I would also offer this link (http://iel.ucdavis.edu/publication/WhyC.html) to a paper from a few years back that provides some insight into what languages are used in industry.

Alan Anderson 05-11-2015 16:21

Re: Preferred Programming Language
 
For students who are already "into" programming, Java is probably the most reasonable option for FRC. For students who are just getting into it, LabVIEW is by far
  • the easiest to start with
  • the best for having multiple people looking at the code simultaneously
  • the fastest for implementing parallel tasks
(all in my opinion, of course).

The important thing to keep in mind is that whatever they learn now very likely won't be what they use in the "real world". With that as a guiding principle, I would suggest choosing something unlike what they already might know, on the theory that it's always good to have multiple viewpoints when approaching a task.

EDesbiens 05-11-2015 16:28

Re: Preferred Programming Language
 
Quote:

Originally Posted by Alan Anderson (Post 1503492)
The important thing to keep in mind is that whatever they learn now very likely won't be what they use in the "real world". With that as a guiding principle, I would suggest choosing something unlike what they already might know, on the theory that it's always good to have multiple viewpoints when approaching a task.

I like that point :) It makes me want to switch to C++... But do I have the time? :)

Hsifeulbhsifder 05-11-2015 18:47

Re: Preferred Programming Language
 
Also our deploy times for Java were roughly 30 seconds vs C++ which was under 2 seconds without disabling the robot.

Jaci 05-11-2015 21:31

Re: Preferred Programming Language
 
I'm just going to bump in for a little bit (again)

A lot of the responses on this thread are claiming that Java and C++ are very similar languages. I can't say I necessarily agree.

Although, yes, Java and C++ share some syntactical similarities, the way the languages work can be completely different. If you learn Java, you shouldn't try to program in C++ 'The Java Way', because that leads to issues and inefficiencies. Take pointers for example. In C++, your life revolves around them. In Java, your life also revolves around them. But the key difference is that in C++ you have to handle it on your own, while in Java just about every little bit of data you deal with is a pointer. This leads to issues if you go in with the mindset "these two languages are pretty much the same", because they're not.

If you want to find a language to use on your Robot, look at the pros and cons behind each, and decide what YOU want to learn and use, there's no wrong answer. But please, don't leave it up to "Learn C++ if you have the time, otherwise fall back to Java", because they're not the same language, they just happen to share a fairly common Syntax. Each language has its own advantages and disadvantages, and it's not as easy as "C++ is more hardcore", because I can promise you that although Java presents a friendly face, there's a lot of more you can do with it if you're willing to put in the time.

</rant>

Fauge7 06-11-2015 02:41

Re: Preferred Programming Language
 
This thread kinda makes me want to learn c++ now. Last year i was playing around with opencv and ended up getting a pretty cool vision system running and operable but opencv isnt created for java. so i used python in the hopes it would work better(on a co-processor). I never ended up getting the co-processor working but hopefully this year brings better changes.

CFH 06-11-2015 09:06

Re: Preferred Programming Language
 
All depends on your teams previous experience, my team has used tabview for the past few years, the pros is that it is easier to get pid loops up and running and that vision processing is easier (maybe?) but the cons is that find it harder to read and there is a bit of a learning curve, and the fact that virtually nobody learns it before first and will virtually never be used in the outside world ,

pros to java is that everybody already knows it, so no learning curve, global classes (aka "subsystems") are easier to use, most of the better teams use it, and it is easier to read, cons are that vision processing is fairly hard

RyanN 06-11-2015 09:43

Re: Preferred Programming Language
 
Here's my opinion:

I love LabVIEW. I learned it by mentoring FRC and have used it at NASA for data acquisition. It also made some college lab and project stuff a bit easier to accomplish. It's a great language to learn for robotics and if you get the right job, you will definitely be using it. Big companies use it besides NASA.

C++ is my second favorite. C and C++ are very powerful languages that are used from small, low powered, embedded applications (robotics), to very high-powered supercomputers. It's probably the most difficult language to learn, but also the most versatile language to choose from.

Java hasn't been useful in my experience in electrical and computer engineering. I learned Java for my database class, but haven't had a need to use it since then. If you're into web development or Android development, then it'll be useful. Embedded... yea... it'll run on microprocessors, but not as common to see as C++.

Python is the most significant upcoming language. Since I got to college in 2008, it seems its use has exploded. I dabble in Python more than any other language right now. It was shoved down my throat in the past few years of college and I use it everyday now. It's not officially supported by FIRST, but I bet it will very soon. It's also pretty easy to learn for the first time (harder to learn when you're taught C++ because you keep trying to do things the hard way).

MATLAB and Simulink are also very useful collegiate and lab based software solutions... but NI and Mathworks aren't the best of friends (competing products). I used a ton of Simulink in graduate school and I know NASA used it quite a bit for modeling and data processing.

MamaSpoldi 06-11-2015 10:34

Re: Preferred Programming Language
 
Quote:

Originally Posted by Jaci (Post 1503571)
I'm just going to bump in for a little bit (again)

A lot of the responses on this thread are claiming that Java and C++ are very similar languages. I can't say I necessarily agree.

Although, yes, Java and C++ share some syntactical similarities, the way the languages work can be completely different. If you learn Java, you shouldn't try to program in C++ 'The Java Way', because that leads to issues and inefficiencies. Take pointers for example. In C++, your life revolves around them. In Java, your life also revolves around them. But the key difference is that in C++ you have to handle it on your own, while in Java just about every little bit of data you deal with is a pointer. This leads to issues if you go in with the mindset "these two languages are pretty much the same", because they're not.

If you want to find a language to use on your Robot, look at the pros and cons behind each, and decide what YOU want to learn and use, there's no wrong answer. But please, don't leave it up to "Learn C++ if you have the time, otherwise fall back to Java", because they're not the same language, they just happen to share a fairly common Syntax. Each language has its own advantages and disadvantages, and it's not as easy as "C++ is more hardcore", because I can promise you that although Java presents a friendly face, there's a lot of more you can do with it if you're willing to put in the time.

</rant>

Sorry but I differ with you on some points here. Syntactically C++ is a superset of Java... you could almost say that if you put C and Java it gives you an approximation of C++.

However, I would agree that Java has different conventions that are followed for coding standards and there are differences in the "default behaviors" of the code between C++ and Java as well. For example, C++ uses a "call by value" interface and Java uses "call by reference", meaning that one (C++) requires the use of pointers to allow a function to modify a value passed in and the other (Java) always implicitly passes a pointer (which can also be termed a "reference") and therefore any changes made to a parameter value inside a function modify persist after the function returns.

My point is that if you understand the underlying assumptions (which are always important regardless of the language you are using) in C++ and Java, you are likely to see them as much more similar than they are different. And the advantage of learning them both is that it provides you with perspective on the trade-offs of their variations in programming style.

Jared 06-11-2015 14:43

Re: Preferred Programming Language
 
Quote:

Originally Posted by CFH (Post 1503632)
cons is that find it harder to read and there is a bit of a learning curve, and the fact that virtually nobody learns it before first and will virtually never be used in the outside world

In the past three months, I've seen LabVIEW and NI hardware used on a series of fiber optic connector inspection systems, a gasket inspection system, a medical device testing system, and a robotics lab at MIT. LabVIEW's vision toolkit is incredibly powerful, and is simply the best when it comes to extremely high accuracy 3D imaging needed in inspection systems. It's used in the robotics lab over matlab/simulink simply because the hardware support/debugging tools are superior.

If you major in computer science, you'll be very familiar with text based object oriented languages, but the large majority of CS majors (at least the ones at my school) will never have done any significant work in LabVIEW. I know people who have been offered paid internships that led to jobs just because they were familiar with LabVIEW and most other applicants weren't.

MrRoboSteve 06-11-2015 17:40

Re: Preferred Programming Language
 
All of the officially supported languages, and Python, have real world applications.

Nearly every robot could be programmed in all four languages.

The three officially supported languages have the best support network -- for example, there are often CSAs at events that know the languages. With Python, you'll need to be more self-sufficient. Not a stopper for teams with depth in this area.

The best language is the one that your mentors know.

teku14 06-11-2015 19:03

Re: Preferred Programming Language
 
Quote:

Originally Posted by CFH (Post 1503632)
All depends on your teams previous experience, my team has used tabview for the past few years, the pros is that it is easier to get pid loops up and running and that vision processing is easier (maybe?) but the cons is that find it harder to read and there is a bit of a learning curve, and the fact that virtually nobody learns it before first and will virtually never be used in the outside world ,

pros to java is that everybody already knows it, so no learning curve, global classes (aka "subsystems") are easier to use, most of the better teams use it, and it is easier to read, cons are that vision processing is fairly hard

I saw some job openings at SpaceX where they listed LabVIEW as a required skill. One of their representatives at their company booth at worlds also told me that They use it extensively for for testing and their custom control system.


All times are GMT -5. The time now is 19:21.

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