how do you learn to code

10
How Do You Learn To Code? Roshan Choxi - Quora Filed to: QUORA 7/04/15 1:00pm It’s been my sole focus to answer this question for the last two years. I’ve 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 shouldn’t focus on goals, but hear me out—it’s all about leverage. Anyone who works with me knows that I dweebishly reference the R’as Al Ghul scene in Batman Begins pretty much 3-4 times a day:

Upload: manishsg

Post on 12-Sep-2015

229 views

Category:

Documents


2 download

DESCRIPTION

sss

TRANSCRIPT

  • How Do You Learn To Code?Roshan Choxi - QuoraFiled to: QUORA 7/04/15 1:00pm

    Its been my sole focus to answer this question for the last two years. Ive noticedthere are three strategies that successful students consistently use better than anyoneelse 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 allabout leverage. Anyone who works with me knows that I dweebishly reference theRas Al Ghul scene in Batman Begins pretty much 3-4 times a day:

  • Ras tells Bruce:

    Rubyourchest,yourarmswilltakecareofthemselves.

    If you focus on building the habit of programming for 20-30 hours a week, you willreach your goal of being a web developer. If you focus on the goal of being a webdeveloper in X months, you get nothing from that but stress and insecurity about howfar along you are. Focus on the habit, not the goal. Rub your chest, your arms willtake care of themselves.

    Sohereswhatyoushoulddorightnow: put 15 minutes a day on your calendarto spend time programming. Dont do more than 15, just focus on doing 15 minutes aday. If you can do it successfully with no excuses for a week, try bumping it up to 20minutes a day. Dont try to overextend yourself by doing an hour a day right off thebat, this is going to be a 10,000 hour marathon so were focusing on developing thehabit right now. The number of minutes you put in isnt as important as you showingup each day.

    2. Learning alone is painful

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

    32 8

  • Havingamentor:I worked at a small startup called merge.fm while in college. Ilearned more in the summer I spent working with one of their cofounders than I didin the entire previous year at my university. Theres just something about workingalongside 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 dontknow. Theres a reason why mentorship used to be the de facto standard of learning anew trade, its very effective.

    Belongingtoacommunity:For me, the two communities I belonged to were theIllini Entrepreneurship Network (a student organization at my university) andHackerNews (a large hacker/startup oriented online community).

    I didnt learn what objects and classes were from HackerNews, but I learned adifferent category of things. I learned that nobody likes Javascript. I learned thatRubyists are the hipsters of programming. I learned that Bret Taylor, Rich Hickey,and John Carmack are programming gods, and that software companies that are trulyserious about coffee have kitchens that look like meth labs.In short, I learned how totalk 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 nowthough)

    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 importantone to me is becauseitsfun. Thats something that is tragically lost in classicaleducation, but I think its important enough to be on this list. Look for resources thatshow 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 downthe page.

  • Paul Graham once told the founders of Airbnb:

    Youguyswontdie,yourelikecockroaches.

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

    Abouttheauthor:RoshanChoxi, Cofounder and CEO of Bloc, The WorldsLargest Online Bootcamp

    HowdoIlearntocode?originallyappearedonQuora.YoucanfollowQuoraonTwitter,Facebook,andGoogle+.

    Thisanswerhasbeenlightlyeditedforgrammarandclarity.

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

    Coding...coding...

    MIT Invented a Way toAutomatically Fix SoftwareBugs With Borrowed Code

    6 Inspiring Websites ThatTeach You To Code

    I Read This Mammoth Essayon Code To Make You 38Thousand Times Smarter

    Drealmar Roshan Choxi - Quora7/04/15 1:33pm

  • I was lucky enough to learn programming (or more accurately STARTED tolearn programming) at the age of 7 in BASIC on an old 8-bit computer, andbeen a software engineer for nearly 25 years now, and still LOVE every singlebits of it (pun intended).

    I respectfully disagree with 1 and 2. They are not wrong, and they are surelyright for many people, but they are definitelly not universal or maybe even forthe majority. Ive always been obsessed and passionate with programming, andkeep working at it, and learning, because Ive always had dream goals in myhead.

    Learning a language by doing exercices is probably the worst, in my opinion. Atleast for me. Set yourself an attainable goal. A small, but exciting software orgame 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 circleinside 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 painfulnights doing nothing but googling an issue and tracing through your code.

    But everything you learned will be burned on your brain like a white hotbranding iron and it will never go away.

    So yeah, your #3 is the universal one. The one everyone should go for.

    BUILD THINGS! :)

    SQLGuru Drealmar7/04/15 2:35pm

    I mostly agree with this. I started coding in 5th grade on a Commodore 64 andeven to this day, still love coding. My passion drives me.

    However, I also like mentoring people in how to code. Mostly so that people doit 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 andwe 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 differentstyles so that they can see the differences and the similarities. But making it anapp that theyve always wanted to have, they are more vested in the outcomeinstead of it feeling like homework from a class. There are also more real-worldscenarios that they encounter than any trivial exercise would raise.

  • Sunshine Drealmar7/04/15 3:41pmI was 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 wishthat you had, and build it. Also, look at other peoples code. Look at it andunderstand it. I learned a lot in my early years by working as a Juniorprogrammer on a team with some great developers and learned a lot just fromlooking at their code.

    Tel Roshan Choxi - Quora7/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 afterthe other are a program. Breaking a problem down to its absolute simpleststeps, learning those absolutely simple steps, thats the habit, thats the goalyou 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 nohandholding in this job and failure is always an option. You will often need toknow the answers that are only apparent six months in on the first day, and tomake 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 programsto test features, build features to test improvements. You know your a coderwhen you program an application just to learn how to code its features. Its noteven limited to pure coding, its fairly common for coders to build game levelsjust to test how new shaders behave in their proper environment.

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

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

  • Tel Richard M Tyson7/04/15 3:25pm

    You will understand the power of judicious misspellings or bad grammer incomments after you have been screwed over a couple of times.

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

    Nah.

    Sunshine Richard M Tyson7/04/15 3:43pm

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

    MonkeyT Roshan Choxi - Quora7/04/15 2:06pm

    I suppose you cant learn like I did: walk to Radio Shack after school with abackpack of Byte Magazine tutorials and plop down in front of their TRS-80floor display for a few hours each week.

    Sunshine MonkeyT7/04/15 3:45pm

    Those were the days! My step father used to take me to NY Amateur ComputerClub meetings once upon a time.

    allan jones Roshan Choxi - Quora7/04/15 1:25pm

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

  • as a practical example - whats the solution to wil e. coyotes problem? easy: goto a restaurant. hunger is the problem, not catching road runner. learning thedifference is huge when it comes to solving problems with code.

    as to learning - hands-on effort on something that interests you, coupled withfeedback from someone who knows what theyre doing. but that comes,initially, from passion for what youre doing. without that all the book learningand mentorship in the world wont help.

    hayesmp Roshan Choxi - Quora7/04/15 1:13pm

    Having now worked professionally as a Rails engineer for the past 3.5 years: gotstarted 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 wouldlike coming from someone with no previous programming experience.

    clarksbrother Roshan Choxi - Quora7/04/15 1:28pm

    It was kind of 2 parts for me. Ive always been a nerd - if I really neededsomething that didnt exist that wasnt too complex/time intensive, Id try andcode 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 highpressure driver seat to pretty much independently develop and deploy a lot ofapplications in a a relatively short period of time. Spending 50 hours a weeklearning and diving head first into something is the surest way to pick it up. Ireally felt it was no different than if I got dropped off in the middle of a foreignland where no one spoke English. Eventually through a lot of trial and error, Iwould start to get pretty fluent in the language if out of immediate need ifnothing else.

    Now, my applications are seem by millions of people every day... but used byonly a handlful... (have fun with that riddle!)

  • ShadowofTime01 Roshan Choxi - Quora7/04/15 2:41pmI tried to self teach when I was like 10 or 12, but I didnt really understand

    coding until I was in college when we had to use MATLAB for my aerospaceengineering classes. That opened up a door that allowed me to read most codeand learn it it pretty quickly. I think once you understand the logic behind howmost scripts are set up, its easy to at least have a base understanding of mostcoding languages. Unlike spoken languages, computing languages all have theirgrammar rooted in logic, whereas the former has grammar that is influencedby culture. This makes most coding languages easier to understand once youhave a grasp of one of them, its just the vocabulary that changes.

    borderline Roshan Choxi - Quora7/04/15 3:25pm

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

    deivahh Roshan Choxi - Quora7/04/15 1:23pm

    #3 was sooo important to me when learning Python. Building things is a supereasy way to encounter and subsequently learn to deal with a variety ofchallenges that just learning the basics wont teach you. Another random thingI did was, after a few months, I started looking at problems on StackOverflow,and trying to solve them myself.

    kermit4karate Roshan Choxi - Quora7/04/15 1:16pm

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

  • About BlogNeed Help?Content Guide

    PermissionsPrivacyTerms of UseAdvertisingJobsRSS

    Load More

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