AP Pseudocode List Indexes start at 1?

Can someone please confirm that Lists in AP Pseudocode start their indexing at 1, rather than 0?

If so, this seems ridiculous to me. We spend the whole class working with Javascript as the default language in Code Studio and teach students along the way how to deal with indexing that starts at 0.

I get that students who truly grasp the content at a high level can shift back and forth to accommodate different indexing schemes, but AP tests are hard enough. Why introduce the added complexity? I believe this difference will do a better job of neededlessly confusing students instead of assessing their grasp of the List concepts.

Best,
Randy

Yes, AP Pseudocode starts list indexing at 1. I feel your frustration. On every practice question or test question, I had a reminder about this. Hopefully, they will get used to both by the time they get to the AP Exam.

1 Like

Hi Sangeeta - Thanks for the reply. Sigh. I’ll have to follow your suggestion to include reminders and practice for the rest of the year. Do you know if College Board has received feedback on this issue?

– Randy

Hi Randy, I don’t know! You can always post in the AP CSP community. One more voice would be good :slight_smile:

Sangeeta

From a historical perspective, arrays being indexed starting with 1 is normal. Indexing starting with zero came from C. It had to do with pointers and pointer arithmetic, which was allowed in C. Since C is the syntax all language designers want to emulate, but this time get it right, we have indexing at 0 being spread like a virus. Javascript was infected by C syntax even though the designer wanted a language like Scheme. Since App Lab uses a 3rd party Javascript interpreter App Lab is now infected as well.

Since pseudo-code predates C it indexes from 1 as it should.

Javascript is the problem. There is no reason for it to index from 0. App Lab could be changed to index from 1, but it would be a large effort and make it incompatible with older App Lab programs and the Javascript standard.

Thanks for the comments. I can appreciate the historical context and how different languages have different indexing schemes. I graduated in Computer Science from Santa Clara waaay back in 1987, so we saw all kinds of approaches to list/array management.

My point, though, is that we spend all year teaching with Javascript (or Java for CSP - A) and indexing at 0. AP should get with the times and current approaches in industry…all of which I’m familiar with use indexing schemes that start with 0.

Note that the College has maintained that there is nothing on the AP Exam that will trip up a student between 0 indexed and 1 indexed arrays. I have not found any question or example code on any practice exam where it matters.

Leaving history aside, I disagree. Indexing from 1 is easier to conceptualize and learn. I think we should change App Lab to start at 1.

It is not unusual for me to create Arrays in App Lab that start at 1. You just ignore the 0th item.

We teach number systems that start counting at 0…binary, hex, etc. java starts indexing at 0, c and JavaScript start indexing at 0. I’d rather teach it consistently and the way it’s used in industry and not have to “ignore” a valid index value.

3 Likes

I’m not a programmer and used punch cards in college. But my beef is if pseudo code started counting the index at 1 instead of 0, students wouldn’t need to hassle with “list-1” in their functions. I realize this is a college level class, but it’s still an introductory course. If we start confusing kids right out of the gate, that may nip their interest in computer science. And it’s hard enough getting them to sign up for the course.

Yes, even the x and y coordinate system. 1 on x, is moving one right, and 1 on y is moving 1 up.
Hotels and buildings should be like that too in the USA… in Spain, Portugal, Brazil and many other countries use the first floor as “0”, if you get a room 105, let’s say, that means it is floor 1 but that means is going up one floor from the ground. Having a room 005 is being on the first floor (GROUND). It is very confusing. We should be all unified into the concept.
Is it zero the first? Adding to confusing matters, some countries use the first day of the week on Sundays, like Brazil, where Monday is the second day of the week. Standards, standards. We computer people like uniformity and standardization. :-0