Many programs that we write can be embedded in recurrent neural networks (RNNs). For such programs, a trained RNN can perform better than if we write the algorithm by hand, refining it via trial and error. I walk through an example in detail. Introduction Humans are bad at managing spaghetti code. Of course, we should try and avoid writing spaghetti code if we can. But there are problems that are