When I was a kid, my dad got an incubator and some eggs from a coworker of his who also raised chickens, and attempted to hatch about three dozen eggs (over the course of several batches). He wound up with seven slimy little chicks living in an old refrigerator box in his workshop. (I was expecting fluffy cute chicks, and they did turn into fluffy cute chicks pretty quickly, but as it turns out the inside of an egg is full of slime! Who knew.) They took ill, and four of them didn't make it. Of the remaining three, Spot and Feathers turned out to be roosters and had to be returned to the farm, but Blacky endeared herself to us by laying eggs and eating grubs, and lived a reasonably full chickeny life before some kind of nocturnal predator broke into her coop.
So I had fond memories of chickens.
Then, when we moved into our last apartment here, I started biking past the police station on my way to work. There were three or four chickens who lived across the street from the police station that I would frequently see milling about in their front yard, scratching in the police station's lawn, or crossing the street on the way from one side to the other. Huh, I thought. Keeping chickens in Mountain View must be legal.
So I looked up the city code and started haunting the forums at Backyard Chickens. After we bought the house brooksmoses designed a coop that followed all (well, most of) the relevant rules and suggestions, a friend who worked at a pet store hooked me up with three-day-old sexed chicks (thereby skipping all the really difficult parts), and that was that. They lived in a cage with a heat lamp until they were big enough to go outside and the coop was finished.