News for hackers. Stuff that matters.

Ask HN: Starting with programming?

I have zero programming experience. I did a bit of matlab in college, but that didn't teach me anything [maybe a basic understanding of for / while / if / statements].

I was wondering what I should start with to reach the basic proficiency within the next 6-8 months so that I could [if i wanted] be able to get a job as a starting /entry level programmer ? I am a mechanical engineer otherwise.

Also, I was wondering whether you would say what exactly I should be starting with ?

A] python or ruby or

B] html & css [with js later on?] or

C] something completely different ?

( 11 comments | 7 points | on HN )
Re:Ask HN: Starting with programming? by willgodfrey on Saturday March 26, 2011 @03:28PM (#2372938)
I asked something similar a few weeks ago here: http://news.ycombinator.com/item?id=2289974 Take a look at the comment I got, some good suggestions in there.

We are in similar boats, I am a structural engineer by day and have a tad of programming experience, mostly with Matlab and some VBA stuff. I wanted to start basic and proceed as necessary, skipping if I felt the material was too rudimentary.

Per the comments I got, I started with Zed Shaw's Learning Python the hard way (http://learnpythonthehardway.org/index). It's great so far. As wyclif mentions elsewhere here, the first half is incredibly simple, to the point that its nearly ridiculous. I've found myself performing the exercises quickly and moving on, if nothing else it's just plain good practice of the simple mechanics of writing code, even if the code I'm writing is rudimentary.

Also per the comments from that post, I registered and started a personal weblog using a wordpress template. It's given me my fair share of HTML work, which has also been helpful.

Good luck, enjoy the ride!

Re:Ask HN: Starting with programming? by wyclif on Saturday March 26, 2011 @03:59AM (#2371617)
If you're really starting from zero, I'd recommend Python. The first book I'd recommend would be Zed Shaw's Learning Python the Hard Way. Again, this is for a raw beginner; if you've already written some rudimentary code and know how to use a text editor, the first half of the book will drive you crazy because of the drilling. If you can skip to the end of that book and you're not challenged, try How To Think Like a Computer Scientist (the Python edition). Both of these books are free online.

This question (or a variation of it) has been asked before on Ask HN, so do a search and read those archived posts.

My best advice is to get some HTML, CSS, and JavaScript under your belt. That will give you a good foundation. Then move on to a good, dynamic functional language like Python or Ruby.

Re:Ask HN: Starting with programming? by BrainScraps on Saturday March 26, 2011 @04:09AM (#2371627)
I'm doing Python the Hard Way and I think it's a great book. Dive into Python is good as well.

If you're slightly off-kilter like I am, you might enjoy a delicious combination of Why's Poignant guide to Ruby and Rails for Zombies. Good stuff, although Rails for Zombies can be a bit maddening if you're a beginner.

Cheers!

Re:Ask HN: Starting with programming? by wyclif on Saturday March 26, 2011 @05:05AM (#2371697)
I really miss _why, especially his blog.
Re:Ask HN: Starting with programming? by Animus7 on Saturday March 26, 2011 @04:15AM (#2371632)
There are as many kinds of programming as there are kinds of engineering. Want to build web sites? Administrate corporate databases? Program robots?

While a few concepts carry over, the tools and workflows in the different branches of programming can be worlds apart. You probably want to get some direction re: where you want to go with programming before you dive into something specific like a language.

Re:Ask HN: Starting with programming? by wyclif on Saturday March 26, 2011 @05:09AM (#2371702)
That's true, and it's why I mentioned HTML/CSS/JavaScript. Those are general-purpose foundational languages that will stand anyone in good stead no matter what branch of programming they wind up in.
Re:Ask HN: Starting with programming? by Animus7 on Saturday March 26, 2011 @05:19AM (#2371714)
I completely disagree. Your advice applies if you're in the web business, but HTML, CSS, and Javascript are hardly "general-purpose" and they won't help you in coding up a router firmware.
Re:Ask HN: Starting with programming? by wyclif on Saturday March 26, 2011 @05:36AM (#2371731)
The OP was asking about web programming, not router firmware.
Re:Ask HN: Starting with programming? by code on Saturday March 26, 2011 @04:54AM (#2371678)
In this order...

HTML, CSS, Javascript, XML, Ajax, Python, MySQL

If you're adventureous, try HTML5 and CSS3 afterwards. Also look into jQuery and Django afterwards.

Re:Ask HN: Starting with programming? by noob513 on Saturday March 26, 2011 @09:56AM (#2372075)
Why do you recommend this sequence ? Most likely I'd probably follow this sequence, but is there a particular rationale behind this ?
Re:Ask HN: Starting with programming? by code on Saturday March 26, 2011 @08:42PM (#2373685)
It makes the most sense. If you want to do web development and know absolutely nothing, HTML is the starting point. I wouldn't necessarily call it a programming language but it is a markup language in which is heavily used along with everything else and is the easiest to pick up.

From there, everything else is a building block. Think of it like math. You'd take transitional math before pre-algebra, pre-algebra before algebra, etc... Same thing.