Hacker News new | past | comments | ask | show | jobs | submit login

Even beginners can learn to program in a data oriented way from the beginning.

Two books that teach this style of programming to beginners are:

1. How to Design Programs - https://htdp.org/

2. A Data-Centric Introduction to Computing - https://dcic-world.org/




Those are not this.


Can you elaborate a bit more on the reason?


The books you presented are, roughly speaking, introductions to programming with a focus on data science, functional programming, and common structures/ideas used in those which are, in other texts, not usually considered introductory material. "Data" in this sense means, like, collected facts about the world and how to model them.

Data-oriented design is a particular way of designing your programs where you focus on efficiently laying out your "data" - in a different sense, meaning "whatever it is I've got in storage" - within that storage - to compute with it as fast as possible.

The industry-standard tools used for the first thing are often using techniques developed in the second of the second thing, but that's not relevant for the pedagogical framing. The tools they are teaching (Scheme and Pyret) actually make it very hard to play with low-level data layout details. And the emphasis in these texts on "real [as in, world] data" is in direct contradiction to the DOD axiom that "data is not the problem domain... The data-oriented design approach doesn't build the real-world problem into the code."

A rule of thumb: Is anyone talking about GPUs, SIMD, or CPU cache sizes? If not, you're looking at something about data modeling or data science, not data orientation.

And this, sorry, is all super fucking obvious if you actually read the intro to all three things.


I think this may be more akin to what you original comment meant: https://blog.klipse.tech/dop/2022/06/22/principles-of-dop.ht...

I got confused by the terms (Data Oriented Design and Data Oriented Programming) and watched Mike Acton's talk by mistake https://www.youtube.com/watch?v=rX0ItVEVjHc (and what a lucky mistake)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: