I finished the first part of my #NaNoGenMo project, a “Where I’m From” poem generator.
It’s nothing fancy, but I’m really pleased with how it turned out.
Some technical notes:
- The rest of the language comes from word lists, collected and curated by various sources, including me. I’m especially proud of the “trees” (I made a list of tree start and end words and it randomly combines them into pairs or trios) and the beverages — again I made a list of drink adjectives (hot, spiced, tropical) and drink nouns (coffee, lager, juice) and mashed them up.
- The quotes come from a not-very-scientific google search for “short quotes” plus a bunch of novel starting sentences. I could probably add more options and clean up what’s there, but it’s big enough to stay interesting for the time being.
- I had to tinker with the loading a bit, because originally the page was not loading new content on refresh. This is due to how and when I assigned the variables, and I fixed it by moving everything inside a function that gets called each page load.
- Did I mention I usually code in Ruby? I love Ruby. This is not Ruby! You can checkout the repo here for more details.
I needed a quick pick-me-up today (job hunting is brutal, y’all), and this hit the spot. I hope you enjoy!