Re: [CODE] Snippets vs. patches

From: Shane P. Lee (tacodog21@yahoo.com)
Date: 11/08/00


"Peter Ajamian" wrote:

Well, I feel there are ceartain pros and cons to doing it either way as
follows...

Patches Pros...

 - If created correctly and current it is easy to install especially
into a stock source.

:: Sure, this is true, but I must point out that in most situations,
people who install these patches generally are NOT editing a stock MUD.
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.

 - Easy to create for complicated modifications with changes in several
different areas as long as a before and after source is maintained.

:: Can you say, 'Lazy'? I mean, I've so far not been in the position to
re-write on of my submissions, but if I did do so, I would definately
choose to go with a snippet.

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

 - 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? I mean face it, once you make one patch, any other
patch you attempt to make will probably have several .rej files
generated. There are several other examples I could list, but this
email will be large enough as it is.

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

 - Easy to maintain.

:: Again, laziness :P

-snip Cons of Patches and Pros of Snippets -

Cons of Snippets...

 - Cannot be used automatically.

:: 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?

 - Time consuming to create and use for large complex modifications.

:: See previous comment.

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

 - More difficult to create and maintain.

:: This is looking more and more towards laziness. Again, any
contribution is highly valued, 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 can
promise you that I myself will find it much more appealing.

Feel free to add to or comment on this list.

Regards, Peter

:: Consider it done :P

-FIRE

__________________________________________________
Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one Place.
http://shopping.yahoo.com/


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