Re: [CODE] Snippets vs. patches

From: Peter Ajamian (peter@pajamian.dhs.org)
Date: 11/08/00


My main point was to show that there are pros and cons to both patches
and snippets.  Generally speaking I feel that if it takes more than a
couple pages in the snippet then make it a patch.

"Shane P. Lee" wrote:
>
> I myself installed OasisOLC and DG Scripts by hand, and it was not a
> good experience.
> I shudder at the thought of having both of these patches snippetized,
> the size alone would be mind-boggling.
>
Exactly my point.

<Moving "Lazy" comments to end>

> "Peter Ajamian" wrote:
>>  - Under ideal circumstances they work automatically.  Under not-so
>> ideal circumstances they can still do the bulk of the work for you just
>> leaving a few rejects for you to take care of on your own.
>
> :: Errm... Okay. Sorry, but .rej files only add to the confusion of the
> addition for me. When that happened to me over OLC, I simply scrapped
> everything and started from scratch, hand-patching this time. I would
> be interested to hear from people out there on whether or not they do
> the same thing.
>
I've autopatched into sources that aren't stock before and simply fixed
the rejects.  It's really not all that difficult if you know how to use
some simple searching tools in Linux.  Just because you can't do it
doesn't mean that it can't be done, or even that it's anywhere near hard
to do if you know what you're doing.

>  - The generally preferred format for extremely large modifications
> such
> as Oasis OLC and DG Scripts.
>
> :: Agreed. But look at the file; race_body.diff. This was a wonderful
> contribution, however how many people would opt to install this patch
> as opposed to OLC?

Why would anyone want to install one as opposed to the other?  They are
completely different and distinct modifications, one may opt to install
one or both or neither.

> I mean face it, once you make one patch, any other
> patch you attempt to make will probably have several .rej files
> generated.

Not always several, but usually at least a few.  Patch is very flexible
and can often successfully patch in hunks on modified files.

>>  - Can be applied automatically or by hand, the choice is up to the
>> person who is using the patch.
>
> :: Agreed. However, patching by hand can be extremely difficult, even
> for experienced coders. Shouldn't we be trying to write stuff for all
> possible types of coders?
>
Absolutely, and don't forget those "types" of coders who would rather
patch automatically than by hand, shouldn't we be trying to cater to
them as well?

Note also that even for hand patching, the patch format is if nothing
else uniform you don't have to cope with the differing writing styles of
contributors, some of whom don't even have a decent grasp of the english
language (no offence intended, just simply stating fact as I percieve
it).

>>  - Easy to miss something when creating a snippet for complex
>> modifications.
>
> :: This is true, I almost made that mistake myself with my Mercury
> snippet. However, I decided to try adding this snippet to a stock
> version of CircleMUD with OasisOLC and found several mistakes I made.
> I was able to fix them, by spending a few more hours 'field testing'
> my snippet.
>
Note that patches can also be usefull as an intermediary step towards
creating a snippet, in other words you can use the diff to make sure
that you have everything in the snippet.

>  - More difficult to create and maintain.
>
> Again, any
> contribution is highly valued,

Good point, don't forget it.

> but I beg you to think hard about the
> actual usage of any contribution before you send it in. If it's
> something very large, say like OLC and DG Scripts, go ahead and make
> a patch. But if, instead, it's something small, say like my
> contributions, please take the time to make a quality snippet.

I agree on the premise that larger modifications are generally better as
patches and smaller ones as snippets (see opening comment).

"Lazy" comments and answer follow here:

> :: Can you say, 'Lazy'?

> :: Again, laziness :P

> :: Too true, but shouldn't we be more concerned with quality and future
> applications of our contributions than with saving a few hours writing
> a snippet?

> :: See previous comment.

> :: This is looking more and more towards laziness.

Before going off and calling anyone here "lazy" I encourage you to
consider the following...

 - No one is paying anyone anything for these contributions, they are
completely voluntary.

 - You are not obligated to use anyone's patch or snippet, if you don't
like it you don't have to use it.

 - Many people have to actually work to make ends meet and if you add in
the additional time it takes to maintain a MUD without profit or
reimbursment of any kind then there is not a whole lot of time left to
be spent creating a snippet, patches save time and effort and should not
be discounted as being "lazy".

 - ANY contribution weather patch or snippet or whatever should be
appreciated.  It took that person time and effort just making the
initial modifications to thier own source, the fact that they are
willing to share that in any form at all should be appreciated and far
be it for me or anyone else to criticize someone based on the form they
choose to use.

So let's toss around the pros and cons of patches and snippets, it makes
for interesting conversation on the list, but please, under no
circumstances, should you criticize someone or call anyone "lazy" based
on the form they choose to use.

Regards, peter


     +------------------------------------------------------------+
     | 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