logoalt Hacker News

pjmlptoday at 1:33 PM1 replyview on HN

No need for graphics programmers, anyone that is still around coding since the old days, does remember on how to make use of data structures, algorithms, and how to do much with little hardware resources.

Maybe the RAM prices will help bringing those skills back.


Replies

socalgal2today at 6:01 PM

Those practices make things hard to modify and update. As one example, I use to use binary formats for game data. The data is loaded into memory and it's ready to use, at most a few offsets need to be changed to pointers, in place.

Good: (*) no extra memory needed (*) can read directly from CD/DVD/HD to memory - not through buffered i/o (*) no parsing time

Bad: (*) change or add a single field in to any part of the saved data and all previous files are now invalid.

I'd solve this with a version number and basically print a message "old version in file, rebuild your data"

Modern apps use JSON/Protobufs, etc. They are way slower to load, take way more memory as there are usually 2 versions of the data, the data in the file and the parsed data your app is actually using. They take time to parse.

But, they continue to work even with changes and they can more trivially be used across languages and apps.

That's just one example of 100s of others where the abstraction is slower and uses more memory but provides flexibility the old ones didn't.

show 1 reply