have been around some time here but haven’t participated in discussion that much because most topics are pretty advanced and, with my limited knowledge of Linux, I didn’t think I could add anything to the conversations.
But, because I didn’t know where to ask else and I really trust this community and their expertise, I have one question which is only remotely connected to Linux, but rather to computing in general: What is your advice / experience in teaching programming to adults (preferably in connection with the Arduino environment, or, broader, the basic, standing concepts in C-like languages) and do you have any tips for anyone in this situation?
Let me explain where I am coming from. Recently, a friend of mine and I started to think about doing some microcontroller coding projects with Arduino, with the intent to get some practical skills to apply them to larger projects (like building a self-driving mini car etc.). I myself have somewhat experience in coding, as I was pretty engaged in school and wrote a simple 3D physics engine in Java in my last school year, but I am not really a programmer, most code I write is very messy, and even though I’m somewhat interested in API design (mostly through reading the book Effective Java) and different programming paradigms as well as the formal basis of programming language (mostly through YouTube videos and the experience of reading The Little Schemer, which introduced me to the concept of functional languages; for me, at the time, a completely novel way of thinking about programming), I’m often only interested in getting the job done. In comparison, my friend, even though he had experienced programming in school, he suffered from a bad teacher and wasn’t really that inclined to go further down into that rabbit hole - until recently, when we started to build things with the Arduino and really have just a lot of fun brainstorming cool new projects to learn and tinker with; so I tried to teach him the basics of programming through practical appliance on the Arduino.
But I personally feel that I’m not that good of a teacher, because
- some programming concepts have been known to me for such a long time that I don’t know how to explain them to a beginner or explain the limitations of them
- I don’t know enough about the underlying structures of programming languages, even though I’m aware of the basic concept of compilers and bytecode etc. I don’t know in detail e.g. how memory allocations work etc. which - I think - are important to explain the limitations of a language construct which I take for granted, but are nonetheless confusing and upsetting to a beginner
- I don’t know which concepts to introduce in which order, right now I’m introducing concepts “on the way”, when I think they are in particular useful in our current problem. But this means that I’m artificially limiting the things we can do with the programming language, and also we are writing a lot of messy code which is just not well-structured (e.g. we wrote a program to send messages in morse code with a diode which could be easily programmed, but because he only knew the concept of functions and variables we wrote for every letter a function which resulted in lengthy code instead of defining some kind of mapping for every letter which could be automatically resolved - which, I think, would’ve been the more elegant and concise solution, but I didn’t want to overwhelm my buddy)
- I always had trouble explaining things to other people, even though I try to use metaphors etc. in most cases I fail just utterly to describe the things in a concise and precise way, and sometimes even my metaphors doesn’t work out at all and foster misconceptions.
For 2. and 4. I have an example: I tried to explain the concept of a variable in a practical, high-level sense; and used the metaphor of a container with a name to illustrate the concept (as something which you always know how to designate and has some contents in it which can be easily changed). He thought about the concept further and asked whether there would be a way to define a variable which has, as he called it, multiple layers (as there could be in a container) which are automatically “scrolled through” every time the variable is retrieved; basically a self-changing variable following some convention in the changes. I tried to explain that variables only provide very basic, non-interactive functionality (even though I’m not entirely sure whether that’s always true, as I think in functional languages a variable can be assigned to an interactive function? And in OOP you have, of course, only objects which are often interactive. But here comes again my glaring lack of knowledge; at least I’m pretty certain that variables in the Arduino language are limited to their basic functionality), and tried to cram my very limited knowledge of memory allocation out of my mind to explain that they’re basically just a pointer to some section in memory; only further confusing my friend who doesn’t have much knowledge of the inner workings of a computer. Regarding types, I also had problems explaining the concept, the same goes for functions (especially as I tried to draw parallels to the concepts of mathematical functions for functions with return value, but that doesn’t make a lot of sense when applied to functions with no return values?) and so forth and so on.
So, my teaching method is basically a big glaring inconsistent mess of practical application and bad metaphors for theoretical concepts which really hinders our ability to advance. It is a revealing experience for me because you begin to think about old concepts and their limitations in a new light; but also a frustrating experience because in most cases I don’t have satisfactory answers for the questions of my buddy (and an experience that is, once again, proving that only the best are really able to teach beginners well). I tried researching in the internet a bit, but most material is not trying to teach you teaching programming but rather to teach you the concepts of programming itself; and the rest is primarily aimed at school teachers teaching children. I have found some pages which show up relatively high in the DuckDuckGo search, this site which gives me a basic idea of how to approach teaching, but I have trouble applying it to the specific situations, this article which affirms my supposition that it’s more important to teach how and why the code works rather than how it looks, but again, I have trouble explaining these concepts in the first place, so what should I do?
I’m pretty puzzled right know to what to do next and how to continue teaching him, so I thought I would ask whether you had any personal experiences in teaching programming to adults and whether you have any tips, maybe even specific ones for the Arduino platform.
Thank you for reading through this lengthy post and regards.
Edit: Just wanted to say, I’m not a native speaker. Please, if you find any errors, tell me and I’ll correct them.