Live data from Hacker News

How can I learn to program?

news.ycombinator.com

21–30 of 77 posts

Re: How can I learn to program?

#21
Python, as mentioned, is an excellent choice for a first language.

However, if you are either mathematically minded or somewhat into chain-and-bondage, then Haskell might also be worth looking into. I'd suggest reading Raymond Smullyan's "To Mock a Mockingbird" if you want to go down that road.

It's a popular book about combinatory logic. The kind of logic you need for functional programming.

Re: How can I learn to program?

#22

If you're starting from the very beginning, learn a good text editor. (Editing is such a huge part of programming and has so many other payoffs that it is a very good first step.) Use a forgiving and simple language like Python, and ideally an operating system where the tools you need are already installed. Learn the documentation systems for your language of choice. For instance, in Python, you can go to http://www.…

Also, get a mentor, and some like minded people to share code reviews with.

And not only write code, but also read code.

And debugging is actually a more useful skill than writing new code, and comes in handy far more often. It also tends to be more painful. But where there's mud, there's brass.

Re: How can I learn to program?

#24
post #23

The below three essays are absolutely invaluable. Peter Norvig: http://norvig.com/21-days.html Eric Raymond: http://www.catb.org/~esr/faqs/hacker-howto.html Paul Graham: http://www.paulgraham.com/pfaq.html

And here's another resource.

http://see.stanford.edu/see/courses.aspx

In particular, check out CS 106A.

Re: How can I learn to program?

#26
post #10

Set up a Linux computer (Ubuntu Linux is the easiest to set up), and spend the summer learning to program in Python. Here are some of the best online Python tutorials, including a link to videos and course material for MIT's introductory computer science course, which uses Python: http://www.quora.com/How-can-I-learn-to-program-in-Python/an... Build something that you want to use so it will be meaningful to you. Do y…

Change out Emacs for Vim and you'll be a pro in no time.

Vim tutorial: http://blog.interlinked.org/tutorials/vim_tutorial.html

Re: How can I learn to program?

#27
post #10

Set up a Linux computer (Ubuntu Linux is the easiest to set up), and spend the summer learning to program in Python. Here are some of the best online Python tutorials, including a link to videos and course material for MIT's introductory computer science course, which uses Python: http://www.quora.com/How-can-I-learn-to-program-in-Python/an... Build something that you want to use so it will be meaningful to you. Do y…

I agree with the generalities of the response but disagree with some of the particulars. Learning programming should be language agnostic. The "best" language is the one that works for you. Everyone is different and every language is different, some work for some but not others. I'm primarily a Perl person, not that Python is bad, but it's not my language of choice. I advise experimenting with different languages and finding the one that best suits your mindset and needs. For me, Perl is the one that "clicked" with me. I like using it and am productive in it. I've experimented with many other languages (Python included), but Perl just fit me the best. I see the power of other languages and am constantly impressed by what I see others doing in different languages, but ultimately the "best" language is the one that works for you. Even when it comes down to development tools, I'm a vi person. Emacs has it's benefits, but I prefer vi. Pick what works for you. For web development the LAMP stack (Linux, Apache, MySQL, PHP) is arguably the most popular. Most of the open-source CMS platforms such as Drupal and Joomla use it. Facebook is built in PHP on Apache and Linux. I respect PHP as a web programming language, it's accessible, has many of the conveniences of Perl (without many of the idiosyncrasies) and is web-centric. There's a reason it's popular on the web. Experiment and pick what seems to work best for you. There's no single solution. As we say in the Perl world, TMTOWTDI, There's More Than One Way To do It.

Re: How can I learn to program?

#28
post #10

Set up a Linux computer (Ubuntu Linux is the easiest to set up), and spend the summer learning to program in Python. Here are some of the best online Python tutorials, including a link to videos and course material for MIT's introductory computer science course, which uses Python: http://www.quora.com/How-can-I-learn-to-program-in-Python/an... Build something that you want to use so it will be meaningful to you. Do y…

Print out espeed's answer. Put copies on your desk, tape them to your refrigerator, tape them over your bed. Put laminated minature copies in your wallet.

I started learning this stuff... my god... 10 years ago.

It took me over a year to figure out that line 1 was the best first step OS (a question I didn't even ask until 4 years in).

It took me four years after that to figure out that line 2 was the best second step (I am on chapter 18 of Mark Lutz's Learning Python, very easy read, the only problem is to not get impatient).

It took 3 years to figure out that line 7 (including line 8) was the best way to go for databases.

10 years ago was the first time I read Greenspun's stuff and decided to march down this path (lines 6 and 10). I still use vim as my primary editor, but I'm learning emacs. Most valuable starter tip on emacs I ever got: you should have hundreds of files open.

That is a great answer.

Re: How can I learn to program?

#30
post #10

Set up a Linux computer (Ubuntu Linux is the easiest to set up), and spend the summer learning to program in Python. Here are some of the best online Python tutorials, including a link to videos and course material for MIT's introductory computer science course, which uses Python: http://www.quora.com/How-can-I-learn-to-program-in-Python/an... Build something that you want to use so it will be meaningful to you. Do y…

Change out Emacs for Vim and you'll be a pro in no time. Vim tutorial: http://blog.interlinked.org/tutorials/vim_tutorial.html

Mmmm, unnecessary flame bait. You could have instead, said, "I like and am productive in VIM too, check out this tutorial". I think we all know, at this point, that you can be immensely productive in either Emacs or VIM.

/me bias because I'm an Emacs user - but I don't think myself above VIM users...

Post reply on HN