How to Learn to Code

[et_pb_section bb_built=”1″ admin_label=”section”][et_pb_row admin_label=”row” background_position=”top_left” background_repeat=”repeat” background_size=”initial”][et_pb_column type=”4_4″][et_pb_text admin_label=”Text” _builder_version=”3.0.51″ background_layout=”light” text_orientation=”left” border_style=”solid” background_position=”top_left” background_repeat=”repeat” background_size=”initial”]

Curiosity is one of the most important personality traits that you can have in the tech industry. Before you write your first line of code, check yourself mentally. Do you want to know how the world works? How technology works? Do you like solving puzzles and figuring things out? Do you enjoy having “A-ha!” moments?

In this post I’m going to walk you through some important concepts that can help you succeed in the world of programming.

Be Curious. Try to Understand

When I started learning to code I didn’t care about programming, and I didn’t care how anything worked. I was just trying to build a product so I could start a business. This is the worst mindset a new programmer could have. If you want to learn how to code, you have to be curious. In order to code you have to learn how computers work. You need to understand how all of the pieces fit together and how they interact to build an application. Successful programmers WANT to learn how technology works deeply. Slow down, enjoy the learning process and be curious. That is how you learn to code.

[/et_pb_text][et_pb_video admin_label=”Video” _builder_version=”3.0.51″ src=”” /][et_pb_button admin_label=”Button” _builder_version=”3.0.51″ button_text=”Subscribe to My Channel!” button_url=”” url_new_window=”on” button_alignment=”center” background_layout=”dark” custom_button=”on” button_letter_spacing=”0″ button_icon_placement=”right” button_letter_spacing_hover=”0″ custom_css_main_element=”width: 100%;” button_bg_color=”#e02b20″ saved_tabs=”all” global_module=”770″ /][et_pb_text admin_label=”Text” background_layout=”light” text_orientation=”left” border_style=”solid” background_position=”top_left” background_repeat=”repeat” background_size=”initial” _builder_version=”3.0.51″]

Learn Each Thing By Itself

There are a lot of moving parts in the world of technology. You’re always picking up new tools, and you have to learn how to use them. It’s best to learn how to use that tool in isolation before trying to integrate it into your project. Before using MySQL in your app, try learning MySQL all by itself, that way you know how the tool works on its own. Anything new or unfamiliar you come across will be much easier to learn without all the extra moving pieces.


It’s hard to stop in the middle of a project and go research something else seemingly unrelated. A lot of times it’s better to just stop and do the research you need to do. I had a problem with my live website, and I needed to fix something in the Apache web server. I didn’t know anything about Apache, so I spent three days trying to copy & paste solutions and nothing worked. Finally I gave in and decided to learn all I could about how Apache worked. Within thirty minutes I had solved my problem. I only solved the problem because I was willing to read the documentation and learn about Apache. You have to be willing to drop what you’re doing and learn how to use stuff (which is why Curios programmers are usually more successful.)

I’ve had this happen countless times. You’ll have to stop and learn about environment variables, how your $PATH works, what SYMlinks are, User permissions, and a bunch of other stuff that just pop up out of nowhere. If you don’t stop and take a couple hours or days to learn how to use them, they will drive you insane, and something always seems to pop up when it’s inconvenient. Just take a deep breath, stop, and do the research.

It’s also really hard to code when you’re angry. You shouldn’t become angry when coding because the computer tells you what the problem is. Sometimes it’s hard to decipher the message, but that comes with experience. You have to be able to stay calm under pressure, and if you ever get frustrated then it’s time to take a break. Be willing to walk away from a problem and come back to it with a fresh mind.

Go Deep first… Then Wide

It’s tempting to jump around from language to language, but in the beginning it’s a bad idea. You don’t want to keep re-learning the same surface level stuff like for loops, arrays, and variable assignment. Instead, you want to go really deep into one language/stack. If you’re really good at one language, you’ll code much faster, have higher quality code, build products faster, have more confidence, and get paid a lot more. (Besides, it’s not that hard to switch languages anyway)

If you go deep into a language first, you’ll have a much better appreciation for differences when you do start experimenting with other languages. The surface level stuff is all very similar, so jumping around doesn’t do you much good until you’ve gone deep. That said, it IS important to experiment and be flexible! Once you’ve gotten very comfortable in a language go explore!

Programming Challenges

You have to apply what you learn to real projects, no matter how small. To a beginner, programming challenges are everything. You start out with small and simple projects like “reversing a string” and “saving a users favorite food to a database”, and gradually increase the difficulty. every challenge will teach you something important, and the more you do the better you’ll get. Big programs like Facebook or YouTube are just a bunch of little programs working together. By starting with these small programs you’re learning the fundamentals to build bigger programs. it doesn’t really matter what kind of exercises you do, but variety is good. We have a growing list of exercises for you to solve here.

[/et_pb_text][et_pb_text admin_label=”Text – NewsLetter Email Opt in” _builder_version=”3.0.51″ background_layout=”light” text_orientation=”left” border_style=”solid” global_module=”1643″]

Want More Tutorials?

Subscribe to our NewsLetter to get our latest Tutorials, Courses, product & tool reviews, and more! We don't email very often. When we do, it'll be good!

[/et_pb_text][et_pb_text admin_label=”Text” _builder_version=”3.0.51″ background_layout=”light” text_orientation=”left” border_style=”solid” background_position=”top_left” background_repeat=”repeat” background_size=”initial”]

Read the Error… And the Manual

I’ve seen so many beginners copy and paste an error message into Stack Overflow or Reddit, and ask someone what the problem is, when the error message tells you exactly what the problem is. You can’t expect answers or information to just pop out at you. You have to dig. You have to get very comfortable reading errors, reading the manual and doing your own research to be a great programmer. Read and understand error messages.

Focus on Improvement

Code will not make itself clean. Once you start being able to complete your projects, make a conscious effort to keep your code clean, and refactor things as they need to be refactored. It takes a lot more planning, and a lot more thought, but you should always be trying to improve your code quality, and always be refactoring your codebase. You don’t have to get it perfect, but as long as you consistently try to follow best practices and improve, you’ll make progress.

Writing code that computers understand is easy, but writing code that humans understand is hard. The cleaner your code, the easier it is for humans to understand it. Do your research and apply what you learn.

Build Cool Stuff!!!

Completing a “Todo list tutorial” isn’t coding; It’s copying. It only counts when it’s your own project. Reading and following along with tutorials can help you learn new concepts and improve code quality, but you have to apply what you learn to your own projects in order to gain any benefit. I try to always finish every project that I start so I can put it in my portfolio. It’s fun to look back on the programs you created and see the progress you’ve made. So build your own cool stuff!


The main takeaways to learn to code, or become a better programmer are to genuinely be curious about how computers work, to want to understand how all the pieces work together, and to build cool stuff. If you put those elements together, then you’ll succeed as a programmer. If you want to get better, then make a genuine effort. Read articles, buy books, and try to apply what you learn to your code.

[/et_pb_text][et_pb_cta admin_label=”Reading List CTA” _builder_version=”3.0.51″ title=”Reading Makes You Smarter!” button_text=”Get Smarter!” button_url=”” url_new_window=”off” use_background_color=”on” background_layout=”dark” border_style=”solid” custom_button=”off” button_letter_spacing=”0″ button_icon_placement=”right” button_letter_spacing_hover=”0″ background_position=”top_left” background_repeat=”repeat” background_size=”initial” use_background_color_gradient=”on” background_color_gradient_start=”#0e1ef4″ background_color_gradient_end=”#0f1fff” saved_tabs=”all” global_module=”930″]

Check out our recommended reading for anyone in the technology industry!


Leave a Comment

Your email address will not be published. Required fields are marked *