Should I Learn To Code?

Back to Blog

Everywhere you look, someone is proclaiming the universal benefit of learning to code.

Between initiatives like Hour of Code, dozens of coding bootcamps, free and paid online resources, and everyone from celebrities to political figures getting in on the action, the message is the same: Anyone Can Code, and you should too! And it’s true that coding knowledge has never been more accessible to the people that want to learn it. Many of my peers who are professional developers have a formal education in something completely different! I personally spend lots of time volunteering to teach people to code, whether that’s one-on-one, mentoring with Girl Develop It, speaking at events, or even organizing WordCamps.

Here’s the thing, though: learning to code is hard work, and it means dozens of different things depending on what you want to do with it. There are different languages for static websites, interacting with databases, writing apps, building computer software, or developing intelligent machinery, and each one has their own syntax, rules, and considerations. Even if we just narrow our focus down to “code for the web,” that could be anywhere from standard HTML/CSS, to a fully structured front-end framework taking advantage of CSS Preprocessors, to any number of different JavaScript libraries, to a server-side language like PHP or Ruby. On top of that, you might want to learn a specific content management system, like WordPress, which has its own functions and rules on top of the language it’s built with. And this isn’t even including considerations about speed, security, or server configurations.

Does that make your head spin? It’s enough to make me a little overwhelmed, and I do this for a living! There is a lot to learn here, and it requires serious time and dedication to become proficient at even a small portion of it. I don’t think everyone can learn to code at this level, nor do I think everyone should. We’ve embraced division of labor for many reasons, not the least of which is that it enables us to focus on the skills we are best at or which will have a better economic outcome for our own lives. I’m certainly glad I don’t have to build my own house or farm my own food in order to survive!

So what does that mean about learning to code? Should we not even bother?

While not everyone needs to learn how to code at the level that will enable them to actually build things, we can’t escape the fact that code is everywhere and we all interact with it on a daily basis: on our computers, on our phones, in our vehicles, in our homes, at the store. As such, knowledge of code will go a long way toward understanding how the world works. The more directly we want to interact with code, the more we need to know about it. To put it another way:

Everyone does not need to know how to code, but everyone should know enough about code to support their level of interaction with it.

Look at car ownership as a perfect example. You don’t need to be a car mechanic in order to drive your car to the store, but to get the most out of driving your vehicle, it’s best if you have a general understanding of how it works, how to maintain it and keep it running well, and how to communicate any problems you are having with it. And regarding the division of labor, though I did not build my own house or farm all my own food, I do know how to repair things and maintain a small vegetable garden.

Theoretical vs Practical code

For the purposes of this article, I’m going to make a distinction between what I am calling “theoretical” code, or understanding how code works, and “practical” code, which is the actual, executable language that produces output. As an example, think of understanding language. “Theoretical” knowledge would be understanding that language is made up of letters, which form words, which form sentences, which express thoughts. “Practical” knowledge would be the ability to speak or read a given language. And you can have a shallow or deep understanding of each: perhaps a deep theoretical knowledge can talk about different parts of speech (nouns, verbs, etc.) or different nuances of speech (tone, emotion, context). A deep practical knowledge of language would enable you to understand different dialects, or perhaps speak using non-literal forms like puns, metaphors, or colloquialisms.

Let’s go back to that car ownership metaphor and dig into that a little deeper. If you’re a car owner whose primary concern is getting to and from your destinations safely and reliably, you’ll want to have certain practical knowledge, mostly at a surface level. This means following your car’s maintenance schedule for oil changes, tire rotations, and other general upkeep. You’ll also want to make sure to use the right kind of fuel, keep your tire pressure up, make sure filters are changed and fluid levels are full. On a theoretical level, it helps to understand certain words: what does horsepower mean? What does torque mean? What kind of car body do I have? What kind of engine do I have? It also helps to have a basic understanding of how cars work and how the different parts of your car are connected. Does that help you drive better? No, but it does help you sense when something is wrong before you get a warning light, and better communicate those problems to a mechanic.

If you’re a car enthusiast, however, your practical and theoretical knowledge will probably go deeper than that. With greater theoretical knowledge, you’ll probably be able to discuss the types of different engines, drivetrains, or body types, and debate the merits of each. You’ll probably exhibit  a preference of brands for vehicles and their components based on your research. You may have additional practical knowledge as well, such as being able to change your own tires, change your own oil, or work on other interior or exterior components. You might also modify your vehicle to suit your preferences. The more interested you are in working on your own car, the more practical and theoretical knowledge you will gain, and the more extensively you’ll be able to modify and service your own vehicle.

Both car mechanics and engineers who build and design cars have deep theoretical and practical knowledge about cars, but they are applied in different ways: one for repairing and modifying existing equipment, and one for creating and testing new equipment.

What is your reason for wanting to learn about code?

Because I work primarily with WordPress, I’ve put together some examples below of different ways people want to interact with WordPress code, and my recommendations for the level of code education I think will be most beneficial. These are not comprehensive lists, but suggestions and examples of what each level means. Of course, if you start dabbling in it and find you love it beyond your intended use, the sky is the limit, and there are plenty of places to learn!

I want to build websites or applications WITH WORDPRESS

  • Learn theoretical code deeply: Get a “teaching-level” understanding of the languages you’re using and why they’re used. Examples: How do you use DOM elements semantically? How do you take advantage of the CSS cascade and specificity? What are different WordPress data types and how do they relate to each other? How do you use actions, hooks, and filters? What are the rules for your programming method of choice (object oriented vs. functional, or something else) and why are they adopted?
  • Learn practical code deeply: You get to “learn to code” in the traditional sense! Focus your efforts by not only learning how to read examples and write functional code, but writing clean, understandable, secure, and reusable code, and being able to parse and deconstruct other people’s code to understand what’s happening. You’ll want to not only have an understanding of the vanilla languages you’re using (HTML/CSS/JS/PHP), but any frameworks you are using on top of those languages (including WordPress, which has its own set of functionality and rules beyond vanilla PHP). Learn the standards for writing the languages and adopt a consistent organizational structure. Document all the things.

I want to design for WORDPRESS

  • Learn theoretical code deeply: Understand WordPress site architecture and logic on a basic level. Understand different data types (like post types, taxonomies, meta, users) and how they relate to each other. Understand how WordPress determines visual output via the Template Hierarchy as well as how it can be customized. Understand how content management systems create dynamic pages and how to modularize your designs to fit this type of output.
  • Learn practical code moderately: have a strong reading and writing foundation in HTML and CSS. Understand how design elements relate to the DOM and how different content elements relate to themes. Understand basic coding logic (perhaps through JavaScript or basic work with the WordPress loop) and where each language is used in the development process. If you like code, getting more deeply into actually writing themes is beneficial.

I work alongside or manage WORDPRESS developers or web designers

  • Learn theoretical code moderately: Familiarity with the different areas of the WordPress admin and how they relate to different WordPress data types. Understand that design and functionality decisions, including interactions with third-party code, have impacts on code complexity and project scope.
  • Learn practical code moderately: Being able to explain code concepts in layman’s terms. Understand which coding languages are being used and what each language is responsible for. Understand terms like “responsive,” “mobile-first,” “API,” and “framework” on a basic level and how they translate to code. Understand what a code library is and which ones are being used.

I want to use themes or plugins to put my own site together

  • Learn theoretical code moderately: Learn the names for different “parts” of WordPress (like menus, widgets, posts, pages, taxonomies, users), where they are located in the admin, and what they output on your site. Know what a theme is supposed to be doing (visual presentation) and what a plugin is doing (additional functionality). Understand that WordPress is a combination of visual output and files (HTML/CSS/JS/media) plus database interaction and logic (PHP/Content Entry/Settings Panels) and know, in general, that they are responsible for different elements of your site (content output, look and feel, etc.)
  • Learn practical code simply: Get a basic “reading-level” understanding of HTML and CSS so you can recognize DOM elements, Classes, and IDs. If you want to be able to make visual tweaks, learn how to make a simple WordPress child theme and write simple CSS rules made out of selectors and declarations. If you want to start adding code to functions.php, I’d suggest getting a higher understanding of WordPress code first.

I want to be a user of wORDPRESS services

  • Learn theoretical code simply: understand that the web is build of many languages, several of which are working together to build each website. Understand that some languages interact with the browser, and some languages interact with databases on the server. Understand that certain languages are more concerned with structure and visual presentation (like HTML and CSS, which are often referred to as “markup” or structural) and some languages are concerned with logic and output (like JavaScript, PHP, Ruby, or others, which are often referred to as the “actual” code, or the code that makes things “happen/function”).

What do you think? Have you tried learning to code? Let me know your experience in the comments!

Leave a Reply

4 Responses to “Should I Learn To Code?”

  1. Ani

    Michelle, the distinctions you make are really clear and helpful. I have painfully used a WP Premium Theme to build my own site, with neither theoretical nor practical knowledge and found myself longing for just enough to feel less blind (not too mention less frustrated) as I made my way. I also know that my work is to do my writing and marketing and not to become a developer, so have been trying to find where to stand. This is so helpful.

  2. Why Learn to Code? - Curiosita Labs

    […] Marktime Media, has a great example of theory vs practical knowledge. In her article about Should I Learn to Code, she talks about the difference between car ownership and car enthusiast. Car owners need to know […]

  3. Jeff Matson

    Excellent article, Michelle.

    As you know, I’m one of those “everyone should learn how to code” types of people. By that, I usually mean something along the lines of theoretical code as you discussed in this article.

    When I say “everyone should learn to code!”, I’m primarily referring to a certain mindset. As developers, we know that code is 49% being able to think a certain way, 50% experience, and 1% syntax. Teaching people to think in an object-oriented or procedural way is half the battle. The other half just comes over time.

    Yes, development is really, really fucking hard. We’re also good at making things look really, really fucking easy (this is also where experience plays into things). Because of this, I feel that newcomers are rather intimidated by all the semicolons, brackets, and parentheses, and it’s our job to keep them pushing forward into a career that we all love.

    I feel like I’m ranting a bit here, but I’ll leave with this:
    Learning to code is a process that absolutely anyone can take on. I only appear super smart because I’ve spent more than half my life learning something. Anyone can learn to code, have some fun, and make cool shit.

  4. Robert Bethge

    Great guide! Helps me as an aspiring developer to dedicate my resources to where it makes most sense.