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

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    A First Computer Science Course

    • 15 Comments

    Starting back this past winter I started hearing about a National Science Foundation (NSF) project to create or perhaps promote might be a better way of putting it a new three course computer science curriculum for high schools. This is part of the Broadening Participation in Computing  (BPC) program at NSF. I heard some of it at TCEA and more still at SIGCSE. It sounds pretty interesting. Clearly, in my opinion and in that of many others, we need to expand computer science education. We especially need more diversity in the field. Only some 20,000 high school students take the APCS A exam these days. That compares pretty poorly with over 80,000 in statistics which is a fairly new and still small (in AP terms) exam. Would a good course before the APCS course help matters?

    What I have been specifically thinking about lately is this so-called first course. Some people refer to it as a pre-AP course but others see this as a course for far more students than just those who are headed for the Advanced Placement Computer Science course. I tend to agree. While it might be nice to have a lot more kids take the AP course – ok yeah it would be nice – I keep coming to the idea that what we need to do most in high school is:

    a) get students interested in computer science and

    b) give them some basics so that when they get to college/university they are ready to start if they have the interest

    I’ve seen a number of my own students over the years take just one computer science course in high school and then do just fine as CS majors in college. Not taking APCS did not stop them because they had interest and some basics. So the question is – what should that first computer science course be like?

    Should it have some programming in it? I’d have to say yes. But it doesn’t have to be boring or especially difficult programming. Start with Alice, Scratch, squeak/eToys or something along those lines. Then move to something a little more “real” like Small Basic, Visual Basic or perhaps Python or a functional language like F# or Scheme. Personally I’d avoid curly bracket and semi-colon languages but for some people C#, Java or even C++ will work out just fine. The important thing I think is to give teachers some choices. Let people teach with what they are comfortable with. If they like the tools teachers are much more likely to spread enthusiasm to their students. That to me is a key piece.

    I think you also have to be concepts focused more than tool focused. I think that the activities at Computer Science Unplugged are great for that. its not just that they are fun and interesting it is that they move some of the focus from the physical computer and to the concepts themselves. That’s a big plus.

    I’d like to see some computer history covered as well. I know. Everyone tells me history is boring. But maybe that just means we are teaching it wrong. We’ve got some real characters in the history of computers and we should play that up. There were some out of the box inspiring people like Grace Hopper for example. Let’s get some creative people to tell those stories in the best way possible. And stories are the way to do it – no dry recitation of facts and dates. That would be boring. But talk about the things that made change and innovation necessary. World War II and everything from code breaking to simple cannon trajectory calculations. Why was computing necessary for just in time inventory? And there are lots more we could come up with after a little brainstorming.

    What else do we need? What concepts are key? Remember that in a single semester or even year course we can’t cover it all. Loops and decision structures? Absolutely! Right? What about object oriented design/programming? Is the first course too soon? Or should we use objects even if we don’t teach how to create them? Is recursion in or out?  Can we use games as projects? Why or why not? What are good projects that build interest while teaching concepts?

    Do you have or know of a scope and sequence document (or more complete package) for a first computer science course? Please send me a link at alfredth (at) microsoft.com or add it to the comments? Strong opinions about what this course should look like? Let me know in the comments, by email or write about it in your own blog and let me know about it. This is something I think needs a broad background of ideas and support.

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    Why Do So Many Programmers Use One Character Index Variables

    • 14 Comments

    There is a commercial on TV these days where a little girl is helping her mother and grandmother prepare a large turkey for a holiday dinner. The little girl asks the older women why the turkey only has one leg. The other leg has been cut off and the older women explain that this is because the little girl’s great grandmother always did it that way. Then a flashback shows that the reason the leg was originally cut off was because the great grandmother didn’t have a pot that whole hold the turkey unless one leg was cut off first. Her daughter and granddaughter and great granddaughter could probably easy buy a pot large enough. In fact the pots they have now might be large enough. But “because that is the way we have always done it” these women were still cutting off one leg.

    I remember Grace Hopper once saying in a talk that if we every said “because that is the way we have always done it” she would appear behind us and haunt us. I can’t hear the phrase without thinking of here over 30 years later. But in a real way that is why so many programmers using index variables of one letter and that the letter is between “i” and “n.” So what’s the story?

    For many people back in the day the principal programming language was FORTRAN. Early versions of FORTRAN would let you specific the variable type of a name but the default values for integers were variables that started with the letters “i” through “n.” Also with some systems longer variable names took up more room in memory. And memory at that time was expensive. So to make it easy a lot of people used “i”, “j”, and “k” as their first choice for index variable names. That’s how I learned it.

    Those of us who learned FORTRAN as a first language brought that habit with us to other languages. To BASIC, and C, and Java, and even PASCAL. And many many more. Why? “Because that is the way we have always done it” Shame on us. And the people we taught taught the same thing to others. That’s not really good. “index” is such a better variable name. In specific cases there are even more helpful, more descriptive and more useful variable names. For counting loops, for variables to pass to methods and many other places. Generally most of use have gone beyond the one character variable name. The last big sticking point seems to be index/loop variables. It’s probably time we all got past that. At least we should teach better practices to our students.

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    How not to teach programming

    • 14 Comments

    Through the wonders of DZone I came across a blog post called Don't teach like you code. The target audience seems to be professional coders who are teaching beginners. It’s always interesting to read articles like this and part of that is to understand the perceptions that people have about teaching when they are not full-time teachers themselves. And this article does make some good points about how not to teach. Unfortunately the examples of how people, one presumes the author included, actually code are not what I want new programmers to learn. In fact this post was quite unsettling to me as someone who made his living writing code for 14-15 years and who still writes some when necessary.

    The article has a line that reads “”But, good coding isn't like teaching at all. It promotes habits that are entirely counterproductive to the art of teaching.” Really? I’m skeptical. He goes on to say “”Part way through writing a method, you might decide you need to track things in an array. After a few minutes, you'll decide a hashtable works better.” Oh please in the name of all that is good in the world don’t let that be common among professional developers. Yes, that happens sometimes but it should be awfully rare. You should have thought things through in some detail before you started coding. If you are making big data structures in the middle of coding you clearly (in my opinion at least) were not ready to start coding at all.

    On the other hand in teaching I would expect this to be more common. Specifically the lecture that worked well with one audience may not work as well with another. A good teacher sees this, adapts and tries to explain things a little differently.

    And then there is this gem “Second, coding lets you cheat on the details. We compile our code not because we think we're done, but because we want to find out what we may have missed. ” No! If you run the compiler and get errors and warnings you should be surprised. Or at very least disappointed. Now maybe the author is using crummy tools. I am spoiled by Visual Studio which notices a lot of syntax and other errors as you are typing. And IntelliSense goes a long long way toward helping avoid spelling errors. This makes it easier to avoid missing things. But don’t people read though and self-edit before compiling any more? Some days I think we were all better off when programmers had only one or two chances to compile their code a day. Coding is about details. Cheating on details is a path to destruction.

    The last line of the article is priceless. “How do you teach people well? It starts by knowing that what may make you a great programmer will not make you a great teacher.”  Probably true. But you also have to understand what makes a great programmer. I think a lot of programmers have a much higher opinion of their coding ability than is warranted. I never saw myself as a great programmer BTW. In fact I know what a great programmer is and how they work. I’m pretty sure I don’t have it. But I know enough about it to teach it. Like a great football coach who has never thrown a touchdown pass or gotten a sack or kicked a field goal but who can help others do all those things better a good teacher is someone who helps others learn from the mistakes of others.

    A great programmer may not make a good teacher because they may not understand how they do what they do in a way that they can translate for a beginner. But someone who speaks the language of software and can translate the concepts and ideas for beginners may make for a great teacher even if only an average (or even fair) programmer themselves. We still have to focus on what makes for a great programmer not what makes a lazy programmer though.



Page 4 of 618 (1,853 items) «23456»