Sometimes, Answers Lie In Plain Sight

Sometimes, Answers Lie In Plain Sight

Have you ever been stuck on a problem and thought that the answer had to be complex or sophisticated. Did you ultimately find that you overcomplicated the situation? If you do, don’t fret. It happens to all of us at times. Come with me today, as we consider how to not get lost in complicated answers to simple questions.


Firstly though, let me take you on a quick journey. Recently, I was doing some work for a client. Specifically I was updating the ownCloud product documentation, which uses the reStructuredText format and Sphinx-Doc.

As always, I was using [Mac] VIM to edit the content, as it’s my turn-to editor. As I was working through the content, I kept feeling frustrated at the time it would take to create section headers.

If you’re not familiar with the reStructuredText format, a header is created by inserting a repeating character on the line underneath the header text. The character needs to repeat for at least as long as the header text, as in the example below.

Here Is The Header
==================

Here, you can see that I’ve used an equals sign, but I could have used a tilde (~), the caret (^), or many other characters, as long as I’m consistent in the character that I use.

Now while I love VIM, I’m not a power user. Given that, every time I wanted to create a section header, I’d go through what I considered a rather laborious process.

I’d create a new line, underneath the header text and press and hold the header character. If the header text wasn’t that long, such as 5 - 10 characters, then the process was completed quite quickly. However, if the header were quite long, like any of the headers in this article, then the time would start to drag on.

Given VIM’s incredible flexibility and power, I was sure that there had to be a simpler way. All I had to do was to get off my backside and find it.

I started thinking through how it might be done. I thought that I’d likely have to detect the end of line character on the following line, yet somehow make it as long as the text above, so that it followed the rules and was at least as long as the header text.

Then I started wondering how this would be possible in VIM.

  • Would I need to create some VIM script?
  • Was there a plugin already existing for this?

And on and on the questions went. After a while, it became apparent that I was going down a rabbit hole that only Lewis Carol would be proud of. So I turned to my favourite source of truth in times like this. No, it’s wasn’t Google. It was the VIM IRC channel.

If you’re not participating in IRC channels and asking there for answers to your technical questions, you’re overlooking one of the best sources of advice that there is on the internet.

That said, after a little while, not even 10 minutes, several answers were supplied. Unsurprisingly, the best one was the simplest. Here’s what it was.

YpVr=

If you’re not familiar with VIM, don’t worry. I’ll explain. The command:

  1. Copies the current line
  2. Pastes it after the current line
  3. Selects all the text in the pasted line
  4. Replaces every character with the = character

How’s that for a simple example? No need to figure out line lengths, wait for characters to repeat, or any other complicated or overly sophisticated solutions to be coded. It did as little work as required, by just copying, pasting, and replacing.

Setting VIM aside for a moment, and thinking of the editor you use, can you think of a simpler way to achieve this solution - assuming that your editor doesn’t have this support built-in?

Complicated Options Can Seem So Tempting

Perhaps this is a rather opaque example. But it lead me to a brief period of introspection, where I considered some key questions:

  • Why do complicated options always seem so tempting?
  • Why do we go looking for the fanciful and spectacular?
  • Why are simple solutions so commonly overlooked?
  • Why are we not satisfied with solutions that “just get the job done”?

Is it because of some inherent flaw in the mindset of people attracted to technology? Is it caused by our ego? Perhaps we believe that if we create a sophisticated solution, we can shout about it from the rooftops. Afterward, people would extol the virtues of our greatness? And we can revel in that glory.

I can’t say for sure, but I’ve been guilty of this so often. Instead of seeking out a simple solution, I often over-engineered a solution which eventually got dumped after it required too much time and effort.

The Answers Often Lie Within

The whole process reminded me of an excellent (and also little) book, called Acres of Diamonds. The book follows the story of a man living in what is modern day Iraq, around 1870, a man already quite healthy and wealthy. He has no need nor want for anything material, and considers himself quite content.

However, one day, a priest comes by and tells him of the riches to be made in diamonds. After hearing this, his contentment fades away, as he sees that there are riches which he doesn’t have.

The next day, he leaves everything behind and sets off in search of them, travelling as far as Europe. But, by this time, both his health and wealth have faded, and he ends his life by throwing himself into the sea, a sad, broken man.

As fate would have it, the new owner of the property is standing outside one day and notices something shining in the ground. On digging to discover what it is, finds that it’s a diamond. On digging further, finds that there are so many diamonds, that untold wealth follows.

What’s This Have To Do With Simple Solutions?

The tale has an excellent moral to share:

often the answers lie within. Opportunities are to be found all around us. If we’ll but look, they can be found.

So often, proverbially, we stop to consider what we already know, what we already have, what already works. We get caught up by what’s shiny, new, and different.

We fall for the illusion that to be simple is to be incomplete. When, all the while, that simple solution was all we ever needed.

Over time, I’ve found this advice to be very sagely, even reassuring. Perhaps it’s the years which have taught me to slow down and to heed it. Perhaps I’ve experienced the truth of it enough times to consider it as a first resort.

Regardless, the wisdom to be accurate. Furthermore, it reflects what others, people far more skilled than I, have said. Take this quote, attributed to Albert Einstein:

Everything should be as simple as it can be but not simpler!

Or what about this thought from Wil Shipley:

You can spend three days writing a routine which is breathtaking and fast, but you’ve spent three days. [Instead] start with brevity.

The point is that beautiful, elegant, and sophisticated solutions are often a mirage. They’re a siren calling to you with a soft, sweet, tempting voice. They’re your ego talking, spinning tall yarns of the greatness which will come from your next lofty endeavour.

What they’re often not is the answer which we seek.

Why?

Because they never tell you just how much time it will take to get the job done. They don’t encourage you to think laterally, nor to consider alternative options. They don’t remind you that you’re not here to indulge your ego or vanity.

Instead, they call from the mountain top, telling you all thing wonderful sights you’ll see when you get there. But they don’t tell you how treacherous or arduous the journey will be.

Train Yourself To Keep Things Simple

I could write at length about the inherent beauty of the simple, even spartan. But that would not serve any valuable purpose.

Instead, I believe the best way to train yourself to keep things simple is to practice creating simple solutions. Then, after you’ve completed each one, look at what you created and consider:

  • How long it took from start to finish
  • What was the effort invested
  • What investment did you have to make to create it

Then, ask yourself if the brilliant solution would even be halfway finished by now.

I’d suggest that you’d likely have barely left the drawing board of your complicated solution when your simpler one was already completed, and you’d moved on with your life or work.

At first, this might seem quite preposterous. But after you get used to it, it can catch you by surprise. That’s the beauty in simple solutions. They don’t shout at you and tell you how marvellous they are. They just get on with the job without a fuss.

Often they’re the solution that would never make it on TV because people would think that you’d left so many things out. Time after time, they work, and do so at a fraction of the cost of more complicated solutions.

In Conclusion

I realise that this has been more of a theoretical discussion than a practical one. Regardless, I genuinely want you to consider simpler solutions to the challenges which you face. I hope that you’ll consider them, in place of more sophisticated and complicated alternatives.

It’s not because I believe simpler solutions are always better. Not at all. There are a time and place for them; as there are for most things.

It’s that I believe that more sophisticated solutions should never be the first resort. I believe that they should be a latter — if not last — resort.

Perhaps, they’re not even something which we set out to create. Rather, they’re a solution which naturally evolves over time. Being technical people, it’s likely that we’ll be forever tempted by deeply involved solutions.

But, by being aware of this temptation, aware of the large investment they can often required, and by considering a simple solution first, I believe that we can solve our problems far quicker and easier when we keep our ideas uncomplicated.

CC Image Courtesy of Bureau of Land Management on Flickr


You might also be interested in these tutorials too...

First Experiences with Symfony 4 & the Symfony Community
Sat, Dec 30, 2017

First Experiences with Symfony 4 & the Symfony Community

Recently, I decided to learn the basics of the Symfony (4) framework, so that I could better understand one of my client’s applications, and provide better support to it. I never expected to use such a well-rounded framework. Nor did I expect to encounter such an engaged and supportive community. Here’s the story.


Want more tutorials like this?

If so, enter your email address in the field below and click subscribe.

You can unsubscribe at any time by clicking the link in the footer of the emails you'll receive. Here's my privacy policy, if you'd like to know more. I use Mailchimp to send emails. You can learn more about their privacy practices here.

Join the discussion

comments powered by Disqus