Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   How to: Teach java? (http://www.chiefdelphi.com/forums/showthread.php?t=136993)

JesseK 28-04-2015 12:37

Re: How to: Teach java?
 
For learning the basics of brand new languages, two generalist websites come to mind:
http://exercism.io/
http://www.codecademy.com/learn

From there I would browse existing successful teams' public code repositories on GitHub. It's like CAD - you don't know what you need to know until you see an example of it.

gblake 28-04-2015 12:59

Re: How to: Teach java?
 
A few folks have mentioned Eclipse.

To complement Eclipse, I'll mention NetBeans. It is tightly affiliated with Oracle and the rest of the Java community. It was easy for me to learn as a Java beginner. It has some fancy features that I might get around to using some day, but until I want to use them, they don't get in my way.

Eclipse on the other hand, never makes me happy. Probably because I have invested less time into using it than I have invested into NetBeans. However, there might be a fundamental difference in ease of use. Tools that emerge from the Unix/Linux community often assume users have a tremendous depth and breadth of knowledge, and/or expect you to understand instinctively subjects like the convoluted, terse syntax used writing a regular expression.

If I had a nickel for every time a *nix tool or help file used a word or phrase for which I had no definition or antecedent, I would have a lot of nickels....

About Visual Studio and C#... I have to agree that switching from Java (+NetBeans) to C# for one project was just about as easy as falling off a log; but my prejudices against Microsoft's attempts at global hegemony (and my curmudgeonly belief that C# was created and promoted for business reasons, not for technical reasons) caused me to switch back to using Java as soon as that one project was over.

Blake
PS: If writing FRC robot code is made easy by some plug-in or other tool integrated into Eclipse, but not into NetBeans, that makes the choice pretty easy.

AndyB871 28-04-2015 14:18

Re: How to: Teach java?
 
@mathking robocode looks pretty neat, I think im going to combine a bunch of ideas here. I'm going to start with the MIT course first, using a couple of individual challenges along the way. Once they get comfortable with that I think we'll take a look at robocode and then finally WPIlib.

As for the IDE sub-conversation, I used to be a VS buff myself, but at work we develop software for small embedded platforms, hence no microsoft support. Short of using a text editor *blegh* I gave eclipse a try and i've come to love it, in all it's obfuscated glory.

Since I'm familiar with it, and since we're going to be stuck with it (essentially) for FRC I'm going to take the trial by fire route with eclipse and just commit to it. As issues crop up I'll show them how to navigate through the piles and piles of configuration options.

Thanks guys, this has been really helpful

gblake 28-04-2015 14:29

Re: How to: Teach java?
 
Quote:

Originally Posted by AndyB871 (Post 1477905)
...
As for the IDE sub-conversation, I used to be a VS buff myself, but at work we develop software for small embedded platforms, hence no microsoft support. Short of using a text editor *blegh* I gave eclipse a try and i've come to love it, in all it's obfuscated glory.

Since I'm familiar with it, and since we're going to be stuck with it (essentially) for FRC I'm going to take the trial by fire route with eclipse and just commit to it. As issues crop up I'll show them how to navigate through the piles and piles of configuration options.
...

I understand. Eclipse comes with both blessings and curses.

Folks tell me that the Notepad++, sup'ed up text editor is not *blegh*. Ima gonna try it someday soon, but I haven't yet. It might be a nice lightweight intro that leads a student toward Eclipse or other IDEs, without quite so many fires or trials on day one. It's probably worth a quick peek.

Jalerre 28-04-2015 16:34

Re: How to: Teach java?
 
This is a great resource for teaching Java. It breaks it down to the very basics and gives lots of examples. My suggestion would be to pick and choose the lessons that are the most applicable to FRC. And don't forget to utilize the resources that FIRST provides.

David Lame 28-04-2015 18:50

Re: How to: Teach java?
 
Quote:

Originally Posted by Aero (Post 1477710)
If you teach them one language for a few weeks than switch over, the differences are just going to confuse them more.

If you're teaching them Java, teach it from the beginning.
If Eclipse being complicated is a worry, I'd recommend IntelliJ IDEA as an IDE - they'll be happy to give your FRC team a free copy of the Ultimate edition if you email them.

For people with absolutely no programming experience, it's going to be hard to teach them pure Java and expect them to pick up on WPIlib easily. You can teach WPIlib from the start, but don't expect them to grasp the language's syntax quickly.
I taught a group of rookies Python over a few months. What I found worked best was getting them through basic syntax, then giving them challenges that required independent research to solve. I find teaching programming works better the more self-directed you can make your class.

Using an easier java environment makes sense. I've only used Netbeans and Eclipse. Both of them aren't very beginner friendly.

Katie_UPS 28-04-2015 19:13

Re: How to: Teach java?
 
You're receiving a lot of awesome resources. I TA a freshman level intro to C course, and this is a rough outline of what we use (I wrote this up a while ago for my own purposes, so some function calls are C specific)(we also teach pointers but I removed that section):
Code:

Using IDE / Hello World -- how to navigate in IDE/run a program/write hello world
        write skeleton code - what is “#include”, what is main, printf()
        run code once,twice,many times (same thing happens)
        understanding basic debug messages

Varaiables / Printing Basic Variables
        what are variables?
        how do I make a variable?
        how do I print a variable?

Modifying Variables / Scanf()
        printing/changing/printing variable
        using scanf to set the value of a variable

If() statements
        What is an if statement
        How does it work
                if(1) if (0)
                if(x = 1) vs if (x==1)
                different operators (&&, ||, !=, !)
        examples
                using one operator
                using multiple operators

Functions
        how do functions work
        how does return work
        the anatomy of a function (type name(parameters))
        how does a function and main() talk

Loops - for(;;)
        What is a loop
        The anatomy of for(;;)
        examples (use var tables to show behind the scenes)
                counting up by 1
                counting down by 1
                counting up by 2
                counting up by power 2*2*2*2…
                counting down by devision
                printing fractions

Loops - while()
        What is a while loop
        Anatomy of a while loop
        use while loop to count
                use var table
        use while loop to wait for a specific input (ie guessing game)

Arrays - 1D
        What is an array?
        visualizing an array
        anatomy of an array
        using an array
                accessing an element
                filling it with a for loop
                accessing every element with a for loop

Arrays and Functions
        Passing an array
        modifying an array in a function

If for some reason, you really want to write your own curriculum, that has been a tried and true path for teaching complete newbies.

mathking 28-04-2015 22:45

Re: How to: Teach java?
 
I have used a pretty wide variety of IDEs, plus command line compiling, in teaching computer science. I settled on Eclipse as the one that produces the best results for my students. There was a while when I considered switching to Net Beans because of FRC robot programming, but I decided to stick with Eclipse because overall I have found it to have the best balance of learning curve and power. I guess I am saying don't feel too bad about sticking with Eclipse.

lagringa841 28-04-2015 23:04

Re: How to: Teach java?
 
Hello!
I highly recommend Pogo! He starts teaching Java from Elite. He's great at explaining and he starts from the beginning. My teams head programmer recommended him to many members of our team including me and I've learned so much! Best of luck!! :D
https://www.youtube.com/user/PogoStick29Dev

WillNess 30-04-2015 13:36

Re: How to: Teach java?
 
Quote:

Originally Posted by Fusion_Clint (Post 1477516)
FTC is going to JAVA next year

Is it going to be very similar to FRC Java?

levydev 30-04-2015 13:40

Re: How to: Teach java?
 
No. FTC teams are going to be deploying Android applications. There will be n Scratch like visual programming alternative called MIT App Inventor. However for those choosing to code in Java , they will be using the Android Studio IDE.

RobOTies 30-04-2015 16:20

Re: How to: Teach java?
 
I tried teaching Java for FRC for the first time this year with the help of our mentors. We created a series of activities that are on the class website.

We started with the Blockly Activities and then the BlueJ activities. By the end of those activities, students were familiar with the basics of Java programming that are most relevant to using with FRC robots. Then they are using "EasyJ" as a scaffold to building the code, and then they copy and paste it into the simple iterative robot template in Eclipse. From there they can modify the code as needed. Note - "EasyJ" was created last year, so be careful with the port numbers since they start at 1 instead of 0.

The activities need some tweaking for next year, but so far I've been impressed at how students have been able to work together to program our Aerial Assist robot from last year with little help from me. Feel free to use any activities and I welcome feedback to make them better!

JCharlton 30-04-2015 17:03

Re: How to: Teach java?
 
I'm surprised no one has mentioned Processing.

It's a simple all-in-one that you can use to teach basic programming concepts, while using Java syntax.

I'll admit it might not be the best path to understand FRC robot-objects, but will help new programmers get familiar with basic concepts up to Object properties and methods.

After that then get them started programming in the FRC framework with a "real" IDE.

techplex 30-04-2015 18:29

Re: How to: Teach java?
 
I'd like to share a tool I've been working on to make WPILibJ programming easier. I'm calling it EasyJ. Its a block environment where each block roughly correlates 1 to 1 with a line of code.

Currently it supports Iterative Robot style programming, but we are working on Command Based.

I'm working with a teacher at Old Town High School and after teaching some Java basics her classe used EasyJ to start programming the robot.

http://easyj.team5122.com/

Hope that helps,
Blake

pafwl 28-12-2015 15:11

Re: How to: Teach java?
 
You can access sample code and a presentation from our Comcast FIRST Bootcamp. I presented a section on JAVA/C++. I has a review of Java basics and it presents a method to build your robot code on. This method makes the process very logical, flexible and creating multiple autonomous programs very, very easy.

http://www.frc272.com/files/seminar/Archive/

Good luck... have fun...

Email me directly at pafwl@aol.com.

PS - There is a presentation on using Sensors included and examples in the code.


All times are GMT -5. The time now is 09:01.

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