17

I prefer to teach while loops as part of my unit on if/else statements since the syntax and thought process are virtually identical. I then introduce for loops when teaching lists (in Python) or arrays (in Java). With for loops, language impacts which style you likely use first. With Python, I use the for item in list structure first. In Java, I use the ...


8

All of the IF and Loop structures are based on two fundamental operations: Test and Branch. The only difference between an IF-Else and a Loop of any kind is whether you branch downward or back to the top. On a flow chart this just knocks you in the nose: the only difference is the arrowhead on one line. When something so varied and complex can be reduced to ...


8

Ideally, interfaces come first. Before Classes. Interfaces define concepts. Classes implement those concepts. Don't think of them as an add-on to OO programming. Think of them as the essence. In fact, if you present a pre built class to students, my guess is that you already, probably informally, give the interface first. Here is a class with public ...


6

There is a lot to unpack here, but first, YES, the teaching methodology can be improved, but that is always true, an unending quest. Next, I'll note that C is a language with enough pitfalls that many people struggle with it at the detail level, finding it harder to think more globally. My preference, perhaps not open to you, is to start with a language at ...


5

From a practical standpoint, rather than a theoretical one, there are at least two pedagogically defensible ways to do this. Spiral curriculum, and Scaffolding Use a Spiral Approach I won't assume that you never mention variables early with this approach, but you just don't teach all that needs to be known at the first introduction of variables (or any ...


4

While your ideal order makes sense, you really should try to plan the course based on the limitations of the language that you're working with. In this case, instead of thinking about the different conceptual loops, you should think about the different loop syntaxes that the language provides. In this case, the order in @Bryan R's answer (if/else -> while ->...


4

Perhaps you are creating a problem where none exists. You seem to be assuming that looping needs to be covered all at once and all together, rather than distributed over some some longer range interspersed with other topics. The two fundamentally different kinds of looping are definite in which the program knows how many iterations are necessary prior to ...


4

I am surprised to hear of State Machines being introduced anywhere early in a curriculum. They are a solution to a particular kind of problem, and wouldn't make much sense outside of it. So, this is an indication to me that the curriculum is getting things backwards. Humans need to learn things starting with very concrete situations that are graspable. Then ...


4

In addition to Buffy's excellent suggestions, I might suggest reframing your own thinking. You are thinking and speaking rather abstractly. Little phrases like "a means for mapping an individual's thoughts to formal language" and the question "Should state machines be introduced somehow more explicitly, with better examples" hint to me that you're really ...


4

At this scale (fewer than 5 students) lectures are a poor choice of educational methodology in any case. Lectures were created as a way to scale up education for the masses. They are driven by economic considerations, not educational ones. What you have here is precisely the scale of an Oxford University Tutorial in which a few students meet a few times a ...


3

For an infinite loop we use while True in python, however students ask or struggle with this. I can not explain it without explaining while condition. So pupils have to hold something that they do not understand in their head. Could you restructure this to something that makes sense to your students in plain English? Something like: programShouldRun = ...


3

The first 6 or 8 days of the year we work in Jeroo instead of straight Java (there's a Python mode as well). It serves as a very quick introduction to syntax, ifs, and while loops. I've found it helps when I can go back later in the year with "remember in Jeroo when..." What Jeroo doesn't have is variables. You can't do things like loop 5 times. You can ...


2

I'd say that it can fit very well between the Inheritance and the Polymorphism. Interfaces are a way of promising that any implementing class supports the interface's functionality. for example, given an interface Movable: public interface Movable { public void move(); } one knows that anything that for any object instance of a class which ...


2

I will add to this, choice of language is also important, learning C (and forget C++) and how to program at the same time is to hard (see zone of proximal development). Even Java is to hard: Explaining public static void Main(string[] args) Explaining that all programs need a main, but don't put anything in it, except new Program().run(); (main does not ...


2

I only ever taught my fellow students but this method was the one that everyone seemed to get. There's a track, and there's a runner, he's running forever. When you type that while in, you're telling him to do something while he runs. Then you put a condition near the while, which is almost the same thing as a hurdle that is put in on the track. The runner ...


1

Maybe you could use physical objects to help students visualize how to utilize these loops. For example for the bounded loops: grab 5 apples, label them with some number, and show how you go through each apple (e.g., bite each of them one at a time). For the simple unbounded, try this: put a set of brand new apples on the table, ask if there are any of ...


1

My laundry list: We write sample programs using components from a library (say JavaFx, or SFML) We don't care (much) about the internals of objects, as long as they work, but about their programming interface = what we can do with them. Abstraction. Anyway, we're going to build new objects. Some explanations about classes/methods/fields. Encapsulation. ...


1

Interfaces should be taught right after, or during the section on APIs, because they are simply a promise to implement a certain Application Programming Interface. It's why they are called interfaces in the first place. They are also more general than inheritance, which makes them a much better example as a polymorphic data type. With this in mind, I propose ...


Only top voted, non community-wiki answers of a minimum length are eligible