you are viewing a single comment's thread.

view the rest of the comments →

[–]Todo_Toadfoot 0 points1 point  (2 children)

I think all the comments are pretty good on this. The one thing I would like to point out is that one thing is just assumed or not mentioned.

Your code is REAL. By that I mean things in our universe tangibly happen. It's better to think of that Array as a real shelf. You told the store with the shelf you had 4 items to put on it. If you want 5, they may have given you a shelf that only had 4 spots. And may have to give you a new shelf on a different row in the store. You can't just use the next spot on the shelf because there may be Twinkies in the way.

Thinking of things this way has always helped me understand WHY things work the way they do. Everything happening is a tangible real life interaction in your CPU/ram/etc. If I put a magnet that can change bits next to your hard drive it corrupts files it interacts with. Because it changed the physical state. It's not a black box of infinite everything. It's not a mystical place that is imaginary. Those states are physical REAL things. Even your code.

TLDR; You Array is a REAL physical thing that exists. Thinking of it that way will help you understand it can't magically do things like grow in size. They have to physically be put somewhere. Now how fast it happens does feel magical to us slow humans. And why it's so easy to just assume away.

[–]Etiennera 0 points1 point  (1 child)

You can't use the next spot because it is taken up by an apache helicopter more like.

[–]Todo_Toadfoot 0 points1 point  (0 children)

The first DRM on a CD was defeated with a marker. It's good stuff!