|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#16
|
||||
|
||||
|
Re: Advantages of each programming language
There are many environments (in the real world) where C and C++ is only choice, favorite or not. For example the Linux kernel and drivers are written in C. The native API for the OS on the robot (VxWorks) is in C, all the other APIs are only a wrapper. Drivers and board support packages for VxWorks are written in C only.
I would advise a student looking to be a computer scientist that Java is a viable choice. If the student is going to be an engineer (especially in embedded systems and robotics), C/C++ is a better choice. C/C++ is not going away any time soon and C++ is not so different from Java that training in Java (which many high schools provide) is not applicable. What are Oracle and Microsoft plans for Java? Will Java diverge? Will HTML5 and/or C# kill Java? Who knows? LabView and Python are awesome environments but not (works everywhere for everything) primary tools, they are specialized 4GL tools. Also, (in FRC) using a language your mentor knows is a primary consideration. HTH Last edited by wireties : 03-06-2012 at 01:35 PM. |
|
#17
|
|||
|
|||
|
Re: Advantages of each programming language
Quote:
Quote:
Seconding this. |
|
#18
|
||||
|
||||
|
Re: Advantages of each programming language
Quote:
I was thinking the skills from FIRST can help in college and in a career. Both my kids learned Java from an awesome teacher at the high school and C++ on the robotics team. Neither encountered a class in college (both are EEs) where they did not already know the programming language and tools. They both won the junior design contests in college and attribute their success to FIRST experience. HTH |
|
#19
|
|||
|
|||
|
Re: Advantages of each programming language
|
|
#20
|
||||
|
||||
|
Re: Advantages of each programming language
Quote:
Thanks to ucpp, you no longer need a Windows PC for any part of the toolchain. If you can get a new gcc and libstdc++ (I've had issues with the cross compile for the latter :/) you don't even need to worry about memory management thanks to std::shared_ptr<T> and std::unique_ptr<T> if you don't want to. C++ is also the anarchist's programming language. It gives you plenty of power, but also the ability to do not-so-good things with that power, and it doesn't try to stop you like Java (think pointer casts, crazy macros, abusive operator overloading, etc). In the hands of a good programmer, you can do amazing things in C++ incredibly succinctly and efficiently. In the hands of a bad programmer, C++ yields bug-ridden spaghetti code. Lastly, you can also fall back to the raw VxWorks APIs in C++ if you want very, very easily. Quote:
I will say it DOES have the BEST parallel processing of any of the languages though.Also, since it's not text based, it's not as friendly with version control. Quote:
Quote:
|
|
#21
|
|||
|
|||
|
Re: Advantages of each programming language
I agree with wireties, but I would have to argue that python deserves more credit than being a "specialized 4GL tool". Python is available on just about every platform and is increasingly becoming a must know language. Entire applications and frameworks have been built using python (Django and anything built with it is an excellent example), but it is also equally effective as a "automation" language to replace the typical unix based scripting. It is an incredibly dynamic and powerful language.
Speaking from the stand point of a software engineer/computer scientist, I agree with the statement of C/C++ or Java is better suited for those who are seeking such a degree. I also agree that they are similar enough to each other to negate any steep learning curve between the two. Java, in my opinion, is a bit easier to conceptually understand, however, as was stated it does have it's memory issues as well. It is very easy to accidentally hold on to a reference to an object thus keeping it from being garbage collected. Therefore, don't let the memory management aspect of C++ scare you away. Though, pointers tend to put the fear of God in some people. A good computer scientist/software developer isn't going to constrain themselves to one language or even two. A healthy knowledge and proficiency in multiple languages is absolutely necessary. For instance, I use on a regular basis in my job the following languages: Java, C/C++, Python, Ruby, PHP, JavaScript, Scala, ActionScript and Objective-C. Sometimes, all in one day. They all have their pros and cons but each was selected for a very specific reason. Much like C/C++ is selected for most system level applications and Java is selected for most Web Applications. I like to look at it as layers of abstraction. At any rate, the point I want to make is that you should continue learning and exploring new languages and don't ever limit yourself. |
|
#22
|
|||
|
|||
|
Re: Advantages of each programming language
Abrightwell says it well, I think. Python is an essential language in terms of its exceptional readability and simplicity. The performance and weak typing are valid criticisms in certain situations, but it is incredibly valuable for rapid prototyping of algorithms and even large pieces of software. Django is an excellent example; I was able to create a dynamic upcoming match display for our team in a few hours, that integrates with our scouting system.
|
|
#23
|
|||
|
|||
|
Re: Advantages of each programming language
Quote:
|
|
#24
|
|||||
|
|||||
|
Re: Advantages of each programming language
You are of course correct, editing the original post to avoid confusion...
|
|
#25
|
|||
|
|||
|
Re: Advantages of each programming language
Quote:
|
|
#26
|
||||
|
||||
|
Re: Advantages of each programming language
Thank you for all of the help!
Our programmer ended up using Labview, and so far it's working well enough ![]() There are still a few minor bugs, but hopefully tomorrow we'll be able to get some assistance at the Portland regional. Good luck everyone! |
|
#27
|
|||
|
|||
|
Re: Advantages of each programming language
Honestly if you have never coded before start in Labview and use your off season to play around with c++/java
|
|
#28
|
|||
|
|||
|
Re: Advantages of each programming language
Frankly, one overlooked piece of this argument is the students.
If you have students who are interested in Computer Science/Engineering I would recommend C++ or Java, as the experience they gain will be quite valuable for them in the future. C++ is a more complex language (but has some advantages), if you have a student who is willing to do the research to learn the in's and out's of memory management, references, pointers, etc. then it is a great opportunity to learn coding at a deeper level. Java, on the other hand, can take away alot of the painful hurdles that a new programmer would encounter, making it easier to get the robot up and running, and makes a better gateway language than C++. If you have students who are interested in pursuing non-computer related engineering and science, but are still getting stuck with the programming , then you should consider labview, as it is used much more frequently by non-programming oriented disciplines due to it's graphical nature, and ease of use.Also take into account your mentors (if you have any that know programming), if you've got a mentor that knows any of the above, then it will take alot of the edge of learning that particular language. |
|
#29
|
||||
|
||||
|
Re: Advantages of each programming language
Quote:
And honestly, learning Java is really not too difficult. There are tons and tons of tutorials out there, and using it in the scope of FIRST is a pretty easy transition. As a college freshman, I was fairly well able to teach 3 students Java from scratch, and bring one more up to date with FIRST java, within a few weeks. They now are doing all of the programming for our robot, and I couldnt be prouder of what they have accomplished in a few short weeks. Check em out at the Portland regional! Visit our pit! Team 997, Spartan Robotics. |
|
#30
|
|||
|
|||
|
Re: Advantages of each programming language
One additional advantage of Java for FRC (compared to C++ or LabVIEW) is installation and activation. With only the getting started guide and an internet connection all of the Java tools can be installed and then used indefinitely.
In terms of students gaining programming experience, there is also some room for a team to use multiple languages. For example, this year we programmed our robot in Java and modified the dashboard application in LabVIEW. (Java can easily send data back to a dashboard written in LabVIEW despite the lack of examples) As a professional engineer, when I interview job candidates I evaluate their ability to work through the logic of programming and weigh that far above their claimed experiences. Granted, we sometimes look for experience with a particular language but that's often secondary since syntax is far easier to teach than good programming/reasoning skills. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|