From: Jeremy Walker Date: 2012-05-15T02:29:43+09:00 Subject: Re: I'm looking for a Metaprogramming Project --001517447e3a57ed5d04c0026ee5 Content-Type: text/plain; charset=ISO-8859-1 On 14 May 2012 18:17, Marc Heiler wrote: > > What should I make to show off metaprogramming? > > The first thing is to laugh into the face of anyone who is > "metaprogramming". > I have to disagree with this. The whole of Rails is built around metaprogramming. The reading of a database schema and creation of methods at runtime, the use of method_missing throughout. Without those things, Rails would be a totally different framework. I agree that a lot of the time there are simple ways to do things, but good metaprogramming makes beautiful, powerful and DRY code. For the OP, I'd recommend reading http://pragprog.com/book/ppmetr/metaprogramming-ruby and then just using the techniques in the applications that you build. If you want to build something specific then the Struct challenge mentioned previously looks good fun. Jeremy Walker > > Metaprogramming is a fashion run that is hopefully soon dying out. > > It is synonymous to admit that whoever is using "meta" to solve > any given problem in Ruby there is: > > (a) no better solution (which would be sad, ruby is such a great > language) > (b) an ego boost to show off how to solve problems in convoluted and > ugly ways > (c) the bane of KEEPING THINGS SIMPLE, in an ever rising complexity for > marginal gains > > I don't say that "metaprogramming" has no valid use cases. For example, > I tend to use a config object for my projects, which allows one to call > any method on it, and that object tries to make sense of it when > possible. > > But that is really nothing "meta" I can see here. > > Meta is the new Agile - buzzwords with no values that will die soon. > > -- > Posted via http://www.ruby-forum.com/. > > --001517447e3a57ed5d04c0026ee5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On 14 May 2012 18:17, Marc Heiler <l= ists@ruby-forum.com> wrote:
> What should I make to show off metaprogramming?

The first thing is to laugh into the face of anyone who is
"metaprogramming".

I have to = disagree with this. The whole of Rails is built around metaprogramming. The= reading of a database schema and creation of methods at runtime, the use o= f method_missing throughout. Without those things, Rails would be a totally= different framework.

I agree that a lot of the time there are simple ways to= do things, but good metaprogramming makes beautiful, powerful and DRY code= .

For the OP, I'd recommend reading=A0http://pragprog.c= om/book/ppmetr/metaprogramming-ruby and then just using the techniques = in the applications that you build. If you want to build something specific= then the Struct challenge mentioned previously looks good fun.

Jeremy Walker
=A0

Metaprogramming is a fashion run that is hopefully soon dying out.

It is synonymous to admit that whoever is using "meta" to solve any given problem in Ruby there is:

(a) no better solution (which would be sad, ruby is such a great
language)
(b) an ego boost to show off how to solve problems in convoluted and
ugly ways
(c) the bane of KEEPING THINGS SIMPLE, in an ever rising complexity for
marginal gains

I don't say that "metaprogramming" has no valid use cases. Fo= r example,
I tend to use a config object for my projects, which allows one to call
any method on it, and that object tries to make sense of it when
possible.

But that is really nothing "meta" I can see here.

Meta is the new Agile - buzzwords with no values that will die soon.

--001517447e3a57ed5d04c0026ee5--