On Keeping it Simple

I got an email recently that inspired me to post a little reminder about web design:

Life is really simple, but we insist on making it complicated. ~Confucius

The email detailed the difficult journey a new-to-DOM person was having learning how to walk the DOM tree. He simply wanted to go down to the second level of an element after finding the right element. In this case of the email, it was about how to find blockquotes within blockquotes.

The DOM trekker was simultaneously trying to figure out how to add CSS on the fly, and asking whether it would matter if it was added inline at the element in question, or in the head section.

This got me curious, so I asked what the goal was:

Very simply he wanted to display the top level blockquotes with a border on the left only, but blockquotes within blockquotes with borders on top and bottom only.

The plan was to hunt down those blockquotes using DOM, then on the fly insert CSS to change their style according to where they were in the ‘tree.’

Schrödinger anyone?

My response to this frazzled developer was simply to ‘step back, have a cup of coffee, watch a movie, then check his email.’

In his email he would find 2 lines of CSS as follows:

For the first level blockquote:
blockquote { margin: .5em; border-left: 5px solid #eee; padding-left:.5em; }
For the second level blockquote:
blockquote blockquote {margin: .5em; border-top:5px solid #eee; border-bottom:5px solid #eee; border-left: none; padding: .5em 0 .5em .5em; }

Which yields this:
Blockquotes in blockquotes.

Now, don’t get me wrong – I don’t mind emails like this in the least. In fact, I have people who I email or IM when I’m frantically worked up and complicating an issue beyond measure. Having a support network helps sometimes when you’re losing your mind.

Everyone does this at some point or other.

It’s why we have phrases like K.I.S.S. or ‘Missing the forest for the trees‘ and even the ever popular ‘Doh!

I won’t say that there is always an easy solution to every problem, but often times, the more time we spend thinking about an issue, the more complex it gets in our head. Suddenly our minds are working overtime, thinking far beyond the issue at hand – and definitely no longer keeping it simple.

I do this. Most people do this. You probably do also. It’s fine. It’s okay. Thankfully, it’s only a temporary insanity that we suffer in our stress.

With this little reminder… I’ll leave you with a couple of parting words from the masters:

Simplicity, simplicity, simplicity! I say, let your affairs be as two or three, and not a hundred or a thousand instead of a million count half a dozen, and keep your accounts on your thumb-nail. ~Henry David Thoreau

Simplicity is the ultimate sophistication. ~Leonardo DaVinci

~Nicole