I know this is long but please bare with me because I could really use the help, thanks :)
I'm not exactly new here but I thought I would introduce myself, my name is Joe and I have been programming on and off since high school. I stopped after high school and started up again a couple years later in college, when I discovered Processing, and have been actively developing in my academic life since. I do spend a lot of my free time programming. Mostly proof of concept stuff but I have done a couple larger projects outside of school (and several in).
I am working with a local high school's intro programming class for my senior capstone project, and as part of my work I need to help teach them about computer programming. I have been trying for days to think about the things i could teach them and I just can't decide what the most important things are to establish a strong base line that will evolve into quality coding skills and a better understanding of programming and the application lifecycle. So I decided I would poll this wonderful community to see what people think about the subject, and here is my question for all of you:
Knowing what you know about programming right now (not necessarily Processing specific, but the students have used Processing before), what are the 5 things you think you should have learned about programming when you first began?
Now these could be specific skills, thought processes, best practices, about fundamentals of computer programming, how to write sort functions for arrays, what the difference is between == and .equals() for Strings, OOP skills, class design, or some topic in programming (math, physics, 2D transformations, graphics, game concepts, whatever). Anything at all so long as it pertains to programming and you wished you knew then what you know now.
I will be checking back in to the forum frequently tonight, hopefully we can get a good discussion going on of what people think the fundamentals of computer programming should be. Thanks for reading, and I hope to hear from each one of you!
Definitely, I'm thinking OOP basics - Encapsulation, Inheritance, and Polymorphism - are going to be pretty high on the list. They are concepts that I had to learn over again when I started with Processing and it would have been a lot easier if I started with fundamental things such as those, rather than after I had been (trying) to program for a some time. Some of the other things I was thinking of were:
primitives and variables - what each are and how to work with variables
loops and functions - what are they, how to define them, and how they work
classes - what they are, how they are built and are implemented
programming strategies - steps to design, implement, and execute the production of a program
Also to make programming easier to stick with, even when it is frustratingly annoying, and not doing what you (think) you are telling it to do, I think to contextualize the information in terms of graphics, interaction, sound, gameplay, and simulation is pretty important. Things like animating a character across the screen is far more interesting than simply programming a system to analyze and return information or something similar. And if they are interested the information and skills will sink in and stick.
I would make it by steps, as Processing allows this. I think, from the code I see from beginners here, that lot of teachers do it this way. First, the application lifecycle: what is start() and draw(), how to use keyPressed() and similar, what are global variables, avoid hiding them with local variables. Introduce base controls: if/else, for, while... Then, introducing custom functions, to help reducing copy / paste. Idem for arrays! And only then, progressively inject classes, as a way to reduce even more repetitive code. Use them as simple structures, then add constructors, methods, and only later, inheritance, polymorphism and other harder concepts.
Processing made Java procedural for a reason: it is easier to understand than jumping straight into OOP, and it reduces a bit the boilerplate code. One can do simple and nice sketches without OOP, but when starting to be more ambitious, the need for OOP will be more flagrant. Of course, exercises must be designed to follow the progression. Sometime, we see here assignments where we think "classes are a good fit for this" but the student haven't seen them yet.
I'd add orthogonality. It's a nice concept that helps to make good coding and it can be used to descend into particular basic issues of different programming languages (as passing by value vs. passing by reference in Java/p5). Regards!