Hello good people of dev.to();! My name is Matt Silverman and I am a high school student. I started learning to code around a year and a half ago, and I would like to share 7 things about learning to code in general, from the perspective of a high school student. I believe that these tips can be applied to whatever you are learning, however old you are.
Many people believe that in order to learn to code you need to be a mathematical genius, however that is simply not true. When I started learning to code about midway through 7th grade, I could barely solve a linear relationship. Sure, for some fields in programming you do need to have a decent grasp of math, but that is not a majority by a long shot. Others are scared because computer code is something other than English, and it looks complicated. My response to this is that looks can be deceiving. What may look like gibberish when you first see it, after a few tutorials will start to make sense. Learning to code is exactly like learning another language. There are certain rules you need to follow, and things you can and cannot do. Once you learn that, you are on the road to more advanced computer science ideas.
//TIP: Think of programming like talking to someone, telling them what to do in //complete detail. Example: if you tell someone to do something, but forget to //tell them to stop, they will keep doing it. It is the same with a computer.
Do some research on general fields of programming, ignoring the programming languages necessary for now. Write down what interests you, and why. After that, find out what is involved in learning each of those skills (the languages, prerequisites, etc). After doing that, rule out some of things you don't want to do. An example of this would be to not learn learning server side programming first, as it requires knowledge of HTML, CSS, databases, and how webpages/servers work. Once you have listed 3 or so things with all of the above done, it is time to choose one. For me, I chose web development because there are so many paths to follow with it, but you may choose a different, and that is absolutely fine.
//TIP: It is important to remember you can always go back and learn about //something else
Planning anything is really important, especially in learning. The field of development is getting larger at an exponential rate, with more and more technologies being created every day. In order to learn to code, plan a course of study for yourself. Go on a site like Udemy.com or Codecademy.com, and find some courses on the language(s)/subject you have selected above. I would recommend starting and finishing a course on Codecademy.com first, as it is free so you can get a taste of what the language is and if you like it. Then, get more advanced and in depth with courses on Udemy. It is also important to make a syllabus for yourself. Make a schedule saying how many hours which days you want to learn, and goals for each day. Remember: don't overwork yourself. I would recommend 1 hour a day 4-5 days a week. As well, plan ahead and figure out what you want to learn next.
//NOTE: Make sure you start with the basics!
Making mistakes and getting errors is just part of programming in general. No matter how much experience someone has, they will still make mistakes. At one point, my progress on a project was halted for 3 entire days because I forgot to capitalize letter. Seriously! About a week later, I made that exact same type of error, except this time it only took me about 15 minutes to fix it because I had learned what the error might be, and how to efficiently debug the problem and repair it. You learn more from your failures than your successes. It isn't so much about not making mistakes as it is learning from them.
If you get an error, don't give up! First try to tackle it on your own, and if you can't after a half hour, then stop, go do something else and come back to it when your mind is clear. If you can't solve it on your own, you can ask on a forum! Make a question on StackOverflow.com, or if you are on Udemy, ask in the Q&A. There are literally hundreds of people there who would love to answer your questions, and help you debug your errors. No one will judge you, even if it is a silly error.
//note: ALWAYS include the code snippet you think is the culprit for the error in //your question
Thank you all very much. This is my first article, and I hope that it helps someone get started, and I will be writing more of these articles in the future. If you have any questions or comments, please post them in the comments section down below, and I will answer them as soon as I possibly can.
Thank you all very much for your time!
-Matt Silverman | SILVERMAN.IO