[documentation] snippets book
Nick Lewis
nick at smartcampaigns.com
Tue Nov 29 07:31:48 UTC 2005
Kobus Myburgh wrote:
> Even though popularized, I am not sure that it is a good term. A hack
> is something that is "thrown tegether in a short time", and if I
> understand the motion with this, this is not what it will be, as the
> code will be refined to be actually quite clean and very functional,
> so I go for -1 against "Drupal Hacks".
>
>
I agree with entire premise, but disagree with the conclusion. If this
is about right way and wrong way, using code snippets is the wrong way,
and building a module is the right way. Speaking of which, if we're
archiving code -- some snippets that are geared toward module developers
would be so very helpful that I have wetted myself just thinking about
them. I need to change pants... [1]
[::cough::] But seriously: code snippets are hacks. Usually they are
little more than a sql query that is inserted within a page or block.
They are only good for one-page/one-block and are not really reusable
and certainly not scalable. From the standpoint of module development,
there is an advantage in labeling them with the dirty word "hack". Also,
(and this is merely one Texan's impression), the word 'hack' has a
connotation of "quick","easy" to the layman... I don't like "forge" for
snippets. If we use forge for anything it should be for expanding
documentation on module development. My +1 for hacks stands. However, I
did just wet myself thinking about expanded documentation for wanna-be
module developers...
Onward,
Nick Lewis
http://nicklewis.smartcampaigns.com
1. Perhaps I wet myself because of the length of time I spent figuring
out how to make a custom module automatically file nodes under certain
taxonomies by-way of their CiviCRM location profile.
More information about the documentation
mailing list