The syntax problems in high school CS

January 4, 2012 at 7:50 am 12 comments

This is a nice account of personal struggles with syntax getting in the way of playing with computer science ideas.  The stories are believable, about facing a course in Basic that was more about memorizing history, about a course in Pascal that made Basic seem simple in comparison, and about layers of languages leading to layers of complexity.  I also believe the idea that Scheme, with its minimal syntax, lets the learner forego memorizing “rules” of syntax.

However, I don’t buy the subtitle: “Simple language makes learning complex concepts easy.”  Simple language means that you don’t struggle with complex language.  Hard ideas in computer science are hard ideas.  Hard ideas in a complex language may be impossible for some students.  Hard ideas in a simple language means that you can focus on the right things–it’s easier, but I don’t buy that just the language alone makes complex CS ideas easy.

Simple Language Makes Learning Complex Concepts Easy

The thing I liked most about taking this course in Scheme was that I knew that I was learning something. Every concept I had ever tried and failed to understand comprehensively in my Pascal class – searching and sorting procedures, recursion, processing binary trees – was made clear when I studied them in Scheme. These things occur so naturally in Scheme that I couldn’t help but understand. After mastering the concept, I could then go back into my Pascal class and easily master the code. The point here is that concepts like these are universal in computer science. After you understand them, then you can learn the rules of any language in order to encode them. But it doesn’t matter how well you have mastered the syntax of a language if you don’t understand the meaning of what you are typing or the reason why it works.

via High School Computing: The Inside Story | Institute for Mathematics and Computer Science.

Entry filed under: Uncategorized. Tags: , , .

Big rise in AP CS test-takers in Georgia and in US Equality in school leads to system excellence: Boredom and failure, part 3

12 Comments Add your own

  • 1. Doug Blank  |  January 4, 2012 at 8:11 am

    Mark, I agree with you completely. My experience exactly parallels Natasha’s: introduced to BASIC, then had the syntax of languages taught as CS, then discovered the beauty of Scheme.

    But I think Natasha is close to the issue. I call this issue “pedagogical scalability” — the initial ability to match a beginner’s intuitions, but then allow the user to grow into more sophisticated conceptual frameworks. Scheme has a high pedagogical scalability rating, whereas BASIC’s is low — on a couple of counts. BASIC has some arbitrary syntax, and doesn’t scale well to other computing concepts (functional programming, OOP, recursion, etc).

    In our own work now with the Calico Project, we are focusing on “pedagogical transition points”. We don’t think one language can span the entire gamut, but there are things technology can do to help make the leap from one language to another.

    Reply
  • 2. Alfred Thompson  |  January 4, 2012 at 8:31 am

    What is wrong with me that I fell in love with computer science learning FORTRAN?
    Now I confess to a bias against Scheme. Not based on logic but on two things. Some nasty Schemers. Students who did well in classes I taught but who absolutely hated Scheme with a passion when they were forced to take it in college. So I may not be the right one to evaluate this article but that never stopped me before so …
    What I got out of the article is that the way the early courses were taught was a big problem. It may well be that Scheme rang a chord with this student and may with many more as well. But lots of things “ring chords” with some but can be completely screwed up by the right (or wrong) teacher. This refers again to stories I have heard from students in Scheme classes. Languages can help but it seems to me that the teacher and curriculum still matter quite a bit. We ignore them are great risk.

    Reply
    • 3. Doug Blank  |  January 4, 2012 at 9:00 am

      Hi Alfred! Having been on both sides of college Scheme (learning and teaching) I understand what you are saying. I have had some students that just cannot get their minds to begin to appreciate Scheme. Usually, these are confident students that have a very good grasp of a language like C or Java. For these students, I think that learning a language like Scheme is akin to learning a second human language. This is really hard for some (like me!) One has to basically learn to re-think (or dream) in this new language.

      I also appreciate, though, that each person will gravitate to their own language niche based on nothing but person preference (emacs vs vi, anyone?) Perhaps FORTRAN is your niche, or perhaps you romanticize it by associating the way it was taught, or the experience of discovering these ideas for the first time. Or maybe you just plain like it. Personal preference can have a huge effect, and you are right that we should not ignore this aspect. Many of our upper level courses at Bryn Mawr College do not specify a language to use… students can often use whatever they are comfortable with.

      I see the relationship between “ring chords” and “ring tones”… students need the ability to be (and express) themselves individually in computer science. What can we do to help?

      Reply
      • 4. Alfred Thompson  |  January 4, 2012 at 9:08 am

        “students need the ability to be (and express) themselves individually in computer science. What can we do to help?”

        This is the key point in teaching almost anything. A lack of personal expression is a great way to kill excitent and allowing it a key to building it. What may have been the most exciting thing for me in the first course I took was not the assigned projects but that I was allowed to do my own projects in ways to express myself along with the assigned projects. This was rare back in the card punch era I think and one of the things that made the small liberal arts college I attended special for us CS geeks.
        In my own teaching I loved to encourage creativity and personal expression. I found this easy to facilitate using GUI programing using Visual Basic (ight use C# now or might now). Now I know there is always a worry that students will spend too much time geting creative and not enough on the principles assigned but this always seemed like a classroom manageent problem more than a technology/language/IDE problem.

        Reply
  • 5. Natasha Chen  |  January 4, 2012 at 10:26 am

    Professor Guzdial,

    I sincerely appreciate you blogging about my article, and I take your point on “easy” vs. “easier.” Thanks for noting that!

    Natasha Chen
    http://www.eimacs.com

    Reply
  • 6. chaikens  |  January 4, 2012 at 1:03 pm

    It’s interesting that IMACS serves gifted and talented HS students and requires them to take (online) aptitude tests before enrolling in their computer science courses. Most of us college instructors don’t do that.

    Reply
    • 7. Terry Kaufman  |  January 5, 2012 at 7:58 pm

      I’d like to clarify why IMACS asks applicants to take the IMACS Aptitude Test. Our online curricula are university level, while our applicants are pre-college students some as young as 10 years old. As with programs such as EPGY and CTY, we ask applicants to demonstrate a high level of mathematical ability to minimize the likelihood of a student-course mismatch. Colleges are able to rely in part on tests such as the SAT or ACT to help gauge the ability of their applicants. In any case, I would be surprised if a college or college instructor accepted a 10-year old student into a university class without some objective measure of that student’s ability.

      Terry Kaufman
      IMACS President

      Reply
      • 8. Seth Chaiken  |  January 17, 2012 at 12:48 am

        I certainly agree with and applaud IMACS policies and work, and with Terry’s last remark. My points were that a high level of mathematical ability might well be necessary for (or be highly correlated with) people of any age to react to the range of computer science instruction in the way Natasha reported, and that even fairly competitive colleges offer computer science to students falling into much wider range of mathematical abilities. College faculty advisors, at least in my experience, don’t have access to SAT or ACT scores.

        Reply
  • 9. gasstationwithoutpumps  |  January 4, 2012 at 11:10 pm

    I also started with Fortran and assembly language, and went through many others (Pascal, Algol W, SAIL, Franz LISP, C, C++, Perl, Python, to name a few). Some languages resonated with me, some turned me off. (I never could stomach APL nor any of the logic programming languages, for example.)

    I think that too much syntax early on does get in the way of learning the basic concepts, but too little syntax (like the LISP languages) also interferes with readability. When you have to count parentheses to figure out what your statement means, it lacks readability.

    I think that Java is a pedagogically poor place to start programmers, as it requires them to express a lot of concepts that are not really relevant for the level they are at. Personally I favor starting students with a drag-and-drop language (Scratch), then advancing to a dynamically-typed language (Python), and only moving to a statically typed language once they are doing large (perhaps multi-person) projects that can benefit from rigid interfaces to partition the problem and compile-time optimization that is hard to do in dynamically-typed languages.

    The choice of teaching language does affect the order in which concepts can be taught (or the order of concepts affects the choice of language). For instance, Scratch does not make recursion possible, but does allow early introduction of concurrency and race conditions. I have a hard time coming up with an order of concepts that makes Java a good first language (unless one only learns one language ever).

    Reply
  • 10. Errol Thompson  |  January 5, 2012 at 3:50 am

    There are ways of simplifying the syntax issues that enable students to pick up the syntax at a slower pace. I did this with Pascal by emphasising a subset of the language and syntax. The better students developed the ability to use the more powerful language and syntax concepts. I am trying to do the same now with Java.

    The problem that I see is that so often in introductory programming courses, I see people trying to teach all the complexity and power of the language and not the core principles of programming.

    If I had the option to select a language then I might choose Scheme simply because it is easier to start with a functional approach to programming and then move to objects. I am doing this with Java and a test-driven approach but it is more difficult because of the need to have classes.

    Reply
  • 11. Rob St. Amant  |  January 5, 2012 at 10:14 am

    I recently finished writing a book chapter on basic programming concepts for lay readers, and I found that Python worked pretty well as a match for a simple real-world procedure, without too much in the way of strange terms and syntax that needed to be explained. (There are the usual foibles of most programming languages: ‘=’ for assignment, ‘for’ for iterations, counting from zero instead of one, etc., but they were manageable, aside from how to create some new data structures.) But of course making explanations easy is a bit different from making programmming easy.

    Reply
  • 12. Bonnie  |  January 6, 2012 at 9:45 am

    There is no reason why Java or other similar languages can’t be taught effectively to introductory students using a stripped down set of syntactical concepts. The problem is the existing textbooks (and many instructors) who insist that every variant of loop or if statement must be taught in the first programming course.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Trackback this post  |  Subscribe to the comments via RSS Feed


Enter your email address to follow this blog and receive notifications of new posts by email.

Join 9,005 other followers

Feeds

Recent Posts

Blog Stats

  • 1,880,386 hits
January 2012
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

CS Teaching Tips


%d bloggers like this: