The rhythm of the code

Layout is extremely important for the comprehensibility of the code. 2+3 * 1+2 is not 15 (what the spacing suggests) but 7. Or what about this coding horror:

<xsl:function name="local:something">
<…></xsl:function><xsl:function name="local:something-else"><…>  
</xsl:function>

What are the things we can do to enhance comprehensibility? First a few tips about expressions and the likes:

But what is, in my eyes, most important is the code’s “rhythm”. When you look at some script or module, can you easily see how it’s structured? Where things begin and end? What belongs to what? Here are my tips: