Hacker News new | past | comments | ask | show | jobs | submit login
Nice try, kid ... (flickr.com)
33 points by catalinist on Jan 30, 2008 | hide | past | favorite | 32 comments



I actually did something similar when I was in middle school. The teacher wanted everyone in the class to write something like that 500 times and turn it in the next day.

I went home and ran the following program on my Apple IIe:

  10 FOR X = 1 TO 500
  20 ?"I will behave myself in class"
  30 NEXT X

  PR# 2
  RUN
With the printer plugged into slot 2 on the machine, this sent the output of the program to the printer.

Needless to say the teacher was not impressed the next day, when I handed in several sheets of linefeed printer paper. I was impressed however.

He made me write it by hand about 100 times instead of 500.


In retrospect I wonder why we did what the teachers told us. Mostly.


We were trained to obey with the eventual consequences of insubordination being suspension or expulsion.


I have a friend who was suspended from high-school for (indirectly) refusing to do a word puzzle. His stated reason is that he doesn't like word puzzles. When he was asked to leave the room for failing to follow instructions, he refused. The punishments escalated and he refused each one on the basis that it was overblown punishment for refusing to do a word puzzle. Eventually he reluctantly agreed to a week's suspension because the only worse punishment available was expulsion.

He still carps on about being suspended for a week for refusing to do a word puzzle.


What is so bad about suspension? He would have more time to do something that is fun when he is not in school.


College applications ask if you were ever suspended from school.


Not as high-tech, but I once got caught writing a column of "I"s, a column of "will"s, a column of "not"s, etc.


I find it funny that many of these comments are on ways the code could be improved. We are a strange bunch of people indeed. Still, I laughed when I saw this image.


First sentence should have been:

"Funny how much commenting about improving code."

Second sentence should have been:

"We are strange."

Third sentence should have been:

"I laughed anyway."

50.6% as much text.


ha(x4) good one! I could have written it in some form of Chinese and used 7 characters.


Now all he has to do is compile, link, and load!


Should have wrote it in Python to save a few lines :)

for x in range(500): print 'I will not throw paper airplanes in class.'

Or perhaps Arc!


Why not use Erlang and make it concurrent? :)

[spawn(fun() -> print("'I will not throw paper airplanes in class.'") end) || N <- lists:seq(1, 500)]


Um. Because writing to stdout will serialize the processes?


What makes you think it's written to stdout?


stdout can be redirected, as to a stream that round robins it to a matrix of printers.


Matrix printers?


of


I'm pretty sure the people in the Matrix will be confused when every printer in the world starts printing out "I will not throw paper airplanes in class." ... Of course, then the agents will reset the system and everyone will just experience deja vu.


Sure, of. But a Matrix of Matrix printers would be nice.


(for i 1 500 (prn "I will not throw paper airplanes in class."))

Although, I assume the kid forgot the \n in his printf.


"prn"? Ick. Looks like 'porn'! Why not print, or put, or puts or out or just "p"?


pr = print

prn = print followed by newline


Because i and t are such a waste of time! :-)


?"For the win."


Wouldn't it be easier to type:

(repeat 500 (prn ...))

?


You are correct. I need to go back and reread the tutorial.


or ruby

  (0..500).each {|i| print "I will not throw paper airplanes in class\n"}


500.times {print "I will not throw paper airplanes in class \n"}


500.times {puts "I will not throw paper airplanes in class"}


I figured there was something in ruby for that :P


Cute, bizarre, clever. Good.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: