Simple learning program with (possibly) horrendous code.