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

21–30 of 59 posts

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

#21
post #7

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

Bonus points for recommending a Linux environment.

Everyone should learn sysadmin basics. It's not hard, and in the long run it can be handy, especially in startups with small teams.

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

#22
If you end up choosing python, a popular first book is: http://learnpythonthehardway.org/

A lot depends on which language is going to be helpful in your computational physics class: you should find out which language they'll expect you to work in.

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

#23
post #7

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

The Python Tutorial (http://docs.python.org/tutorial/) is really pretty good.

Now, if you are doing more researchy work, then a lot of the web stuff is peripheral.

My advice would be to use scipy (the swiss army knife of scientific programming with python), matplotlib (for 2D plots), something for 3D (maybe Mayavi2?), NetworkX for networks, PyTables for storing read-only data, the inbuilt csv library, ctypes or weave for performance ... and domain specific libraries here: http://www.scipy.org/Topical_Software

But don't worry about all that yet. You can hack together a good demo with nothing but scipy and matplotlib.

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

#24
I was about to suggest you to "Learn You A Haskell For Great Good" :) Way too complicated. Listen to the other guys that don't suggest Haskell. If you then discover your calling in programming, go back and learn Haskell at your own peril. Also try to stay away from LISP in your first lessons, and its ugliest kid, emacs. Use a simpler text editor that won't twist your fingers. gedit would be my suggestion.

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

#25
post #23
post #7

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

The Python Tutorial ( http://docs.python.org/tutorial/ ) is really pretty good. Now, if you are doing more researchy work, then a lot of the web stuff is peripheral. My advice would be to use scipy (the swiss army knife of scientific programming with python), matplotlib (for 2D plots), something for 3D (maybe Mayavi2?), NetworkX for networks, PyTables for storing read-only data, the inbuilt csv library, ctypes or wea…

[deleted]

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

#26
Lots of informative advice, I am very grateful to all of you. Thanks again. I think I will go with Python or Ruby after I check out the resources in the links that were posted. I plan to build my knowledge but as a person with a science background, I'm happiest when I'm solving a problem so I definitively see the merit in working on the project whist learning.

I don't think I have any further questions - I got loads more helpful advice than I thought I would ever get and again, I'm very grateful. The only couple things I feel are worth mentioning is that I am using a Mac and I have actually written a couple subroutine packages for HPC in FORTRAN but they are nothing too special as FORTRAN syntax is very simplistic.

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

#27
I really won't add too many links to all the comments here. But Given you mention physics and some RA experience, i will say Haskell may not be as hard as a few others think. (i.e. If my idea of what it takes to do complete physics and/or chemistry graduation). I think in the end, you may have to spend an hour or two for each of the links before taking a call on which you prefer.

- Eeks, that looks eerily like common sense :-)

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

#28
By coding.

That may come across like a smart-ass answer, but it's not. I'm in the same boat, and I'm learning the same way. I've got a Mac dev environment, and Linux dev environment. I'm using a book by Stephen Kochan, and another by Dave Mark.

We're surrounded by a plethora of materials to help us learn.

Just do it! Pick one up and read, and write some code. Stumble through. You will make mistakes.

See emilepetrone and @housefed for a good example of this. He posts on here all the time. He's only been coding for a year, and has a functional website.

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

#29
I am in the process of doing exactly this.

If your ventures are web apps, my recommendation would be to learn Ruby on Rails. You will be able to build demo apps within a few months of 8-10 hours per week.

I started with RailsTutorial.org, which is a free book that will take you from installing Ruby to building a twitter clone. From there, get a few books, I recommend Agile development with rails and The Rails 3 Way, and continue to work on some smaller apps. There are also great screencasts you can find by searching for "railscasts."

If you are using windows computers, install Ubuntu Linux which is really easy with Wubi. I have found it makes things easier. If you have a mac, stick with it.

For text editor, I use Sublime Text 2, and if you're on mac, just go with Textmate.

Sign up for Github and learn about version control. Also, go through projects on Github and learn by reading other people's code.

After you have a semi-grasp of the basics, start building something substantial.

Search Stack Overflow when you have questions, and if you've been trying to figure something out for over six hours, ask a question on Stack Overflow.

For html and css questions, I generally just google any issues I have and fool around in firebug, which is a firefox extension that lets you edit html or css and see the changes on your screen.

Best of luck!

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

#30
I was in your shoes 11 months ago, so let me give you some real-world advice. If you have a friend that knows any language (Python, Ruby, PHP, etc) start there. They will be there when you have questions, and having a person to turn to is the most important thing. However lets say you don't have a friend to turn to- start wit h Python.

Try Google App Engine to get started so you don't have to worry about dealing with a server. Start here http://learnpythonthehardway.org/

Find a copy of http://oreilly.com/catalog/9780596801601#toc for understanding basic ideas with HTML, CSS, JS and Python/GAE.

In the meantime, start a blog and write about your stuggles and the things you learn. Initially it won't really be about coding - but the main thing is showing momentum to the outside world. (Trolls will hate just ignore). By getting your name out there, people will be more interested in helping you.

Start there. If you have questions, my email is emile (at)

Post reply on HN