DEV Community

Ben Halpern
Ben Halpern

Posted on

When is learning what to Google good enough?

Let's say you never really learn regex. You know how and when to use it, but you never quite get past needing tools and search engines.

Is that okay? Is it necessary to advance past this point? Why or why not?

Top comments (41)

Collapse
 
healeycodes profile image
Andrew Healey • Edited

In a previous job, there was a regex wizard. Things were good. He was wise. We could go to him, present him with a problem, and he would write a solution on some yarn (Slack).

A short while after he left, I found myself with a problem that regex could solve. I was left with Google. So I hacked. I copied and pasted and used the regex-helper websites as I ran around the china shop that is string parsing, smashing everything as I went.

I didn't know it at the time but when I searched and hacked a solution together, I was learning bits and bobs. Stray phrases of advice stuck me with. Occasionally and without knowing it I would find myself on a tech blog explaining the intricacies of search patterns.

Then one day someone who had seen some of my diffs approached me and requested a regex solution. Without knowing it I had become the wizard. An expert who knew almost nothing.

It would have been quicker just to learn the theory from the start! ๐Ÿ˜Š

Collapse
 
kip13 profile image
kip • Edited

Take the problem as an oportunity to learn, to explore and prove to yourself that isn't "magic" and you can be the "wizard" too...

Collapse
 
jacobherrington profile image
Jacob Herrington (he/him)

This is how I feel a huge amount of engineering seniority develops. It comes in small spurts and builds up over years, frequently we don't even realize how much we know.

Collapse
 
__orderandchaos profile image
Order & Chaos Creative • Edited

I jump between languages a lot. I have to Google the most rudimentary things all the time. For the most part, I know what I need to do and how to do it, but remembering the exact function names and syntax for all the languages, libraries and frameworks I use is impossible.

Collapse
 
sayujraghav profile image
sayujraghav

I also strongly agree with what you have said. Its impossible to remember or memorize A-Z all the time about any thing.

Collapse
 
jacobherrington profile image
Jacob Herrington (he/him)

Yeah, I find myself searching for standard library stuff all the time when I swap languages.

It's good to know how they work, but sometimes you get method or function names mixed up in your head.

Collapse
 
yaser profile image
Yaser Al-Najjar

I believe there is nothing like "never really learn".

There is just "no enough motivation".

I realized that when I was asked to explain regex to validate data in the frontend for new comers.

I couldn't stand the idea of explaining "poorly" in front of many people, so I looked up regex thoroughly to avoid any embarrassing situation.

That was my enough motivation to learn regex, and I reflect this story to any "never able to learn" situation as "no enough motivation".

Collapse
 
simbo1905 profile image
Simon Massey • Edited

There are a lot of very good comments on this post. I think many can be summed up as you should learn what you use frequently but that it's okay to have a broad and shallow appreciation of many topics that you can google. Turning that around you should understand and gain expertise in the things you use every day.

My grandfather told me that you are not paying a teacher to make chalk marks on the blackboard. You are paying them for what they know and their skill in explaining it. Knowing what to google is a similar situation. One big difference between a programmer who is struggling to get started and one who can be thrown any task is knowing just enough to google.

A couple of decades ago you needed to read the right books. Until google and stackoverflow you needed to read the right websites and forums. More recently to get up to speed on some new tech you need to watch the right YouTube channels.

I would suggest if anyone finds themselves googling too often for something they should watch a few videos about it. I recommend using a player that lets you speed up the playback to as fast as you can comprehend then skip back and slow down anything you missed. Some techs will always require deep knowledge, for example cryptography, but mainstream technology competes for mindshare by being accessible. After a bit of video research you can google like a boss and with a bit of experience you can be highly proficient in most mainstream tech.

Collapse
 
_bigblind profile image
Frederik ๐Ÿ‘จโ€๐Ÿ’ปโžก๏ธ๐ŸŒ Creemers

I think it's a great place to start with anything. If you need something frequently enough, you'll start to remember it.

So for example, I'm quite new to Elixir, and the backend at my job is written in it. I went through most of the getting started guide quite quickly, and then dove into the code base. The basics of defining modules and functions stuck quite quickly, but I still need to google for things like case and cond statements, and standard library functions.

I think where actively learning things by following tutorials works best is for unknown unknowns. You might not know that a particular type of solution is out there, so you don't know to Google for it.

Collapse
 
jacobherrington profile image
Jacob Herrington (he/him)

Everyone searches for syntax from time to time!

I like your point about determining unknown unknowns with tutorials.

Collapse
 
yashints profile image
Yaser Adel Mehraban

I am usually against Regex in general, things can get quite out of hand if one doesn't fully understand how it works and use it, especially if it passes tests (covering happy paths) and reaches production ๐Ÿ˜ฑ.

But to answer the question, I personally have been in situations where I needed to Google to find something which was close enough to what I needed and then used a couple of online regex checkers to validate what I was writing. And I am one of those who believe it's really rare that you know everything about a topic. So even if I feel confident, I always do a bit more research (Google, find someone expert, use a tool, etc) ยฏ_(ใƒ„)_/ยฏ

Collapse
 
jacobherrington profile image
Jacob Herrington (he/him)

Regex is a powerful tool, but as every Tobey Maguire fan knows: With great power, comes great responsibility.

Collapse
 
cecilelebleu profile image
Cรฉcile Lebleu

It took me a full 2 minutes to understand the title. LOL

Seriously now, I keep my own personal documentation for everything I study. Taking notes on everything is a great way to remember it, so I rarely actually go through them; but as it's organized the way I understand it, it's easier to find what I'm looking for. Otherwise, I use DuckDuckGo :D

Collapse
 
jacobherrington profile image
Jacob Herrington (he/him)

DuckDuckGo users unite!

There are literally dozens of us!

Collapse
 
cecilelebleu profile image
Cรฉcile Lebleu

Letโ€™s turn that into hundreds ๐Ÿ˜„

Collapse
 
scotthannen profile image
Scott Hannen

We need software to help us write software for the same reasons people need the software we write. We write the software so that it can do for someone what they would do manually or store whatever they would remember. Google, in turn, stores the details we would otherwise have to remember in order to build such software. We remember what to Google or use bookmarks or other software to remember what we Googled for us. I suppose at some point we have to actually remember something, but why clutter our heads with stuff we can store on someone else's shelf?

Collapse
 
jacoby profile image
Dave Jacoby

My level of knowledge with regexes is likely much higher than most peoples'. I'm a Perl guy, and this is one of the things that sets Perl apart.

I know that there's mechanisms commenting within Perl regexes (but not, if I understand, Perl Compatable Regular Expressions (PCRE), which is what other languages import). I have decided that if your regex is that far along, your problem domain has become too complex. You might be trying to parse HTML or something.

But beyond that, much simpler regexes have buggy behavior, including this lightning talk from a year ago, where a friend explains an issue with the regex engine that I kinda understand as I listen, but forget soon after the video ends.

So, while I have drank deeply from the kool-aid, I understand those who might just sip.

To put it another way, Larry Wall (the person who committed the code with the regex bug) says it's okay to speak Baby Perl, and so, who am I to say that speaking Baby Regex is a problem?

Collapse
 
darkes profile image
Victor Darkes

Regex is a difficult thing to say you master because, depending on the DSL, different characters are interpreted differently. I would say you never get past needing tools in this scenario because it probably isn't something your day-to-day work requires. And that's true for anything someone would decide to google.

Collapse
 
jacobherrington profile image
Jacob Herrington (he/him)

Even if I felt totally confident in my regex, I'd still check it online.

Collapse
 
aadibajpai profile image
Aadi Bajpai

You ask different things. I understand regex and how it works but I still double check my patterns with regexr or regex101 and sometimes googling some syntax. It is perfectly alright to know the why and google the how, imho :)

Collapse
 
ssimontis profile image
Scott Simontis

I keep lots of notes. Some of which I host to host to the public in the short future. So I always have detailed notes on how some random protocol works, what I learned the hard way about an exception, etc.

There are situations where Google isn't available. If you have sysadmin duties, and the Internet fails and chaos ensues, you may need to at least know enough console-fu to assign yourself a static IP address, set up static routes to the gateway, and proceed from there.

When part of my job was field technician, Google was sometimes an option, sometimes not. I do not inspire public confidence when I have a traffic cabinet open at an intersection and I am sitting there Googling "how to connect conflict monitor unit." If I was running wires, I was always terrified of touching my phone because I wanted to stay safely grounded to the cabinet.

Also, at some point you realize that you don't need any credentials to post things on the Internet. There are blog posts I read and I want to reach out to the author urgently and beg them to remove this from their code before something bad happens...but sometimes people need to learn the hard way (assuming lives are not at risk or it's a security thing).

Collapse
 
jacobherrington profile image
Jacob Herrington (he/him)

99% of the content I make is intended to work like a journal. I'm writing to remind myself of things or try to process my thoughts.

Collapse
 
lukegarrigan profile image
Luke Garrigan • Edited

I think it depends on how often you use something. Iโ€™ll be honest regex was on my to-learn for bloody ages, I even attempted to learn it a couple months ago. As I use regex very rarely Iโ€™ve already forgotten what Iโ€™d learnt, so google is my answer. If I was, however, using regex on a daily basis Iโ€™m sure Iโ€™d have a much better understanding of it. So yeah, google is good enough for me ๐Ÿ˜

Collapse
 
jrking365 profile image
Jean Roger Nigoumi Guiala

I think even if it is for a one time usage, it is important to understand what the portion of code is doing. Taking the example of regex, you don't need to learn regex but understand what the code is doing is important. Also when the usage become recurrent, I think investing some time learning it is better.

Collapse
 
leewarrickjr profile image
Lee Warrick

Regex knowledge is a nice-to-have.

We can't learn everything, and that means you have to prioritize your time and make smart decisions about what you put on your plate to study.

Knowing when to use one and when not to use a regex is far more valuable than memorizing the slightly obtuse syntax.

If you find yourself googling regex over and over, using them more and more, maybe then it's time to sharpen up your regex skills and dive deeper.

Otherwise I think it's fine to have to google the things you rarely use, or even keep a cheat-sheet for the syntax at hand. There's no harm in reference material.