Re: requesting comments on rajmvServiceLog (access + error logging through PHP and JS to MySQL)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 21, 2012 at 7:31 AM, rene7705 <rene7705@xxxxxxxxx> wrote:
> On Mon, May 21, 2012 at 1:17 PM, Simon Schick
> <simonsimcity@xxxxxxxxxxxxxx> wrote:
>> Specially the function rajmvServiceLog_graphs_raphael_calculateData() with a
>> code of ca. 280 lines is quite long ...
>
> 280 lines is long?! :)

In general, yes. 280 lines is long. Too long, likely. Usually it
indicates you aren't designing your code in a top-down fashion, and it
is a high candidate for refactoring in order to break out into
reusable functions. 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 long and marked
for refactoring.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux