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 mostly agree with ShardPhoenix. Actually learning a language is essential to learning the mindset which programming teaches you.
I find it's easiest to learn programming when I have a specific problem I need to solve, and I'm just looking up the concepts I need for that. However, that approach only really works when you've learned a bit of coding already, so you know what specific problems are reasonable to solve.
Examples of things I did when I was learning to program: I wrote programs to do lots of basic math things, such as testing primality and approximating integrals. I wrote a program to insert "literally" into sentences everywhere where it made grammatical sense. I used regular expressions to search through a massive text file for the names of people who were doing the same course as me. Having the goal made it easier to learn the syntax and concepts.
This struck me as slightly odd.
In my experience, people who do not have at least a decent grasp of the concepts involved in programming will not even be able to imagine the kinds of problems that are not reasonable to solve. They will, on occasion, think up things that they believe is "simple", but would in practice require the equivalent of a whole Google department working on it for years before it... (read more)