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:
Programming is about processing data automatically. You could do a "programming without a computer" if you have something else to process the data. For example, humans.
Giving commands to humans could be an analogy to programming. The analogy would work best if we ignore the human-specific stuff (e.g. how to motivate them) and focus on the large task.
For example, in an alternative universe without computers, you could be a director of a new library. You have received one million new books; they are in unsorted heaps in the next building. Your goal is to make a system where it is easy to find a book by title, and if possible, also by author's name. It should be possible to later add or remove books. The work of your employees costs money, and the total costs of running the library should not be unnecessarily large.
This is almost like making a program. You have to design data structures (where do you put the books? will you also use some notes on paper? what notes? how will the papers be organized?) and program (instructions for your employees: the initial book import, finding a book, adding a book, removing a book). You have to make estimates about complexity of the program (how many man-days will you need for one million books? if you have twice as much employees, can you make it happen twice faster? for two million books, would your costs double?).
Databases predate computers. I don't have good examples for other programming concepts.
I have also designed a lesson for children to teach the skills of "being specific", "following instructions literally" and "designing instructions to be followed literally". They had a chess-board and a small toy which could be put on some square and face a certain direction. They had paper cards with commands "go forward", "turn left" and "turn right". The task was to create a list of commands which would make the toy get from a starting position (e.g. B3, facing north) to an end position (e.g. D5, facing north). They arranged the list of paper commands next to the chess-board. Then they switched places with a classmate and tested their commands. But I did not measure if this lesson really increased their skills.
So the idea is to be able to intuitively see the individual parts of a problem and feel how complicated they each are? Cool. Sounds all reductionist. I'll have to learn python now then.