I’m a big fan of vertical whitespace, and find it strange that more fuss is made of tabs vs spaces (which doesn’t really affect readability) than vertical spacing (which does).
Here’s a simple code example, randomly picked:
$max_width = intval( get_option( 'thumbnail_size_w' ) ); $max_height = intval( get_option( 'thumbnail_size_h' ) ); // last chance thumbnail size defaults if ( ! $max_width && ! $max_height ) { $max_width = 128; $max_height = 96; }
Compared to:
$max_width = intval( get_option( 'thumbnail_size_w' ) ); $max_height = intval( get_option( 'thumbnail_size_h' ) ); // last chance thumbnail size defaults if ( ! $max_width && ! $max_height ) { $max_width = 128; $max_height = 96; }
That single extra line makes such a difference when scanning code. Imagine trying to read a book with no paragraphs.
Hmm you have a decent point here John, However I am obsessive about website speed and optimizing, yep when coding a site its good but after I have finished testing it I obsessively compress everything.
Have just stumbled on your blog as was just searching for similar domains to mine.
Best,
Phillip
LikeLike
There’s a difference between source code and minified code, though. No one is reading your minified code.
LikeLike