Maybe it's crossed your mind once or twice before: You know, this would be a lot easier if I just knew how to program. But it's an intimidating subject, especially if you're not sure of your technical expertise, and there's so much to learn that it's hard to know where to start.
In today's Whiteboard Friday, master technical SEO Andy Doe shares why it's so important for SEOs and marketers to take the programming plunge, explains key concepts, and helps you determine the best course of action for you to get started when it comes to leveling up your technical prowess.
Howdy, TimeTraderz fans. Andy Doe here, Head of SEO at Catalyst. I'm here to talk to you today about programming for SEOs and marketers.
Why should you learn how to program?
I think there are really several key benefits to learning how to program.
1. Improved developer relations
First, being developer relations. As SEOs, we're constantly working with developers to implement our recommendations. Understanding why they make certain decisions, how they think is really pivotal to working with them better.
2. Become a better technical SEO
Understanding how to program makes you a better technical SEO. Just understanding the construction of websites and how they operate really helps you do a lot better with your SEO. Automation. As marketers, as SEOs, we all sometimes do very repetitive tasks, and being able to cut down on the time spent to do those repetitive tasks is really key.
It really opens up the opportunity to do things and focus more on strategy and the other things that you can't leave to automation.
3. Leveling up your data analysis
If anyone is familiar with this number, 1,048,576, that's the row limit in Microsoft Excel.
As marketers, we're swimming in a sea of data. It's very easy to work with a dataset that well exceeds that. I often work with hundreds of millions of rows of data. Utilizing a program language like R or Python is a really good way of handling that amount of data.
It's becoming really, really more common in the States to be taught how to program in elementary school. So by learning how to program, you're on equal footing with the children of the world, people that may enter the workplace in the future. So you don't even have to learn how to program in depth. But I do recommend you at least understand the concepts and logic behind programming.
Which language should you learn?
Oftentimes I hear people say, "I did a little bit of programming in college or high school. I learned so-and-so language." To them, I say, "You're in great shape. Stick to whichever programming language you're comfortable with." You don't have to start from square one.
A lot of the programming languages share a common logic. But if you are starting from square one and you need to just decide on which programming language I'm going to learn today, I have two recommendations.
If you're going down the path of data analysis, your primary reason for learning how to program is to work with data and do more sophisticated things with data, then I think there's no better language than Python.
Python is very well-equipped. There are lots of libraries designed specifically for data analysis, and it's a very much more robust language than something like R.
Now I want to go through some basic programming concepts so that you walk away feeling a little bit more comfortable with the idea of learning a program so it's a little less intimidating.
The first concept I want to go through is the idea of a variable. These are just like algebra, like basic algebra.
So you can assign x is equal to 2 or any other value, and then we can use that later. So x plus 2 is 4. Variables can have any name. We're using Python syntax as an example. So the first variable we have is a variable called "animal,"and it's equal to the value "cat."
This is a string, which is just a bit of text that we assign to it. Now variables could be of many different types. So the variable "number" can be equal to 2, an integer. Or the variable "colors" can be a list, which is a type of Python array. Arrays are just variables with multiple values. So in this instance, colors is equal to red, blue, and green, and it's just denoted with the brackets.
The next concept I'd like you to understand is conditions, so if/else being a basic condition that we would work with. It reads a lot like English. So if the variable "animal" is equal to "cat," which it is, print out the text "MEOW!" If "animal" wasn't equal to "cat," say it was equal to "dog,"then we would print out "Woof!"
Then the output, since "animal" is equal to "cat," is "MEOW!" Loops. There are many different types of loops. I'm going to use a for loop as an example. Again, it reads a little bit like the English language. So we have a variable "colors,"which we know is equal to red, blue, and green.
So we want to say for every value in that variable "colors,"print out that value. So for x in colors, print (x). It will go through each one, one at a time and print it out. So the first value is red. It gets printed out. The second value is blue. It gets printed out.
The last value is green. It gets printed out, and the code ceases. Now the last concept I want to explain is functions. Functions very simply are reusable snippets of code. So we have a very basic function here, which we define as moz, so the function moz, which has the value one line of code print ("WBF!") for Whiteboard Friday.
If we execute the function moz, it will print out the value "WBF!" So all these concepts in themselves aren't very useful. But when you start really programming and you start stringing them all together, you're doing all sorts of sophisticated things, and it becomes very, very powerful building blocks to doing much greater things.
So now that you understand programming and why you should do it, I want to leave you with some resources to actually learn.
The first resource I recommend is Lynda. It got rebranded LinkedIn Learning. The reason why I recommend Lynda is because many, many public libraries offer you a subscription for free.
When I was learning to program originally, I actually went to the library and had to take out books and try to do it myself. Nowadays, there are tons of other resources, like Codecademy.
Python for Data Analysis
It also acts as an invaluable reference guide. If you're interested in learning Python for data analysis, there's one book that I highly recommend. It is "Python for Data Analysis" by McKinney. That's an O'Reilly book. McKinney was the creator of Pandas, which is a very well used Python library for data analysis. So hopefully you've walked away a little less scared of programming and are excited to learn.