[Talk] Question about scripts

Danny Rathjens talk@flux.org
Thu, 07 Sep 2006 13:00:35 -0400


Kwan Lowe wrote:
> Not really Linux related so I'm posting it here...
> 
> Say you get a request to print out the first 10 digits of Pi in the fewest possible
> number of lines (source).  You turn in the following:
> 
> #!/bin/sh
> echo "3.141592653"
> 
> The instructor marks it wrong, and argues that it's contrary to the spirit of the
> assignment.  What do you folks think?
 
If it is a programming class where you are learning how to solve problems
algorithmically, then it is wrong.  If it is a logic class, where overly-literal
interpretations are good, then it is correct. :)
I'd expect a chance to redo it "in the spirit", though, if told a hard-coded
answer is unacceptable.
-- 
     _.,-*~`^'~*-,._ Danny Rathjens _.,-*~`^'~*-,._
FireCast: Rock solid kiosk software: http://www.wirespring.com/