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.
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.
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
What do you think? Have you tried learning to code? Let me know your experience in the comments!