[Sdruby] methodphitamine

Rob Kaufman rgkaufman at gmail.com
Mon Aug 20 18:20:37 GMT 2007


Some code, like this particular little guy, only belong in obfuscation
contests.  Editor tools are for saving typing, not code hacks.

Rob

On 8/20/07, Kevin Clark <kevin.clark at gmail.com> wrote:
>
> I'm with Tom on this one. It's an interesting hack, but I wouldn't use
> it for code I cared about.
>
> Kev
>
> On 8/20/07, Tom Werner <pubsub at rubyisawesome.com> wrote:
> > I, for one, find to_proc to be just far enough over the edge of
> > cleverness that I don't use it, and find methodphetimine so abhorrent as
> > to be an example of worst practice. Each technique saves you a few
> > keystrokes at best and obfuscates code while decreasing performance. I
> > fail to see a benefit to either technique (other than that they're
> > somehow perceived as cool or flashy).
> >
> >
> > Brian Chapados wrote:
> > > http://jicksta.com/articles/2007/08/04/the-methodphitamine
> > >
> > > I finally finished reading through my pile-o-feeds. It's a few weeks
> old,
> > > but if you haven't seen it already, this one is awesome!
> > >
> > > spoiler:
> > > User.find(:all).map &its.contacts.map(&its.last_name.capitalize)
> > >
> > >
> >
> > --
> > Tom Preston-Werner
> >
> > * Libraries:
> >     Chronic (chronic.rubyforge.org)
> >     God (god.rubyforge.org)
> >     Fuzed (fuzed.rubyforge.org)
> > * Site:
> >     rubyisawesome.com
> >
> > _______________________________________________
> > Sdruby mailing list
> > Sdruby at lists.sdruby.com
> > http://lists.sdruby.com/mailman/listinfo/sdruby
> >
>
>
> --
> Kevin Clark
> http://glu.ttono.us
> _______________________________________________
> Sdruby mailing list
> Sdruby at lists.sdruby.com
> http://lists.sdruby.com/mailman/listinfo/sdruby
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://comox.textdrive.com/pipermail/sdruby/attachments/20070820/8558604e/attachment-0001.htm


More information about the Sdruby mailing list