Alright Guys. I am the Head of programming for my Team. I need to teach others to program. The kids I am going to be teaching can be anything from basic MS Word/OO Writer skills to already know a little. (and a few that really know what they are doing).
The problem is I need to teach both Java and C++/Arduino.
We use Java as our Competition bot language, and C++/Arduino for our other projects.
Now the only kids who can take both classes have to know a programming language already, but the others have to choose one, I don’t have the time or means of transportation to get to the meeting place to do two SEPARATE Classes.
Any ideas from the community on what I should to keep the languages separate enough that I am not just confusing the holy hell out of them… If I had the time I was going to teach Java to them all, then C++ for a group for Arduino. I just don’t have that time…
I look forward to any help I receive. Thanks Guys.
Is there a specific reason the competition robot has to be in Java? If not it may be best to teach everyone C++ and use that as the competition robot language, both to lower the workload for yourself and to allow the students to better learn the language.
If some of the students already know a language you could have them help you in teaching the other members. In terms of splitting the languages of, I would try splitting the class between working a code and teaching them about the language and have one language be coding while you lecture the other. This seems like the best way to keep them separate from each other although the actual class may be a lot of work for you.
Well I talked to our Programming Mentor about using C++ for both. (He actually knows C++ more than Java). He was afraid that with something so much more complex as the Competition Bot that we would have a lot more problems with Memory Management and the other lower level pitfalls on C++.
Here is what he said:
For next year’s robot, I think java is better for beginners because it will prevent you from doing things like buffer over flows or invalid memory access. I think Java might be more inclusive and could get us some more programmers. For the t-shirt cannon and anything else, lets just use what ever we want.
Oh course that means I still need to teach C++ to them anyway. I only have one more year on the team.
Other than the Mentor I am the only one who knows any C++. There is only one other Student who knows Java, but not as well as I. It does help a bit, but not much.
OH i totally forgot. What are some good resources for teaching Core Java and C++.
Not stuff for the WPILIB libraries, but for the Languages themselves.
The year our 4-yr programmer graduated and left programming to the novices, he left us a whole bunch of sample JAVA programs and information from our school’s [now nonexistent] AP programming class. I haven’t looked through most of the files, but someone who did (and took the AP test a year later) said that he thought he did really well. I’m sorry I can’t be more exact.
2 years later, all the programmers are self-taught. We learned how to program the robot by reading some of these examples, perusing the FIRST provided samples, and reading other teams’ code (available to CD).
Even with Java, when you start getting into the more involved methods, you begin to run into memory management considerations, especially because a lot of them are just wrappers of their respective C++ methods (if that’s the right term for it). We actually hit a stack overflow error, if I recall correctly, when running camera code…
I can’t speak for how to teach the differences as I’m not nearly familiar with both to offer a good perspective on both, but I will say that learning about, understanding, and seeing the OO nature of these languages is incredibly useful to understanding their structure and implementation. For me, I just learned the fundamentals then went through examples of existing code to learn the language.
One thing I will say is that you want to make sure that you not only teach new members the programming language, but that you also teach the implementation of the language in FRC. There are so many abstract concepts and so many more details about them that aren’t related to FRC that it’s easy to get lost in them and be completely bewildered going into build season. Our software engineering team taught our newbies this year by developing Java on Finches using Netbeans (a small minibot-esque platform) and neglected to give them a taste of how robot code is structured. As a result, one of the most consistent responses from their newbies this year was that they found acquainting themselves with the structure of robot code an incredible challenge because they had never seen it before build season, so when the veterans began preliminary code structuring many of them rapidly lost track of what was going on.
I will make a suggestion, as a teacher of both Java and C++. If you only have the time to teach one, just teach one and have the kids pick up the other on their own. Rather than confusing the second language tends to illuminate when you get a little practice in. Consider using something like Robocode to have the kids learn Java on their own. It is fun, easy to install and as a bonus if they do much with it they will learn a lot about how to use events and mathematics in a Java program. In general I think that picking up a second language is not only easier, it makes you understand the first language more completely.
Anyone have any good resources on teaching CORE C++. Syntax, Pointers, Class Structure, using/accessing Functions and Member Functions, ect? Not so much the C++ Library stuff (beyond some basics of course).