DEV Community

Priyabrata Paul
Priyabrata Paul

Posted on • Originally published at priyabrata-paul-blog.hashnode.dev

Story of the First Array

🙋‍♂️Hi

In this story, we will uncover how arrays were first employed to tackle data structure challenges at the hardware level. We will also follow their journey as they became crucial elements of programming languages. Let’s begin.

Prologue: A Need for Order

It was the spring of 1945 at the Moore School of Electrical Engineering in Philadelphia.

A handful of engineers huddled around a chalk‑filled blackboard, wrestling with a bold new idea: a computer that could store both its instructions and its data in the same memory. John von Neumann, fresh from his work on the Manhattan Project, was sketching a diagram of a long row of identical cells, each labeled with a number—0, 1, 2…—and a tiny arrow pointing to the next.

“The machine must be able to fetch any datum directly,” he said, tapping the first cell. “If we give each cell an address, the program can jump straight to it without scanning.”

That simple insight—contiguous, addressable memory—was the seed of the array.

Array in Hardware - The EDVAC Experiment

Later that year, the EDVAC (Electronic Discrete Variable Automatic Computer) began construction.

EDVAC was one of the first stored-program computers that utilized registers to hold temporary data and employed magnetic core memory for efficient storage and retrieval of information. Its designers needed a way to keep track of the intermediate results of a long numerical simulation of ballistic trajectories. For this, the values were stored in magnetic core memory. However, as they delved into this complex task, they encountered a significant challenge: the management of data.

Problem - Data was scattered

Initially, data was scattered across non-contiguous memory locations, resembling fragmented islands in a vast ocean. Programmers relied on individual variables to store each piece of data, which forced them into a daunting juggling act as they monitored memory addresses and sizes. This haphazard approach not only complicated coding but also increased the chances of error, rendering even simple operations cumbersome.

While magnetic core memory offered improvements in speed and reliability over earlier technologies, it did little to alleviate the fundamental issue of fragmented storage. The inefficiencies began to surface, especially when complex calculations required multiple variables. Amidst this chaos, the concept of arrays emerged as a revolutionary solution.

Solution - Data stored in arrays of memory

Arrays allowed for contiguous memory allocation, organizing related data into neat blocks. This structural change transformed how EDVAC handled information, making it easier for programmers to access entire datasets at once. No longer did they need to hop between scattered variables; data management became streamlined and intuitive.

This pivotal transition not only resolved the inefficiencies of the early design but also set the stage for future advancements in computing. With the advent of arrays, EDVAC embraced a new era of organized data handling, laying the groundwork for modern programming practices. The struggles of its early days faded into history, replaced by the promise of efficient and effective data management that continues to shape technology today.

The EDVAC’s successful use of a contiguous block of memory became the first real‑world demonstration that an array could serve as a general‑purpose data container.

From Hardware to Language – FORTRAN’s DIMENSION

A decade later, the IBM 704 was humming in a Boston lab. Scientists needed to solve massive systems of linear equations for nuclear physics research. The existing programming methods forced them to write repetitive code for each variable, a nightmare of bookkeeping.

Enter a small team led by John Backus. While drafting the language specification for what would become FORTRAN I, Backus remembered the EDVAC’s memory layout. He introduced the DIMENSION statement:

DIMENSION X(100), Y(100)
Enter fullscreen mode Exit fullscreen mode

Now a programmer could declare a fixed‑size, one‑dimensional array of 100 elements with a single line of code. The compiler translated X(I) into base address of X + (I‑1) times the word size, exactly the addressing scheme pioneered on the EDVAC.

The first FORTRAN program to use DIMENSION solved a set of differential equations for a weather‑prediction model. It ran orders of magnitude faster than its predecessor because the array allowed the algorithm to iterate over data with simple, predictable memory accesses.

Zero‑Based Indexing – ALGOL 60

Across the Atlantic, a consortium of European and American computer scientists gathered in 1960 to design a language that could express algorithms clearly. Their meetings produced ALGOL 60, which introduced zero‑based indexing for arrays:

integer A[0:9];
Enter fullscreen mode Exit fullscreen mode

The decision to start counting at zero mirrored the way hardware addressed memory—offset 0 from the base address. This subtle change made the mental model of array element = base + index × size exact, eliminating the off‑by‑one adjustments that had plagued earlier code.

ALGOL’s array syntax spread quickly to academic circles, influencing later languages such as Pascal, C, and ultimately the modern programming ecosystem.

Epilogue: The Legacy of a Simple Row

From a chalkboard sketch in 1945 to a language keyword in 1957 and a standardized indexing rule in 1960, the array traveled from hardware necessity to a universal programming abstraction. Its core idea—store a collection of homogeneous items in a contiguous block and address each by its position—remains unchanged in today’s GPUs, databases, and high‑performance scientific codes.

Every time a program accesses arr[i], it echoes the same principle that von Neumann first wrote on that blackboard:

… give each piece of data a number, and you can reach it instantly.

The story of the array is a reminder that some of the most powerful tools in computing begin with the simplest of insights.

Bye 🙋‍♂️

Congratulations! You finished reading this article.
See you then, in another story.


References


Top comments (0)