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.

Supervirus
titlepage.xhtml
jacket.xhtml
Supervirus_split_000.html
Supervirus_split_001.html
Supervirus_split_002.html
Supervirus_split_003.html
Supervirus_split_004.html
Supervirus_split_005.html
Supervirus_split_006.html
Supervirus_split_007.html
Supervirus_split_008.html
Supervirus_split_009.html
Supervirus_split_010.html
Supervirus_split_011.html
Supervirus_split_012.html
Supervirus_split_013.html
Supervirus_split_014.html
Supervirus_split_015.html
Supervirus_split_016.html
Supervirus_split_017.html
Supervirus_split_018.html
Supervirus_split_019.html
Supervirus_split_020.html
Supervirus_split_021.html
Supervirus_split_022.html
Supervirus_split_023.html
Supervirus_split_024.html
Supervirus_split_025.html
Supervirus_split_026.html
Supervirus_split_027.html
Supervirus_split_028.html
Supervirus_split_029.html
Supervirus_split_030.html
Supervirus_split_031.html
Supervirus_split_032.html
Supervirus_split_033.html
Supervirus_split_034.html
Supervirus_split_035.html
Supervirus_split_036.html
Supervirus_split_037.html
Supervirus_split_038.html
Supervirus_split_039.html
Supervirus_split_040.html
Supervirus_split_041.html
Supervirus_split_042.html
Supervirus_split_043.html
Supervirus_split_044.html
Supervirus_split_045.html
Supervirus_split_046.html
Supervirus_split_047.html
Supervirus_split_048.html
Supervirus_split_049.html
Supervirus_split_050.html
Supervirus_split_051.html
Supervirus_split_052.html
Supervirus_split_053.html
Supervirus_split_054.html
Supervirus_split_055.html
Supervirus_split_056.html
Supervirus_split_057.html
Supervirus_split_058.html
Supervirus_split_059.html
Supervirus_split_060.html
Supervirus_split_061.html
Supervirus_split_062.html
Supervirus_split_063.html
Supervirus_split_064.html
Supervirus_split_065.html
Supervirus_split_066.html
Supervirus_split_067.html
Supervirus_split_068.html
Supervirus_split_069.html
Supervirus_split_070.html
Supervirus_split_071.html
Supervirus_split_072.html
Supervirus_split_073.html
Supervirus_split_074.html
Supervirus_split_075.html
Supervirus_split_076.html
Supervirus_split_077.html
Supervirus_split_078.html
Supervirus_split_079.html
Supervirus_split_080.html
Supervirus_split_081.html
Supervirus_split_082.html