Re: [CODE] Snippets vs. patches

From: Patrick Dughi (dughi@imaxx.net)
Date: 11/08/00


        One thing people may overlook;

        The assumption is that if you're messing with code (patches or
snippets) -> You <- know what you're doing.

        I'm not saying that this is an accurate assumption, but it is the
correct one to make.  Snippets - step by step instructions are nice, but
really, do they do anything but allow people who have poor coding
knowledge to get deeper and deeper into unknown territory?

        It's like throwing a kid who can't swim into the deep section of
your local public pool.  You give him a kickboard so he'll float.  Sooner
than later though, you're going to spend the majority of the time either
rescuing him, or carrying him through the water.

        Sure, some of them do learn to swim, but the majority (or the
majority of loud ones) seem to be the profesional shirt-tugging,
down-on-their-luck, "Hey Mister, can yah help a fellow out?" type beggars
that you see on street corners of anytown, USA.  Minus, perhaps, the
cardboard sign praising god for your potential charity.  Though not
always.  In either case, it's more useful if some of these drown, if
they're never going to bother to learn.

        At least I didn't reiterate that fish parable.

                        Aside from all this:

        Snippets are inaccurate.  They're a person's internal conception
of how they did things, and often enough, it's misleading, or just plain
wrong.  Patches, on the other hand, are supposed to be an exact list of
changes between a stock version and a supposedly working modified version.
Even if you don't have the same version, or a mismatch, you can read a
patch and determine exactly what it was trying to do.  Have an
incompatible version change with a popular snippet, and you'll have 40-100
mails in the next 3-4 weeks asking about a 'fix' - usually a one or two
line solution.  With a patch (like xapobjs/iedit in my case, a decent
sized change) I got maybe 3 personal mails and there was some discussion
about it on this list where someone else actually generated the fix.

        I think it's because you have to know what you're doing when
you're reading through a patch/fixing rejs, etc - and that promotes
understanding of both the code, and how the system works.  Snippets do not
encourage this as a general rule.

        My expectations are a bit high.  I fully expect that everyone who
uses any code that I distribute is actually capable of doing it on their
own.  I look at my code as just a labour saving device, and that's how I
view most other patches.

        Any code though, whether snippet or patch, is not a replacement
for understanding how to program.  There is no replacement for that.

        In this light, snippets are just prettied up, dumbed down, more
potentially inaccurate versions of patches - the real thing.

        Sorry for the disjunct paragraph/sentance structure, I'm
preoccupied and typing this out in minute-long bursts over the last hour
and a half.

                                                        PjD


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/11/01 PDT