Advertisements

Hal Fulton wrote:
> John Carter wrote:
>> Ah me. In a fit of over user friendliness I did a couple of the most
>> colossally stupid things in a class.
>
> [snip]
>
> But aren't you glad you *can* do these things...
>
>
> Hal

Joel VanderWerf wrote:
> Hal Fulton wrote:
>> John Carter wrote:
>>> Ah me. In a fit of over user friendliness I did a couple of the most
>>> colossally stupid things in a class.
>>
>> [snip]
>>
>> But aren't you glad you *can* do these things...
>>
>>
>> Hal
>
> But then there is the punishment...
>
> 100.times {puts "I will not do colossally stupid things in a class."}
>
But ... but ... but ... you *redefined* "puts"

On 8/30/06, Robert Dober <> wrote:
> On 8/30/06, John Carter <> 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?

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:

<> wrote:
> You're probably right about it being out of print, but you can downloa=
d =
> a PDF from the following URL. The scan is a bit fuzzy but it's fairly =
=
> readable.
>
> <http://www.iam.unibe.ch/~ducasse/FreeBooks/BitsOfHistory/>

Cool! Thanks. Used on Amazon start at US$41.66!

I still think Ruby would be great in the Smalltalk environment.
Squeak + Ruby =3D 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 'typ=
e'.

On Aug 29, 2006, at 8:23 PM, John Carter 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.

Actually, I love to do this for tests, especially when I use open-uri.

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!