REUSABLE CODE
The names that Kenny gave his programs didn't matter much. He named his stock-picking program "nemo," thinking the word meant "nothing" in Latin, though it actually means "no one." That was what he thought the project was: nothing.
In fact, a big part of Kenny's stock-picker was borrowed from a different program he had written before, Pats Suck. That name made even less sense at first blush, because he had written the Pats Suck program to compile negative news coverage about the New England Patriots.
Pats Suck was the program Kenny wrote at the height of his frustration with grad school, before he dropped out. It was his least serious program yet, but he worked on it for two weeks -- the longest stretch since a few of his major college assignments.
The New England Patriots were not just Kenny's local pro football team. They were the undeserved, cheating victors over Kenny's Eagles in Superbowl XXXIX. Kenny didn't care too much about the Pats, honestly. But his fierce loyalty to a zero-championships team manifested in disparaging other teams and their fans. He yelled at the Eagles too, in Philly fashion. But he knew, as did every Philly fan, every player on the Eagles, even his TV, that it was among his greatest wishes that the Eagles would win a Superbowl within his lifetime. And if and when they did, you could be sure they'd win not because they were a perfect team, but rather because they fought the hardest.
He could barely watch an Eagles game. Year after year, they were locked in talented mediocrity. They won some amazing games. They looked good on paper, terrible on the field, and they won anyway. Some of the time. Just enough to get to the playoffs, and lose. Watching even one game was too painful, watching them throw it away. He'd turn off the TV, yell, go outside, sit on the stoop, wait a minute, go back inside, turn the game back on. Turn it off and stare at the TV, turn it back on again.
Superbowl XXXIX was worse: the Eagles never should have had a chance, and they almost won, against the odds.
He'd never root for another team. It was fair to say that he'd rather have them the way they were rather than trade any part of them in for another franchise.
Pats Suck was Kenny's most advanced scraper program. It could independently Google for news about the Eagles and the Pats and direct itself to the result pages. Then it scraped the pages for language about the two teams. But it was also a kind of joke. It picked out all the good news and comments about the Eagles, all the bad news about the Pats, and emailed it to him. It all happened automatically. In a sense, the Eagles won every day, when he opened his inbox, even in the off season.
But there wasn't much football news worth reading in the off season. So, not too long after he wrote the program, he directed the daily automatic messages straight into a folder of his email that he never read. Then he forgot about it, like the rest of his programs, and the home-team conquests it collected went unnoticed.
The Pats Suck program was reborn when Kenny worked on his stock-picking program.
Kenny worked by the maxim, "Good coders code; great coders reuse." You could sit down and type out hundreds of lines of brilliant code to do some computational task, but (according to the maxim) you could work faster and better by finding and using code that someone had already written to do that task.
Kenny was a silent champion of code reuse, because he was always trying to write programs that he didn't really have the skills or experience to create correctly, and he was too lazy to learn how. When he wrote the stock-picker ("nemo"), Kenny reused Pats Suck. He didn't even have to copy and paste the code; it was easy for one program to incorporate another one in a line or two.
With one or two changes, he had a program that could go out and fetch news about the stock market by looking for certain words and then copying and pasting text.
The stock-picking program had only two other parts: a Guesser, and a Judger.
The Judger was simple: it looked at the program's stock portfolio at the end of every day and saw whether the portfolio had gone up or gone down. Thumbs up or thumbs down.
The Guesser was complicated: it was supposed to take the news and try different stock-picking strategies. In the Jeep, listening to Gene, Kenny realized that his Guesser was a lot like what Simon called the Playbook. It tried different stuff.
But my program was terrible, Kenny thought. It didn't work -- at all. The Guesser could barely guess anything.