fbpx

Learning To Code – A Few Tips

Thoughts On Learning To Code

So you want to learn how to program?  I have some suggestions.

First, full disclosure.  I’m hardly a programmer.  I’m a guy learning.  I can't really produce full-blown applications yet.

However, I have learned a fair amount about the process of learning to code already.  And I have some tips.  Here they are.

Which Coding Language To Pick?


Everybody says don't worry about what language you start with.  This may be true, but it is ridiculous to expect anyone to be indifferent.  So accept that you will obsessively read about the different languages and which one you should learn. 

I personally think it is good to read deeply about the various languages that exist.  This is part of your education, learning about the landscape of computer programming.

The trick is to not get stuck endlessly analyzing this step.  I say take a few days of deep reading and then pick one and start.  The first few weeks are so slow and so basic that the concepts you learn can be quickly applied to a new language if you decide you need to switch gears and change languages.

To help you decide, here are some quick points.

  • JavaScript is probably the best place to start if you want to become an entry-level professional programmer.  

  • Python is the way to go if you want to build web applications quickly and also have an interest in data science or more academic work.  Eventually, you should learn the web application framework Django along with Python.

  • Ruby (plus the framework Rails) is the way to go if you want to learn the most elegant and simplest language--and want to build web applications as quickly as possible.  But you should know that Ruby and Rails are losing momentum when compared to Python and JavaScript--which are surging.  JavaScript in particular is surging more and more.

Why I Picked Ruby And Rails


I chose to learn Ruby and Ruby on Rails.  I made this pick for three reasons.  First, I like the idea of learning an elegant, beautiful language.  Second, I want tangible results as quickly as possible to ensure I get motivation and momentum going—so I don’t quit in frustration.  Ruby and Rails get me up and running the quickest.  Three, I am an entrepreneur, not someone trying to get a job as a coder.  So I can learn the language I want.  If I were shooting to get a job, I'd be going long on JavaScript.  (I am certain I will learn other languages as well.)

Learning To Code Is Like Learning To Play An Instrument


Learning to code is like learning any other technical activity.  To make progress, you have to practice.  Would you master the guitar faster by passively watching hundreds of YouTube videos or by picking up a guitar and practicing?

By practicing, I don’t mean fooling around.  I mean finding exercises that are hard for you and doing them.  This is a bit like eating your veggies, but you will make progress much faster if you actually practice.

Here’s a good rule of thumb.  If what you are doing is easy (passively watching videos), you could be making better progress if you were doing something that requires you to take breaks fairly often (practicing and actually coding).

Watch And Mirror Coders On YouTube


I know that I just said don’t spend too much time watching videos and reading articles, but there is one huge exception.  Following tutorials on YouTube and coding alongside an experienced programmer was what really allowed me to break through in my coding. 

Somehow watching someone tie it all together gave me the big picture of what is happening when we build web applications in web frameworks.  The MVC paradigm finally made sense.  I understood what a controller is.  What routing is.  What view files are.  What models are.  So I suggest you follow formal books (or online resources with exercises) and also code alongside programmers on YouTube.  (A nice bonus when you follow along with someone on YouTube is you learn lots of command line shortcuts.)

Go With Linux Or Mac


In my experience, Linux is easier to code with than Windows.  (I can’t speak to Macs, but believe they are as easy as Linux.)  This problem is getting better with time, but when you are brand new, if you are on Windows, find a way to dual boot your machine. 

But be careful when you install Linux.  You can wipe out your machine by accident.  Have everything important backed up online in the cloud.  (Getting Linux up and running is hard.  So maybe code in a cloud-based IDE like Cloud 9 until you get Linux going.)

By the way, nothing in the above section should be read as "you need to buy a new computer to learn to code."  You don't need to.

Learn The Command Line ASAP


Learn to operate on the command line as quickly as possible.  If you don’t, you will be hard-pressed to learn to code -- as you will get stuck not knowing how to navigate the coding environment.  This tutorial by Michael Hartl is a good place to start.  Honestly, you learn the command line just by coding a lot, getting stuck, and then googling how to fix stuff.

Google And Stack Overflow Are Your Best Friends


If you get stuck on an error code, just throw the error into google.  Chances are better than 50% someone has posted the solution for you.  I often can’t understand the explanation of the first link I get addressing the error.  So just go back to the search page and keep clicking link results until you find something that makes sense to you.

If you are totally stuck, throw your question up on Stack Overflow.  Every question I have had to ask was easily answered by someone somewhere on the planet.  It’s quite thrilling.  Note, some people are kind of sniffy on these forums.  F ‘em.  They’re probably losers trying to prove something in the only domain where they have some skills.  Just forge ahead.  Yes, try to follow the rules and ask extremely clear questions.  But don’t sweat it if some toffer “downvotes” your question.

Coding Is An Iterative Process


I have found coding to be the most iterative learning process I have ever encountered.  By this, I mean that the first time you encounter the materials that teach you to code, you will be lost.  For example, the first time I went through Michael Hartl’s RailsTutorial.org, I was drowning, just barely, quasi groking half the material at best.  The second time, it was like I was reading a totally different book, and I found the concepts not that hard to grasp.

So you just have to keep going.  Try to understand.  Move ahead.  Circle back.  Repeat.  It’s really cool when you start to see the matrix.  (I only partially see it yet.)

Dabble In Other Languages


The standard advice is to go deep initially on one language and one framework.  I think this is solid advice.  We need to get to where we can actually build stuff, and knowing 10 percent of 10 things won’t cut it.

However, when I get burned out on Ruby and Rails, I sometimes dabble in tutorials on Python and Django.  I find it refreshing to still be focused on coding, but not on Ruby and Rails.  Also, see the same programming concepts (like arrays, MVC, etc.) working through a different language syntax helps me understand the high-level concepts better and recognize that these concepts aren’t unique to Ruby.

Try To Build Your Own Stuff ASAP


You find out what you are retaining in a hurry when you go try to build your own app.  You also find out where gaps lie quickly.  So just go build.  I presently can’t build more than static web pages in Ruby on Rails without following a tutorial, but I can see much greater dynamism in the distance.  So I keep trying to build stuff, then going back to exercises.

Just Keep Going


Finally, and most importantly, just keep going.  We all want to optimize this stuff and learn efficiently, but most importantly, the key is to just keep learning, coding, practicing, and trying to build stuff.

The Valley Of Death is a long one in coding.  You have to take your lumps and realize that you won’t be able to build anything of note for months.  So let’s get through that valley as soon as possible—or risk giving up in frustration.  So code as much as you possibly can.  Practice, practice, practice.

I hope this helps!

Click Here to Leave a Comment Below

Leave a Reply: