This article is focused on what to do and what not to do when
learning to code. It’ll also give you tips on how to learn in the most
efficient way possible. These tips are based on Natasha Postolovski’s
experiences as a self-taught developer, now working as a software
developer at ThoughtWorks in Australia. You can follow her on Twitter at @npostolovski.
It seems that more people than ever
before have decided to learn to code. The abundance of high-quality
educational materials, tutorials, and mentors
on the internet means that self-starters from many different
backgrounds can teach themselves programming, whether their goal is to
build an app, create a website, solve a particular problem with
technology, or become a software developer. Having so many learning resources available is a good thing, but it also presents a problem. When you want to learn to code, where should you start? What do you learn, and what don’t you learn? What’s the best way to practice, and the fastest way to improve your skills? This article aims to help answer some of those questions.
Google Trends suggests that the number of people interested in learning to code has risen rapidly over the last several years.
Be clear about your goals
People learn to code for many
different reasons. You may need to learn the basics of both JavaScript
and Ruby to apply for a job as a Junior Full-stack Developer. Maybe you
only need to know enough HTML and CSS to finish a school project, or
maybe you need to learn a little bit of Python to be able to do data
analysis with Numpy. You might have an idea for an iPhone game you want to write in Swift, or an exciting concept for the first virtual reality smash hit game built with Unity 3D.
Your billion dollar startup idea might call for some gnarly machine
learning, or you may need a simple piece of software to help fix a
problem in your small business. There are a thousand reasons why someone
might want to learn to code, and a thousand different ways to approach
the process. As you start to learn how to code and
dive deeper into programming, you’ll start to discover more about the
specific set of technical skills you’ll need to achieve your goal,
whatever it might be. However, when you start, it’s best to start as
simply as possible. As a general rule, I’d recommend the following:
If you’re creating a static website (meaning that it doesn’t need to store data or have dynamic behavior), think about learning HTML and CSS as a start. You may also eventually decide to learn JavaScript as well, if you need it.
If you need to build an iOS app, learn Swift. If you’re building an Android app, learn Java.
If you want to build a web app, you’ll need to learn HTML, CSS, and a web framework.
A web framework is something that makes it easier for you to store data
and add dynamic behavior to your web app, such as the ability to have
user accounts and display data from a database. Some popular web
frameworks include:
The web framework that is appropriate
for you will depend on what you are trying to build. I do think Ruby on
Rails is a great option for someone learning to code, as it is very well
documented via Rails Guides.
The web framework that is
appropriate for you will depend on what you are trying to build. I do
think Ruby on Rails is a great option for someone learning to code, as
it is very well documented via Rails Guides.
If you want to build a game, you should consider learning Unity.
If you want to do data science or machine learning, Python plus these libraries
are a good choice. A library is some pre-written code that makes it
easier to perform particular tasks, such as displaying a scatter-plot.
Once you have an idea of what you
need to learn, it’s worth giving some thought to a timeline. Your
timeline will help to inform the pace at which you need to learn to
code. Ideally, you should be able to formulate a statement like this: In 3 months time, I want to have published a website for my friend’s band. Or… In 6 months time I want to have launched a working MVP or ‘Minimum Viable Product’ version of my business idea. Even if you don’t have a specific
timeline in mind, creating one can help you stay motivated and track
your progress against your target. Replace a goal like “I want to quit
my job as a librarian and become a software developer”, with something
more specific, like “In 12 months, I want to quit my job as a librarian
and become a software developer”. Having this timeframe firmly in mind
will help you set milestones for your progress.
Understand how you learn best
There is no best way to learn to code.
Some people love to watch YouTube videos and screencasts
Some people like to immerse themselves in a book
Some people want to figure it out by doing
Some people need to read documentation from start to finish
Some methods of learning will work
extremely well for you, and others will be far less effective. Before
you start learning to code, it’s worth understanding how you like to
learn and shaping your learning journey around this method. If you’re truly listening to yourself, you will do this naturally. If, however, you feel like there’s a right
way to learn, or feel pressured to learn in a certain way, you might
find yourself gravitating to learning methods that seem ‘correct’ or
impressive but don’t work well for you. Be especially wary of this when being
given advice by someone who first learned to code more than a few years
ago. These people have the best of intentions, but the methods they
used to learn to code might not take into account some of the fantastic
resources that have become available over the last few years. For example, back in 2006 when Ruby
on Rails was starting to gain popularity, many programmers first learned
Ruby by reading a book affectionately known as the ‘Pickaxe Book’,
named after the picture of a pickaxe on its cover. An 864 page tome
that exhaustively details every aspect of the Ruby programming language,
the ‘Pickaxe Book’ is legendary among Ruby programmers. And yet, for
someone who is learning code for the first time, it can be very
difficult place to start now!
Work on something that matters to you
When you’re learning to code, it’s
easy to sink hours and hours into tutorials that don’t mean very much to
you. You might be building toy programs like to-do lists or silly
websites for something that doesn’t exist. While this is a good way to
learn, it’s not very motivating. Alongside all the tutorials that will
have you build something just to learn, it’s incredibly important to build something that matters to you. If you’re learning how to make
websites, make a website for yourself, or for someone you care about. If
you’re learning to make a web app, practice by building a web app that
solves a problem in your own life, no matter how small. If you’re
learning to make games, start by creating a game that you yourself want
to play. A little anecdote: a few years ago I
was a teaching assistant for a class of school teachers who were
learning how to code so they could pass the knowledge on to their
students. Without fail, the teachers who learned the most in that class
were those who practiced by building something for themselves. The
teacher who did the best in the class was working to build a simple app
to help track her family’s finances. The teachers who didn’t build
anything for themselves and only did the in-class exercises learned the
least. Something I’ve observed to be true about people is that we’re
always the most motivated to learn and retain information when we see it
as directly useful to us. Compare the following scenarios: two
people are learning how to accept credit card payments on a website. Who
do you think will retain this information? The person who is learning
because ‘it might be useful some day’, or the person who desperately
needs to figure out how to accept donations via their website for the
independent documentary they are trying to produce? Having a personal project you care
about and can apply your learnings to will be the single biggest thing
that accelerates your learning and makes things stick.
Find good company
Whether it’s a mentor or someone else
you know who is also learning to code, having someone to support you is
invaluable. Learning to code can be challenging, and it helps to know
that someone else is going through the same struggles. If you don’t know
anyone else who is learning to code, you can try to meet them by
attending local tech meetups on Meetup.com.
Some meetup groups have ‘Newbie’ nights that attract lots of beginners.
If there aren’t local meetups in your area, or meetups just aren’t your
thing, a community like CodeNewbie.org
is another great place to seek out support. If the idea of learning to
code alongside a group of other people sounds great to you, then it may
also be worth looking into coding bootcamps. A mentor can also give a huge boost
to your efforts to learn to code. They can help you when you get stuck,
motivate you when you feel doubtful, advise you on what to learn next,
and help you navigate toward your ultimate goal. If you know someone who
has already achieved the goal you are working toward (i.e. becoming a
software developer, or launching an indie game), then they might be a
candidate to mentor you. The truth is, most mentor and mentee
relationships don’t start with the question “Will you be my mentor?”
They start with an invitation to grab a coffee, a meal, or a beer, and
continue after that if it works for both of you. You may not be lucky enough to already know someone who can be your mentor. If not, that’s why services like CodeMentor exist; to connect you with a mentor who can help you on your journey to learn to code.
Be consistent
It’s much better to practice
regularly for 20 minutes each day than to do three hours once a
fortnight. Consistency will help you to solidify what you learn and
retain information. If the gaps between practice sessions are too long,
you’ll forget things and lose the ability to do things that you had
previously committed to muscle memory.
Track your progress
Learning to code can be a long
journey, and it can be easy to forget how far you’ve come. Even after
you’ve learned the fundamentals of programming, which is a fantastic
achievement, it can still feel like there is so much you don’t know.
That’s why it’s important to track your progress and reflect on what
you’ve learned. Every day, or every week, write a
paragraph about what you learned that you didn’t know the day or week
before. After a while, marking your progress with these little journal
entries will help you appreciate how far you’ve come.
Finish things
One thing that can slow down your
progress when learning to code is never finishing things. After all,
starting projects is fun! You get to pick and choose the parts you want
to build, and the things you want to learn. If something is too hard,
you leave it until later… but what if later never comes? You end up not
getting enough practice by putting off challenging tasks until later. If
you get into the habit of not finishing things, this can lead to gaps
in your knowledge. Remember: it’s better to finish just one thing than it is to start ten things and never finishing any.
Error messages are your friend
One thing that goes hand-in-hand with
learning to code are error messages! They’re those scary red screens
and noisy pop-up boxes that tells us we’ve done something wrong in our
code. When we see one of these, our first instinct is usually to
navigate away from the error message as quickly as possible and start
looking for a solution. But did we actually take the time to read it? If
not, we might be missing out on a lot of helpful information. In fact,
error messages can be awesome, because a lot of the time they tell us
exactly what is wrong, and where.
In fact, the worst thing we can do when we encounter an error message
is to navigate away from it without reading it properly. So remember:
error messages are your friend. They’re there to help you, not to punish
you.
Don’t try to learn everything
Accepting that you won’t master everything is actually a good thing when trying to learn how to code, lifted from our Codementor Office Hours with Haseeb.
One of the best and yet the most
challenging things about technology is that you can never learn it all.
In fact, the more you know, the more you realize that you don’t know!
There are thousands of programming languages, web frameworks, tools,
specifications, libraries, and protocols you could possibly learn about,
but it would be a mistake to try to learn them all. Try not to go down
rabbit holes. List the things you need to learn to achieve your goal,
and try to stick to those until you achieve it. As you discover things
you want to learn about along the way, write them down in a safe place
and return to them when the time is right. So much of being a good programmer is
simply not getting side-tracked. You can start developing these skills
now, even in the very early days of your coding journey.
And remember, there’s no script for this!
There are a thousand different ways
to learn to code. Some people pick up programming extremely quickly,
while others take longer. One person might quickly grasp concepts that
you find difficult, while another might struggle with something that you
think is easy. Your journey might not be linear. You may take breaks,
get side-tracked, or have doubts. You might learn to code, then forget,
then learn it all over again. The last thought that I want to leave you with is that there’s no right
way to learn to code, and no blueprint that works for everyone.
Learning to code is a journey that will be as unique as you are. Embrace
the uncertainty, and go for it regardless. It’s truly worth it.
Step 1 : Learn the theory and fundamentals Understand top fundamental topics covered in data structures such as: Algorithms, Arrays, Collections, Complexity Analysis, Graphs, Hashtables, Heaps, Linked Lists, Queues, Recursion, Search, Sort, Stacks, Trees You can checkout these websites to help cover fundamentals: www.geeks4geeks.com - explains all the high level fundamentals www.beehyve.io/data-structures — student crowdsourced resources and community for any topic in CS including Data Structures Time complexity resources [BeeHyve]Time Complexity Cheat Sheet https://visualgo.net/en - has visualizations of a lot of helpful algorithms Here are more schools that have DS classes which you may find helpful: CS 226 Algorithms and Data Structures Brown CS 16 Introduction to Algorithms and Data Structures Stanford CS 166 Data Structures CMU CSE 15-211 Fundamental Data Structures and Algorithms University of Washington at St. Louis CSE 241 Algorithms a...
Excellent Blog, I like your blog and It is very informative. Thank you
ReplyDeleteRuby vs Python
Programming Language