DEV Community

Cover image for understanding : what computer wants
Mohammed Hamza (Horse Radish)
Mohammed Hamza (Horse Radish)

Posted on

understanding : what computer wants

So
this is my first post in a while
I am a serious procrastinator, so here it goes:
I am writing this post without any preparation (I know its the best) but I had to break the perfect chance cycle aka the perfectionist trap.
Today I just understood or more likely perception changed utterly, regarding a simple thing: ND arrays
I am re-learning and revising programming from 1 not zero since I had a couple of courses about a decade ago.
so I decided to make a 3*3 game puzzle
but kept thinking about how to make Python, C, or Java treat it as a grid, as in height and width because we were always taught that way and drawn in the board that way.
however, all the answers were about nested arrays or arrays inside arrays.
I finally understood it
s what and how perceiving a 2D array is different from how its created.
for Computer it
s always Linear but nested.
On the PC it`s always 1 big line so
1 2 3
4 5 6
7 8 9
is actually (1,2,3)(4,5,6)(7,8,9) but you use a library like NumPY to represent it to you in Human readable 2D table way.

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay