CodeNewbie Community šŸŒ±

Cover image for Coding is knowing how to ask questions *well*
Jason Leow ~ golifelog.com
Jason Leow ~ golifelog.com

Posted on

Coding is knowing how to ask questions *well*

The thinking skill that's often not explicitly taught


Iā€™d been taking a web development course on Udemy and this week I finally started on learning server-side programming. Front-end development had been relatively easier for me to pick up because over the years of setting up Wordpress websites, one invariably comes across HTML, CSS and some Javascript. I realised there had been a lot of accidental immersion and learning in that aspect. But, back-end is completely foreign to me and now itā€™s feeling really hard.

Nobody teaches how to properly google for answers

One of the main things I never learned though was how to properly google programming questions when Iā€™m stuck. As a beginner, Iā€™m completely unfamiliar with the technical terms of the language, so I end up searching using very broad, vague keywords that doesnā€™t help much at all. I donā€™t even know how to phrase my problem properly!

For instance, I was learning how to make a web scraper using PHP. The instructor showed us how to use file_get_contents function but just to get the whole web page. I wanted to scrape a specific text content from a specific class so just simply using file_get_contents wouldnā€™t work . So I simply googled ā€œPHP scrape html class elementā€. Some useful stuff but still kind of broad. A lot of stuff pointing me to using other libraries. I fiddled around, copy and pasted bits of code I found from Stack Overflow but nothing worked (I later realised I needed to download the libraries, which wasnā€™t really mentioned in the answers ?).

Later on during the instructor demo, he googled ā€œsplit a stringā€ and got links to the explode function, which helps to extract specific parts of the HTML code after you used the file_get_contents function. Like WTF? How does a beginner even know ā€œsplit a stringā€ are the right keywords to use?

Not even knowing the right search key words to use

The problem is I donā€™t even know the right words to use to get to what I need. The right words at the right level of specificity and technicality. Learning the coding ā€˜vocabularyā€™ of terms and syntax takes time and as a beginner, thatā€™s my weak spot in being able to find the right answers online.

It felt like I was trying to learn a foreign language, like say French, but only had a German-French dictionary to learn it. If I donā€™t know German to start with, how do I even find the right word in French? How do I bridge English to German (i.e. rookie search keywords to right technical terms to the right answer)?

Beginner's guide on how to know what key words to use

After doing some reading online and coming across great articles like this one, I learned that itā€™s like a funnel/spiral, with at least 2 layers of search to slowly zoom in on my answer:

  1. Do a general, intentionally imperfect search first, to find the right technical terms:

a. Search on community forums where beginners might have phrased the same question in the same way as you would have. Stack Overflow might not be the most useful at this stage yet.

b. Or scroll through support documentation like W3 School or specific ones like PHP.net (these are like the ā€˜dictionariesā€™ of programming), where you can read through the definitions of the syntax, and starting collecting the right keywordsā€¦

c. Narrow in on a few keywords - the language/framework/library youā€™re using, a noun to describe the what (e.g. element, selector), a verb to describe an action/task you want to do with something (e.g. event, function)

  1. Then get more specific and technical on the next layer of search:

a. This time, we can start trying more expert forums like Stack Overflow, or one for your language

b. Type and search away!

Did I miss out anything? Any other useful tips on how to google for the right answer in programming?


Follow my daily writings on Lifelog, where I write about learning to code, goals, productivity, indie hacking and tech for good.

Oldest comments (0)