When people say programming changes the way you look at problems, do you need to specificly learn a (certain?) language to gain this understanding, or can you study the concepts separately?
If the former, how is the best way to get the most out of programming (if you have no other particular agenda, like necessity for a job), and if the latter, how best to do that?
Learning and using an actual language is important in that it will give you much a tighter feedback loop than just learning about the concepts abstractly or through pen-and-paper.
Python is the most commonly recommended programming language for those who want to learn the basics. Learn Python the Hard Way is often recommended as a beginner’s learning source. I haven’t tried it myself (I already know how to program) but it looked reasonable when I gave it a skim.
Thanks.
I have a list of books people recommend (and a favourite that I’ve decided to use), but I haven’t heard much about how other people learnt, before these all came out. How did you?
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).
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.
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.
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 can get done. If that’s what you meant by knowing what problems are reasonable to solve, then that’s fine.
However, even such large, Google-scaled projects could still present a good way to motivate yourself and start looking up and learning stuff about coding.
I believe I went with the wrong interpretation of “solve”. I read it as something much more open, in the sense of “figuring out the problem’s key elements”, which would mean “needing to solve” google-scale projects and then them being “reasonable to solve” is equivalent to doing the research and experimentation required to figure out all the important structural elements of the problem, and what kind of team exactly would be working on which problems in order to implement the full solution.
If I interpret “solve” as in “fully functional” (coded, runs, performs the desired operation without bugging for the standard test cases), then what you said and what I said reduce to approximately the same thing.
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.
So,
When people say programming changes the way you look at problems, do you need to specificly learn a (certain?) language to gain this understanding, or can you study the concepts separately?
If the former, how is the best way to get the most out of programming (if you have no other particular agenda, like necessity for a job), and if the latter, how best to do that?
Learning and using an actual language is important in that it will give you much a tighter feedback loop than just learning about the concepts abstractly or through pen-and-paper.
Python is the most commonly recommended programming language for those who want to learn the basics. Learn Python the Hard Way is often recommended as a beginner’s learning source. I haven’t tried it myself (I already know how to program) but it looked reasonable when I gave it a skim.
Thanks. I have a list of books people recommend (and a favourite that I’ve decided to use), but I haven’t heard much about how other people learnt, before these all came out. How did you?
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).
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 can get done. If that’s what you meant by knowing what problems are reasonable to solve, then that’s fine.
However, even such large, Google-scaled projects could still present a good way to motivate yourself and start looking up and learning stuff about coding.
I’m pretty sure we exactly agree on this. Just out of curiosity, what did you think I meant?
I believe I went with the wrong interpretation of “solve”. I read it as something much more open, in the sense of “figuring out the problem’s key elements”, which would mean “needing to solve” google-scale projects and then them being “reasonable to solve” is equivalent to doing the research and experimentation required to figure out all the important structural elements of the problem, and what kind of team exactly would be working on which problems in order to implement the full solution.
If I interpret “solve” as in “fully functional” (coded, runs, performs the desired operation without bugging for the standard test cases), then what you said and what I said reduce to approximately the same thing.
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.