Computer Science Teacher
Computer Science Teacher - Thoughts and Information from Alfred Thompson

February, 2010

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    What Programming Language to Teach First?


    Have you ever been asked a question that you have been asked time and again but suddenly decided you have a different answer for? One of the questions I hear a lot is what programming language should be taught first and this question was asked of a panel I say on last week. Except for me it was an impressive panel. Don Slater of Carnegie Mellon and the Alice Project, Michael Kolling, University of Kent and creator of Greenfoot for teaching Java, and David Klappholz from Stevens Institute of Technology who got his PhD while I was still picking a major in college. So of course I asked to answer first because that was the only way I had a chance of adding value. Plus I had suddenly realized that I had a new answer – one that I had not tried out in public before. And I wanted to give it a go.

    Normally of course I would have launched into a great explanation of why Visual Basic was the best and language wars would likely have erupted. But that just did not feel right. So I answered that it depended on a number of things such as the goals of  the course, the type of student but most importantly it depended on what language the teacher was most comfortable with and had the most passion for. The first programming course is hugely important. It is during this course that many students will either be turned on to computer science or turned away from it. This is the first impression and it needs to be a good one. If the teacher knows the language, is comfortable with the language, can have fun with the language and really enjoys the language the students will have a better experience. Everyone wins

    I remember teaching Java for the first time. It was not a good experience for me (I was not ready for it) and I am sure it was not a good experience for many of the students. I did then a disservice. In hind sight I should not have agreed to teach the course. But I did and I tried my best but it was not ideal. Teachers easily, and without thinking about it, transfer their feelings about material to their students. Recent reports say this is true of math for example. (Study finds female teachers' fear of math can be catching) I doubt the same is any less true for computer science education. This is why we need well trained and confident computer science teachers in our schools.

    There are other considerations BTW. Michael Kolling pointed out that supporting tools are very important. Greenfoot and/or Alice for Java for example. I personally think the Visual Studio IDE makes learning Visual Basic and C# much easier than they would be using a command line and text editor. Plus the drag and drop editing of graphical user interfaces make creating real looking Windows program easy and fun. There are also curriculum materials available for some of the better tools. The Greenfoot site has some for that tool. has some for Alice. The Scratch web site has many resources as well. The Microsoft Faculty Connection has curriculum resources for VB and C#. And there is the newly revamped beginning developer learning center. Python which is a language that has a lot of proponents  (I like that it is dynamic) but not as much in the way of a support environment for teaching. Yet.

    I know that a lot of curriculum is slaved to the AP CS curriculum these days but I really strongly believe that APCS is too much for a first course. Students need a gate way course that will introduce them to programming in a fun, exciting, dynamic and enthusiastic way. For that course it is best if the teacher uses a language and a platform that they love. Communicate the love not fear, the enthusiasm not the necessity of a specific language, and share passion not pain.

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    Cheating In Computer Science Classes


    This story on cheating in Computer Science classes is one of  those things that really makes you think. Years ago one of my students was so tired of students looking over his shoulder and stealing his code that he started using variable names that made absolutely no sense at all. He figured that if they were too obviously his no one would dare steal his code. This was my first awareness of student cheating in my own classroom and was a real eye opener. I kept a close eye on things but honestly I am sure I missed as much cheating as I caught. Hopefully not more but who knows?

    Defining cheating in computer science / programming courses is difficult though. After all code reuse is a goal for professional developers and team work is essential. The article above listed HONOR CODE RULES FOR STANFORD'S COMPUTER SCIENCE CLASSES and they are a lot like I tried to run things in my classroom

    • You must indicate on your submission the receipt of any assistance, such as discussion of ideas and strategies and write the actual program code on your own.
    • You must not share program code with other students.
    • You must not look at solution sets or program code from other years.
    • You must be prepared to explain any program code you submit.

    The last line became a critical part of my final project grading in my courses. I would do a one on one interview and mini code review with each student and we would go over their project together. I would prepare questions about code that seemed tricky or overly familiar to me. I would ask for explanations of names and program organization. All this to make sure that students understood what they had done. This doesn’t scale well of course. You can’t realistically do it for a 180 students. I wish we could but there is a limit to time in the day. On smaller projects during the year I would do spot interviews when I suspected something was “different” about a project. This requires knowing what each student is like and also doesn’t always scale. But you know English teachers do it with writing projects so we should be able to do it in computer science classes as well. Style is unique.

    But the article also says that cheating is much more common in computer science courses than in other courses. Why is that? Stanford’s Eric Roberts has some ideas based on his research.

    • Students are attracted to a computer science degree by its marketability and as a steppingstone to wealth and job security rather than intrinsic interest in the subject. They see stellar course work as critical to their future livelihood.
    • The material is cumulative, so students who neglect early work are completely confused by later assignments, and panic.
    • Unlike other disciplines, it is not possible to merely submit inferior work. A computer program that doesn't work is simply rejected, which creates student anxiety.
    • It"s easy to get help from others. In terminal clusters, students work near each other, so it’s tempting to ask for help, peek over a shoulder or retrieve program listings from a recycling bin. Many students accidentally leave copies of their work on the hard disk of public machines.
    • Computer science courses often reuse past assignments, because assignments, like programs, improve with time and debugging. So students seek solution sets from past course offerings.

    These resonate with me. Take the second item. How do we handle it when students fall behind? Can we do things more self-paced, especially in the early courses, to make this sort of cheating less necessary? Perhaps not at college/university but perhaps we can in high school. Helping students get a solid base for later seems like it should be a huge goal for HS CS.

    And the third item. Do we have to make projects binary – pass or fail? Or can we review code and give some partial credit for it? That is done in grading the free response questions on the APCS exam. This is a larger problem with projects/homework of course. But I tried to review even code that would not correctly compile to at least understand what the student was not understanding. If we can review projects while they are being worked on we can help with those sorts of things. Again, not easy to scale but doable in smaller courses. And lets face it, small classes are what many HS CS teachers are facing. Perhaps we can turn that into an advantage for our students.

    Clearly this is going to be an issue going forward. It means we need to talk about the ethics of “helping”, “borrowing” and other cheating methods. But we also need to emphasize that students really need to and should want to learn these things for themselves. Success in later their life will depend on what they know and not on what the student in the next chair knows.

    BTW see Mark Guzdial’s take on this at Stanford finds cheating increasing, especially among CS students and how cheating influenced Georgia Tech in how they rewrote the curriculum. Useful information and ideas.

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    ASCII Art For Fun and Projects


    I guess I am on a nostalgia kick. Earlier this week I found a link to an Text Ascii Art Generator over on Doug Peterson’s Doug – Off The Record blog. This site lets you enter text and have it reproduced in ASCII art similar to the sample below.

    Ascii Text

    There are a large selection of fonts to choose from. I picked one that was as similar to a project I did 30 some years ago to show you. Doing this sort of thing as well as more complex art and images was quite the thing back in the early days of computers. You know back before we had laser printers and could generate photo quality graphics cheaply and easily. There are all sorts of ways to generate these messages of course. The hard way which is more efficient and the easy way which doesn't scale well are two of them.

    One can easily create a set of statements that draw each line of the text that makes up a message and that is fairly easy to do. One usually draws the message on a piece of graph paper and uses that template to create the statements leaving blank spaces and entering characters as appropriate. As I said though that doesn’t scale well. Better is to create a more complex program that knows how to draw each character and how to line things up across the page so things come out right.

    Of course moving down the page is easier than across. Back in the old line printer days I wrote a program that generated huge banners for the line printer. I had a long, complicated, tricky to debug print statement for each letter. I could easy vary the characters that were used to fill in the letters – yea me. :-) But really that didn’t scale all that well either and it took me for ever to get all 26 letters (UPPERCASE only) and ten digits. I tended to add letters as I needed them for specific messages. I had a box full of punch cards when I was done.

    The more correct way would be to encode the bits needed for each letter and have a general purpose routine that would take that code as input. Much less code to debug and much easier to scale to add characters or create whole new fonts. The web site I linked to has a link to information about FIGlet Fonts and AOL Macro Fonts which are a couple of ways to encode font sets for ASCII art. There are more of course.

    I think that having students create their own encoding and writing their own programs for drawing the characters would make an interesting set of projects though. It would give them some exposure to thinking about that sort of thing and hopefully understanding that it could lead to other sorts of information storing. It should also help them understand more about fonts in general. Starting with the difference between proportional and non-proportional (fixed pitch) fonts. Maybe you could even let them discover that for themselves. :-)

    What do you think? Would students find this interesting today or is it just too old? A lot of students seem to like throwback games so maybe this would appeal to them. Let me know if you try it.

    Are you following me on Twitter?

Page 1 of 8 (22 items) 12345»