The Kilobyte's Gambit is a delightful, painful reminder
How chess in 1K of code is putting Gigabytes and Gigahertz to shame in 2021
Sometimes it takes a virtual kick in the head to be reminded - in this day and age when people take so much for granted - that certain things have gone astray in the tech world. One of them: clean code. Most smartphone or laptop owners used to GB of system memory and TB of storage probably won't believe this, but some of us remember using computers with 16K of RAM (hello there Sinclair ZX Spectrum). Yes, that is 16K, not 16MB (which is a thousand times more): an amount of memory so small, so insignificant as to defy comprehension. The favicons of websites on our browser bars take up around 4K or more. So nobody would possibly be able to do anything with 1K of RAM today, right?
Anyone who lived through the Atari ST/Amiga days surely remembers the demo/intro scene, where expert programmers tried to cram as many dazzling graphics routines playing in a loop in as little an amount of memory as possible. There have been several true audiovisual works of art created by talented programmers like that, weighing in at 16K or less. Modern hackers have their own version of that competitive demo scene, called "the 1KB challenge", where they try to make something fully functional and usable taking up no more than 1K of memory. Some of them did manage to produce amazing results in recent years by utilizing assembly (direct "to the metal" coding) and advanced programming techniques.
Since Netflix's The Queen's Gambit show made chess wildly popular late last year, The Kilobyte's Gambit goes for that Beth Harmon famous pose and some lovely 8-bit quality graphics. It works. But the very fact that one can play chess - one of the most complex board games in human history - with a computer that's using just 1KB of memory to decide its moves is nothing less of astounding. The AI is no Deep Blue, of course, as it would need a library of moves and games many GB in size in order to present seasoned chess players with a serious challenge, but still: 1KB of RAM. The mind boggles at the simple thought of it.
It all goes to show that since the late 80s, somewhere down the line, clean code just stopped being a priority for software companies. The code they produced for operating systems, applications, you name it became less and less lean and efficient, more and more bloated and resource-demanding, to the point where (voila!) hardware upgrades were needed to run it productively. We've arrived at a point where devices that fit in our pockets possess enough processing power to send rockets to space, but they often do not feel powerful enough for everyday tasks.
This can't be easily undone now, as it would surely require a complete reset of all systems, protocols and platforms all modern apps and services depend on. But developers of all levels could make an effort to return to the clean code ethos whenever possible. Maybe what cannot be done in one broad sweep, could be achieved little by little over time. Maybe.