Easter for Software Developers

· author: Thomas · reading time: ca. 2 min.

Easter and arrays have more in common than you might think. The story of Jesus’ crucifixion and his resurrection “on the third day” shows how easy it is to get numbers wrong.

Some people think that Jesus rose from His grave after three days instead of two. How does this misunderstanding come about?

To understand this, let’s look at the Easter events in chronological order, like an array in which data is stored in a certain order:

  • easter[0] (Day 1): Jesus was crucified on Good Friday. This first day – with index 0 – is the starting point of our array and of the Easter weekend.
  • easter[1] (Day 2): Jesus lay in the tomb. This second day – with index 1 – is a day of silence and waiting.
  • easter[2] (3rd day): Jesus is risen. This third day – with index 2 – marks the climax of the Easter events.

Therefore, the main events that are celebrated today as Easter lasted three days in total (= length of the array). The resurrection took place “on the third day” – i.e. just two days after the crucifixion.

The linguistic misunderstanding arises from the fact that the statement “on the third day”, which we find in the original sources of the Bible (cf. Luke 24:46; and 1 Corinthians 15:3-5), refers to the total duration of the events.

However, some people refer the number three to the time interval between the events, which in reality was only two days, similar to the off-by-one error in programming.

In this error, for example, the length of an array (in our example 3) is confused with the index of the elements (in our example a maximum of 2) – which is exacerbated by the zero-based counting method in many programming languages.

More generally, this error is also known as the “fence post error”, as a fence always requires one more post than it is long – a fence ten meters long requires eleven posts, including the first one.

The section of the Wikipedia article, “Fencepost error”, explains more about this type of problem. It also describes that from antiquity to the Middle Ages, the initial element of a sequence was usually counted as well.

It was not until the mathematician Leonardo da Pisa, also known as Fibonacci, introduced the number zero – based on Arabic mathematics – to Europe in 1202 that a clearer way of counting was made possible.

So it’s no wonder that there are still misunderstandings about numbers and distances. But the actual meaning of Easter also raises frequent questions. You can find some thoughts on this in the article “Why did Jesus have to die?”.