java haiku

Mar. 15th, 2007 05:14 pm
109: (Default)
[personal profile] 109

ArrayList<int> myListOfInt = new ArrayList<int>();

which, spoken aloud, reads:

ArrayList of Int
my list of int, equals new
ArrayList of Int


In 1986, my college Psychology 101 professor told us a little story about her Abnormal Psych class from the previous year. The students each got a lab rat, and they had to train their rats to run through mazes by rewarding the rats for exhibiting properly ratty maze behavior. But there was one girl who was terrified of rats, so they gave her a chicken, and she trained it to play the piano by pecking notes with its beak. Each time the chicken played the right notes, she'd give it a pellet (or whatever the hell chickens eat). Wrong notes, no pellet. She'd teach it one new note at a time, and eventually it would know the whole song.

At one point, after she'd coaxed the chicken to learn maybe half its song, the chicken made a violent side-to-side motion just before playing exactly the right sequence of notes, including the new note she was trying to teach it. It had played the right notes, so she had to give it a pellet. The chicken had definitely figured out that doing what she wanted would get it yummy pellets. After that last pellet, it decided that it had been rewarded for both the note and the motion, and from then on, it made crazy twisting motions continuously as it played. She had to keep rewarding it when it played the right notes, and she had no good way of informing it that the twisting was unnecessary (not without starting over, and there wasn't time). So the chicken went on happily believing that thrashing violently was helping its project succeed.

They eventually went on tour to the local colleges with it, billing it as "The Break-Dancing, Piano-Playing Chicken".

(no subject)

Date: 2007-03-17 12:17 am (UTC)
From: [identity profile] 109.livejournal.com
ну да, у меня тут двойственные ощущения. с эстетической стороны я минималист, и стивенская мысль, выраженная в виде хайку, близка моей душе. с другой стороны, три года писания на шарпе под решарпером сделали процесс превращения мысли в голове в код на экране практически автоматическим, и идентичность первой и третьей строчек соответствующих хаек (хайков?) совершенно не беспокоит.

Profile

109: (Default)
109

March 2019

S M T W T F S
     12
3456789
101112131415 16
17181920212223
24252627282930
31      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags