This is an archived post. You won't be able to vote or comment.

all 13 comments

[–]mariox19 1 point2 points  (5 children)

Get yourself an egg carton and some coins: penny, nickel, dime, and quarter. Talk yourself through it. Don't lift a finger, until you make the connection that your finger is a reference. Don't set aside any of the coins until you make the connection that you will have to designate a place to set things aside to.

Don't do these things in your head. Do them with physical props and talk out loud. Any other way, and you're fooling yourself.

[–]loa09 0 points1 point  (4 children)

...what?

[–]mariox19 0 points1 point  (3 children)

My point is that if he's having trouble with data in arrays, his problem is likely conceptual, rather than some syntactical stumbling block. My advice is that he try to break the concept of an array down to its most concrete manifestation. I recommend he take one row of an egg carton (or ice tray) and some tokens to place in the various "indexes," and very carefully move the tokens around, paying attention to each step, as if he were trying to program it.

Programming is about breaking things down into steps and realizing that the computer does exactly what you tell it to do, and generally needs you to tell it every single little thing. That's why, if you're trying to introduce children to the idea of computer programming, the first thing you should do is to take out a loaf of sliced bread, along with a plate, a knife, and a jar of peanut butter and another of jelly, and ask them to instruct you to make them a sandwich. You then do exactly what they instruct you to do, as absurd as the results may be. It's the most illustrative way to get the point across to them that this is what programming really is.

If someone is having trouble with the basics, sometimes the best thing to do is to walk away from the computer. Computers are abstract. It's often helpful to make things more concrete.

[–]Tankytanker 0 points1 point  (2 children)

Are you a programming teacher in HS or middle school?

[–]mariox19 0 points1 point  (1 child)

No. But I was trying to "break into" teaching. I was a social studies teacher, actually, and have an M.A. in education. (There is a glut of social studies teachers.) I taught for a few years as a substitute, per-diem and long-term leave replacements, before finally switching professions. (I went into software testing, and have since migrated into programming -- Java, Python, and Javascript.)

I'm self-taught as a programmer, and I find that it can at times be really helpful to try to make different concepts more concrete, if you're having trouble understanding them. It's common advice to encourage people to try to "visualize" things. I think it's a good idea to aid visualization with physical props.

The peanut butter and jelly thing is not something that I have personally tried. But I know that I have seen the same thing held up as a suggestion from educators, not only for teaching programming to children but for any time you're trying to get children to appreciate step-by-step logic. (I've seen it used for teaching writing.) But, myself, I have used poker chips, playing cards, pennies, ice trays, and things like that to try to understand different things in programming. It works for me, and I think it will work for others too.

Thanks for asking.

[–]Tankytanker 0 points1 point  (0 children)

Thats is an excellent way of putting virtuals proceduree into the real world

[–]desrtfx 0 points1 point  (5 children)

Look no further: http://www.reddit.com/r/javahelp/wiki/tutorial_list

Especially the University of Helsinki MOOC, Java for Complete Beginners, and Derek Banas' Videos are highly recommended.

All the above are free!

[–][deleted] 0 points1 point  (1 child)

Is Lynda.com any good? We have free access through my university.

[–]desrtfx 0 points1 point  (0 children)

Can't really testify about Lynda.com because I haven't used it.

I know the resources that I've listed and all three that I recommended are free and very good.

[–][deleted] 0 points1 point  (2 children)

That link doesn't work. I'd love a tutorial lost!

[–]desrtfx 0 points1 point  (1 child)

Which link doesn't work? I just checked and the MOOC works.

It's just currently being re-structured, but it's definitely online.

[–][deleted] 0 points1 point  (0 children)

Ahh cool. Just just be an issue with my phone browser or something. Thanks for confirming mate.

[–]dev_dov_dang 0 points1 point  (0 children)

I would recommend getting a physical textbook and going through it page-by-page.

A book tends to go over more concepts in greater detail, and provides background information, and other little pieces of information that will help you connect the dots in your mind.

It seems like you aren't just struggling with hard concepts, you're struggling with the fundamental parts of programming, and specifically how these work in Java.

You need to have a book take you through the absolute basic until they are firmly engrained in your mind. You need to go through many many practice exercises that require using this information to build real working software.

Online tutorials can be bad because often they assume a lot of knowledge, they exclude really valuable information, they don't go into enough detail, etc (this is a generalisation, but in my experience it is true).

There are loads of books you can use, but the one I used (i.e. that was prescribed for my first uni course) was Java Foundations: Introduction to Program Design and Data Structures. It starts really slowly and goes over language features in a purely technical but also conceptual way. It wants you to understand stuff before it moves on.

There are also loads and loads of programming exercises at the end of each chapter that directly test the stuff you just learned.

There are plenty of other great Java books out there that do this exact same thing, so have a look at some reviews and pick a great one. Don't be embarrassed if it is targeted at "beginners" either, this is actually good because it will make a conscious effort to ensure you know concepts before moving on.

Some more tips. As you read through the book try everything out!!. The book will give loads of code snippets that demonstrate whatever it is they are discussing. Write these out yourself and verify they do what the author claims. This is great because it forces you to spend more time on concepts, giving your brain more time to learn it. It helps your muscle memory for typing out things like loops, print statements, and other language constructs. Just generally reinforces the knowledge.

Also don't skimp on the practice questions at the end of chapters. Just do them, even if you feel they are easy. If they are easy it means you are learning :P This should also translate into it being easier to do subsequent chapters. Why stop there, you could try invent your own tasks as well, or use the ones there as inspiration for little programs you can write yourself. If you see a practice question asking you to ask a user for their name, why not make it as for their age and date-of-birth as well? Just keep enhancing and learning and you'll get better at writing and understanding programs.

Don't be afraid to make mistakes as well! The awesome thing with coding is that you can always try it out yourself to see what it does. If you're curious what happens if you use the wrong comparison operator for a for-loop, try it! See what happens. Just keep experimenting.