News for hackers. Stuff that matters.
Re:Nice try, kid ... by umjames on Wednesday January 30, 2008 @02:41PM (#107013)
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.

Re:Nice try, kid ... by eru on Wednesday January 30, 2008 @03:47PM (#107051)
In retrospect I wonder why we did what the teachers told us. Mostly.
Re:Nice try, kid ... by rms on Wednesday January 30, 2008 @06:37PM (#107155)
We were trained to obey with the eventual consequences of insubordination being suspension or expulsion.
Re:Nice try, kid ... by tb on Wednesday January 30, 2008 @08:30PM (#107202)
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.

Re:Nice try, kid ... by tomjen on Wednesday January 30, 2008 @11:49PM (#107266)
What is so bad about suspension? He would have more time to do something that is fun when he is not in school.
Re:Nice try, kid ... by rms on Thursday January 31, 2008 @12:02AM (#107275)
College applications ask if you were ever suspended from school.
Re:Nice try, kid ... by frankus on Wednesday January 30, 2008 @04:48PM (#107096)
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.
Re:Nice try, kid ... by dkokelley on Thursday January 31, 2008 @03:36AM (#107322)
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.
Re:Nice try, kid ... by edw519 on Thursday January 31, 2008 @08:43AM (#107382)
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.

Re:Nice try, kid ... by dkokelley on Thursday January 31, 2008 @02:58PM (#107532)
ha(x4) good one! I could have written it in some form of Chinese and used 7 characters.
Re:Nice try, kid ... by mrtron on Wednesday January 30, 2008 @12:36PM (#106919)
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!

Re:Nice try, kid ... by dima on Wednesday January 30, 2008 @02:16PM (#106990)
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)]

Re:Nice try, kid ... by jgrahamc on Wednesday January 30, 2008 @03:09PM (#107021)
Um. Because writing to stdout will serialize the processes?
Re:Nice try, kid ... by rontr on Thursday January 31, 2008 @12:14AM (#107280)
What makes you think it's written to stdout?
Re:Nice try, kid ... by mynameishere on Wednesday January 30, 2008 @03:38PM (#107046)
stdout can be redirected, as to a stream that round robins it to a matrix of printers.
Re:Nice try, kid ... by eru on Wednesday January 30, 2008 @03:48PM (#107053)
Matrix printers?
Re:Nice try, kid ... by mynameishere on Wednesday January 30, 2008 @04:04PM (#107068)
of
Re:Nice try, kid ... by Xichekolas on Wednesday January 30, 2008 @06:35PM (#107153)
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.
Re:Nice try, kid ... by eru on Thursday January 31, 2008 @03:50AM (#107326)
Sure, of. But a Matrix of Matrix printers would be nice.
Re:Nice try, kid ... by jgrahamc on Wednesday January 30, 2008 @01:01PM (#106936)
(for i 1 500 (prn "I will not throw paper airplanes in class."))

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

Re:Nice try, kid ... by davidw on Wednesday January 30, 2008 @03:09PM (#107022)
"prn"? Ick. Looks like 'porn'! Why not print, or put, or puts or out or just "p"?
Re:Nice try, kid ... by jgrahamc on Wednesday January 30, 2008 @03:23PM (#107029)
pr = print

prn = print followed by newline

Re:Nice try, kid ... by run4yourlives on Wednesday January 30, 2008 @03:21PM (#107028)
Because i and t are such a waste of time! :-)
Re:Nice try, kid ... by WilliamLP on Wednesday January 30, 2008 @05:21PM (#107118)
?"For the win."
Re:Nice try, kid ... by BrandonM on Wednesday January 30, 2008 @03:34PM (#107041)
Wouldn't it be easier to type:

(repeat 500 (prn ...))

?

Re:Nice try, kid ... by jgrahamc on Wednesday January 30, 2008 @03:40PM (#107047)
You are correct. I need to go back and reread the tutorial.
Re:Nice try, kid ... by jamiequint on Wednesday January 30, 2008 @04:37PM (#107092)
or ruby

  (0..500).each {|i| print "I will not throw paper airplanes in class\n"}
Re:Nice try, kid ... by aston on Wednesday January 30, 2008 @05:24PM (#107120)
500.times {print "I will not throw paper airplanes in class \n"}
Re:Nice try, kid ... by curi on Wednesday January 30, 2008 @05:35PM (#107124)
500.times {puts "I will not throw paper airplanes in class"}
Re:Nice try, kid ... by jamiequint on Wednesday January 30, 2008 @06:00PM (#107137)
I figured there was something in ruby for that :P
Re:Nice try, kid ... by chengmi on Wednesday January 30, 2008 @02:22PM (#106999)
Now all he has to do is compile, link, and load!
Re:Nice try, kid ... by mattmaroon on Wednesday January 30, 2008 @09:51PM (#107230)
Cute, bizarre, clever. Good.