Log in

View Full Version : Suggestions for moving from Labview to Java


CoachC
23-10-2016, 13:42
I would like to transition my team from Labview to Java. I have mostly new students with minimal background and am looking for suggestions that lend speed and efficiency to this endeavor. Thanking everyone in advance.

Jim
Team 5247
Red Devil Robotics

TimTheGreat
23-10-2016, 16:37
Since they have minimal background, your best bet would be to start them off with the very basics. If you're set on them using java, codecademy has a beginner course. Codecademy also has a python course which is also a viable option (and better IMO).

Once they have the basics of Java down, have them look at the wpilib screensteps. (http://wpilib.screenstepslive.com/s/4485/m/13809) These will help them in making robot code in Java.

If you aren't set on Java, I recommend Python. There is full support for it in FRC, and the community is very helpful. You can read more about it here. (http://robotpy.readthedocs.io/en/latest/getting_started.html)

Whichever way they choose, I'm sure they'll enjoy it.

CoachC
23-10-2016, 16:42
Thanks Tim. Im still polling my students to gauge enthusiasm and pick the best students for the new endeavor :)

euhlmann
23-10-2016, 21:13
Note that RobotPy is a 3rd party framework and isn't officially supported by FIRST/WPI. Just wanted to make that clear because TimTheGreat had some ambiguous wording.

bdaroz
23-10-2016, 21:40
Note that RobotPy is a 3rd party framework and isn't officially supported by FIRST/WPI. Just wanted to make that clear because TimTheGreat had some ambiguous wording.

This.

While there is great community support for it, you may not have much luck from the event volunteers if something goes sideways at competition.

That said, if you have a team with strong Python skills and is willing to accept that possibility, or another local Python team that would be willing to help, I would definitely look into it.

If you're starting from scratch, with no base of experience, Java would be my suggestion. Our team went from 1 programmer last year (a then-Junior) to a group of 11, and we've spent each week since mid-Sept doing a crash-course in Java before our offseason event in November.

TimTheGreat
23-10-2016, 21:51
Just wanted to make that clear because TimTheGreat had some ambiguous wording.

Yeah looking back now saying it has full support in FRC does really send a false message.

Because of this and reading other replies, since your programmers are all up and coming, I actually would recommend Java because chances are something is going to go wrong at competition and there won't be guaranteed help.

However, have them look at both. Python may look better at first just due to its simpler syntax, but Java will allow for more immediate help if needed.

mathking
23-10-2016, 22:03
If you would like some suggestions, I can tell you some of our steps going from LabView to Java, and give you learning suggestions. Robocode is one of the first suggestions for kids new to Java getting a feel for. If you want to ask any questions send me a PM.

TimTheGreat
23-10-2016, 23:26
If you would like some suggestions, I can tell you some of our steps going from LabView to Java, and give you learning suggestions. Robocode is one of the first suggestions for kids new to Java getting a feel for. If you want to ask any questions send me a PM.

It may be a good idea to post any advice you have on the public forum, that way if anyone else comes along with the same question they can learn as well.

GeeTwo
24-10-2016, 07:50
Jeff did a course in Java for our team a couple of years ago based on Java for Dummies. They basically worked through the chapters, with homework taken from the book early and custom WPIlib stuff after a few chapters.

kingca
24-10-2016, 10:38
Since they are beginners another great resource is codehs.

mathking
24-10-2016, 13:35
My first piece of advice is to take some simple working robot code (either sample code or from a team's public repository) and have your students examine it. Ask them to identify what and where for making simple modifications. If you are moving from LabView you have anyone who knows LabView, have them identify which parts of the LabView code correspond to which methods in Java code. Make a poster of this.

Robocode (https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwjamKvN_fPPAhVCwYMKHZ14B64QFggdMAA&url=http%3A%2F%2Frobocode.sourceforge.net%2F&usg=AFQjCNHB9B556zD5moK91sRcIWofSjWMJQ) is a valuable tool if you have students with no Java experience. They program virtual robot tanks to compete against one another, using a simple, well-documented framework.

The best piece of advice I have is to take a working (mechanically and electrically) robot and have the programmers modify default code to make it drive. Then have them make it do something simple autonomously. Keep making incrementally more complicated tasks and have them work on those. And have them document what they are doing so they have references for use when they make the same mistakes during the build season.

Finally, ask questions. Lots of them. Here is fine but email tends to be a better venue for a lot of quick back and forth questions and clarifications.

apache8080
24-10-2016, 15:03
When moving to Java with a team with little Java experience, it is important to make sure the students know Java. One way that I learned Java and have taught new members Java is through Stanford's CS 106A introductory programming course(Link Below). This course helps teach students Java and also how to solve problems using programming. After students have learned how to use Java it is also useful to read other teams robotics code on github. I learned a lot about programming robots from reading 254's code on github.

Stanford CS 106A (https://see.stanford.edu/Course/CS106A)

Team 254 Github (https://github.com/team254)

Dan Waxman
25-10-2016, 01:30
To reiterate what others have said, I would definitely focus on teaching Java before you focus on any robotics concepts; it would be very difficult to read or write a book in Spanish if you don't speak any. After you get your students started on Java to a point where they can coherently read through other's code, then the FRC concepts come easy. There's very little to program that's difficult in FRC, and odds are if it's difficult, there's been a tool made to make it easier. So I'd just drive home that fundamentals are key.

As for how to teach, there's multiple approaches. Two mentioned before are codeacademy, which is a great resource, or academic class available online. Both of these are great options. Personally, the way I'd do it would be to teach during team meetings, and then supplement that learning with further learning online that you plan out, as well as incorporating challenges to mix in (codewars.com is awesome for this). Any questions feel free to PM me.

CoachC
25-10-2016, 20:31
Thank you all for your outstanding responses. I will utilize much of what has been suggested. I understand it will be a daunting challenge given my teams situation but I feel that if we get an early start the growing pains will be minimal. I have one student who is eager to learn and will be with our team for several years (a new programming captain in the making). Thanks again. Ill post our progress along with bumps in the road as things move forward.

Jim (Coach C)
Team 5247
Red Devil Robotics