Remix.run Logo
dhosek 6 days ago

The way growth in memory availability changes the scope of problems is really quite astonishing. I cut my teeth writing code for Apple ][ computers with theoretically up to 128K of RAM, but in practice much closer to 40K for most use cases, but it does make me much more conscious of memory and CPU usage than younger devs who never faced these sorts of constraints.

Thinking of the example given about being able to just load the word list into memory, I did something of that ilk when my son’s fifth grade class read a book which had a concept of dollar words: You assign a value to each letter, a=1, b=2, … z=26, add up the value and try to get exactly 100. It was pretty trivial to write a program that read the word list and produced the complete list of dollar words (although I didn’t share that with my son, I did give him access to the word list and challenged him to write the program himself).

At the moment, I’m building up a Spanish rhyming dictionary by using a Spanish word list, reversing the words and sorting the reversed list to find the groups of words that are most likely to rhyme, which was something that 30 years ago would have been a challenge on my desktop computer but now is a brief script that I’m just as likely to manage through perl 1-liners and shell pipes as not.