Teaching Data-Oriented Design in an Introductory Programming Class

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Professor I plan to be referencing this for my upcoming ECS prototype. Thank you so much for these lectures.

AdityaSinha
Автор

I find it interesting!
As a kid of the 70s I was hacking in 6502’assembler. And you consciously start to put data, in efficient places and formats. So that you can easily (and quickly move through it).
When I had to learn OOP, I saw how it would make business logic very legible. But I always found it causing too much overhead and creating often very inefficient memory structures. And not really being able to layout the data and the code the way you would want. But it was/inconvenient in many practical cases.

I guess finally time has caught up, where we look at a case by case basis what’s the best approach.
This is the biggest problem in computer science, when to use what paradigm.

My colleagues in my last project weren’t developers. And we do identity management (pushing data around and enriching it, and many of that enrichment and data changes are on the same attributes — you don’t tend to change a surname that often, but you do change dates a lot and access locations). I saw so many single task procedural scripts, that all used this in efficiently ordered data sets.
So I decided to make a meta data description language. To would organize source data dynamically, into different structures. So we could do the import and export transformations efficiently and in the end add that stuff to it that hardly (if ever) changed.
They found it very complex and useless. Until I showed the product owner that a properly described import/export set would go from several minutes to several seconds (~35 times faster).
Only by ordering and reordering the data as described. He was convinced that the complexity was something they’d to get used to.
After a few weeks they were import/export defining like a boss. And we only had one code base. Which is impossible in OO, you’d need to make different classes. And thus inheritedly different structures.

So I advocate to reinstate assembler in semester 1. That helps to “put the data first”, in the developer’s mind.
I wouldn’t loved the concept of an L1 and L2 cache back in the 6502 days :) I sort of treated the zero page like already. It saved extra cycles compared to reading from ram :)

rdoetjes
visit shbcf.ru