Best way to teach/learn code/java. (topic for fun)
It occurs to me the method of teaching students to write programs is all wrong.
I mean I understand trying to keep it interesting by showing students potential; and yes you DO start to build a decent set of tools and techniques.
But I found, when stuck with a complication students only know how to use the front end of a hammer, and not the back.
What does this community think of student assignments that don't have a specific goal, rather ask students to achieve usage of a new tool in different ways.
Example:
Assignment1 Arrays
Q1)
a) declare a new int Array and initialize it with:
*an empty int Array of no specific size
*an empty int Array of specific size 3
*an int Array that starts out with only the values 7,3
b) which one of these doesn't work?
Q2) use the 2 Arrays that worked and change the 1st position in the array to 1, the 2nd position to 2 the 3rd position to 3, and the 4th position to 4.
Q3) which lines cause the code to throw an exception during run time? try to figure out why.
Anyway, you get the point.
Re: Best way to teach/learn code/java. (topic for fun)
I had a similar discussion here: http://www.javaprogrammingforums.com...w-program.html
But a problem with open-ended questions is that many students struggle with even figuring out what a question is asking. That's true for assignments that, from our perspective, spell out exactly what the student should do. So if an assignment was even more vague, many students would struggle with knowing how to start at all.
We see so many students post an assignment and then say "I don't even know what this is asking!". That's because a big part of programming is problem solving, which isn't something you can really teach. And before a student has become accustomed to solving problems (taking a big problem and breaking it up into smaller steps), they won't know what to do with open-ended questions.
I can actually agree that the traditional approach is a bit outdated. Students are used to seeing highly interactive, visual, intuitive interfaces. Taking them from that to a for loop that prints out primes seems a bit archaic, and is probably a reason for declining CS enrollment (in the US anyway). Why not start them off with visual, interactive programming? Stick with the "do this, then this, then this.. now how would you do this?" approach, but give them something to look at and show to their friends.
That's why I would use Processing (which is built on top of Java) as an introduction to programming. I would spend the first semester or so in that language, then maybe switch to Java for the more advanced stuff. But there's no reason that Hello World should be on the command line, when 95% of beginner students have never seen a command line, but do have a phone that can run Java (and Processing) applications.
Re: Best way to teach/learn code/java. (topic for fun)
But a problem with open-ended questions is that many students struggle with even figuring out what a question is asking. That's true for assignments that, from our perspective, spell out exactly what the student should do. So if an assignment was even more vague, many students would struggle with knowing how to start at all.
ok thanks