Re: [PHP] Re: Function size

2012-06-03 Thread Tony Marston
tamouse mailing lists wrote in message news:cahuc_t__sw-_yhrw4n4uqr-fa46+cebunzgehboaatrafla...@mail.gmail.com... On Tue, May 29, 2012 at 2:52 AM, Tony Marston t...@marston-home.demon.co.uk wrote: On May 21, 2012, at 8:32 PM, tamouse mailing lists wrote: A rule of thumb is no more than 50

Re: [PHP] Re: Function size

2012-06-03 Thread Tim Streater
On 03 Jun 2012 at 10:02, Tony Marston tonymars...@hotmail.com wrote: tamouse mailing lists wrote in message news:cahuc_t__sw-_yhrw4n4uqr-fa46+cebunzgehboaatrafla...@mail.gmail.com... There is a point: if you are unfamiliar with code, wading through screens and screens of a function to find

Re: [PHP] Re: Function size

2012-06-03 Thread Tony Marston
Tim Streater wrote in message news:d0.7c.45755.25a3b...@pb1.pair.com... On 03 Jun 2012 at 10:02, Tony Marston tonymars...@hotmail.com wrote: tamouse mailing lists wrote in message news:cahuc_t__sw-_yhrw4n4uqr-fa46+cebunzgehboaatrafla...@mail.gmail.com... There is a point: if you are

Re: [PHP] Re: Function size

2012-05-31 Thread tamouse mailing lists
On Tue, May 29, 2012 at 2:52 AM, Tony Marston t...@marston-home.demon.co.uk wrote: On May 21, 2012, at 8:32 PM, tamouse mailing lists wrote:  A rule of thumb is no more than 50 lines per function, most much less. Back in the day when we didn't have nifty gui screens and an 24 line terminals

Re: [PHP] Re: Function size

2012-05-30 Thread Tony Marston
Ashley Sheridan a...@ashleysheridan.co.uk wrote in message news:1338326229.2616.31.camel@localhost.localdomain... On Tue, 2012-05-29 at 17:06 -0400, Paul M Foster wrote: On Tue, May 29, 2012 at 08:52:46AM +0100, Tony Marston wrote: On May 21, 2012, at 8:32 PM, tamouse mailing lists wrote:

Re: [PHP] Re: Function size

2012-05-30 Thread Sebastian Krebs
Hi, Just want to throw my 2 cent in :) 2012/5/30 Tony Marston t...@marston-home.demon.co.uk Ashley Sheridan a...@ashleysheridan.co.uk wrote in message news:1338326229.2616.31.camel@localhost.localdomain... On Tue, 2012-05-29 at 17:06 -0400, Paul M Foster wrote: On Tue, May 29, 2012 at

Re: [PHP] Re: Function size

2012-05-30 Thread Paul M Foster
On Tue, May 29, 2012 at 11:40:25PM +0200, Matijn Woudt wrote: [snip] On Tue, May 29, 2012 at 11:06 PM, Paul M Foster pa...@quillandmouse.com wrote: [snip] I think a lot of coders try to be kewler than the next 18 guys who are gonna have to look at the code, so they use a lot of

RE: [PHP] Re: Function size

2012-05-30 Thread Steven Staples
Paul, Are you stating here that compression is a bad thing? That means you consider this nice: if ( action == A ) { doA(); } else if (action == B ) { doB(); } else { doC(); } Or perhaps flooded with comments that merely say the same as the code does? I'd go

Re: [PHP] Re: Function size

2012-05-30 Thread Paul M Foster
On Wed, May 30, 2012 at 04:31:12PM +0200, Sebastian Krebs wrote: [snip] If the functions were named properly you don't have to follow every execution path to the deepest deep. Or do you reading PHPs C-source, just because a wild substr() appeared? When you see a method loadFromFile() and

RE: [PHP] Re: Function size

2012-05-30 Thread admin
-Original Message- From: Paul M Foster [mailto:pa...@quillandmouse.com] Sent: Wednesday, May 30, 2012 10:54 AM To: php-general@lists.php.net Subject: Re: [PHP] Re: Function size On Wed, May 30, 2012 at 04:31:12PM +0200, Sebastian Krebs wrote: [snip] If the functions were named

[PHP] Re: Function size

2012-05-29 Thread Tony Marston
On May 21, 2012, at 8:32 PM, tamouse mailing lists wrote: A rule of thumb is no more than 50 lines per function, most much less. Back in the day when we didn't have nifty gui screens and an 24 line terminals (yay green on black!), if a function exceeded one printed page, it was deemed too

Re: [PHP] Re: Function size

2012-05-29 Thread Paul M Foster
On Tue, May 29, 2012 at 08:52:46AM +0100, Tony Marston wrote: On May 21, 2012, at 8:32 PM, tamouse mailing lists wrote: A rule of thumb is no more than 50 lines per function, most much less. Back in the day when we didn't have nifty gui screens and an 24 line terminals (yay green on

Re: [PHP] Re: Function size

2012-05-29 Thread Ashley Sheridan
On Tue, 2012-05-29 at 17:06 -0400, Paul M Foster wrote: On Tue, May 29, 2012 at 08:52:46AM +0100, Tony Marston wrote: On May 21, 2012, at 8:32 PM, tamouse mailing lists wrote: A rule of thumb is no more than 50 lines per function, most much less. Back in the day when we didn't have

Re: [PHP] Re: Function size

2012-05-29 Thread Matijn Woudt
On Tue, May 29, 2012 at 11:06 PM, Paul M Foster pa...@quillandmouse.com wrote: OMG in alpha order?! At best, I might group them together by function type, with some comment notation in the file. But not alpha order. I prefer not to have forward declares in my files, so I generally arrange

[PHP] Re: Function size

2012-05-25 Thread Tedd Sperling
On May 24, 2012, at 4:48 PM, tamouse mailing lists wrote: Yes, I think that is *exactly* the criterion-- not a mystery or an emergent thing, really, was a pretty expicit reasoning--being able to see/scan the entire function on one page (or now in one screenful) makes it much easier to see

[PHP] Re: Function size

2012-05-24 Thread tamouse mailing lists
On May 23, 2012 9:14 AM, Tedd Sperling t...@sperling.com wrote: Hi gang: On May 21, 2012, at 8:32 PM, tamouse mailing lists wrote: A rule of thumb is no more than 50 lines per function, most much less. Back in the day when we didn't have nifty gui screens and an 24 line terminals (yay

Re: [PHP] Re: Function size

2012-05-24 Thread Ashley Sheridan
On Thu, 2012-05-24 at 15:48 -0500, tamouse mailing lists wrote: On May 23, 2012 9:14 AM, Tedd Sperling t...@sperling.com wrote: Hi gang: On May 21, 2012, at 8:32 PM, tamouse mailing lists wrote: A rule of thumb is no more than 50 lines per function, most much less. Back in the day