From: James Edward Gray II Date: 2006-07-03T23:47:42+09:00 Subject: Re: [QUIZ] Sending Ruby code vs. provding URLs On Jul 3, 2006, at 9:35 AM, ara.t.howard@noaa.gov wrote: > On Mon, 3 Jul 2006, Josef 'Jupp' SCHUGT wrote: > >> Hi! >> >> At Mon, 3 Jul 2006 01:29:40 +0900, Dave Burt wrote: >>> http://dave.burt.id.au/ruby/fixed_width_ints.rb >>> http://dave.burt.id.au/ruby/weak_hash.rb >> >> The problem that the former URL is wrong turned my attention to the >> question wether to post URLs that points to the Ruby code that one >> assumes to be a solution to the Ruby Quiz or to post the suggested >> code. >> >> My opinion is that one should post the code. >> >> - Posting the code is less error-prone simply because fewer sources >> of error are involved. No web server and browser is needed and in >> most cases mail user agents are superior to web servers and >> browsers as far as translation of one system's encoding to another >> one's is concerned. Solutions to the Ruby Quiz don't tend to be >> longer than ordinary e-mails so size is no reason not to use >> e-mail. >> >> - To my understanding, the reason of providing code is not primarily >> being listed as one of the people who contributed a solution. It is >> rather allowing others to comment on the code, point out mistakes, >> provide stylistic improvements, or even discuss if the solution >> actually fits the specification. This process is simplified by >> including the code in the mail so that it can easily be quoted. >> >> - Several mail user agents provide no easy way to open a URL. This >> usually means that one needs to copy it, perhaps start a Web >> browser, and then direct that browser to the given URL. The obvious >> question one may raise: Is that code acutally worth the effort? >> Theq >> likeliest answer is "No. If that guy were sure that he has written >> fantastic code, wouldn't he be proud and show it to everyone in the >> most direct manner? Next mail, please." > > - when all the code exists inline in the message one can search > for it using > google or gmane. this, to me, is by far the biggest advantage. I agree that inlining solutions in the message is the best strategy. That's actually a little more work for me, because I have to dig them out of the message, watch for file breaks, and try not to break name associations for things like a test harness. Because of that, posts that clearly delineate files and there names (where it matters) are greatly appreciated. Here's a good example from the solutions I just put up: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/199917 Still, I think inlining is best for the quizzes's primary purpose, for others to learn from, so I accept the extra work and still believe it's the way to go. James Edward Gray II