Blog
What’s happening at hasToggle.
Stay informed with learning resources and keep your debugging ducks in a row.
Friday, January 10, 2025
Ernst Stolz
This is bananas: why you don't get arrays
Finding the avocado 🥑 in an array is a good enough metaphor for one of the core problems in computer science: search. Arrays don’t remember where they store things—you give them items, and they forget where they put them. So, when you ask for the avocado, the array has to loop through itself, checking each item one by one. This process, while simple, highlights a crucial concept: computers don’t “know” where things are; they only know how to search. And search? That’s at the heart of everything in programming.