8 ms·
Want to learn to code? Start here.
- evantahler 14y agoI can't for the life or me remember who said it, but: "Learning to code is a try{}catch{}. Always be prepared to handle things going to wrong, because they will. Every language has a try catch for a reason. Try() is doing, Catch() is learning"
- drexel 14y agoI rolled my eyes when I read the title expecting another compendium of codeacademy-like resources which get you started and then leave you out to dry. I'm finally beginning to feel like I'm actually learning to code by doing pretty much exactly what you described!
- kine 14y agoI'm glad it was helpful. I'm as sick of those empty posts as you are :)
- drexel 14y agoI should note that I was doing these things before I read the article but this post helps to reassure me that I'm on the right track. I glanced at the article about learning Rails and also found the RailsTutorial book to be a great resource even for a beginner like myself given its "dive in and start doing realistic projects" nature.
- jurassic 14y ago> Forget Codecademy This. Getting everything installed and the environment configured is huge.
- kine 14y agoThis needs to be a service. It's such a huge fall off point for beginners
- aviswanathan 14y agoTotally agree. One-click interface to spin up an environment.
- kine 14y agoIf not that, a collection of resources for each language so people aren't sent down rabbit holes where they have no idea what they're doing.
- cuppy 14y agoRails Installer was pretty close to this.
- cpursley 14y agoaction.io
- spmurrayzzz 14y agoMaybe devtable[1] could be extended in a way thats a little more bent towards code education. [1] http://try.devtable.com/ http://try.devtable.com/
- sgpl 14y agoI disagree. Learning to set up your own environment builds tenacity. Having a one click install would take away from the learning experience and the beginner maybe more likely to quit if something breaks or goes wrong instead of googling around for a fix.
- aviswanathan 14y agoAs someone who went from design (Photoshop) to frontend (HTML, CSS, JS) to backend (Ruby), I can totally vouch for ditching the 'one-stop-shop' sites that claim to be able to teach you everything about programming. In my experience, the most important thing to do is fork, break, and fix. Only if you immerse yourself in programming are you able to understand and start applying the concepts. Also, I think a huge skill for any programmer is being able to search and find answers quickly and efficiently. It sounds silly, but being able to quickly Google search for a particular answer or abstract a StackOverflow question to apply to your situation is huge when getting started because those are the resources you come to use all the time when you're actually building a product. Just my $0.02.
- sc0rb 14y agoCan we stop talking about Ruby programmers as if they are equal to people doing real programming?
- tomhaverford 14y agoSo I notice these anti-Ruby/JS/Rails/Python comments from time to time on HN. Sometimes I will scan the author's comment history to gauge why they might write such a thing. Clearly you are not a troll and that was a serious comment. It seems you are a Java guy (which seems to be the case more often than not). And the above comment isn't the first negative comment you have left in a threads attacking the legitimacy of another programming language. I write a lot of Java too, and so I understand that it isn't a language that is regarded as 'cool' and does get put down from time to time. But it's crazy to me that people will channel their insecurity regarding their own choice of language as a reason to attack other people's choices. You seem very defensive of Java[1] and so I thought you would have first hand experience about how childish and irrational it is to attack someone else because they don't code in the same language as you. And for programmers of other language, not all us Java guys are insecure assholes :) [1] https://news.ycombinator.com/item?id=5171053 https://news.ycombinator.com/item?id=5171053
- hkmurakami 14y ago>1) Nights, weekends are bad Not sure how I feel about (1) since that's the maximum most people can afford to put in (they have to pay rent, etc) and I'm ambivalent about telling them "your max effort isn't enough. You have to go all in". I agree with the premise but I'm really not sure how practical it is in practice. That being said, love the rest of the post.
- kine 14y agoI understand what you're saying. I guess it's better to tell people to try and put themselves in a place where they can code full time. For me it was an internship, for others it may be a trial week or month in a different part of their current job
- nikomen 14y agoWhat about someone who has a job where they code full-time (or close to it) but they don't enjoy what they're coding or they don't feel like they're getting better in their current position? Sometimes you're not in a position where you can leave at the moment and find a better coding position or you're not yet good enough at coding to get a job where you actually learn. It's incredibly hard to code for 30-40 hours a week and then try to do it for 5-10 hours a week extra after work to get better. I'm worn out after 40 hours of work, so creating my own projects and/or working on open source projects is difficult. However, without doing that, I don't feel that I can move on to a more challenging development position because I have no code I can show.
- zampano 14y agoI totally understand the feeling. I'm currently in a low pay full time coding job without benefits. I'm in no financial situation to consider quitting (I wouldn't last a month). Only doing what I do at work advances my skillset little, so I've been forced to do extra on nights and weekends. It is never easy to coerce yourself into working extra but I've found a couple of tactics that have helped immensely. 1. Do it for money. I find working for someone else motivates me pretty well. I wanted to learn how to use JS frameworks like ember or angular so I've done a couple of simple restaurant menu CMS systems for local businesses. I did them for peanuts on the condition that I didn't have hard deadlines. Even though I have the luxury of taking as much time as I feel like, I feel some obligation to anyone paying me for work. I've also found that it effectively narrows the focus of the work in a way that might be more challenging in a more free form project. It's a lot harder for me to not start including "cool" but often-useless features in my own projects while I tend to keep my work for others limited to what was agreed upon originally. 2. My other method is to set myself up with two or three productive activities and force myself to rotate between them. I might choose learning German vocabulary, refreshing math online and writing a simple app in a new language for a night and make an effort to always be doing one of those tasks. I try to look at this time as relaxation and free time itself, so I try to set few expectations. When I get bored/frustrated, instead of turning on the TV or opening the news, I switch to the next activity and repeat until its time for bed. You can move forward on unrelated hobbies this way, something that frustrated me when I first learned how to code and overdid the focus and attention I gave it, to the point of severe frustration. Lastly, try to relax and take it easy. If you put yourself through Hell every night you'll quit and get nowhere. Take nights off when needed and get to bed at a decent hour. You won't see immediate returns so any strategy has to be looking toward the long haul.
- bjoe_lewis 14y ago>forget codeacademy That's a good phrase. Though it does a great job mastering you in syntax and semantics, with which you could solve trivial problems the world's never going to face, real learning comes from setting up a dev environment in your machine, and diving in. Learning from mistakes best apply in learning to code, more than any other context.
- ataleb52 14y agoThank you for the awesomeness you have infused your post with. I began on the very road you've suggested not to take about a year, never got anywhere with programming. Got a 9-5 after graduating then finally started doing what you've suggested... Quit my cube job, got a technical internship, and code practically every breathing moment I'm not at work...friends and fun...what are those again? :P
- cuppy 14y agoI'm one of those people who have been trying to learn how to code, and I did start out using Codecademy. I quickly figured out what you're saying here: it kind of sucks. It was helpful for making me think about things with a programmer mindset and also helped teach me syntax, but I completed the entire JavaScript and Python tracks without any clue how to go on to make my own project. Also, it had so many bugs that half the time I ended up checking the Q&A section and just copy/pasting code that worked. On the contrary, I'm now doing One Month Rails, a $20 course from Skillshare. The very first lesson taught me how to set up Git, get Ruby & Rails all set up on my machine, created a new project, and deployed it to Heroku. This was already a world more helpful than the Codecademy lessons. (I'm blogging about it here in case anyone is interested: https://cuppycode.wordpress.com/ https://cuppycode.wordpress.com/ ) Next I'm going to go through the Rails 3 Tutorial. If there are things like this (project focused, help you set up the dev environment) for Python, could anyone recommend?
- equilibrium 14y agoThe first lesson at Getting Started with Django really focusses on setting up a dev environment. http://gettingstartedwithdjango.com/ http://gettingstartedwithdjango.com/
- sgpl 14y agoRails Tutorial (http://ruby.railstutorial.org/ruby-on-rails-tutorial-book http://ruby.railstutorial.org/ruby-on-rails-tutorial-book) teaches you to do all those things and more. More importantly it is absolutely free. I'm just pointing it out as I wasn't sure whether you were referring to another book when you mentioned "Rails 3 Tutorial" as your next step. For starting python I've seen http://learnpythonthehardway.org/ http://learnpythonthehardway.org/ recommended a lot on here. It is also free online.
- paulwithap 14y agoI just started Effective Django: http://effectivedjango.com/ http://effectivedjango.com/ I'm also in the process of learning more about Rails via Michael Hartl's book: http://ruby.railstutorial.org/ruby-on-rails-tutorial-book http://ruby.railstutorial.org/ruby-on-rails-tutorial-book Hartl's book is awesome, but a LOT of new information thrown at you at once, and very opinionated. Still a great resource, though - especially for the low, low cost of free.
- tomasien 14y agoTommy Nicholas, cited in this article, here. Love this, disagree with the "forget Codecademy" part. Codecademy is incredibly useful and I still use it to learn things today, but it's really really important to understand what it's teaching you and what it's not. It walks you through the thought process of various things you do when you write code and makes you actually write it, which is awesome. But that's where it ends so you've got to take the leap from there and actually BUILD something.
- tomasien 14y agoI feel like if Codecademy just made really awesome video tutorials for installing Python or Ruby, setting up rails or Django, using FTP, setting up MAMP, etc. then that would be sufficient to get people started after doing Codecademy.
- hipsters_unite 14y agoLynda.com and Treehouse both do those, but ultimately for me Google searches and blog tutorials generally win out (especially for Linux configuration).
- tomasien 14y agoTreehouse is awesome, it's just expensive. I recommend Treehouse very strongly if you want to build a career-level skill out of programming. Treehouse fucking rules. I do ALWAYS recommend starting to Codecademy just to see if programming itself gets you off and to get your feet wet. Even now I still use it for that. Incidentally, I still don't know how to use Ruby or Python functionally, so that's a pretty big failing of my learning so far. Like, I can write Python and Ruby scripts way better than Php, but Php is always installed and configured on every server and I know exactly how to use it in my dev environment, so I always default to that. I'm making a Twitter App right now, and for speed I'm using a PHP API wrapper that is way worse than just writing the requests in Ruby. But. I don't know how to actually USE Ruby. That felt good to say out loud, er, on the Internet.
- Vlaix 14y agoHN gives me the impression that on a bi-daily basis there's someone, somewhere (generally an American brogrammer with too much hair and weird glasses living in the Valleyr or NY) who WANTS that I want to learn to code. Is that someone actually the exact same person (looks like it) ? Does he know that code can be executed outside of a browser ?
- Paul_D_Santana 14y agoI totally agree. I started with installing Eclipse, creating a new Android project, adding a single button and... Just going from there. I had no intention of publishing it to the official Google Play Store, but I did, purely as a learning experience (and I sure learned a heck of a lot because it's definitely not a straightforward process). And I'm sure we all have experiences like that, right? You'll be amazed at what you can do by just jumping in.
- justjimmy 14y agoSo I set up a VPS for the first time this week, here's how it went: 1. Shell? SSH? Wtf is this? Console? Huh? Why am I using something that looks like DOS, it's 2013! Where is the GUI and menus?! So I learned about Shell/SSH, connected to my server, root and all that stuff. 2. Navigating folders and directories - dear god, this was a nightmare. I never used 'cd \' since '98 and that's only cause I wanted to run DOS games. 3. Kept seeing all these commands with '-' that makes installing extensions seem oh so easy! I wanted APC for PHP, stared at this page (http://pecl.php.net/package/APC http://pecl.php.net/package/APC) for an hour, trying to figure out what to do. Googled like mad. Searching for anything. Learned about "pecl install APC", nope no luck. Then I was told to compile it from source. Yeah, I know exactly what that means! Spent the next 4 hours trying to understand why phpize wouldn't work! Oh, I wasn't doing it from the right directory. -_- I mean, I'm slowly beginning to see how it all fits together but none of the education sites teaches you this stuff! It's like learning cooking recipes when you don't know how to turn the stove on, or what a stove even looks like. Or what's the difference between gas and electricity stove, how to turn on the tap to get water, etc. You learn a great recipe, know all the ingredients and the cooking time down to the second, but when it comes to use the tools and actually cook? Nope - cause I don't know how to turn on the stove or know what a stove looks like! (I know this is an extreme analogy) I wish tutorials would start with projects and setting it up from scratch. If you're going to show me how to do something localhost, you have to show me how to do it on a server (and set up) as well or else I'll never be able to make that connection. (Well not never, but makes it harder) Oh, editing files in the terminal is a blast too :P http://amath.colorado.edu/computing/unix/vi/ http://amath.colorado.edu/computing/unix/vi/ This saved my life that day. So…I definitely vote for teaching the environment before programming. PS: I did eventually install APC…after an entire day :P Now I'm trying to find and learn about setting up master/staging/production (and what it all means). Edit: Just to give some context of why I needed VPS - I wanted root access so I can make a wiki have clean URL (rewrite) and figured why not, learn about VPS. Then that's where I realized I need to learn 10 other things to do this one single thing. The APC was a suggested caching option to improve the site, and trying to do that also needed me to learn more stuff. So it's all kind of ties together when you're trying to accomplish a (seemingly) tiny thing.
- bpatrianakos 14y ago
- catshirt 14y agoi have no formal experience in teaching, but given my own experience i'd have to say that having a technical mentor who is close to you is the single most important factor. important enough that it could probably stand alone (with the proper ambition of course). i'd like to see some sort of matching service that helps match potential programmers with mentors, based on common interest. the "student" gets to learn in a context relevant to their interests, and the mentor gets an extra hand on their project.
- kine 14y agoThat'd be interesting. Might be a fun weekend project to build. Get both people to apply, maybe add a 1m video portion? Match on language or age or years of experience perhaps? Sometimes when you're learning something you need some hand-holding. I think it's a major weak point in the process of learning to code. Just googling for answers isn't always the answer.
- darrellsilver 14y ago"Have a real project you want to build" and "You have to throw yourself in or you will fail." are spot on. At Thinkful (http://thinkful.com/ http://thinkful.com/) our students spend more than half their time on projects they start from scratch, using real tools for exactly this reason. As a result they have 10x the engagement and completion rates vs other online ed tools (MOOCs et al). Failing is learning, but failing is tough. We make that easier.
- grannyg00se 14y ago"8. Stop trying to figure out what you should do and just start." I would say this last point is the most important one. And it also kind of cripples most of the other points.
- kine 14y agoI disagree that it cripples the other points. I just think that a lot of people try to find all of the failure points before they start. You can't start without having a bit of direction (I reference a book to use in my first post) but don't think about where the road will end up, just get on the road.
- jthree 14y agoIf people are interested in learning Ruby, Rails, or JavaScript in a "real" environment (running on your own machine, as a normal developer would), we have both a Environment Setup Guide (http://tutorials.jumpstartlab.com/topics/environment/environment.html http://tutorials.jumpstartlab.com/topics/environment/environ...) and dozens of tutorials from complete walk-throughs to open-ended projects at http://tutorials.jumpstartlab.com/ http://tutorials.jumpstartlab.com/ , all Creative Commons Non-Commercial.
- hallbd16 14y agoJeff, thanks for the links. It was the help I needed in getting past the online based setups I have been using so far. Plus it was a pleasant surprise to see the curriculum of g|school. P.S. Glancing at your other posts, I really like what you and Steve have said about g|school having high expectations for your students. P.S.S- Look out for me in the applications, I am hoping to submit my application the end of April. -Brian Hall
- rachelbythebay 14y agoI've been working on something which lets people follow along at their own pace and see exactly what goes into building a project. It involves a fair amount of just plinking away at a text editor and then compiling it and giving things a test run. I set it up to show my sessions including any little lags, typos, or whatever else I might make along the way. The idea is to show how a real person works at this stuff, and to encourage other people to give it a spin at their leisure. To that end, I have a pause button, variable speed playback, buttons for jumping forward and backward, and of course unlimited restarts. All of this happens in the browser, and it's just text, not video, so it's pretty quick. I use my own favorite text editor and build tool, but anyone so inclined can certainly use their own favorites and it will work out just the same. I try to twiddle a few things here and there to show what sort of differences they make in the end. So far, people really seem to dig it.
- shubb 14y agoIt's intriguing to see how someone clearly very comfortable on unix works on the terminal.
- rachelbythebay 14y agoI'm actually holding back on some of the crazier bits so it doesn't seem to fly by. I don't use the reverse-i-search thing early in a session, for instance. This means I wind up typing out certain commands verbatim more often than I would in real life. Now, once I've used something once or twice I'll flip back in the history a line or two where appropriate, but that's about it. In real life, I use things like ^U ^W and ^Y far more than I do in those recordings. Unfortunately, to truly capture how I normally work on things, I'd have to have it grab multiple windows in parallel. I don't normally drop out of my editor to run compilers. That's just something which happens for those "lessons".
- qu4z-2 14y agoThese days I "drop out" of my editor with C-z to run compilers/system tools. That way you don't lose your editor state, but you also get the full shell (reverse-i search, etc) for whatever other tasks you're doing. Just something that works for me; not sure if you've tried it. YMMV.
- banachtarski 14y agoTotally agree on not having newbies learn to code in a browser. There are so many intangible things that they need to learn to actually produce anything meaningful aside from typing the code itself. People I know who have tried codeacademy or something similar complain that they are just typing "magical" words that produce effects on the screen. Perhaps a way to remedy this is to have them actually download the source files after a lesson is done or something so they can see what they've actually created, outside of the course's blackbox framework.
- viscanti 14y ago> 7) Coding is failing a ton and understanding why. It's painful and frustrating I'd argue that an aspiring programmer's ability to deal with frustration is probably the single biggest indicator of "success". Obviously it's an on-going process, and you're always learning, but I'd say the biggest difference between "trying to learn" and being able to do some basic programming is how you deal with those initial frustrations. It's really easy to give up and go do something you think you're better at.
- woah 14y agoI am learning how to code, and one important thing that I have realized recently is that it can be bad to focus on building specific projects too much. I have spent a lot of time banging my head into the wall on specific implementation problems that might have been spent more efficiently learning from tutorials or books. Since I have started setting aside time for "pure learning" I have gained the background knowledge in languages and libraries to figure out how to solve problems that come up.
- muraiki 14y agoYeah, I did the same thing in that my first project was a bit overly ambitious! I ended up getting discouraged because I would always pour my programming time into this single project, but I simply didn't know enough in order to design it properly. I found that by setting it aside and working on something else, I gained new perspectives as to how to approach the problems that I got stuck on with my first project.
- mattangriffel 14y agoSo my One Month Rails class is the biggest class on Skillshare at the moment (5000 students) and I can't echo this point enough: "Here's why Codecademy doesn't work in the long term... You don't know how to set up a development environment. Any time you have the slightest inkling to build something for yourself leveraging what you've learned in Codecademy, you can't and probably don't know where to start." I'm all for encouraging a solid understanding of the syntax of code, but it's a totally different skill set from building web applications – which requires an understanding of topics like MVC, authentication, authorization, deploying, and using 3rd party libraries (and which to use). This is the kind of stuff people want to learn when they talk about learning how to code and most sites bait and switch them into learning loops, variables, and functions.
- steven2012 14y ago> Coding is failing a ton and understanding why. It's painful and frustrating I get what he is saying but I disagree, in that I think that coding is actually succeeding to get something working by any means necessary, even if you don't quite understand why. Be it getting your first web site up and running, getting your first program compiled, fixing your first bug, etc. There are a lot of hurdles and roadblocks you will face, especially when you are starting out, it will seem that every single piece of information is just out of your reach, like Tantalus and the grapes. It takes a lot of patience and perseverance to get through most programming problems, but that feeling of satisfaction of getting past these roadblocks is amazing. I still get that feeling of satisfaction and accomplishment, even though I'm 20+ years into my programming career. The followup to that is that you look back at your code 6 months later, cringe, and then rewrite it to something that is an order of magnitude better.
- austenallred 14y agoAs a marketer who has been trying for some time now (I'm too embarrassed to admit how long) to learn how to code, I've heard this advice a lot. Here is my issue with it. Everyone says, "Just pick something you want to build, and learn how to build it." I don't know what I want to build, because I don't know what I can build. That's like taking someone who says "I want to learn calculus" and saying "Well just think of a problem you want to solve."
- wbobeirne 14y agoWhen in doubt, build a to-do list.
- neekb 14y agoI agree. I think it's a lot easier to get started if you have SOME idea of what you want to accomplish or what direction you want to go in. And who couldn't use a good to-do list?
- kine 14y agoThis is a great point. "Just start" can be bad advice. People thrive on constraints. Build something that you do every day in your job. Build something where you click a button and you get a response. Build something that makes your current job easier. Build a piece of your favorite app, a very small piece.
- derekp7 14y agoFor beginning programs, there are two classifications that I remember being taught way back when. First, there were the class of problems that can be summed up by "Write a program to generate a sequence of Fibonacci numbers". These were all algorithmic / somewhat math based problems. They usually came from classes that were sponsored by the Engineering side of the school. The second classification can be summed up by "You have two files, each containing a list of [data items]. Produce a program that generates a third list of [data items] [having a given characteristic]". These seamed to me to be more practical / instructive. So as a marketing person, think of some types of reports you would like to see given some data that you have. Remember that the input data should consist of a number of items (records or lines) that have consistent characteristics, somewhat like you would get from a spreadsheet. Maybe you want to get a list of how many customers from each zip code bought a blue widget vs. a green widget. So in this case you would write down a mock up of what your resulting report would look like, then figure out what manual steps you would do to get there. When going through this exercise manually, pretend that you can't remember anything but your current thought, and that you have to write down everything else. Each thing you write down on paper translates to a program variable. Then, every time you have to change what is written down, make sure that is done via a repeatable list of steps. That then translates into an algorithm, which directly translates into lines of code. Most of the first programs I had to do in "the real world" consisted of simply taking data from multiple sources, and making reports that others in the business could analyze. In some cases it was simple compound interest reports based on employee deposits/withdraws in a company savings account (kind of like an in-house mini credit union). Other times it was something like an Inventory Turns report for our head of purchasing (a report of how many times each product would completely cycle in inventory in a given month). These were all done on a Unix command line, using a combination of shell scripts, sort, join, uniq, and awk (this was well before perl came out). Eventually this type of work became second nature (so i didn't have to think through the logic), and I was able to move on to more advanced programming.
- mgshuheb 14y agoI am learning to develop in Ruby on Rails. Thanks Mattan Griffel from Grow Hack who's also a teacher on SkillShare [dot] com. He has made a series of 'straight to the point' lectures guiding any person with any level of coding to create a basic version of Pinterest by the use of RoR. The series is called 'One Month Rails' (http://onemonthrails.com http://onemonthrails.com). I have been using and I am currently enrolled in his class on Skill Share. Personally I have browsed through hundreds of website looking for learning material and these videos have been the best for me so far!
- SeanAm 14y agoI would recommend Harvard's CS50 program. It is the most complete package I've come across for beginners. Downloadable VM's with everything set up - video lectures, problemsets, forum for questions and so on. And the good part is that it isn't just one language - you are exposed to many of the building blocks(C,HTML,SQL,Javascript++) of modern computing. https://www.edx.org/courses/HarvardX/CS50x/2012/ https://www.edx.org/courses/HarvardX/CS50x/2012/
- akristofcak 14y agoNice article. Zack, you say pick a language "Ruby or Python". I started out in PHP (I have no recollection why) and while I'm far from perfect, I know it well enough to build functioning things and more importantly to figure where to find answers when I'm stuck. Yet whenever I read other people's writing about coding, almost without fail people say "PHP sucks, do Python" or "PHP sucks, learn Ruby". Without getting into the arguments about which language is better (I am fairly aware of the differences), can people who have experience with all three opine on whether it makes sense to throw out the time and energy I have invested in PHP (not to mention lot of well functioning code) and start from scratch with one of the other two?
- sanderjd 14y agoTwo answers for your one question: no, it absolutely doesn't make sense to throw out the time and energy you have invested in PHP, but yes, it absolutely does make sense to start from scratch with one of the other two. Both in fact, and any others that you come across. The more the merrier! Programming languages don't take up mutually exclusive niches in your brain, they complement one another.
- akristofcak 14y agoThat's a great response - thanks!