I really believe that learning by doing is the best approach here. I taught computer programming in various languages for many years and the hands-on approach always seemed to work the best. When students can see the instructions they write have a clear process and result, that often excites them and motivates them to do more. And by starting out simple, they can quickly see how simply commands work and then learn more complex commands. Starting out with a simple language can build beyond the difficulty of syntax so once students see how the commands work, they can then focus on syntax of more difficult languages.
Active approah is best. Teach them step by step like the saying monkey see monkey do. While lecture demonstrate you give 2 or 3 examples for them to critically think how to solve it.then another 2 exersices without help. Through that they identify their mistake
Beside active approach, you may tried to give some of study case regarding the topic in programming languages and making a group discussion to your participant (if the class for advance). Invite your participant to explain about their opinion regarding the study case. Before that you have to prepare the step of the solving programming problems and guide them into the purpose of subject. Mistake is apart of learning process. Cheers
Qutaiba Altai asked, "how do we get students to logically thinking?"
Indeed, that's a great question! For me, that always came quite naturally, which is why I initial gravitated towards IT and computer programming. My mind simply works logically.
When I have taught in that area, I often find it helpful to start at very low levels for students: ones and zeros. You can teach about the computer and how it works and start out with bits that are set to one or zero. This can lead to binary numbers and how the base 2 number system works. Students can then be helped to understand that literally everything in the computer is the same: it is either a one or a zero. Helping them see things that way can help them understand that there's no feelings, no thoughts, nothing else: just a one or a zero.
From the base 2 system, they can be led into the hexadecimal number system. This can help their understanding more, but still in the limited concept of what fits in the space -- and that ends up being the one or the zero. From there, different thoughts and concepts can be expanded, but always coming back to the idea of a one or a zero. Complex logical problems can be used. AND and OR statements can then be expanded. Hopefully at this point the students can then see the basis behind logic and will have a good idea understanding the rest of the computer.
This is an interesting question that may require a whole paper as an answer, but I will provide my answer briefly based on my little experience.
In fact I will decorticate your question to elementary parts as follows:
What is the most efficient way: I don't think it is easy to answer this question since it's not easy to decide which way is the best. This depends on many factors that we should identify in order to be able to compare teaching or learning "ways".
to teach someone : I think teaching is an art. We can find very excellent programmers but when it comes to teach, these persons may not be as effective as when programming. The big difference between the two tasks is that with programming ,we are face to a machine that we can manage easily using our own skills. In the other hand, teaching suggests that we are face to humans who are more complex entities to understand and to let them understand .Because we are face to humans, focus only on the technical aspects is not enough, we may need to deal with the "psychological"aspects such as building a strong confidence in the hearts of your learners and motivating them strongly, etc.
a programming: programming is the art of making a machine acting like humans. We need to tell the learners that they are very smart while a machine is very stupid. They need to make the machine "smart".To do this, they need the two elements below : logical thinking and special language.
get students to logically thinking: this is the hard task that many teachers face. This is also very important. One possible way is to make students understand how their brains are executing things. Based on my little experience, the students generally ignore how they , as humans, have found a solution to a problem, how their brains act. They rather find their way of thinking natural and spontaneous. For example if you ask a student to sort a table of integers , he will do of course, but if you ask him how did you find this result , he will just say I have seen them and ordered them. He ignores the fact that his brain has done very fast comparisons in a suitable order to get the result. I think it's important to teach the students how they are really thinking to solve real life problems. Once they can write down the elementary operations done by their brains l in a suitable order, they will be able to activate their thinking skills and extend it to teach the computer what it should do to solve a problem.
This step produces the flowchart of the solution or an algorithm or pseudocode in a natural language.
After that,the students need to know that "talking" to their machines to ask them doing things needs a special language.
language? I think the programming language itself is not a big deal. It doesn't require a lot of efforts as the logical thinking . The students need to know the rules, syntax and semantic of each statement and need to do a lot of practice to retain all the language#JARGON". What is important here is to clarify every concept : variable, arithmétique operations, logical operations, if statement, loops, ....The students need to distinguish clearly each concept so that they use it correctly.
Another thing is to train the students on best practices, that is how to write clean, readable and maintainable code.
There are a lot of points to add but I will stop here.
I always believe that the best way to learn anything is by doing it. Unless you don't do it practically, you won't be an expert on it. Because when you perform something practically, you grab the concept way more easily and remember it for a long time And for learning programming, I think this is the only way possible. You will never be an expert in any programming language if you only learn it theoretically.
Learning a programming language is a long process and you need to plan it well. Because- "A goal without a plan is just a wish."
Here's a plan that you can follow to master any programming language-
1. Start with the Basics 2. Decide your area of interest 3. Decide your daily tasks and complete them on time 4. Data Structures and Algorithms 5. Projects