Functions: how long is too long?
yannis: It is probably too long at 50 lines. Turn the question around, what must the function return and start from there. The function should do no more than necessary to achieve the goal stated as the return of the function.