Thursday, January 25, 2018

Thinking About CS Textbooks

There are a lot of subjects where I found textbooks to be very valuable when I was a student. History for example. One of my degrees is in Sociology where I read all the textbooks cover to cover. In Computer Science I tended to use textbooks more as a reference – a place to look things up – more than as something to read cover to cover. I’m sure that is the same for some but very different for others.

I’ve never really figured how to get the most out of a text book while teaching computer science. For the most part I haven’t used them at all. I do have a lot of materials I make available to my students though. They have copies of all my PowerPoint presentations for example. Lots of them have information in the speaker notes. I also link to videos online. Some I’ve recorded and some by other people. Code.Org has some great ones for example. (https://code.org/educate/resources/videos) I also write up some “how to” for things I don’t necessarily cover in class. This seems to work ok but lately I have been thinking I need more.

As I see it one of the problems with textbooks is that students don’t read them. Flipped classroom (read this at home or watch this at home and we’ll talk about it in class) seems to work for some people but I’m still skeptical. I’ve heard students complain about having to read 150 page books over a months time and wonder how likely they really are to be reading a textbook assignment. Even if they do, what do I have them read?

What I have decided to do is to write my own book. Now I have written traditional textbooks before. I’ve even gotten some good reviews on them. But for now I wanted something different. I want something short and to the point. Something as a reference or a “catch up” for missed lectures. So not pages worth of step by step hand holding. No pages of summary questions or exercises to assign. Just short explanations of concepts with some sample code to read.

I’m starting with my freshmen class. About a third of a semester is spent on learning some basic Visual Basic programming. We don’t got very deep or cover too many concepts. Variables, if statements, and loops – that’s about it. Including title, table of contents and index I’m at about 45 pages. I think that is about right.  Of and about a third of that is stuff I don’t lecture on because they are not core CS concepts but things students can use in their projects to make them more interesting. That way when I get the usual “Mr. Thompson how do I use a timer?” or “Mr. Thompson I want to use images in my user interface” question I can send them to the book. I have half a semester before I can try it out so I can tune it a bit.

For my honors programming class (we use C# there)  I am shooting for between 75 and 100 pages. That is a full semester and we cover a lot more material. Once again I see this as a backup and not my main teaching tool. I’ve got the topics for the first quarter just about finished so maybe I can use that this semester as well.

Now I am wondering how others use textbooks. It’s not a conversation I hear much about. Maybe I would have learned that if I had gone to school for education and not computer science? One of these days I want to attend a birds of a feather discussion about using textbooks.

Monday, January 08, 2018

How Hard Is That Programming Problem?

A recent blog post by Mark Guzdial (Learning Computer Science is Different than Learning Other STEM Disciplines) has my mind going in a bunch of different directions between the post itself and the comments people are making in  various places. I see a bunch of posts in my near future but I’m going to start with asking the question “How hard are the programming assignments we give students?” and “Do we really know?”

Mark Talks about the “Rainfall Problem” that started with Elliot Soloway. (I link to a couple of papers on the subject below)

Design a program called rainfall that consumes a list of numbers representing daily rainfall amounts as entered by a user. The list may contain the number -999 indicating the end of the data of interest. Produce the average of the non-negative values in the list up to the first -999 (if it shows up). There may be negative numbers other than -999 in the list.

If you are anything like me, your first assumption will be that it is easy. A piece of cake. Surely my students will solve that in no time. And yet the research shows that this is a very difficult problem for first year CS students. How can that be? I’m not sure we really know. Of course I will have to assign it to students first chance I get.

A famous interview question is FIzzBuzz.

Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”.

Apparently that is a difficult problem for a lot of CS students as well (Why Can't Programmers.. Program? and Using FizzBuzz to find developers who grok coding) I assign that to my students and tell them in advance that is is hard. Most of them solve it pretty quickly. Am I a great teacher or do I have exceptional students or is something else at play here? Do we even know? Probably not.

In general I find it difficult to estimate how hard a programming project will be for beginning students. Let’s face it, I’ve been programming for 45 years so anything I am likely to come up with for first year CS students in high school is going to be pretty trivial for me to code. After assigning a project a couple of times one gets a sense of course but the variation between classes can be huge.

So if a problem takes too long or too short to complete who is to blame or credit?

Kathi Fisler from WPI said in a recent Facebook comment “From what I've read as I dig deeper into this, a huge factor in whether novices can solve _any_ programming problem is how closely it connects to problems and code patterns that they have seen before.”

That makes a lot of sense to me. DO my students do well with FizzBuzz because they have seen similar patterns in my class? Maybe because of the way my mind works and because of my experience both programming and teaching programming. If so, that raises a new concern. We can’t teach every possible pattern. We don’t even know every possible pattern. So how will our students do when they are exposed to something outside their experience?

My last set of questions, which I am struggling with today, are we teaching to the problem? In other words, do we teach in specific ways to prepare them for the problems we know we will assign? Is that good or bad? If bad, how do we do better? This teaching computer programming is hard!

Rainfall related academic papers

Monday, January 01, 2018

Computer Science Education Things I'm Watching in 2018

This time of year I like to think about what might happen in the year ahead. 2018 looks to be an interesting year for computer science education. There is a lot of momentum going and we'll see how it continues or not. A few specific things I am interested in though.

Advanced Placement Computer Science - Wow! did AP CS principles take off in 2017. Will that growth continue or was there just a lot of pent up demand? What is APCS P going to do to enrollment in APCS A?  I'm not sure anyone really knows. Chances are that both will see increased enrollment this year. How much is the question. AP CS is driving a lot  in high school CS education. It has credibility (deserved or not - a separate question) and that makes it easy to push into schools passed principals and school boards. In a sense it is a path of least resistance.

K-8 Computer Science Education -  This is the exciting place in CS education. APCS is boring. Sorry but it is. We're teaching high school CS the way we've always taught it. In K-8 we have a lot of people who don't have a lot of history teaching CS. They are teaching something new to them in many cases. They are looking to teach CS more like they teach other courses. Plus they are looking to make teaching and learning CS interesting for themselves and their students. This is where I expect to see teaching innovation. This is where we'll see teachers using robots, micro:bits, Android, and more hardware devices.
I've been following the #CSK8 twitter chat during the last year. There is a lot of excitement and interest in doing fun things in CS education at the lower grade levels. That twitter chat is a must participate event if you are interested in CS in the younger grades. BTW as I write this the next #CSK8 twitter chat is about physical computing and will happen on 3 January 2018 at 5pm PT and 8PM eastern US time.

State Standards - More states are writing state-wide standards all the time. The trickle in 2017 may turn into a flood in 2018. How will that play out I wonder? What will the K-8 standards look like especially. Will the make CS required for all or just offered to all? I suspect different states will take different paths. It's going to be a lot to watch. My home state of New Hampshire is working on standards and I'll be taking part in that effort. I hope all the states continue to involve classroom teachers in this important work.

So what do others think will be the interesting things to watch in 2018 regarding computer science education?