Ah me. In a fit of over user friendliness I did a couple of the most colossally stupid things in a class.
I, with head hung in shame, record them here so that...
* others may avoid them,
* I remember to avoid them later,
* writers of obfusticated ruby may benefit.
a) Name a method the same as something in the Kernel module and then
forget that you have done so.
In particular I overrode "puts" in something that didn't inherit from
IO. OUCH! That really does make printing debugging statements
interesting.
b) Put various key Ruby terms (eg. "raise") in alias statements.
c) Do two or more of these very very dumb things in the same body of code.
John Carter Phone : (64)(3) 358 6639
Tait Electronics Fax : (64)(3) 359 4632
PO Box 1645 Christchurch Email : john.carter@tait.co.nz
New Zealand
"We have more to fear from
The Bungling of the Incompetent
Than from the Machinations of the Wicked." (source unknown)
This is a chellange, I am sure I can do better or was it worse?
Robert
···
On 8/30/06, John Carter <john.carter@tait.co.nz> wrote:
Ah me. In a fit of over user friendliness I did a couple of
the most colossally stupid things in a class.
I, with head hung in shame, record them here so that...
* others may avoid them,
* I remember to avoid them later,
* writers of obfusticated ruby may benefit.
a) Name a method the same as something in the Kernel module and then
forget that you have done so.
In particular I overrode "puts" in something that didn't inherit from
IO. OUCH! That really does make printing debugging statements
interesting.
b) Put various key Ruby terms (eg. "raise") in alias statements.
c) Do two or more of these very very dumb things in the same body of code.
--
Deux choses sont infinies : l'univers et la bêtise humaine ; en ce qui
concerne l'univers, je n'en ai pas acquis la certitude absolue.
Ah me. In a fit of over user friendliness I did a couple of the most colossally stupid things in a class.
I, with head hung in shame, record them here so that...
* others may avoid them,
* I remember to avoid them later,
* writers of obfusticated ruby may benefit.
a) Name a method the same as something in the Kernel module and then
forget that you have done so.
In particular I overrode "puts" in something that didn't inherit from
IO. OUCH! That really does make printing debugging statements
interesting.
--
Eric Hodel - drbrain@segment7.net - http://blog.segment7.net
This implementation is HODEL-HASH-9600 compliant
This reminds me of the cartoons which are sprinked throughout
"Smalltalk-80: Bits of History, Words of Advice." No doubt long out
of print.
Some of these were
A black frame with a cartoon word bubble saying "OOPS! I just typed
'Processor <- nil.'!"
A plane with the right wing coming off and flames coming out, and the
pilot saying "I think we'd better boot and resume!"
A woman painting a floor with a paint labled "New System" she's
painted herself into a small corner labled "Old System" then she steps
out of the corner, paints it and says "The nice thing about Smalltalk
is that the paint dries instantly!"
And my favorite, a series of pictures on the left word balloons on the right:
"Here we go!"
3+4
FLASH "Oh...too bad"
later
"Once more!"
3+4
DzzDD,
Geep
Z,4hcn
"Hmmmmm"
later
"This out to be better!"
3+4
LAD Compiler doe
not understand => ^h,3ep
"Well now!..."
later
3+4
Class text image
"Oh, I think I know what that is..."
later
3+4
9
"All Right!
Hey everybody, Smalltalk works!"
···
On 8/30/06, Robert Dober <robert.dober@gmail.com> wrote:
On 8/30/06, John Carter <john.carter@tait.co.nz> wrote:
>
> Ah me. In a fit of over user friendliness I did a couple of
> the most colossally stupid things in a class.
>
> I, with head hung in shame, record them here so that...
> * others may avoid them,
> * I remember to avoid them later,
> * writers of obfusticated ruby may benefit.
>
> a) Name a method the same as something in the Kernel module and then
> forget that you have done so.
>
> In particular I overrode "puts" in something that didn't inherit from
> IO. OUCH! That really does make printing debugging statements
> interesting.
>
> b) Put various key Ruby terms (eg. "raise") in alias statements.
>
> c) Do two or more of these very very dumb things in the same body of code.
This is a chellange, I am sure I can do better or was it worse?
You're probably right about it being out of print, but you can download a PDF from the following URL. The scan is a bit fuzzy but it's fairly readable.
I still think Ruby would be great in the Smalltalk environment.
Squeak + Ruby = Reek ?
Maybe I'll get around to writing it myself one day. Better do a Google first
As far as redefining, I seem to have a penchant for doing that with 'type'.
Regards,
JJ
···
On Wed, 30 Aug 2006 16:00:20 -0400, Morton Goldberg <m_goldberg@ameritech.net> wrote:
You're probably right about it being out of print, but you can download a PDF from the following URL. The scan is a bit fuzzy but it's fairly readable.
Will we have a "Best Thread Of The Year"(1) contest, for me this one is a
hot favorite.
BTW let us port Reek to GTK ==> Geek
Cheers
Robert
(1) useful threads DNQ of course
···
On 9/1/06, David Vallner <david@vallner.net> wrote:
Chad Perrin wrote:
> On Thu, Aug 31, 2006 at 08:38:46PM +0900, John Johnson wrote:
>> I still think Ruby would be great in the Smalltalk environment.
>> Squeak + Ruby = Reek ?
>
> Scooby?
>
Can anyone recommend a good neurone peeling brand? I need a brainscrub.
David Vallner
--
Deux choses sont infinies : l'univers et la bêtise humaine ; en ce qui
concerne l'univers, je n'en ai pas acquis la certitude absolue.