From: Michael Campbell Date: 2002-10-18T23:57:17+09:00 Subject: Re: Please check my algorithm > > It amuses me sometimes to see the accolades for how much easier > ruby > > is to read/write (or how much harder perl is!) because of the > more > > regular syntax. Then inevitably when someone asks how to do > > something, the responses leapfrog each other in terseness _well_ > > beyond reasonable readability. =) > > Small problems like this are a great way to explore some of Ruby's > features, though. And every now and then, as you whittle and hack > away > at the code, you break through some sort of obfuscation barrier and > everything suddenly crystallises into a beautiful new form or > technique that is both terse and elegant, but which would never > have > been found if you'd stuck to the clear but verbose way of doing it. Point well taken. It might be a good idea sometimes however for those among you who really know the language well (I'm not one) to point out that this is the "compressed" version of a possible solution, done at least in part as a intellectual exercise for the submitter. My thought here is that if a genuine neophyte comes here asking for help and gets this 1 liner checksummed line-noise answer, they walk away thinking "this is easier to read?", and may drift away. While I'm sure the person who submitted the answer was at least partially doing it for his OWN education in How Ruby Works and its capabilites etc. Just today I saw, for example, a question on how to split a file into pieces based on a regex in the file. One of the answers was a very good, but typical 1-liner that approached APL readability. Maybe I'm just projecting a thin-skinned personality on the questioner, too. ===== -- Use your computer to help find a cure for cancer: http://members.ud.com/projects/cancer/ Yahoo IM: michael_s_campbell __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com