From the course: Learning Data Analytics: 1 Foundations

Learning syntax

From the course: Learning Data Analytics: 1 Foundations

Learning syntax

Syntax is required. Programs use syntax to run, and really nothing can happen without it. All programs have their own syntax, just like different countries have their different language. So an easy way to think about syntax is that it's the language of your program, and it allows you to interact with your program to do a variety of different commands, like when you choose a menu option, or even when you write a formula, you're using syntax. So of course it can be intimidating. Could you imagine if you had to learn syntax to open or save a file? If you're old enough to remember DOS, then you know exactly what it's like. Don't be overwhelmed by syntax, because just like you learn to speak in your language, you'll learn to speak in syntax. I think one of the more difficult parts of learning syntax is that you have to know what you want to say, then you have to learn how to say it, and then you have to say it correctly. Or should I say, type it correctly? really no way around learning syntax, or as some would say, fumbling through syntax until you learn it. However, if you're not a programmer, you may find that you don't have to learn as much as you think. I know people typically dread going to the help menu, but trust me, it's way better than it was in the 90s. The help menu also includes examples, and I know for me personally, seeing a working sample helps me to understand maybe how to apply which is great when I know what I want to do, but not exactly how to syntactically write it. I don't know a single technical person that doesn't hit up the internet when they're looking for something to solve a problem in a particular program. This can either be dramatically helpful to solve the problem, or at least give you options to try. When I'm searching for answers, if I see experts exchange or stack overflow pop up, I'm going to typically go there first. Because very early in my career, these sites are where the technical people went to share questions and get information from other technical people. You'll see people asking similar questions to yours and it will be full of suggestions and potential syntax. I encourage people to use real people terms to find the answer versus attempting to write technical terms. Simple searches like tie names together will likely take you to a concatenate or concat function or convert text date to a real date in Excel will likely take you to some conversion functions. Keep in mind that syntax requires following the rules of the syntax for that program. The way you write a function in one program is not necessarily how you write it in all programs. However, if you have learned syntax for one program, it's easier to find it in other programs. For example, you could use words like, how do I concatenate in SQL? Or how do I write an if function in Power BI? Many modern tools give us the ability to use a GUI or a graphical user interface to build things, but we can always take a peek behind the scenes to look at the syntax. For example, in power query, we would look at M code in macros. We would look at the VBA in the function palette. We would just look at what the function is written in the formula bar. Even access queries, build a SQL statement that you can see in the background and learn how to read. There's no way to get around learning syntax. And if you want to expand the capabilities of your data and your skills, the more The more you learn about syntax of any particular program, the more you can leverage it. If you find you're in love with syntax, and you like to type out all that code versus using the GUI, you might grow up to pursue data science, where programming is one of the key differences between a data scientist and a data analyst.

Contents