Live data from Hacker News

Ask HN: I want to learn how to code. Can anyone tell me how to start learning?

news.ycombinator.com

31–40 of 59 posts

Re: Ask HN: I want to learn how to code. Can anyone tell me how to start learning?

#31
I don't mean to hijack the thread, but I'm curious; how did you go about receiving seed funding (and enough to hire people) for a tech/web startup while not having strong coding abilities yourself?

Did you hire people with the intent of having them build a demo for you?

And for other readers... Do either of these things happen much? Does it work?

Re: Ask HN: I want to learn how to code. Can anyone tell me how to start learning?

#32
I would also mention the Lynda.com videos. I'm running one of their Perl tutorials now working in Eclipse and finally seem to be getting somewhere. And I really wish someone would put together an intro to programming series using Yahoo Pipes as a platform.

Re: Ask HN: I want to learn how to code. Can anyone tell me how to start learning?

#33
Look for a mentor who is already working on a real-world project. The problem with learning things on your own is that the examples from which you are self-learning are (by design) too simple and often unrelated to a result that you want.

That's not to say the tutorial/source would be completely unrelated, but it sounds like from your post, that coding isn't something that comes easily which means that in order to make the leap to something that you actually want to do, you'll need more than a book to guide your way.

The great thing about a mentor is that they (should) will have a real life problem for you to solve and they can help you work through some of the subtleties of the problem.

I used to think that anyone can learn to code (this was when I was 18). I find, now, that there are people that are more naturally inclined to it and some people that will never be able to, because their brains don't work that way. I would gently encourage you to be open to discovering where you lie on that spectrum and not to be too disappointed if you've tried but still find yourself swimming in molasses.

Re: Ask HN: I want to learn how to code. Can anyone tell me how to start learning?

#34
I've been in the process of teaching/pointing in a general direction a couple of friends on how to program. "Learn Python the Hard Way" was far too boring, and wasn't practical enough for my friends.

If you're used to and good at learning in a school format, MIT OpenCourseWare is excellent. My friends also liked the videos better than learning by book.

http://ocw.mit.edu/courses/electrical-engineering-and-comput...

I would go in this general order for beginners. Do all the assignments, and don't cheat. Ask for help on explaining the solution. These courses help in building good fundamentals, then apply what you learn to a personal project.

  1. 6.00 - Introduction to CS and Programming (Python)
  2. One of: 6.087, 6.092, or 6.096&6.088, (C, Java, C++) respectively.  
     For scientific computing, pick C and/or C++.
  3. 6.046J - Introduction to Algorithms
From there, 6.001, and perhaps the database course (I think experiencing databases is much easier that a taught course)

Doing #1 already goes a long way to your proposed project.

Re: Ask HN: I want to learn how to code. Can anyone tell me how to start learning?

#35
You need to take a bottom up approach. Fill your time studying the very basics (i.e., programming languages, components, specifications, history, etc.). Online video lectures [beginning with] Programming Languages was where I ended up learning the greatest amount in the first weeks.

I started with MIT OpenCourseWare. I was very fortunate to find this lecture series: http://www.youtube.com/edu?edu_search_query=intro+computer+p... because it is class taught at MIT for students entering the CS or engineering programs that have little or no background in Programming Languages.

Hint: Pay attention in the first and second videos close enough and you'll learn how to locate online resources that are provided to the enrolled students.

Re: Ask HN: I want to learn how to code. Can anyone tell me how to start learning?

#36
yesterday i showed my 12 year old kid (who, to my disappointment is more interested in sport, hip hop dance lessons, music (tuba) and girls then in code) http://processing.org/ - together we managed to write a drawing program with a game component in about 2 hours (he typed....) even though the language is in no way perfect or even pretty he finally "got" it.

so before starting with a small project, try to implement a one person tron / snake game in processing - it helps you to start "codethink".

after that i would recommend reading a shitload of books. if you are into mobile apps, try http://ofps.oreilly.com/titles/9780596805784/ it's basically a tutorial for making a simple web app in HTML, css, js with no prior knowledge required.

Re: Ask HN: I want to learn how to code. Can anyone tell me how to start learning?

#37
Python should be a reasonable first language but you might have need for others later. Use a simpler editor at first so you can concentrate on coding, not working the editor itself. The editor should be able to show line numbers so when your program reports errors on a line number you can find it. Syntax highlighting is a plus. Code most everyday (take some breaks) but please think your problem through before committing to a solution! Be sure to read code from others to pick up tips/style. Work through some books or something. You don't have to be a top-notch expert all at once. I think the Perl community says it's okay to just use the parts of the language you understand until you learn more! (However becoming fluent in gritty details will make things smoother when you don't need to look up mechanics as often. A musician needs to know their scales.) Try rewriting old projects when you get better. That implies saving your work somehow. Be sure to learn how to create modular libraries and to use libraries written by others! You can't put everything into one source file unless it's something simple and there's useful functionality to be found.

Re: Ask HN: I want to learn how to code. Can anyone tell me how to start learning?

#38

I 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…

While Ruby is a fantastic language and a joy to program in, if you are planning on heavy computation, python is a much better route to go. While everything can be tweaked and optimized in both languages, python is generally favored for performance and ruby for flexibility. Numpy and Scipy are both quite efficient and provide lots of functionality needed in scientific computation. Down the road, if you have a script t…

I don't think the raw computing power is that important in this case. And if it was, there are better alternatives than Python.

However, I would suggest that Python is probably a better beginner/learning language than Ruby. There are many odd ends in the Ruby language that might easily trip an inexperienced coder up.

Re: Ask HN: I want to learn how to code. Can anyone tell me how to start learning?

#39
post #2

I 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…

FWIW, I think that is subjective. Some people learn better that way, but I don't think it's a universal truth. People are individuals when it comes to learning.

Re: Ask HN: I want to learn how to code. Can anyone tell me how to start learning?

#40
I wrote this:

http://learnpythonthehardway.org/book/

It's free. Do this:

1. Use your current computer. It doesn't matter if you have Linux, OSX, or Windows. What matters is that, right now, you want to learn to code, so you should go learn to code, not learn to setup a new OS.

2. Just use gedit. Don't use vim, vi, emacs, or any "hardcore" editor. On a Mac if you're using a non-English keyboard, use Textwrangler. Learning a new editor is not learning to code.

3. Start now, do what I tell you in the book. Type code in, do not copy-paste, make it run, fix it until it does, do the extra credit, then go on to the next one.

4. Other programmers will tell you to use their favorite tools, just ignore them. Just use gedit, Terminal (cmd on Windows), and python. That is all. Nothing else. Everything else is a distraction.

5. Finally, do it every night, for 2 hours a night, and take a break on one day. You'll be surprised how quick you can get through the book, and you'll get stuck sometimes, but keep doing it.

After that, move on to other more advanced topics and try to learn more stuff, but for now, just do this.

Post reply on HN