Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: I want to learn how to code. Can anyone tell me how to start learning?
69 points by theprotagonist on June 27, 2011 | hide | past | favorite | 57 comments
Greetings,

I am a recent college graduate (as of this past May) and I studied chemistry and physics. I have plans to go to graduate school within a year for theoretical and computational chemical physics - that's basically fancy talk for predicting physical interactions between molecules using high performance computing. I have some experience in the field from working as a research assistant as an undergrad and while I never had any problems with the physics, I struggled a little bit with the coding aspect because of lack of previous exposure.

I also read this post "To founders who can't code"

http://news.ycombinator.com/item?id=1761530

It really hit home. I have had two failed ventures thus far which likely would have taken off better if I had the coding abilities to make my own demo. Instead I took the seed funding I received and hired people to do it for me - long story short things didn't work out; I lost money and disappointed people.

The author of the aforementioned post recommends that noncoder founders should: "Take 6 months off and go learn how to code (day and night, weekends including)." This is what I would like to do but I am unsure as to how to begin. Sure, there is a wealth of sources but I am unsure of which ones are quality sources and also what languages to learn first. I am not trying to be a coder or hacker overnight and my approach is methodical: I will devote 8-10 hours per week to learning. I generally pick up things fast; the key though, is having interesting problems to solve which increase in order of difficulty.

If anyone can give me a few pointers on how I can start learning (what resources are good, what language to begin with, a good program of studies) that would be much appreciated as it would help me develop my future ideas on my own and would probably also help with my research. I thought a cool initial project would be an applet which queries each line of a word document with book titles (I keep a running list of all the books I’ve read, one per line in a doc) and searches the net for a picture of a book cover and imports it into the app. Apologies for my ignorance but would this be a realistic project within 6 months?

Lastly, I did run a search on this but didn’t find any related threads; I apologize if this Q has come up before.

Thanks for your advice, AKD




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.


Zed, thanks for the book, I just got started with it.

I have heard that when done with the book, I still won't be able to program in Python. Can you elaborate on that?

Also, what do you recommend after completing your book? I'm interested in building web apps.


In the 2nd Edition, I rewrote exercises 50, 51, and 52 to teach you to make a simple web app based on the game in exercise 41 and 42. I also rewrote 41 and 42 so that it's a little more complex and challenging.

When you're done with the book, I say you can't really code yet because you lack experience actually using Python. You have all the syntax and tools, you just don't really know how to apply them. What I recommend now is you go through the Django Book 2.0 and do all the code in that book. Once you do that you'll have enough to start building your own stuff.

I'd also say, whatever you make will probably suck for a while, but that's alright. Just keep making stuff, put it out there, get feedback from good coders, and improve.


"I have heard that when done with the book, I still won't be able to program in Python."

Be careful about whose advice you take. There are a lot of programmers out there who are so far down the road to perfecting their craft that they can't see where they started.

For a mature programmer, using powerful tools will aid them in expressing their complex ideas quickly. As a beginner, you'll experience a ton of "ah ha!" moments where an idea will come to you in code, rather than in abstract. It will start simple with data structures like dicts and will progress toward object-oriented structures.

To say you won't be able to program when you finish LPTHW is to say that a 5th grader can't write. They're not going to write "The Great Gatsby", but they can write.


Zed's right start with a non-IDE solution such as using a basic editor..as it forces you to think and get at the object-oriented abstraction of the programming language you are attempting to learn.


Zed thank you, someone posted a link to your site last night and I think it is very right for me. I will use it.

As per the Windows vs Linux debate - I have found most physics labs use either various Linux distros (Red Hat is super popular) or OSX. I myself have a MacBook Pro running OSX and so I just downloaded and will be using TextWranger as an editor to complete the lessons.


A quote from Learn Python the Hard Way: "Warning Windows is a big problem for Python. Sometimes you install Python and one computer will have no problems, and another computer will be missing important features. If you have problems, please visit: http://docs.python.org/faq/windows.html (http://learnpythonthehardway.org/book/ex0.html).

Why waste time messing with it? In the time you spend fucking around with Windows, you could have set up a Linux system. And Linux is the OS more commonly used by startups and physics labs (which is why the OP wants to learn how to program).


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)


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 learned how to do the various subtasks involved with your project, and then assemble it all together.

I'd suggest that Python would be a good language to start with. I personally like the O'Reilly book Learning Python, though there are many options.


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 really seeing it come to life is a pretty phenomenal way to learn.


I also agree. I tried reading a book on Objective-C, read the first two chapters, and ditched it for the iPhone SDK. I messed around, and tried making some ideas come to life. It took me a couple months, but eventually I was fluent in Objective-C.


From experience, I'd definitely second the 'actual project' part, particularly around breaking it down/picking the right level of project. Ideally you want something that you can pull off in a day or two, then apply what you've learned to the next project, or extend your first project so that it does more.

plug: It's the tack that I took when writing Quick and Easy Python (http://manning.com/briggs/) - small bits, building on each other.


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.


Hi. Most of the advice in the comments already posted is sound, but none of them seemed to address HPC. Working on a cluster invites an entirely different bundle of conceptual and practical hurdles (e.g. parallelism, working remotely, industrial-strength shell scripting &c.) Even though I had been programming since I was a kid, I found my crash-course in HPC to be quite challenging; confronted with a new programming model in a new low-level language, it was the first time that I really appreciated what it must be like not to know how to program at all.

So: 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!


Do you think that learning about parallelism would help a beginner to learn how to program, or to understand code better? I consider myself an intermediate programmer, with about five years of experience, but have never explored HPC. Not sure it would have helped me more to have done so as a beginner.


I'm not sure, really. In Saeed Dehnadi's article "The camel has two humps", it's mentioned that there are three great filters in programming pedagogy:

* assignment/sequence

* recursion

* concurrency.

Most students never master the first, and most of those never master the second, and so on. In that spirit, I would recommend that the OP firmly grasp the first two with both hands before reaching for the third. Of the languages the OP could study that treat concurrency or parallelism as a kind of conceptual primitive (e.g. Scala or Erlang), none are likely to appear as working languages in an HPC milieu. Almost always, the libraries are bolted on as an afterthought to traditionally popular languages for scientific computing.

I think this is a regrettable pattern, but a pattern which will shape the OP's daily work if they wish to begin (and remain in) a program in computational chemistry.

All I meant to suggest is that when the OP begins to learn parallel computing, they want to be thinking about parallel algorithms, not segfaults or pointer purgatory or the finer points of scp or vi. The sooner the former can be mentally sublimed, the better the OP will feel about HPC.


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!


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.


Grab yourself a copy of Racket (http://racket-lang.org) [also, the quickstart guide at http://docs.racket-lang.org/quick/index.html might be useful], the How to Design Programs textbook (http://htdp.org/2003-09-26/Book/), and most importantly, set aside some solid blocks of time to dive in. You will learn most by doing, and through doing you will gain understanding.


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.


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.


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.


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.


The best advice I can give you is to write as much as you can before you start coding. Putting a program or app together is 60% critical thinking, 20% writing, and 20% error management. If you've already got some ideas, try to break them down as much as possible.

As for specific languages to learn: startups in particular seem to love Ruby, but honestly, they all work the same way, fundamentally. I crashed through the basics of Ruby in a week, started learning JavaScript, and stopped shortly after realizing that the majority of it was the same code just written differently.

++ to keeping a journal. It keeps you in check, because even though you say will will devote so much time a week to it, you won't. I had to start setting personal goals on a daily basis. That drive alone is helping. Keeping a blog is great for peer support too. I don't get many comments on mine, but it definitely feels good when someone stops by to say, "Hey, this is cool stuff."

Hope that helps, and good luck!


I'm new to coding as well, but so far what I've gathered is that WHAT language you learn is less important than actually sitting down and getting dirty with code.

When I was trying to decide what to learn I narrowed the search down by just heading to the book store and flipping through some books on various languages. Ultimately, I ended up with a choice between Ruby and Python. I couldn't tell what the major differences were, so I just decided to pick Ruby. I figured that there was no real way of recognizing the nuances of ANY language until I actually had one under my belt and could better understand what makes each one tick.

I'm fully aware that this was a somewhat cavalier method of choosing the pal I'd be spending the majority of my waking hours with, but I think that starting anywhere is better than stalling because you can't decide.

So far I'm satisfied with my choice. I think I would have been satisfied with Python too.


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.


I'm actually 2 months into learning to program Javascript for the Unity3D engine. I've learned a lot in 8 weeks, and I'm happy I took the time to commit to it. I could actually start prototyping my own basic mobile games with Unity, something I never thought I'd be able to do.

So I guess from my experience: - Find a single good source or book for tutorials and learning. Its best for the coding style and teaching style to be consistent. I used a fantastic series of free video tutorials produced by the Walker Brothers, which included 3 entry exams, and a series of lab assignments after each tutorial set. I had to submit the work in order to get access to the next set.

- Find a good Q&A source like Stackoverflow, forums, or a site more specific to what you're coding in. When you get stuck or don't understand something, go and ask (search first). +1 if you have programming friends to ask too.

- Keep a journal (really!) on Google docs. At the end of the night, you can quickly re-hash what you learned (cs concepts, or cool functions you learned), or often write out the things you don't understand. That way, when you start up again, you can do a quick review on where you left off and get back to figuring out things you previously were stuck on.

- Try not to skip past things you don't understand. If you don't understand them, take the time to practice out the code, or look up documentation. A big key point: its always worth it to invest the time to figure little problems out. I once spent 3 hours trying to get some timer controllers working just perfectly the way I wanted. They were actually OKAY to begin with and I was considering skipping past it for the sake of productivity, but in hammering out the problem, I gained confidence and had the satisfaction of solving a problem.

- Get your things WORKING! As beginner programmers, our first concern is making what we want happen. Not pretty code, not computer science theory. Just results. Getting results fast gives you the confidence to try harder things, which will naturally take you into the world of organized code and computer science.

Good luck!


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.


I would also suggest one more thing: http://mitpress.mit.edu/SICM/

Since you say you have dabbled with physics, you may find this sort of method useful.


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 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 you have a blog? That's usually a good first exercise. It's easy to do using Flask -- follow the tutorial (http://flask.pocoo.org/docs/).

Here are some tips to get you started:

Use Emacs as the text editor to write your code -- it usually comes pre-installed on Ubuntu, and it has a Python mode. Here are some Emacs tutorials (there are some good videos on YouTube too):

http://philip.greenspun.com/teaching/manuals/usermanual/emac... http://www2.lib.uchicago.edu/keith/tcl-course/emacs-tutorial... http://www.gnu.org/software/emacs/tour/ http://cmgm.stanford.edu/classes/unix/emacs.html

Use PostgreSQL as your database. To install it on Ubuntu, use this command:

  $ sudo apt-get install postgresql
Use SQLAlchemy (http://www.sqlalchemy.org/) to connect your Python website to PostgreSQL.

Here's a good SQL tutorial: http://philip.greenspun.com/sql/

When you build a blog, you don't have to worry about building a public authentication and comment system if you use something like Disqus (http://disqus.com/) -- you just include the Disqus JavaScript tag at the bottom of the blog's entry page.

Here are some good JavaScript tutorials: http://www.quora.com/What-are-good-books-preferably-found-on...

Use StackOverflow to ask programming questions: http://stackoverflow.com/

UPDATE: Here are links to some commonly-used scientific Python packages (http://www.drewconway.com/zia/?p=204).


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.


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. Programming is programming, so spend more time writing code in the beginning I'd say.


Focus less on your 'platform choice' or whatever, as that can actually be quite fluid

Yeah, but programming on Windows is a PITA so I found its simpler to just eliminate that from the equation :)


And this is why your advice is actually bad, op said nothing about his platform choice and you're recommending he should go run a marathon when he's never even jogged.

Windows programming is not a PITA, that's a flat out lie from you. It's total and utter nonsense, especially as Windows has arguably the best IDE of all the platforms.

In the end it's exactly the same as linux programming. And iPhone programming. And BBC Micro Programming. And Spectrum programming. It's just that you have some personal preferences.

Programming is just programming and that's what he wants to learn, not your dogmatic preferences.


There's much more to a productive programming environment than IDEs, and most Python programmers don't use IDEs anyway.

The OP says he wants to do a startup and plans to go to grad school for physics, but in terms of programming, he doesn't really know what he wants.

That's why he is asking for advice on what path to take -- he is asking for "preferences," recommendations, and guidance. How many startups do you know that run Windows? How many high-performance physics labs?

When people were asking for faster horses, they didn't know to ask for automobiles because they didn't know that was something to consider. The had no perspective. Helping someone onto a more productive path from the start can help them get to where they want to go faster in the long run.

How long does it take to run a marathon? The OP has a timeline of 6 months.


Why do you feel Windows a PITA to program in?


The windows command line and setting up the environment primarily. And most of the tutorials online are from a Linux perspective so it's usually easier for new programmers not to have translate the tutorials into a different environment.


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.


My advice, start with javascript:

1. Learning C-like syntax provides a basis for reading a lot of other code.

2. Javascript examples can be seen on any webpage simply by switching to developer mode.

3. The javascript console allows experimenting with code while you read about programming on a webpage without leaving your browser.

4. It is perhaps the most widely used programming language currently.

5. Even if you are not interested in the DOM and webpages, there are still interesting exercises you can do in Javascript - I recommend project euler.


Whatever 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.


I'd second this notion, but with the added caveat that without a 'mathy' way to solve the problem, you can't get much beyond the first 15 or so (if you're good at math, great, if you just want to put down some code to solve a simple problem... I got frustrated :) )


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 :-)


You need to learn about

    https://secure.wikimedia.org/wikipedia/en/wiki/Apache_Subversion
    https://secure.wikimedia.org/wikipedia/en/wiki/Debugger
    https://secure.wikimedia.org/wikipedia/en/wiki/Profiling_%28computer_programming%29
and I believe http://perldoc.perl.org/index-tutorials.html is easy to learn for a novice


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.


Rails for Zombies, of course!

http://www.codeschool.com/courses/rails-for-zombies

Nom nom nom...


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?


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.


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.


I am also in your shoes, and have started with http://learnpythonthehardway.org/ It seems to be one of the best ways to learn Python.


I wrote an article on this subject a few weeks back. It is not a step-by-step "how to write code," but rather a good way to understand the approach to self-teaching yourself computer programming.


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 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.


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 that takes days, weeks, or even months to complete, python allows you to refactor the bottlenecks in your code into C without too much difficulty.

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.


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.


> If you want to brush up your Ruby skills, the Ruby Koans (http://rubykoans.com/) are also pretty good.

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.


Dude, coding is alot easier than physics. Stop procrastinating on HN, get a Linux machine and start your first project. If you want to do web stuff, learn PHP, otherwise use python. For your project you would need a library to extract text from word documents and something like curl to query google.


There is plenty of good material on where to start with programming. Most of the links other people have provided here are very good.

A 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...


interesting problems to solve which increase in order of difficulty.

Project Euler. Though the difficulty tends to sort of spike all over.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: