This is a thread for people who want to learn programming, whether they are non-programmers, beginners, or advanced programmers who want to learn more. If you would like to discuss programming with other people from the LW community, this is the right place.
While programming is not a central topic of this website, it is related to many ideas discussed here. About a third of LW users described their profession as "Computers" in the recent survey. Some users have expressed desire to learn programming. Some users have recommended learning programming to others. There are many other websites (or books, etc.) for learning programming, but talking with the people you already know, following our traditions of rational discourse, could be an advantage.
So this is the experiment. Unlike Open Thread, it has a specific topic, and the beginners are encouraged to ask their programming questions, even if they are completely unrelated to the usual LW topics. Especially the open-ended questions like "how...?" and "why...?". (Maybe we are already strong enough to survive even the mindkilling questions like "which programming language is the best?".)
Here are some older LW articles about programming:
- Why learning programming is a great idea even if you'd never want to code for a living
- I want to learn programming
- Are Functional languages the future of programming?
- Colonization models: a programming tutorial;a tutorial on computational Bayesian inference
- Khan Academy: Introduction to programming and computer science
- Free Tutoring in Math/Programming
- More intuitive programming languages
- Learn to code
- What is the best programming language?
- Computer Science and Programming: Links and Resources
- Advice On Getting A Software Job
- Checking for the Programming Gear
Here are some other resources:
- Computer Science @ Khan Academy
- Project Euler - problems to test your programming skills
- Stack Overflow - for specific questions
...and there are also many links within the articles.
And here is the place for your questions:
I was a physics major and kind of got thrown into the deep end in a "Scientific Programming" class where we had to write physics simulations in C with very little instruction. Back then I (somehow) didn't realize that doing my own online research and self-learning was a good idea so I had to rely on the TA a lot when I didn't know how to do something. Fortunately programming came somewhat naturally to me and I was able to do ok by learning from the example code we were given and proceeding by analogy. Interestingly there were people in the class who were better than me at physics and math but found programming a lot harder than I did. I don't know what the difference was.
After my degree I decided I didn't like physics enough to continue and went back to school for a master's in IT, since I'd enjoyed the programming class and it seemed like a good field job-wise. There I learned programming in a more normal way (starting with Java) and got better about self learning, including teaching myself Ruby using the first half of Why's (Poignant) Guide to Ruby.
Since then I've continued learning through working as a programmer, through online resources (including Coursera which has some great courses), and through books. It was also helpful to have a smart programmer at my first company who was able to informally mentor me when I was new.
(Sorry for the long-winded answer, but I agree with you that's it's interesting to see how people really did something, not just how they'd recommend doing it).