Learning How To Learn How To Program

in #programming7 years ago (edited)

I was talking with a friend today about how she tried (unsuccessfully) to learn how to program. Her experienced mirrored that of other people I've seen try and fail to learn how to code, they try to learn programming like they'd "learn" a subject at school. The only problem with this approach is that school rarely teaches you tangible skills. More often than not you just memorize things to pass a test. Learning to code is much more like learning to read, write and do math in elementary school than studying American Literature or Biology.

Here's a TL;DR:

  1. Learn by doing
  2. Take no notes
  3. Don't give up!

Learn By Doing

Learning by doing is pretty much essential to the programmer and this can be a radical paradigm shift for people. Programming is unlike school in the sense that at school you study then memorize the answers. In essence, you're learning how to write directions for the computer in her language.

It's very much like becoming fluent in a spoken language. Take Spanish, for instance. Once you learn the very basics of the language like some basic words; conjugating verbs in the present, past and future tense; and how to order words (ie black cat, gato negro) the only way to become fluent is by reading, speaking and listening to Spanish not memorizing large sets of words.

To relate the Spanish example back to programming, after you learn the basics like loops, if/else statements, types and declaring variables you just have to keep making new things and challenging yourself. You will never be able to memorize the entire language spec but if you can get the basics down you can build on that. You might have to Google "How to write a for loop" 20 times but the 21st time you get to that point it'll come naturally. This takes me to my next point, take no notes!

Take No Notes

All the notes you'll ever need are written down for you in the documentation and on forums like Stack Overflow. It's one of the most important skills a programmer has. Once you understand this, you'll be able to do most anything. The best part is, everything is indexed by Google!

For example, lets say you want to learn web development and you've established a very basic knowledge of HTML, CSS, and JavaScript, now you want to accept input in a form. A quick Google search for "accept input in a web page" reveals this link to w3 schools explaining most everything you need to know to accomplish your current goal. Simple!

Now you want to get the value of a user's input in JavaScript when a user presses a button. Back to Google!
Google search results

Wow! That was easy. Mr. Peter Mortensen gives us 6 methods for doing so and tells us what browsers they'll work on.

Now that you've gotten the value of the input, you'd like to make sure it contains the word "steemit". How, pray tell, does one do that?! It's simple, young Padawan. Look on Mozilla Developer Network for "String"! They list about 49 methods, then you can narrow it down from there. The first thing that pops out is includes. Maybe this can do what we want.

After clicking on the link to "includes" we see that yes, this does exactly what we wanted!
String.prototype.includes page

According to the documentation, we pass it a string to search for and if it's included we get true otherwise, we get false. Now go try it out.

if(document.getElementByTagName('input').value.includes("steemit")){
    alert("We did it!");
}

Darn, there was an error in the console! document.getElementByTagName is not a function. Not the end of the world, though! We can just check MDN for what methods exist for the document object then change the code!

if(document.getElementsByTagName('input')[0].value.includes("steemit")){
    alert("We did it!");
}

Guess what guys? We did it!

This is a simple example if you're already learning web development but it can apply to anything. If you stick to your guns (googles) you'll be on your way to being a better programmer in no time!

Don't give up!

Like anything else in life coding isn't something you can just become great at in one day. You aren't going to go from 0 to iPhone app billionaire in a week. In fact, you probably won't be able to do much without the help of good old Google in the first week or two. You'll be very frustrated with yourself and your code because there will be bugs galore and you'll have to fight for every inch of progress. That only makes your victories sweeter and your accomplishments more fulfilling.

I recommend coding every day, even if just for 30 minutes to an hour. Soon you'll find yourself sucked in, working for 2-3 hours at night or maybe your entire Saturday. If you stick with it for months, then a year, you'll be mastering your current skills and picking up new skillsets in no time. Just remember, documentation is key, learn by doing, and never give up. Watch YouTube videos, join a community like FreeCodeCamp, or buy find a book that teaches by example. Programmers love to share knowledge, books and video series are being released for free in increasing numbers. Check out teachyourselfcs.com for an example of this phenomenon (disclaimer, this course of self study is probably best had after gaining some programming experience).

Sort:  

I think setting reasonable goals is a difficult one for people just starting out. The expectation of being able to make a product that it normally takes a large team of professionals of varying skill sets to make isn't very reasonable.

Very true. I touch on that above:

You aren't going to go from 0 to iPhone app billionaire in a week. In fact, you probably won't be able to do much without the help of good old Google in the first week or two.

That's not to say that someone can't become a full stack developer and create an MVP or small business on their own, though.

I would just recommend if you're starting out with an end goal of some project, it would be smart to ask someone who has some experience what that might entail. It's very easy to get discouraged along the way.

Sometimes the end goal is just to learn how to code :p. The post above was written after a conversation with my roommate who's simply interested in becoming a programmer without any particular entrepreneurial aspirations.

Congratulations @kevindiem! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

You got a First Reply

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!