I've been thinking about this for the past few years and every time I think about this subject I just keep coming back to this idea, so I wanted to get some opinions. Here's the idea in a nutshell:
It's not possible to teach how to program. Programming is something that is learned.
Simply put, I think there are no courses that teach how to program. The best a teacher can do is teach the grammar and semantics of a language and give a student drills so he'll develop the necessary skills by himself, but if the student doesn't understand on a fundamental level how to express his ideas in the language's building blocks to accomplish a task, there's no way to convey that intuition. I do think "intuition" is the right word. It involves some kind of mindset or pattern of thoughts that cannot be expressed in words, or at the very least that there are no words for.
Programming is as much art as it is science. Either a student has an innate ability to think in all of code's elegant meanders and pathways, or they don't.
Most people don't, yet they get hired by companies.
I would never be hired for my coding skills, 'cuz I know my limitations and wouldn't really try. I am Salieri, not Mozart.
I don't think that you can be 'taught' how to program as such. A big part of programming is problem solving. You can be shown/taught the skills needed and possibly frameworks to apply them but the creative aspect of problem solving would come from guidance rather than teaching.
Fictional characters Jeeves and MacGyver. Both have vast background knowledge that they have acquired during their lifetime. Both are able to match a new problem to technique that they already know. One prepares in advance, other applies duct tape in situ, but that is an implementation detail.
A teacher can at most supply the background knowledge. The match, apply, and adapt you have to (learn to) do yourself. Well, teacher could show example analysis of a problem; why choose one method over others in that situation. But, there is only so much one can copy-paste ...
Some (science and engineering) students are compelled - sometimes kicking and screaming - to take programming as part of their degree course, usually in combination with "numerical analysis", so that they have a genuine reason for doing it. For many who have no aspirations as programmers in the future it would be necessary that they be taught. Some, however, will have a genuine wish to go further, and those should be encouraged to learn (assisted by a good choice of relevant problems). Actually, the same is true for plenty of things beside programming.
I don't know much about Computer Science courses as I didn't do one, and I'm entirely self-taught as a programmer. My observation, for English universities at least, is that "programming" is a surprisingly small part of a CS degree.
However, I would encourage "programming" to be taught in a manner that is reasonably language-agnostic; employers or clients don't always give you a free choice. There is no "One Language to Rule Them" - and some exposure to multiple languages is beneficial, if only to be slightly more "future-proof". Actually, I do quite a lot of practice programming simply rewriting programs in different languages.
Yes, problem-solving is a good, creative way of learning programming. Those problems will be different for different students.
Either a student has an innate ability to think in all of code's elegant meanders and pathways, or they don't.
So knowing how to program is like grace? https://www.youtube.com/watch?v=ENgJZlmgI6U
I think that's a bit too strong a statement. I do think people are capable of acquiring the intuition to problem-solve if they didn't have it before.
For many who have no aspirations as programmers in the future it would be necessary that they be taught. Some, however, will have a genuine wish to go further, and those should be encouraged to learn (assisted by a good choice of relevant problems).
My contention is precisely that no one is taught, that they can only learn. Some just find that the process comes relatively naturally for them and others struggle a bit more. I would expect that science and engineering students fall more commonly into the former category than the general population.
My observation, for English universities at least, is that "programming" is a surprisingly small part of a CS degree.
Well, that's one piece of evidence that led me to think the OP. In every CS program I've seen, students are not required to know how to program when they start, but they are expected (and indeed required by the nature of the contents) to do it increasingly better as they advance, and there are no programming classes as part of the curriculum along the way. So I'm wondering a) what do students that really struggle do (I would assume fail), and b) whether it is possible that some other preparation (e.g. a strong mathematics background) predisposes students not to struggle hard enough to fail.
Two aspects that go with taught rather than learn (and are not entirely unrelated) are that:
(1) it's often considerably faster to be taught;
(2) "learning" - by which I might really mean "self-taught" - means that you also need to know what is important (let's face it, some websites and even some books do more harm than good) and, if you are taking from multiple sources then it is difficult to wade through different terminology, styles and biases.
The term "learning curve" is relevant. It is useful to be taught to get started ... and then learn (or be "self-taught") as one progresses. In the long term I would definitely favour learn, but to get going it would be useful to be taught.
When I did my Computer Science Degree many, many years ago, my courses were:
Year 1
Mathematics
Hardware design
Electronics
System programming (PDP assembler)
Programming (Pascal)
Databases (or could have Numerical Analysis)
Year 2
Hardware design
Electronics
Operating Systems (PDP)
Compilers (Pascal)
Data Structures & Algorithms (Pascal, Fortran 77, PDP Assembler)
Networking
Microprocessors (hardware/programming using Z80)
Systems Analysis and Information Systems (Cobol 74) (or Numerical Analysis)
Year 3
Hardware design
System design
Operating Systems
Compilers
Networking
Advanced Programming/Algorithms (Algol 68, Snobol, Lisp)
Software Engineering (or Numerical Analysis)
Project
Programming was a major element of the course. Over the 3 years you were formally taught Pascal, Fortran 77, Cobol, Algol68, Snobol and Lisp - and Z80/PDP assembler. All courses (except the hardware/electronics/maths courses) had at least some programming content with the dedicated Programming courses heavy on actual programming.
IMO, being good at maths is an indication that you could be a good programmer, but the reverse is not necessarily true. Not being good at maths doesn't mean you won't be a good programmer.
You can be taught 'the language'. What is far more difficult to teach - but not impossible' - and is really learning, is how to use the constructs of the language to produce a good program. Some have a 'feel' for this and some don't. Really, the only way to get good at programming is to write programs, write programs and write programs. Preferably having them reviewed. Also reading programs that others have written.
Programmers (especially C++ ones) need a 'can do' attitude and be self-starters and enjoy self-study. C++ is a large, professional language that changes about every 3 years. Courses, books etc do not cover the whole of the language. That is up to you to find out what is available.
Many times on these forums there is the comment - 'We haven't covered that yet' or similar. So what. If you only know what you're spoon-fed then your knowledge is going to be very limited. If you don't fancy/want to keep learning then don't do C++. Try Cobol 85.
I would say that there are certain languages that are easier to learn and apply than others– C, Python, and HTML being three of the most popular ones. However, they do all have different applications– C is better for data storage and object-oriented stuff, Python is better for more procedural stuff and workflows, and HTML is good for displaying stuff in Web browsers, assisted by CSS and JavaScript. (This is not from personal experience; I'm not an expert on Python so feel free to correct me).
lastchance wrote:
Two aspects that go with taught rather than learn (and are not entirely unrelated) are that:
(1) it's often considerably faster to be taught;
(2) "learning" - by which I might really mean "self-taught" - means that you also need to know what is important (let's face it, some websites and even some books do more harm than good) and, if you are taking from multiple sources then it is difficult to wade through different terminology, styles and biases.
I am currently teaching myself HTML; and I definitely agree with that. It's going pretty slowly, a lot more so than my C++ courses, several years ago in college. Although that's partly because I am also juggling a job and a photography addiction ;)
a lot of people associate being 'taught' as 'memorizing'. In that sense, 'learning' to program (or do problem solving and related) is very limited: you can memorize patterns that work for a lot of basic cases, even for designs and even for algorithms, but once you exceed your toolbox, you are done and can't function. A lot of coders DO work like this, and they do OK at some jobs. A lot of coding jobs ask for the same ideas over and over, and someone has to do that stuff.
But if you stretch beyond the memorization factor, its more of what you guys were saying, you can guide, but not teach someone to think for themselves. You can give them the basics and encourage them to do new things, but no one can really 'teach' you how to do new things, all they can do is show approaches (which is back to memorization) and give a footing.
So, its a mix of both. There is a memorization aspect, or if not a google aspect (Ive done a dozen programs in languages I did not know, they could have been better, but they worked, thanks to the web) and then there is a whole lot more beyond that. But to an extent, it can be taught, well enough to do some things. Its the 'beyond that' which can't be taught.
You can say the same about many things. Can you teach art?
There is a memorization aspect, or if not a google aspect
Agreed! Like keskiverto said, Jeeves and Macgyver both memorized various methods that served them well in the past, and they used them in new situations, and to good effect (Jeeves did, anyway. Having never seen Macgyver, I cannot speak for him).
But, sometimes a situation calls for something new, and you are forced to innovate. Jeeves does this brilliantly, and so did people like Bill Joy, Richard Stallman, and Linus Torvalds. And this is what makes a great programmer– or really a great anything– the ability to use what you have, and if that doesn't work, to create something new. Or google it ;)
You can say the same about many things. Can you teach art?
There are schools for art ...
There is a slight difference though. Teacher can give vocabulary, grammar rules, and examples of human language, but those do not enable you to write great (novel) poetry (unless you are a Vogon).
Programming produces a novel solution to a problem, not novel content like art does. Or do we include the "invent a problem" into programming? As in "invent a new game idea".
Programming produces a novel solution to a problem, not novel content like art does.
Why doesn't a solution count as content, though? In fact, is programming necessarily distinct from artistic expression? For example, is it not possible to produce programs that, besides solving their intended problems, have aesthetically pleasing structures?
I'd argue programming is not necessarily any less artistic than, say, pottery. Yes, in both cases the final product can be extremely utilitarian, but the craftsman is also perfectly capable of putting something of themselves into their work to make pieces that are distinctly theirs.
There are also esolangs that also play on this idea a bit (like one that describes programs as (sometimes valid) cooking recipes or as shakespeare plays).
edit: http://www.irc.perl.org/ also, I personally like to count that camel as art, and its a valid perl program.
I think requiring that a program resemble already existing forms of artistic expression (such as drawings or poems) in order to count as art is too strong a restriction.
For example, if I take that camel and reformat it, is it still art?
In my view, the fact that it's both a functional perl program and formatted to look the way it does is what makes it art. Although that being said, I agree there's no reason to limit to existing mediums.
uplime,
Yeah, I think the camel counts as art. I think that no matter if it was random letters or if it was a functional program, it would still be art.
helios
When I ran your reformatted Perl script I got a bunch of random junk that looked like this:
.XXXXXXXXXXL .XXX^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XXXXXXXXXXXXXXXXXL XXXXXXL
{XXXXXXXXXXXXXXXXXXXXXXXXXXXXm mXXXXXXXXXXXXXXXXXXXXXXXXXXXX}
`XXXXXXXXXXXXXXXXXXXXXXXXXXXXXL JXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXL JXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
`XXXXXXXXXXXXXXXXXXXXXXXXXXX7XX XXFXXXXXXXXXXXXXXXXXXXXXXXXXXX'
`7XXXXXXXXXXXXXXXXXXXXXXXX} XX XX {XXXXXXXXXXXXXXXXXXXXXXXXF'
`7F^XXXXXXXXXXXXXXXX{XXX}.XF 7X.{XXX}XXXXXXXXXXXXXXXX^7F'
XXXXX XXXXX{XXX} 7XXL{F 7}JXXF {XXX}XXXXX XXXXX
{XXX}.XXXXF XXX} 7XX XXF {XXX 7XXXX.{XXX}
{XXX {XXXF' {XX} `XX} {XX' {XX} `7XXX} XXX}
`XX} `XXL .XXF XX} {XX 7XX. JXX' {XX'
XX} `^XXmXX^ XX XX ^XXmXX^' {XX
XX `XXXL. XX XX .JXXX' XX
JX} mJXXXXX {XX. .XX} XXXXXLm {XL
mXX} `^^^'`^' .XXX} {XXX. `^'`^^^' {XXm
mXXXX ^^^ ^^^ XXXXm
The use of a camel image in association with Perl is a trademark of O'Reilly &
Associates, Inc. Used with permission.
I think that the way the camel script was formatted affected the output. So I think that makes it even cooler, that when you run it it draws camels on the screen.