Live data from Hacker News

Learning to Code vs Learning Computer Science

shkspr.mobi

71–80 of 116 posts

Re: Learning to Code vs Learning Computer Science

#71

Fundamentally I agree, but I question why we do not teach computer science/coding the same way we teach music? For example, when I first learned how to play piano, I wasn't taught how to play Major 9th chords. Rather, I learned simple melodies and expanded into more complicated harmony as I grew older. The reason why I began learning more theory was because I knew of its potential to make me a better musician. This c…

The primary reason for this is that we are currently at a phase where we are encouraging people to program who might not otherwise bother with it. As a consequence, we're making the lessons fun and appealing right off the bat. Writing an iPhone app is more entertaining than writing a command line guess-the-number program, but the latter is a more applicable teaching tool (mostly by virtue of there being far less knowledge necessary understand what's going on).

Re: Learning to Code vs Learning Computer Science

#72
post #35

I find sorting algorithms a bizarre and damaging introduction to computer science. If, as suggested, you ask an interested teenager how they sort a list of numbers on paper, they can usually give a reasonable algorithmic explanation, e.g. "Find the smallest number in the list, and write that first,..." Then, they have to throw that thought process away, and rote learn some different and esoteric alternative - the A-l…

A well-taught computer science course will not force anyone to rote-learn algorithms. Instead it ought to walk the students through the discovery process of improving from a naive but simple bubble sort, through more complicated algorithms. Once they understand the complexities, they can appreciate the genius of quicksort. And with the sort problem well established in their minds, they're ready to appreciate the valu…

>A well-taught computer science course will not force anyone to rote-learn algorithms.

Agree but with the correction that you mean well-structured computer science course. The UK national A-level syllabus for "Decision 1", that which is under discussion, largely demands rote-learning for the examination. To avoid this, for whatever reason, would be very poor teaching.

There are structural deficiencies here, which teaching cannot overcome. (Also worth noting that this is part of the HS maths course, and mathematics teachers are typically not knowledgeable enough to offer the flavour you demand)

> Instead it ought to walk the students through the discovery process of improving from a naive but simple bubble sort, through more complicated algorithms.

Bubblesort is not naive and simple. Given the opportunity to invent a sorting algorithm from scratch, as a total beginner or as an expert, nobody would spontaneously suggest bubblesort in 2013.

Here is a more complete criticism of using bubblesort as an educational tool: http://www.cs.duke.edu/~ola/papers/bubble.pdf

If you open your course with bubblesort, it's my belief that a lot of capable students are going to be thinking "why did we start here? => computer science is not for me".

Overall, I agree with your teaching method - but bubblesort to quicksort is the wrong route. If sorting algorithms are introduced (I don't think it is a good start point), insertion/selection sort to bucket sort would be more pedagogical. The start point more closely matches students' naive understanding, and the end point forces teachers to be more clear about what the key learning points are.

Re: Learning to Code vs Learning Computer Science

#73
There is infinite arm-chair teaching going on regarding coding/programming/computer science right now. If anyone is tempted to do more, fine. But please, please, read up on what people actually doing it have discovered. Reality quickly upends assumptions when you try to teach.

Re: Learning to Code vs Learning Computer Science

#74
> What has that taught anyone? Merely syntax.

That is a completely backwards way at looking at learning to code.

Sure you can boil down trivial examples to make the process one of learning syntax, but the moment you do anything of your own design you begin learning the fundamentals of computer science.

They may not be able to explain to you how sorting works, or many other minute details, but they will probably be able to tell you how they were able to get pressing the screen to result in the character moving up.

After that they will realize the character can't move up forever, so what should happen when it reaches the top? etc. etc.

Simple but non-trivial things are exactly what is needed to get someone to dip their toe in computer science, and will certainly work as a stepping stone to more formal processes later.

Pretending that one liners aren't valuable so by extension small programs aren't valuable is asinine. If you want to point out specific examples then feel free, but this abstract focus at the start just makes you seem like you are focusing on things they shouldn't care about.

As another note, sorting numbers 9/10 is a solved and thus uninteresting problem, don't ever make someone do it until they know a ton about computers.

Re: Learning to Code vs Learning Computer Science

#75

Fundamentally I agree, but I question why we do not teach computer science/coding the same way we teach music? For example, when I first learned how to play piano, I wasn't taught how to play Major 9th chords. Rather, I learned simple melodies and expanded into more complicated harmony as I grew older. The reason why I began learning more theory was because I knew of its potential to make me a better musician. This c…

I agree with you, but this somewhat flies in the face of what he says. He is arguing that CS is important, not just learning to code. But I think learning to code is important because it is what attracts creatives, and both creatives and engineers are needed in development.

There are two things that attracted me to programming:

1. Telling something else to do what you want, and it does it.

2. Being able to be creative within bounds in a way that allowed me to learn new cool things each day and build with those new bits of knowledge upon other bits, to great things that were entertaining.

Without some bounds, chaos and floundering reign. Electric slot racing was cool because a realistic (per ratio) speed was involved, but control was possible, and it was a simple control, variable power to the engine. Having to steer those cars without slots at that speed is beyond our abilities. This is the problem today, to me. There are so many options. There are no slots in the track. No Apple II. And, there are now so many prewritten solutions. You don't need to write a game to find what you were thinking of. There is little reason for the younger generation to develop anything on their own. My kids just play games. I know I couldn't get them to develop if I tried, though I tried once and failed. They'd rather be creative with markers and paper- and that's ok. But, it makes me miss my younger years on the first home computers; I can't give that to them; that era is gone, and I miss it.

Re: Learning to Code vs Learning Computer Science

#76
I'm not sure most of gets called computer science is actually science it terms of "a systematic enterprise that builds and organizes knowledge in the form of testable explanations and predictions about the universe" as wikipedia puts it. Mostly it would be better called software engineering. I think people tend to call it science because that sounds sexier.

The stuff the writer of the article says he supports in the Apps For Good initiative is even less science like. "competitor analysis, testing, monetizing, building a team, and legal / social ramifications of releasing an app" is business studies, not science.

Re: Learning to Code vs Learning Computer Science

#77
post #7

Computer science is to programming as physics is to civil engineering.

No, that's not even remotely an accurate analogy. Computer science is a branch of applied mathematics; not a physical science. Engineers need to have a basic understanding of core physics principles in order to do good work. That analogy doesn't hold with respect to programming and CS. A better analogy is that CS is to programming as number theory is to arithmetic: a person doesn't have to know what a "field" is in o…

That's the problem with analogies, they are analogies.

Re: Learning to Code vs Learning Computer Science

#78

Earlier quoted context omitted.

No, that's not even remotely an accurate analogy. Computer science is a branch of applied mathematics; not a physical science. Engineers need to have a basic understanding of core physics principles in order to do good work. That analogy doesn't hold with respect to programming and CS. A better analogy is that CS is to programming as number theory is to arithmetic: a person doesn't have to know what a "field" is in o…

That's the problem with analogies, they are analogies.

There are good analogies and bad analogies, though. Good ones use relationships that actually have common elements that are meaningful; that's how they work to convey information.

Re: Learning to Code vs Learning Computer Science

#79
post #37
post #36

Earlier quoted context omitted.

It's a false comparison. Algorithms, and data structures don't have a ready, real-life examples, that a new kid from middle school can already relate to. I suppose, you can point to facebook and google and try to explain the infrastructure behind them, but he still doesn't have a way for the kid to play with and see the consequences. I also think there's a false dichotomy implicit in your question.

Really? Did your teachers never say "Ok, everyone line up in height order"?

Really? Have you ever seen kids younger than High school, move about in response to that?

Re: Learning to Code vs Learning Computer Science

#80
post #38
post #36

Earlier quoted context omitted.

It's a false comparison. Algorithms, and data structures don't have a ready, real-life examples, that a new kid from middle school can already relate to. I suppose, you can point to facebook and google and try to explain the infrastructure behind them, but he still doesn't have a way for the kid to play with and see the consequences. I also think there's a false dichotomy implicit in your question.

Actually, you learn your first algorithm in elementary school, you just call it "doing an Euclidean division by hand". You're first data structure comes a bit later, in middle school, with vectors. That are just the first among those that I thought of, there are many more.

My point still stands. You don't run into Euclidean division when you're running back home. You don't see vectors when you're waiting for the school bus to take you home. You never see Binary trees, when you're out playing. But you do see buildings and some being constructed. Not to mention the legos game. Aka, the abstractions to concreteness is harder in CS than in Civil Engineering. It still might be a good strategy to teach some subset of all students, but as general policy for the majority it'll be horribly ineffective (I think).
Post reply on HN