---
title: "Comment by Julian Ewers-Peters on \"Code Smell 219 - Looping from index 0\" | Hashnode"
description: "My two cents: I get the point and it has some merit. However, I disagree with the idea of starting with 1, because in computer science indices of arrays, lists"
url: "https://hashnode.com/posts/code-smell-219-looping-from-index-0/64bdc084a9cc12e3801de146/comment/64be28424d4ccf1030b102df"
---

[Discussion](https://hashnode.com/posts/code-smell-219-looping-from-index-0/64bdc084a9cc12e3801de146)

Comment [Code Smell 219 - Looping from index 0](https://hashnode.com/posts/code-smell-219-looping-from-index-0/64bdc084a9cc12e3801de146)

[Julian Ewers-Peters](https://hashnode.com/@ewerspej)

[Jul 24, 2023](https://hashnode.com/posts/code-smell-219-looping-from-index-0/64bdc084a9cc12e3801de146/comment/64be28424d4ccf1030b102df)

My two cents: I get the point and it has some merit. However, I disagree with the idea of starting with 1, because in computer science indices of arrays, lists and so on usually describe an offset in memory. Index 0 means that there is no offset, so you're at the beginning of an array, you haven't moved the pointer to a different position inside the allocated memory. I know that this adds cognitive load, but adding an abstraction which shifts this logic only makes it more confusing than knowing and understanding that in programming you always start at 0.

[Maxi Contieri](https://hashnode.com/@mcsee)

[Jul 24, 2023](https://hashnode.com/posts/code-smell-219-looping-from-index-0/64bdc084a9cc12e3801de146/comment/64be28424d4ccf1030b102df#reply-64be6cfd56ce01179f5bf41c)

Hi. this is true when you talk about pointers.

That's why I explicitly mention the rule does not apply to low-level optimized code.

Most software is unrelated to pointers but to human concepts. that's why you should prefer one-indexed languages. IMHO

[Julian Ewers-Peters](https://hashnode.com/@ewerspej)

[Jul 24, 2023](https://hashnode.com/posts/code-smell-219-looping-from-index-0/64bdc084a9cc12e3801de146/comment/64be28424d4ccf1030b102df#reply-64be713b39daac17cfbcca7d)

[Maxi Contieri](https://hashnode.com/@mcsee) Well, most programming languages use a representation for arrays and similar data structures with contiguous blocks of allocated memory. Should we abandon modern programming languages just because of this? I don't think so and I don't see the need. For matured developers, this should be a non-issue.

[Maxi Contieri](https://hashnode.com/@mcsee)

[Jul 24, 2023](https://hashnode.com/posts/code-smell-219-looping-from-index-0/64bdc084a9cc12e3801de146/comment/64be28424d4ccf1030b102df#reply-64be756e39daac17cfbccb59)

[Julian Ewers-Peters](https://hashnode.com/@ewerspej)

I am aware most programmers still work as if they were low level.

Should we keep doing it this way because of the status quo or we deserve something better?

This is an issue for any junior or senior developer since it brings lots of cognitive load. Imagine the available space on your brain to make amazing things when you discard this accidental complexity about talking to machines.

Again. this article is just my opinion

[Julian Ewers-Peters](https://hashnode.com/@ewerspej)

[Jul 24, 2023](https://hashnode.com/posts/code-smell-219-looping-from-index-0/64bdc084a9cc12e3801de146/comment/64be28424d4ccf1030b102df#reply-64be7a4056ce01179f5bf66c)

[Maxi Contieri](https://hashnode.com/@mcsee) I'm not questioning your opinion, I already acknowledged that it has merit in my first comment.

What's your proposal, though? How should we proceed? Introduce massive breaking changes into all existing software? Use entirely new programming languages and rewrite everything?

I don't think that changing this is realistic or needed. Once you're used to it, the cognitive load gets less. At least that's the case for me, I cannot speak for every software developer.

I appreciate your blog post, because it does question things as they are being done and shines a light on the cognitive difficulties this produces (at least for some people, especially beginners).

[Maxi Contieri](https://hashnode.com/@mcsee)

[Jul 24, 2023](https://hashnode.com/posts/code-smell-219-looping-from-index-0/64bdc084a9cc12e3801de146/comment/64be28424d4ccf1030b102df#reply-64be820256ce01179f5bf752)

[Julian Ewers-Peters](https://hashnode.com/@ewerspej)

We have too many accidental problems with languages and the way we use them.

We need to be smart and know the cost of mistaken implementation decision so we can make good ones as long as we can.

There's room for change if we ack this is a problem. Maybe we cannot change the way we address indices, but we can change many high level decisions

[Julian Ewers-Peters](https://hashnode.com/@ewerspej)

[Jul 24, 2023](https://hashnode.com/posts/code-smell-219-looping-from-index-0/64bdc084a9cc12e3801de146/comment/64be28424d4ccf1030b102df#reply-64be82c539daac17cfbccd6b)

[Maxi Contieri](https://hashnode.com/@mcsee) I agree that we should learn from past mistakes and improve language design. This is already on-going, maybe not for indices, but some languages, like C#, are evolving fast with user-friendliness in mind.
