Skip to content

Cyber Sale: Save big on Moz Pro! Sign up by Dec. 6, 2024

Whiteboard friday 27dcaca

Programming for SEOs

Paul Shapiro

The author's views are entirely their own (excluding the unlikely event of hypnosis) and may not always reflect the views of Moz.

Table of Contents

Paul Shapiro

Programming for SEOs

The author's views are entirely their own (excluding the unlikely event of hypnosis) and may not always reflect the views of Moz.

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 Paul Shapiro 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.

Click on the whiteboard image above to open a high resolution version in a new tab!

Video Transcription

Howdy, Moz fans. Paul Shapiro 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. 

4. Literacy

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. 

Python

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. 

JavaScript

If you're going down the path of web development, you want to be a better technical SEO, you want to understand how websites are constructed, JavaScript is an incredibly robust programming language that has boomed in usage on websites over the last few years.

It's also very capable of doing backend web development with a language like Node.js, which is just a variant of JavaScript. The only issue with learning JavaScript is I would say that you need to learn CSS and HTML first. So there's a little bit more of a learning curve than say learning Python.

Example concepts

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. 

Variables

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.

Conditions

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.

Functions

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.

Learning resources

So now that you understand programming and why you should do it, I want to leave you with some resources to actually learn. 

Lynda/LinkedIn Learning

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.

There's a ton of different programming classes in there. You can certainly get a Python class. Many levels of advanced Python and JavaScript. You can also learn other things, which I think is pretty cool. So I definitely recommend Lynda/LinkedIn Learning. 

Codeacademy

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.

Codecademy is fantastic. It's completely interactive. So it will go through all the various concepts, and one by one it will ask you to sort of perform them in a very logical manner so you learn it in an optimal way. I definitely recommend Codecademy. They have both a JavaScript and a Python module. The MOOCs online.

Coursera

If you are the person that needs a more traditional classroom environment, you can learn for free, replicating that classroom environment at home. These are websites like Coursera. A lot of the major universities offer them. There are courses there. W3Schools, which is very valuable for any sort of web development, they have very good, very basic tutorials on JavaScript and CSS and HTML and anything you might need to learn web development.

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.

Bonus: FreeCodeCamp

Another great free resource for learning web development and JavaScript is FreeCodeCamp.org

Leave your comments in the section below. Thanks for watching. Till next time.

Video transcription by Speechpad.com


Did you miss Paul's awesome talk at MozCon 2019, Redefining Technical SEO? Download the deck here and don't miss out on next year's conference — super early bird discounts are available now!

Save my spot at MozCon 2020

Back to Top
Paul Shapiro

Paul Shapiro, Head of SEO at Catalyst, specializes in technical SEO for Fortune 500 companies and is the founder of the industry's first technical SEO conference, TechSEO Boost. In his free time, he enjoys horror movies and overly-complicated board games which he writes about on https://boardgamesquad.com. Follow him on Twitter: @fighto, or on his SEO blog: https://searchwilderness.com

With Moz Pro, you have the tools you need to get SEO right — all in one place.

Read Next

How to Optimize E-commerce Sitemaps with 1M+ Pages — Whiteboard Friday

How to Optimize E-commerce Sitemaps with 1M+ Pages — Whiteboard Friday

May 17, 2024
7 Ways SEO and Product Teams Can Collaborate to Ensure Success

7 Ways SEO and Product Teams Can Collaborate to Ensure Success

Apr 24, 2024
6 Things SEOs Should Advocate for When Building a Headless Website — Whiteboard Friday

6 Things SEOs Should Advocate for When Building a Headless Website — Whiteboard Friday

Apr 19, 2024

Comments

Please keep your comments TAGFEE by following the community etiquette

Comments are closed. Got a burning question? Head to our Q&A section to start a new conversation.