National Novel Generation Month, 2017 Edition

November is traditionally “National Novel Writing Month.” The goal is to write a short novel that is 50,000 words in length. I always have grand plans to attempt it and have started a number of times over the years but have never actually finished. (One day, I swear!)

Recently, I stumbled across a geekier take on it, called National Novel Generation Month. The goal of this particular project is to write code that can generate a 50,000 word novel instead. Hey, why not?

I published my code at the beginning of November for my project: The Complete Encyclopedia on 1,449.5 Random Ways to Make a Sandwich.

This book of 1,449.5 random sandwich recipes was created for NaNoGenMo (National Novel Generation Month) 2017. You can view the source code for this project on GitHub.

It uses data parsed from a 1909 book, entitled “The Up-To-Date Sandwich Book: 400 Ways to Make a Sandwich”, written by Eva Greene Fuller and now available for free in the public domain.

For this particular book, new sandwich recipes were generated using Markov chains created from the above text.

Please don’t try to actually make any of the sandwich recipes created with this process. However, if you do, please contact me and show me pictures.

Disclaimer: I cannot be held responsible for any health issues that may arise from eating any of these sandwiches.

There are definitely some interesting ones…

BUTTERED CHEESE AND OLIVE SANDWICH NO. 3

Use three slices of Swiss cheese, spread fresh butter and two tablespoonfuls of olive oil, the juice of two oranges and knead the mixture.

Giving audiobooks a try (again)

I’ve tried to get into audiobooks in the past, but never found them enjoyable.

That changed earlier this summer ahead of our epic road trip to Wyoming to see the total solar eclipse (oh hey, I never wrote about that experience). I saw an offer for new Audible memberships that sounded like a pretty good deal, so I jumped on it.

The first book I ended up download was The Power Broker, which ended up totaling over 60 hours of audio! And you know what?

It. Was. Awesome.

I think I’ve finally found out why I could never get into audiobooks in the past. It’s because I listened to them at normal 1x speed. The narrators read the stories so so so slow. If I speed things up to 1.5x or 1.75x, it sounds much more interesting to me and I find that I’m able to keep focus.

Plus, it turns a 66 hour story into a 50 hour story. Saves time (for more audiobooks). I really recommend it. It’s been a nice break from listening to my standard array of podcasts, which have focused on depressing news as of late.

Since I subscribed in August, I’ve now listened to:

And I’m currently working through Washington (41 hours) by Ron Chernow (he wrote the recently popular biography about Alexander Hamilton, which the musical is based on).

Unimaginable fires in the North Bay

At the moment, something like 3,000 homes have been lost in the North Bay. It’s hard to even fathom the thousands of tragedies unfolding in the North Bay this week and how people who’ve lost their homes, pets, friends, loved ones, or all of it are even coping right now. ❀️

In 2003, a meth addict trying to burn down a house started the Old Fire in the mountains near our house in Southern California. At the time, my dad worked for San Bernardino County and helped maintain their emergency communications system.

When the fires broke out, he was tasked with heading up the hill and bringing some emergency generators and other supplies to an *old* AT&T communications bunker on Strawberry Peak. It was built in the 1950’s and allegedly hardened to withstand a nuclear war. I ended up making the trip up with him.

For two days, we sat on top of the bunker and watched the fires slowly climb the mountain toward us. They were far enough away that we couldn’t hear trees burning, nor hear the bombers dropping Phos-Chek, nor smell smoke due to the wind blowing in a different direction, nor hear the sirens of firetrucks passing below on Highway 18.

At night, we watched the eerie glow of the flames play off the constantly changing patterns of smoke. Fortunately for us, the flames never reach the communications bunker.

Down below, 90,000 acres and 1,000 homes would ultimately be lost.

We had a few close calls growing up, but we were always lucky. I can’t even pretend to imagine the pain and suffering our friends and their families are going through right now.

Want to learn to code?

A friend of mine recently asked for some suggestions on which language she should use to learn to code.

There are so many different routes to go! Python and JavaScript might be easiest because they’re dynamically typed languages (basically they’re more forgiving with how you use variables and pass them around — it’s one less thing to worry about as you start out).

I find Python to be super fun and easy to pick up. Plus there’s tons of neat libraries available for manipulating data. One bonus: down the road, you can start playing with some of the many machine learning libraries that are available. Then you can build a model that will predict names of Android phones.

I’m partial to JavaScript. At this point, it’s probably one of the most popular languages right now. People are building web apps, desktop apps, native mobile apps, and backend servers with it due to the abundance of tools available. Plus, there’s a really addictive feedback loop with it: when you’re first starting out, you code something, refresh your browser and boom, there it is!

I’ve played only a little bit with Swift. I like it and I think Apple is doing some good work trying to provide tools to help people learn. For now, you’re mostly going to be limited to building mobile apps, though there are more tools being built that expand its uses (e.g., servers).

Stay away from PHP.

There are tons of great resources. Codecademy, Code School, Udemy, free tutorials, etc. When I started out, I started learning by trying to build a JavaScript app that could solve Sudoku puzzles. Somehow, I eventually did it! I was pretty hooked!

Getting excited for totality

We’ll be road tripping to Wyoming to see the total solar eclipse. Apparently, experiencing one is really weird.

During a solar totality, animals usually fall silent. People howl and weep. Flames of nuclear fire visibly erupt like geysers from the sun’s edge. Shimmering dark lines cover the ground.

I can’t wait!

Emoji Say What?

Here’s a random little side project that I’ve been working on: Emoji Say What?

It’s like a game of telephone, but using the latest in human communication technologies, hieroglyphics, emoji!

Basically, you visit the site and get a completely out of context sentence or set of emoji and it’s your job to decipher it. And so on and so on. It evolves over time and eventually you get something like this.

Using neural networks to generate names for craft beer.

I’ve been on a machine learning kick lately. Given a large enough dataset to train with, it’s really interesting to see what a neural network can come up with.

This week, it’s names for craft beer.

If you’re a fan of IPA beer, you’ve got names like Dang River, Yamquak, Yall in Wool, Wicked Geee, Yampy, and Oarahe Momnila Day Revenge Bass Cornationn Yerve Of Aterid Ale. Like strong pale ales? Trippel Lock, Third Maus, Third Danger, Spore of Gold and Drammnt. Stouts more your thing? Look for Sir Coffee, Shock Slate, Take Bean, Black Sink Stout, Shrump, Avidberry, or Cherry Trout Stout.

Naturally, I tried to create my own model using a Python library called Keras and a dataset of 7,500 craft beer names.

…I should leave this stuff to the professionals.

Update: Kaggle has a new tutorial teaching you how to do this exact same thing. Neat!