Google not, learn not: why searching can sometimes be better than knowing
A few months ago, I was reading through some of the posts in my home town’s freeCodeCamp study group. I came across an intriguing post.
One of the campers expressed her frustration with not being able to immediately come up with solutions, and questioned whether this will ever gets any easier. At the end of her post, she lamented needing to google for answers — as though this were something to be ashamed of.
I remember exactly what it felt like to be in that situation. I was angry with myself for not being able to rattle off code on demand. I felt like using Google to search for answers was a sign of defeat. Something that, in my mind, signified I was incapable of thinking like a programmer.
Fast-forward 18 months, and I’m currently employed as a full-stack Software Engineer. I spend a considerable amount of time asking Google for help with my day-to-day work. I no longer see it as a weakness when I search StackOverflow for an explanation. It’s actually one of my first steps towards a solution.
So what caused this change of heart? A lot of things. But here are a couple major insights.
Insight #1: Memorizing everything is a waste of your time and brainpower
Don’t believe me? Check out this Quora question, where hundreds of other programmers all responded with basically the same opinion on the matter.
Not good enough, how about a quote from this guy you may have heard of:
“Never memorize something that you can look up.” — Albert Einstein
This is not a conclusion I arrived at easily. After spending hours upon hours poring over blogs and talking with professional developers, I finally came to realize something unexpected: the best in our profession don’t methodically scan and memorize documentation. Most, in fact, don’t bother memorizing anything they don’t have to.
Think about all the words you know in your native tongue. I’d be willing to bet you know a lot more words than you use on a daily basis. If you forget the meaning of a word, what do you do? Just ask Siri or crack open a dictionary and move on with your day. You don’t sit there and beat yourself up for not remembering a word.
Let me clarify my meaning a little with a quick story.
I was listening to a panel discussion at CSSDay in Phoenix this past December when I heard a panelist give a tip that I’ve heard more than once in one variation or another:
“Only memorize the things you use every day. Everything else, just memorize how to look it up.”
This concept, and the internalization of it, has been the single greatest boon to my confidence and progress as a developer.
Early in my journey, I struggled to retain anything. The concepts, syntax, best-practices, they were all incredibly difficult to grasp. I’ve always considered myself a smart person, and a quick learner, but I truly believed I had come up against the first intellectual challenge of my life that I might not conquer.
Then I had a crazy idea: “Stop caring about how to write it, and just focus on understanding what it should do.” I stopped stressing over syntax and started happily writing out extensive pseudo-code. Then once I felt I had fleshed out the core parts of the solution, it was off to the search-engines I went!
This had exactly the effect I hoped it would. I was no longer spending my study-time struggling to remember what method to use to add an item to the end of an array, or if the key in a Javascript Object Literal needed to be wrapped in quotes like its JSON counterpart (it doesn’t).
Instead of going mental trying to remember method names, I focused on what action I needed to perform. When I wanted to add an item to the beginning of an array, I found it easier to google the phrase “add item to beginning of array JavaScript” than to try and use my own memory to differentiate between shift()
, unshift()
, and pop()
.
In addition to this reduction in time spent trying to generate answers from my own head, it had a couple of other distinct benefits:
- I found myself able to pick up on new (to me) languages much faster than I would have ever imagined, because (surprise, surprise), most of these concepts are found in every language, and
- I realized my understanding of these concepts was rapidly deepening. Thanks in large part to forcing myself to read more about the topic, and thus accruing less technical debt.
Aside from the aforementioned positives, which I had hoped would be the result, there was another huge bonus that I didn’t expect at all.
Insight #2: You can learn from the mistakes of others without having to make those mistakes yourself
When you start googling for answers to a problem you are facing, you quickly learn that you are not the only person to deal with this, and that other people will come up with vastly different solutions to the same problem.
Reading through a few different questions and solutions on Stack Overflow will open your eyes to different ways of thinking, or perhaps highlight flaws in your own methodology.
In doing so, you give yourself a chance to learn from other more experienced developers, and see how they work through a problem. This insight has been invaluable.
I no longer search blog posts or Stack Overflow questions with the intention of finding an exact solution. Now, I do these things so I can learn different ways to think through problems.
You learn a lot more by searching
I’m literally programming my brain to tackle problems from perspectives other than my own. I’m making myself better by understanding how someone else would write something, and merging their knowledge with mine. Their struggles become my triumphs.
And you know what? It works…really well. After starting down this path to become a programmer in May of 2015, I accepted my first position as a full-stack software engineer in September of 2016.
In less than 18 months, I had gone from an extremely basic understanding of HTML, to writing Ansible scripts, backend APIs in Ruby on Rails, and creating front-end components using React.
I don’t consider myself an advanced programmer by any definition of the word, but I do feel much more confident in my ability to learn new concepts quickly, and be able to search for the syntax on-the-fly without ever missing a beat.
Very few programmers will remember every method name or function call the first time they see them. Even fewer still will rely solely on their memory to face the challenges in their daily work.
The best advice I can offer you is that you should never be afraid to admit you don’t know something, and seek to correct it using whatever means necessary.
There is only one cure for ignorance, and that will always be asking questions.