It is not enough to know how to write code. I am teaching Java for the first time this year. No biggie, there is a first year for every teacher teaching a language. We manage. I have had a lot of first years: Python, Corona, Visual Basic, Small Basic, Gamemaker and it goes on. In all cases I have had kids walk away with an understanding of how to write a program in the language. What bothers me is knowing that they are not walking away understanding how to write a program in that language correctly. (I do have kids come back to me after their first year in a university CS program saying they are well ahead of their peers so I am not all bad.)
This brilliant observation came to me yesterday as I am coding the latest Java assignment I gave the kids. I can write the program, code it up and get it working. It is just very ugly and I know there is a better way to write the code. Could I learn to write “good” Java code on my own? I doubt it. I see the problem involving the fact I teach little kid languages like Scratch and Small Basic. The code is simple because the language is simple. There is no way to write “fancy” code in these languages. Everything is pretty much brute force. No local variables, no classes, no parameters, no nothing. There is not a whole lot to learn about these languages coding wise. Something like Java on the other hand has all sorts of subtleties and variations. Yesterday for example I discovered two things not explained in the book I am using; “throw IOException” when reading a file and what an overloaded operator (+) does in certain circumstances. Both discoveries involved hair pulling and lots of time lost dinking around trying to find what the heck was going on.
So what is the solution? One option is to quit teaching big person languages like Python, Java and VB. I admit I do not have the background to do a bang up job on these languages. Not a good option in my opinion. I may do one horrible job with writing pretty code with the correct OOP methodology but at least the kids get some of the syntax and learn the IDE. Besides, I like learning languages that are challenging. Learning something new keeps me out of getting in a teaching rut. Even if I end up beating a problem to death with the baseball bat of the coding world it is still a solution that can be refined.
A second option is to take some programming classes at the local university. Tried that but the classes I need are offered in the morning only and that pesky teaching job interferes. I tried to get a “Programming for Teachers” course started for next fall semester. I even had an instructor that was excited about offering the course. It would have been on-line, which is a real biggie in Montana, and be offered for graduate credit. I had about 20 teachers across the state interested. The CS department chair was even onboard. Budget cutbacks killed it. How budget cutbacks kill a 20 student course that would only cost the time of a salaried instructor is beyond me but then lots of things are beyond me other than Java.
For my Java class I have been applying option three. I have a CS instructor, Mike, from the university come over and teach the class a couple time a month. Mike is one of our middle school parents and enjoys coming over. He is a bit fried on college kids and likes working with my programming geeks. He is a bit fast for the kids. OK, he is a bit fast for me and I tell him it is the kids. He takes our junk code and shows us how to do it properly. Sometimes it makes sense, sometimes not so much. This is an interim solution but it is the only thing I have at the moment. I figure if he is able to come over for a couple more years I will have enough “good” Java to do a half way decent job of teaching Java. Opps, I just remembered I will have no kids taking Java next year. It is a Python year. I will have to find a Python expert to come in. By the time I offer Java again I will be starting from scratch. Oh well. Mike’s oldest kid is an eighth grader so I have him for at least 4 more years.