For Programmers: Free Programming Magazines  


Home > Archive > PHP PEAR Questions and Answers > June 2006 > Re: [PEAR-DEV] Re: [PEAR-QA] Re: [PEAR-DEV] Re: [PEAR] [ANNOUNCEMENT]Structures_DataG









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PEAR-DEV] Re: [PEAR-QA] Re: [PEAR-DEV] Re: [PEAR] [ANNOUNCEMENT]Structures_DataG
Greg Beaver

2006-06-19, 7:05 pm

Olivier Guilyardi wrote:
> Pierre wrote:
>
>
>
> I said that I "included" the function, that is : I made a function named
> "Structures_DataGrid_http_build_query()", and am not using PHP_Compat's
> http_build_query() anymore.
>
> Is there anything wrong with this ? (I'm not sure what you were talking
> about in the above citation)


I'd say a good rule of thumb is if you only need about 30 lines of code
or so, and it isn't too complex (i.e. you can maintain it, and the
chance of a bug is low), cut-and-paste is usually better than a dependency.

Anything that introduces more than 1 function, more than 30 lines of
code (approximately) or a very complex algorithm is probably best used
as a dependency. Of course, there are gray areas, and we have to
recognize them. Preferrably with calm and clear-headedness.

Greg
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com