After reading the chapter Layout and Style of the (very good) book Code Complete 2nd Edition Steve McConnell convinced me to change the way I write my functions. Before I wrote functions like this:
function functionName()
{
...
}
This way you have a nice line of white space between the function declaration and the inside of the function. I thought this line of white space improved the readability of the code. Steve McConnell learned me that although that may be true, it cripples the most important thing of code layout: the layout has to follow logical structure of the code. So I’m back to using this style:
function functionName() {
...
}
If you want to know more about this subject or anything else regarding software construction I can certainly recommend you to read Code Complete 2nd Edition.