As an experienced programmer with math background using a language I knew, a problem took me 15-60 minutes. Not knowing a language or how to program, it might take several hours, but not weeks.
Ask HN: I want to learn how to code. Can anyone tell me how to start learning?
11–20 of 59 posts
Re: Ask HN: I want to learn how to code. Can anyone tell me how to start learning?
#12Now for a language recommendation. I am a Ruby programmer, so I've got a pretty heavy lean towards that.
Ruby is an exceptionally easy language to learn. There's a book called Learn to Program written by Chris Pine (http://pine.fm/LearnToProgram/) which is an amazing beginning to getting into Ruby.
Past that, there's the Well-Grounded Rubyist by David A. Black (http://manning.com/black2) which covers all the things from basic Ruby up to medium-advanced levels of Ruby). There's also Programming Ruby 1.9 by the Pragmatic Programmers (http://pragprog.com/titles/ruby3/programming-ruby-1-9)
If you want to brush up your Ruby skills, the Ruby Koans (http://rubykoans.com/) are also pretty good.
If you're looking to get into web development (well, you ARE on the internet!) then I would recommend learning HTML and CSS with a book such as HTML 5 and CSS 3 by Brian Hogan (http://pragprog.com/titles/bhh5/html5-and-css3). Then a good JavaScript book, perhaps something like JavaScript: The good parts (http://oreilly.com/catalog/9780596517748).
After learning as much of those as you can, familarize yourself with Git by reading the Pro Git book by Scott Chacon (http://progit.org/), or if you choose another version control piece of software (Mercurial, Bazaar are good, SVN isn't and CVS is (I'm pretty sure) the work of demons).
Ah and before I forget, I've got The Developers Code (http://www.thedeveloperscode.com/) bookmarked for late-night reading and I'm quite enjoying it so far. Quite a lot of lessons in there that I have learned over my brief career, but ones I knew from the beginning.
One more final thing: you are new here and people will treat you like that. Be nice to them and they will be plenty nice back. Respect the fact that they have limited patience and may not wish to answer your questions eternally. They may also have other people asking them questions at the same time you are, or have other things they would like to be doing.
You will get better with practice. You show a keen want to learn, which is a great start. Never give it up. Nothing is "too hard" forever. Persist, and for the love of god, practice.
Re: Ask HN: I want to learn how to code. Can anyone tell me how to start learning?
#13I second the advice about setting up an Ubuntu machine. Windows is unnecessarily painful for development in comparison. Although there are "workarounds" around the problem, you'll find things much easier for development on an Ubuntu or Mac computer. Now for a language recommendation. I am a Ruby programmer, so I've got a pretty heavy lean towards that. Ruby is an exceptionally easy language to learn. There's a book c…
I've been opening Miami Ruby Brigade meetings with these, recommending them to non-pro-Rubyist friends, and did them myself last week. They're a really great exercise.
Re: Ask HN: I want to learn how to code. Can anyone tell me how to start learning?
#14I think it best to learn how to code by working on an actual project. You seem to already have a project in mind, and I think that would be a fine project. Break it up into steps. First write a program that opens a file, reads the book titles and displays them on the terminal. Then write a program that makes some sort of network connection; maybe download the HTML contents of a website. Etc., etc., until you've learn…
Agreed. I'm self-taught and have been working in the industry for 12 years now. The way I got started was that I had a project I needed to do, so I figured out what I needed to know to get it done. The same is true with my iPhone app -- I knew nothing about Objective-C when I started it, and it's 3 years old now. Learning for the sake of learning is fine, but learning how to build something you want to build and real…
Re: Ask HN: I want to learn how to code. Can anyone tell me how to start learning?
#15Whatever language you choose, consider trying a few problems from http://projecteuler.net . The problems are small enough that you can feel the reward of getting the right answer. I used Python. As an experienced programmer with math background using a language I knew, a problem took me 15-60 minutes. Not knowing a language or how to program, it might take several hours, but not weeks.
Re: Ask HN: I want to learn how to code. Can anyone tell me how to start learning?
#16Set up a Linux computer (Ubuntu Linux is the easiest to set up), and spend the summer learning to program in Python. Python is easy to learn (not much syntax), easy to read (explicit vs implicit), has a big ecosystem (more packages/libraries), is taught at universities so it's easy to find good programmers to help, and is used by many large websites/companies so it's a good language to know. Here are some of the best…
1) Free software/languages 2) Cut corners (disqus) 3) StackOverflow. This was a super life saver as I never had someone next to me while learning to just ask a quick question. The response time on it is often incredible.
Focus less on your 'platform choice' or whatever, as that can actually be quite fluid. Programming is programming, so spend more time writing code in the beginning I'd say.
Re: Ask HN: I want to learn how to code. Can anyone tell me how to start learning?
#17I second the advice about setting up an Ubuntu machine. Windows is unnecessarily painful for development in comparison. Although there are "workarounds" around the problem, you'll find things much easier for development on an Ubuntu or Mac computer. Now for a language recommendation. I am a Ruby programmer, so I've got a pretty heavy lean towards that. Ruby is an exceptionally easy language to learn. There's a book c…
I spent a year working in high performance computing at a university and so much ugly and inefficient code was written in matlab. Had they written it in python, it would have been much easier to optimize and their research would have been much more productive.
Re: Ask HN: I want to learn how to code. Can anyone tell me how to start learning?
#18Set up a Linux computer (Ubuntu Linux is the easiest to set up), and spend the summer learning to program in Python. Python is easy to learn (not much syntax), easy to read (explicit vs implicit), has a big ecosystem (more packages/libraries), is taught at universities so it's easy to find good programmers to help, and is used by many large websites/companies so it's a good language to know. Here are some of the best…
I like all of this advice. The key threads running through it at which I nodded my head in agreement were: 1) Free software/languages 2) Cut corners (disqus) 3) StackOverflow. This was a super life saver as I never had someone next to me while learning to just ask a quick question. The response time on it is often incredible. Focus less on your 'platform choice' or whatever, as that can actually be quite fluid. Progr…
Yeah, but programming on Windows is a PITA so I found its simpler to just eliminate that from the equation :)
Re: Ask HN: I want to learn how to code. Can anyone tell me how to start learning?
#19So: code as much as possible. As soon as you can possibly stand it, look into MPI4py and start parallelizing your code. Chances are you won't be working with python in HPC contexts, but learning parallel programming at the same time as C or fortran would be needlessly difficult. I would also try to get time on a cluster as soon as you're in a position to use it respectably. Most universities with HPC facilities have an online application for an account, and some sysadmin might take pity on you :) Otherwise, maybe Amazon has some kind of deal?
In the interim, become _very_ comfortable with bash and general command line fu, and a serious text editor. Good luck!
Re: Ask HN: I want to learn how to code. Can anyone tell me how to start learning?
#20A fairly good resource is Google Code University; http://code.google.com/edu/
In particular you may want to start with Python basics; http://code.google.com/edu/languages/google-python-class/ind...