Você está na página 1de 10

How Do You Learn To Code?

Roshan Choxi - Quora


Filed to: QUORA 7/04/15 1:00pm

Its been my sole focus to answer this question for the last two years. Ive noticed
there are three strategies that successful students consistently use better than anyone
else regardless of what resources they use:
1. Focus on habits, not goals
2. Learning alone is painful
3. Build things

1. Focus on habits, not goals


It seems counterintuitive that you shouldnt focus on goals, but hear me outits all
about leverage. Anyone who works with me knows that I dweebishly reference the
Ras Al Ghul scene in Batman Begins pretty much 3-4 times a day:

32

Ras tells Bruce:

Rubyourchest,yourarmswilltakecareofthemselves.

If you focus on building the habit of programming for 20-30 hours a week, you will
reach your goal of being a web developer. If you focus on the goal of being a web
developer in X months, you get nothing from that but stress and insecurity about how
far along you are. Focus on the habit, not the goal. Rub your chest, your arms will
take care of themselves.
Sohereswhatyoushoulddorightnow: put 15 minutes a day on your calendar
to spend time programming. Dont do more than 15, just focus on doing 15 minutes a
day. If you can do it successfully with no excuses for a week, try bumping it up to 20
minutes a day. Dont try to overextend yourself by doing an hour a day right off the
bat, this is going to be a 10,000 hour marathon so were focusing on developing the
habit right now. The number of minutes you put in isnt as important as you showing
up each day.

2. Learning alone is painful


When I was learning web development, the two biggest social components to my
learning were having a mentor and belonging to a community.

Havingamentor:I worked at a small startup called merge.fm while in college. I


learned more in the summer I spent working with one of their cofounders than I did
in the entire previous year at my university. Theres just something about working
alongside an expert who knows more than you that really accelerates your learning,
youre able to pick up on how they think and unveil what you dont know you dont
know. Theres a reason why mentorship used to be the de facto standard of learning a
new trade, its very effective.
Belongingtoacommunity:For me, the two communities I belonged to were the
Illini Entrepreneurship Network (a student organization at my university) and
HackerNews (a large hacker/startup oriented online community).
I didnt learn what objects and classes were from HackerNews, but I learned a
different category of things. I learned that nobody likes Javascript. I learned that
Rubyists are the hipsters of programming. I learned that Bret Taylor, Rich Hickey,
and John Carmack are programming gods, and that software companies that are truly
serious about coffee have kitchens that look like meth labs.In short, I learned how to
talk shop. That turns out to be important when youre working with other developers,
but its also the thing that makes you feel like a developer.

3. Build things
In the first year of learning web development, I built:

A Digg Clone (from a Sitepoint book on Rails, I believe its out of date now
though)

An E-Commerce App (from Agile Web Development with Rails 4)


A GeekSquad-esque App (personal project)
A Realtime, Online Classroom (personal project)
A Foreign Language Flashcard App (class project)

I think building real projects is important for many reasons, but the most important
one to me is becauseitsfun. Thats something that is tragically lost in classical
education, but I think its important enough to be on this list. Look for resources that
show you how to build things; http://ruby.railstutorial.org/ is a good one.

4. Be a cockroach
I secretly added a 4th item for those of you whove stuck around to read this far down
the page.

Paul Graham once told the founders of Airbnb:

Youguyswontdie,yourelikecockroaches.

Youll probably want to quit learning how to code at some point. Like anything
worthwhile, its difficult and will make you feel stupid at times. This is why #1 on this
list is so importantstop worrying so much about whether youre making progress or
how much longer itll be until you feel like youve made it. All you have to do is
focus on showing up, for 10-30 hours a week. Be as mindless as a cockroach about
everything else, and dont die.

Abouttheauthor:RoshanChoxi, Cofounder and CEO of Bloc, The Worlds


Largest Online Bootcamp
HowdoIlearntocode?originallyappearedonQuora.Youcanfollow
QuoraonTwitter,Facebook,andGoogle+.
Thisanswerhasbeenlightlyeditedforgrammarandclarity.

If you have tips, advice, or preferred coding resources, tell us about them in the
comments. How did you start out?

Coding...coding...

MIT Invented a Way to


Automatically Fix Software
Bugs With Borrowed Code

6 Inspiring Websites That


Teach You To Code

Roshan Choxi - Quora


a
7/04/15 1:33pm
Drealmar

I Read This Mammoth Essay


on Code To Make You 38
Thousand Times Smarter

I was lucky enough to learn programming (or more accurately STARTED to


learn programming) at the age of 7 in BASIC on an old 8-bit computer, and
been a software engineer for nearly 25 years now, and still LOVE every single
bits of it (pun intended).
I respectfully disagree with 1 and 2. They are not wrong, and they are surely
right for many people, but they are definitelly not universal or maybe even for
the majority. Ive always been obsessed and passionate with programming, and
keep working at it, and learning, because Ive always had dream goals in my
head.
Learning a language by doing exercices is probably the worst, in my opinion. At
least for me. Set yourself an attainable goal. A small, but exciting software or
game youd want to *make*. Then learn as you go from there.
You gonna hit real life speed bumps, you gonna lose a lot of running in circle
inside dead ends before realizing you need to drop buckets of code, backtrack,
and start a chunk of it from scratch. Youll spend a few hellish and painful
nights doing nothing but googling an issue and tracing through your code.
But everything you learned will be burned on your brain like a white hot
branding iron and it will never go away.
So yeah, your #3 is the universal one. The one everyone should go for.
BUILD THINGS! :)
Drealmar
a
7/04/15 2:35pm
SQLGuru

I mostly agree with this. I started coding in 5th grade on a Commodore 64 and
even to this day, still love coding. My passion drives me.
However, I also like mentoring people in how to code. Mostly so that people do
it my way and I dont have to suffer through someones messed up code.... :)
But when I mentor people, I start with finding a project that interests them and
we write it multiple ways (Windows app, Web page, Web app with an API,
Mobile app, etc.) I make them take a small app through all of these different
styles so that they can see the differences and the similarities. But making it an
app that theyve always wanted to have, they are more vested in the outcome
instead of it feeling like homework from a class. There are also more real-world
scenarios that they encounter than any trivial exercise would raise.

Sunshine

aDrealmar

I7/04/15
was 3:41pm
going to make the same observation. I learn best from actually doing
things. Just find a project to work on, perhaps some application that you wish
that you had, and build it. Also, look at other peoples code. Look at it and
understand it. I learned a lot in my early years by working as a Junior
programmer on a team with some great developers and learned a lot just from
looking at their code.

Tel

aRoshan Choxi - Quora

7/04/15 2:37pm

[quote]
1. Focus on habits, not goals
2. Learning alone is painful
3. Build things
[/quote]
Your right for a lot of people but your also wrong.
Programming is goals, a hundred thousand simple steps that executed one after
the other are a program. Breaking a problem down to its absolute simplest
steps, learning those absolutely simple steps, thats the habit, thats the goal
you should focus on. It is much more a task a day habit than coding as a habit.
Your right however that learning alone is painful. Coding is elitest. There is no
handholding in this job and failure is always an option. You will often need to
know the answers that are only apparent six months in on the first day, and to
make it alone you need to be a quick study with rock solid fundamentals.
Having somoen to turn to can be a life saver.
You are absolutely right every programmer should build things. Build programs
to test features, build features to test improvements. You know your a coder
when you program an application just to learn how to code its features. Its not
even limited to pure coding, its fairly common for coders to build game levels
just to test how new shaders behave in their proper environment.

Richard M Tyson
7/04/15 3:19pm

aTel

So you skipped English class? Or was it not worth youre time

Tel

aRichard M Tyson

7/04/15 3:25pm

You will understand the power of judicious misspellings or bad grammer in


comments after you have been screwed over a couple of times.

Richard M Tyson
7/04/15 3:38pm

aTel

Nah.
Richard M Tyson
a
7/04/15 3:43pm
Sunshine

Or is English his second language? He made some good points.

MonkeyT

aRoshan Choxi - Quora

7/04/15 2:06pm

I suppose you cant learn like I did: walk to Radio Shack after school with a
backpack of Byte Magazine tutorials and plop down in front of their TRS-80
floor display for a few hours each week.
MonkeyT
a
7/04/15 3:45pm
Sunshine

Those were the days! My step father used to take me to NY Amateur Computer
Club meetings once upon a time.
Roshan Choxi - Quora
a
7/04/15 1:25pm
allan jones

I always say the best coders are the long-term lazy people. it takes a specific
mindset to want to spend two days writing code to automate something that
takes ten minutes to do. but if you do that ten minutes at least once a day? it
pays for itself - eventually. if you dont have that mentality to start with, youll
solve the problem in front of you, but never see the underlying issue causing it
in the first place. identifying the issue is, imo, the single most important skill in
development.

as a practical example - whats the solution to wil e. coyotes problem? easy: go


to a restaurant. hunger is the problem, not catching road runner. learning the
difference is huge when it comes to solving problems with code.
as to learning - hands-on effort on something that interests you, coupled with
feedback from someone who knows what theyre doing. but that comes,
initially, from passion for what youre doing. without that all the book learning
and mentorship in the world wont help.

hayesmp

aRoshan Choxi - Quora

7/04/15 1:13pm

Having now worked professionally as a Rails engineer for the past 3.5 years: got
started with Rails for Zombies on Code School and then just built projects.
Converted a iphone app into Rails site, built a crowd-funding site from scratch,
etc. Doing real world projects is by far the fastest way to get up to speed.
Now having said all that, I worked as an iOS developer for 2 years before that,
and grew up writing code in Basic and C, so YMMV. Im not sure what it would
like coming from someone with no previous programming experience.
Roshan Choxi - Quora
a
7/04/15 1:28pm
clarksbrother

It was kind of 2 parts for me. Ive always been a nerd - if I really needed
something that didnt exist that wasnt too complex/time intensive, Id try and
code it myself one way or the other. (Tutorials on the web are your best friend).
That gave me enough of a basis to wade into just about any project.
Then, an opportunity through work occurred which basically put me into a high
pressure driver seat to pretty much independently develop and deploy a lot of
applications in a a relatively short period of time. Spending 50 hours a week
learning and diving head first into something is the surest way to pick it up. I
really felt it was no different than if I got dropped off in the middle of a foreign
land where no one spoke English. Eventually through a lot of trial and error, I
would start to get pretty fluent in the language if out of immediate need if
nothing else.
Now, my applications are seem by millions of people every day... but used by
only a handlful... (have fun with that riddle!)

aRoshan Choxi - Quora

ShadowofTime01

I tried to self teach when I was like 10 or 12, but I didnt really understand
7/04/15 2:41pm
coding until I was in college when we had to use MATLAB for my aerospace
engineering classes. That opened up a door that allowed me to read most code
and learn it it pretty quickly. I think once you understand the logic behind how
most scripts are set up, its easy to at least have a base understanding of most
coding languages. Unlike spoken languages, computing languages all have their
grammar rooted in logic, whereas the former has grammar that is influenced
by culture. This makes most coding languages easier to understand once you
have a grasp of one of them, its just the vocabulary that changes.
Roshan Choxi - Quora
a
7/04/15 3:25pm
borderline

One of the most important things about learning to code, especially if you are
looking for it as a career is to make sure you enjoy doing it. Sometimes you are
trying to figure out a crazy bug by staring at a single line of code for twenty or
more hours. Definitely take the time to work on your own projects and get into
the mindset of coding. Coding is not for everyone, and getting into a career
when you dont like it will give you a miserable life.

deivahh

aRoshan Choxi - Quora

7/04/15 1:23pm

#3 was sooo important to me when learning Python. Building things is a super


easy way to encounter and subsequently learn to deal with a variety of
challenges that just learning the basics wont teach you. Another random thing
I did was, after a few months, I started looking at problems on StackOverflow,
and trying to solve them myself.

kermit4karate
7/04/15 1:16pm

aRoshan Choxi - Quora

One problem Im facing is that programming is so different from the other hats
I wear as a small business owner. Shifting gears between marketing and visual
creative work to programming is almost impossible for me sometimes. I have to
shift my brain into a totally different gear to be able to read code and think in
object-oriented terms, and some days are easier than others.

I do absolutely agree with the idea of focussing on habits and not goals though.
That is incredibly helpful.

Load More

About BlogNeed Help?Content Guide


PermissionsPrivacyTerms of UseAdvertisingJobsRSS

Você também pode gostar