31

You can get at this concept very intuitively in strings before you ever get to arrays. Take a string like "hello world" and ask them a subtle-sounding point: does the string begin here: "*hello world", or here: "h*ello world". They'll certainly be able to identify the correct answer. Then ask, "how far from the start of the string do we have to go to get ...


30

Ages in the United States (it's not the same around the world). For the first year of life, children are 0 years old. Only after completion of a year is the age changed to 1. By this logic, a child in his/her second year of life is 1 just as the second element of an array is found at index 1. Edit: another example is the counting of centuries. An event ...


27

An analogy that will work well in Europe, but not in North America: Image licensed under the CC BY-SA 3.0 by Bidgee of Wikimedia Commons. Floors (in European countries) are typically numbered with 0 (or G) as the ground floor, then 1 as the first floor above ground, etc. This could easily be compared to a list/array of floors, with floors[0] being ground, ...


20

The clock (24 hours system) If we look at the clock, we have to examples of counting hours. The 24 hour system is 0 based. The 12 hour system is interesting, neither 0 or 1 based. The 12-hour clock In the 12-hour clock system we start at 12 and make our way up to 11. This needs some explanation. The 12 hour clock has a funny way of counting, that you ...


10

I don't see anything confusing in 0-based indexing. In fact, it seems that 0-based indexing is not less natural for humans than 1-based indexing. Humans use 1-based indexing just because of following some long-standing, but weird tradition. I remember that when I was a pre-school child (<7 years old) and has not been yet influenced by social traditions ...


8

You overestimate complexity of 0-based indexing a lot. There is nothing complex in 0-based indexing. On the other side, pointers are relatively complex thing. I don't think it has any sense to introduce pointers earlier, than at the time when pupil would be ready to fully feel their usefulness and use them in practice. Especially in languages like C, where ...


8

This is a great explanation of why 0-indexing exists. As someone who barely knows what a pointer is, your explanation made perfect sense. If you wanted to dumb it down a little you could phrase it as: When you create an array, the variable you assign that array to is actually a pointer to the first element. Lets create an array num. When you want to ...


7

tl;dr: Just say no. This question is difficult on many levels. I seems to me to be a land mine of misconceptions and has the possibility to lead to poor teaching practice. First the difficulties Only concepts can be abstract. Abstraction is about ideas. Animal is a concept. Mammal is a concept. Animal is more abstract than Mammal since it contains the ...


7

Exponents representing the values of the digits in positional number systems. e.g. the-arabic-system / denary / the-system-you-learnt-in-primary-school. 10³ 10² 10¹ 10⁰ 1000 100 10 1 or binary 2³ 2² 2¹ 2⁰ 8 4 2 1 The binary example in binary 10¹¹ 10¹⁰ 10¹ 10⁰ 1000 100 10 1 This was @GypsySpellweaver idea, see comment.


4

The most fundamental shift in my programing came from my attitude about details. When I was young I wanted to pull every detail out of everything I touched, pin in down in front of me in one source file and beat it into submission. I could stand in one place and know everything. After decades of programming my attitude is: the less I know the better. ...


4

Draw ongoing attention to the potentially confusing point by banning cardinal descriptions of an element's position. Avoid referring to the "first element" or "second element" and talk only about "element at index 0" or "at index 1." Insist that your students speak only of indices and not of position in a sequence. If you ever use cardinal numbers in human ...


4

Fundamentally, I question the notion that you can test to see if students understand the idea of abstraction beyond a superficial level, even if you don't restrict yourself to asking just multiple choice questions. It's a little hard for me to articulate, but I sort of feel the best way to learn + get feedback on whether you understand abstraction is to ...


4

I would probably ask students to demonstrate their understanding of abstraction by writing code demonstrating solutions to a small problem at, say, three different levels of abstraction. I'd probably leave it to them to choose the levels of abstraction, and optionally write a short explanation of the differences in level of abstraction the code was intended ...


3

Your tennis racket question, is not good. As tells as that is is abstraction, then focuses on the form, when the most important aspect of a tennis racket is its function. Therefore the answer is non of the above (those are all implementation detail, and you asked for an abstraction). A good abstraction is hitty thing. The 2nd question, is very long, and can ...


3

I am not advocating teaching pointers to explain 0-indexing (see mine and others answers on your other question for how to do that). However if we have good reason to teach pointers, here is a tip that helped me when I was learning. I have also shared these ideas with other pupils, and they started to make progress. I find code involving pointers confusing: ...


2

Based on my past experience working on a FRC team, my main advice would be to be very cautious about pushing students to use more advanced abstractions, design patterns, and whatnot. The issue is that if you spend a lot of up-front effort designing interfaces and abstraction layers, you can end up painting yourself into a corner, especially if you're new to ...


2

UK school years We used to have years 1,2, 1,2,3,4, 1,2,3,4,5,6th form. We then changed to 1,2,3,4,5,6,7,8,9,10,11,12,13 (years 12 and 13 are 6th form, no one know where this name comes from). Then we added reception year, to get R,1,2,3,4,5,6,7,8,9,10,11,12,13. R is just a different symbol for 0. (In the US K is used for 0.)


2

A common example I use is centuries/years. We start with the first century on a range of 0-100 years. Or the first year of a century, which always ends in 00. It describes the amount of x that has passed, not the n-th x. The word "first" is the confusing thing for beginners I feel.


2

For anyone old enough (>30years): In the UK a few years back we had only a few TV channels, first 1, then 2, they slowly increased to 5: BBC1, BBC2, ITV, channel 4, and eventually channel 5 The TVs typically had 10 numbered slots (sometimes 8). the slots where 0 - 9, we would but the channels into the slots 1 = BBC1, 2 = BBC2, 3 = ITV, 4 = channel-4, 5 = ...


1

I know that you are looking for a physical analogy, but I'd say I agree with @ctrl-alt-delor about the 'link to what they already know' part. I usually start by introducing a simple algorithm, then show how that algorithm can be parameterized. Then we move on to OO, where I discuss how an algorithm can be parameterized with not just a value, but with a ...


1

Subtraction paradox: In North-American football, if a runner goes from the 3 yard line to the 4 yard-line, there is a (4-3) = 1 yard gain. However, if your math teacher assigns problems 3-4 (integers), you have to do two problems. So in what engineers call an "analog" system, the Result = Stop - Start; but for integers it can be more complex. So in North ...


1

Light gang switches, same the way you teach binary counting. (Well, the same way that I was taught binary arithmetic back when knowing binary and hex were important.) EDIT: An off transistor (simulated by a light switch) is considered to be 0 (no voltage) and an on to be 1 (voltage passing). Since "all zeros" is a valid configuration, 0 is a valid address ...


1

Let me suggest, pretty strongly, that you may be mixing up too many ideas in too short a space for novices to grasp in one go. Spread it out. There is no real reason to introduce arrays along with pointers, nor to give a complex reason for zero indexing at the start. In C, you don't want to avoid it altogether, of course, but you don't to dump the whole load ...


1

This one in related to computing, but sufficiently different, as it related to the social side. You can link it in by teaching the social side before indexing. The freedom to run the program as you wish, for any purpose (freedom 0). The freedom to study how the program works, and change it so it does your computing as you wish (freedom 1). Access to ...


1

An example from thermodynamics: the study of heat and temperature. In thermodynamics there are 4 laws, numbered from zero. Look to see when your pupils study this in physics (science). You now have cross curricular linking, which is also good. Like Asimov's 0th law of robotics, the zeroth low of thermodynamics was added after the other 3: “The zeroth law ...


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