[Belfast-pm] unshift-y bop-op-op-op, just blows me away </hair>

Andrew Wilson andrew-belfastpm at rivendale.net
Thu Dec 23 11:17:28 CST 2004


On Thu, Dec 23, 2004 at 04:58:38PM +0000, Marty Pauley wrote:
> On 2004-12-23, Andrew Wilson wrote:
>> 
>> perl -e 'do{for(0..10){print$i++%11," "}print"\n";$i--}for 0..10;'
>> 
>> But that's butt ugly,
> 
> And it doesn't work, where "work" is defined as "produce the same output as the
> original code".

you're absolutely right. I ran it, checked it by eye and missed the
differences. Hmm, Take it as an example of why automated tests are
better than running the code and exmining the output.

andrew
-- 
Scorpio: (Oct. 24 - Nov. 21)
You haven't carried out any of the reforms you promised you would,
but you'll still be re-elected by a majority of your girlfriends.


More information about the Belfast-pm mailing list