Codes and Planning