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?

Friday, December 22, 2017

Looking Back on Computer Science Education in 2017

Time to look back on the past year I think. I wrote a post in January about what I was watching (Computer Science Education Things I’m Watching in 2017) so I think a wrap up is called  for. So what was I watching and what did I see?

Computer Science for Everyone – I think we’ve seen a lot of progress here. States continue to write standards and develop plans for teacher certification. My own home state of New Hampshire had certification requirements approved for example. Now we’re working on K-12 standards. We’re ahead of some states and behind others. I think we’ll all be looking at the leading edge states going forward. There is still some discussion over if “for all” means it is offered to all of if it means everyone has to take it. We’ll see that continue to shake out this coming year I think.

Advanced Placement Computer Science Principles – I think the number of students who took this last May surprised a lot of people. I know it was even more than I expected. I have been teaching it this fall (I’m using the curriculum but there are other excellent ones available). My students seem to be enjoying the course and learning a lot. While I am curious to see how they do on the exam I am more curious to see what they think of the course a couple of years down the line. That is the real judge of a course in my opinion.

Enrolment in APCS A is down in my school but I am not sure if that is a result of the APCS P course (some of my APCS P students already took APCS A) or some other factor. This is something else to watch going forward.

Expanding CS Education Before High School – The #CSk8 twitter chat continues growing by leaps and bounds. My feeling is that we saw a lot more K-8 CS people at the CSTA conference this past summer as well. I think in some regards we’ve seeing faster growth here than we are at the high school level though I don’t have actual data. and organizations affiliated with the CS for All Consortium have done a lot of training.  The CS for All Consortium says they have worked with 5% of all the schools in the country. That is huge for year one.

Making and CS – I haven’t seen as much here as I had hoped. Where I do see it most is in K-8 though. I think that makes sense as K-8 CS curriculum is starting from a much smaller base and has a lot less inertia from existing CS curriculum to work around. Plus younger students are used to making things in school.

There are some curriculum resources using making but they tend to cover the range of grades 6 through 9 (or maybe 10). That’s good as far as it goes but I’d really like to see an advanced CS course involving the Internet of Things or serious making that is different from robotics. The AP courses may be more of a barrier than a help there though.

What Else? Looking back I see that government interest in CS education continues to grow. Even the Trump administration seems in favor of it. They may not be pushing it as hard as the Obama administration but they are doing more than just not getting in the way. Real progress requires work at the state and local levels and that support seems as strong as ever.

What were the highs and lows of computer science education that you observed in 2017? And what should I be watching in 2018? That blog post comes out after the first of the year.

Monday, December 18, 2017

What Do You Do Besides Write Code?

A bunch of years ago I read an op-ed piece in one of the news magazines. I forget the one but the piece itself has stuck with me for years. The Op-ed was written by a guy who was critical of software people. He was in construction and built things. And on the weekend he built more things. Software people just wrote code and didn’t, in his view, do useful things with their free time. At least they didn’t do construction type things on their own houses.

My first reaction was, clearly he wasn’t watching me as I built a large deck for my house or any of the other projects I’d done around the house. He clearly didn’t know my friend Philip who is building his own house. Yes, with his own hands. The man is an amazing carpenter who is also quite the software person. And he doesn’t know my friend Clint whose projects over the years have amazed with with their creativity and complicated construction. Or many of the others I know who build things with their hands and make their homes or cars truly their own.

My second thought was, the man wants me to be impressed that he does the something on weekends as he does for work? That’s crazy. He should be doing something else to stretch himself. If he really wanted to impress me he should tell me about the code he writes in his down time. People need something other than what they do for a living to keep them really grounded.

An article in Medium (“Every Computer Scientist Should Have A Creative Hobby” by Yash Tulsiani ) got me thinking about this again today.

Generally the best technical people, especially computer science people, I have known have had some sort of other creative outlet. Some music, some wood working (amazing how many CS people love power tools), and some write fiction. A bunch of them are seriously into photography.  

Computing used to be something that stayed locked into environment controlled glass rooms that people might be able to see into but not interact with. The opposite is true today. While once upon a time you could get away with esoteric and complex user interfaces or boring simple ones – card readers anyone? Today we talk to our computers and expect them to talk back. Today we want it all to be easy – swipe left, swipe right, swipe down.

Today computer science is never in isolation Today it’s “computer science and …” where the “and” is anything and everything. People who can’t see past the computer and not very useful. People who are not creative and innovative are not the idea computer scientist today.

One of the things that creative hobbies have in common with computing is that they force one to look at things. To look closely at times, to look from far away at other times, and generally to look differently. A person who only has code as a tool and programming as a way of looking at problems is as bad as the carpenter who only has a hammer and sees all problems as nails.

As a teacher I occasionally see students who get totally immersed in one thing. It may be sports, it may be their music or art, sometimes it is computing, sometimes it is in some other academic subject. What ever it is I worry that they lose sight of the big picture. That can be a fatal trap in a future where most people will have multiple careers.

So you can code? Great! What other creative outlets do you enjoy?

Tuesday, December 05, 2017

Some Thoughts on Drag and Drop Block Programming

I’ve toyed with drag and drop or block based programming for a bunch of years now. I even keep a list of block programming platforms. But this year I am really using them a lot with students. It’s been a real learning experience for me and my students. I’m using AppInventor with my mobile application programming students and’s AppLab with my APCS Principles students. Now the AP class is using AppLab with JavaScript now but we started with the blocks and the interface is still very much drag and drop related.

I’m thinking about this in two ways. One as for my own projects and one as a teaching tool. I’m old school – started programming with punch cards and FORTRAN – so I confess that I am still most comfortable doing my own programming in traditional languages (mostly in C# these days with some Visual basic depending on my mood0. For for students things are different.

First the good. In many ways my mobile apps students are doing more advanced things than my Honors Programming students (C# there). For example connecting to Amazon’s API is a snap in AppInventor. Setting up things like nested code is also very easy. Syntax problems are pretty much not an issue. So we are covering a lot of concepts. That’s all great. I wonder how it will translate for learning text based languages. My AP students all have previous (to applab) experience with text based languages so they are not a control group for me.

One the down side, debugging block based code is different for me. I’m used to traditional debuggers and I haven’t figured out how (or if) that can be done in AppInventor. So of course I go old school with taking code out or adding messages in different places. Error messages in AppInventor are an area where I am facing a learning curve. The idiom is different and I’m teaching myself so it can be slow at times. Next time I teach this it will be better though as my students are showing me a lot of bugs learning opportunities. Still I have had the AppInventor emulator crash with no usable error message and that is a problem. I want to see if I can get some cheap devices to use next year. I think that will make some things better.

UI formatting is an other area I am struggling with. I think this is both a lack of experience and practice with the tool combined with different limitations on a mobile device screen. I am less than happy with my UI for my Windows Phone app which I wrote in C# and Visual Studio which suggests I need help with small screen UI design anyway.

In any case the students in my mobile app class are learning a lot (I think) and enjoying the course (I think) which are good indicators of success. I’m pretty happy with that. I’ll use AppInventor for future sections of Mobile App Programming.

I still feel like blocks are best for small apps and for beginners. Yes, I know people make some pretty sophisticated programs with them but I struggle to wrap my head about that being as easy as text based languages. Maybe 45 years of experience writing text based code is a learning disability for me. Or maybe I just need the right teacher? I’m taking blame here and trying not to blame the tools.

Today block programming languages seem to be mostly designed as teaching tools and they are good at that. I think a lot more has to be done to really make them usable as general purpose languages for more complicated large projects. I do think they can get there even if the path isn’t obvious to me.

Thursday, November 30, 2017

CS Educator Interview: Sheena Vaidyanathan

Sheena is a wonderful innovative teacher who I have know for several years. We also served on the CSTA Board together. She works across grad levels (K-8) at a school district in California. She’s doing some very cool things. I am so grateful that she agreed to do this interview. I think you’ll find it interesting.


I teach in the Los Altos School District, in the San Francisco Bay Area, California. It is a K-8 public school district with approximately 4500 students.  We have seven elementary schools that are K-6, and two Jr High schools (grades 7 and 8).


My background is in computer science. After working for several years in Silicon Valley,  I decided to take a break and go to college to learn art.  During that time, I had an opportunity to volunteer in the local art docent program, and  discovered I loved teaching. I became the art teacher for one of the schools in the district and along with watercolor, clay etc, I showed the kids how to create on the computer . When the art teacher position went away, my administrator suggested I teach those digital art lessons across the district. I used Scratch programming as a tool for  the art program in the district in 2009, just a couple of years after Scratch was launched. Later this digital art class was converted into a CS program for sixth graders, and then expanded to all other grades. Today, every child in the district learns computer science.


Currently I am the computer science integration specialist for the district. This means that besides teaching I work on curriculum, PD and integration across the district. Every one of our seven elementary schools has a STEM teacher and this teacher integrates computer science in K-5 STEM lessons. I work with this STEM team, introducing new tools, and doing PD when needed. The sixth graders have the same required CS program that I started, and it includes units in Scratch, JavaScript/Processing, and Arduino. I currently teach this 6th grade program in one of the schools.  I also teach a Python based CS elective in 7th and 8 grade at both Jr High schools. I also work with the 7th and 8th grade Science teachers to integrate CS into the Science classes.   See more details on our CS programs at


If I had to pick one overall philosophy, it would be ‘CREATIVITY’.  My CS program was created from an art program, where the focus was on creating something that was personally relevant and where programming was just one more medium to express your creativity.  I use mini projects to teach specific content, with challenges to differentiate instruction, and with as much flexibility as possible. The focus is to get students to work passionately on projects they care about.


Differentiation. After teaching CS for several years ,we now have students  at widely different levels in our classes and we must differentiate in many ways to make sure we keep all students engaged. After taking the required CS classes at our schools, some students continue to work on coding projects at home, and even enroll in summer camps/clubs and more, while others have only done what is done in class (or have forgotten it!) . In our classes today, we work continuously on the challenge of  creating a comfortable environment where each student can move at their pace. 


Our administrators are very supportive of the programs. In 2009, when very few public schools were doing any CS (there was no or much advocacy material 8 years back!), the Los Altos school administration showed that they were early adopters and innovative . They launched a district wide computer science program because they believed in the idea that this would encourage creativity and help students see computers in a different way. At every step during the last 8+ years, they have encouraged computer science in our district. We are constrained by the number of dedicated teachers available to teach CS, else we would have moved even faster than where we are today.


Success is measured by just one factor - ‘Do they want to do more?’. The answer is yes for all grades. The K-5 students love STEM time and welcome any open coding time. The sixth graders often tell us it is their favorite class and at their end of year showcase, we have a packed room of students showing their final projects. Our 7th/8th grade CS elective is over subscribed. Kids are using code in other classes on their own. A Chemistry or English teacher for example will sometime sends me a Scratch or Python project that was submitted to show learning in their class. Our students are not afraid of coding, and are always ready to learn more. 


Students are curious, creative and eager to learn.  It is so much fun watching them discover the magic of coding. Hearing that shout of joy, when a student fixes a bug can keep you going for hours even when you are tired.  Computer science education is moving at a fast pace, and I am always learning new ideas, experimenting with new tools and looking for ways to improve our CS programs.


See also Computer Science Educator Interview Series Index (2017) for other CS educator interviews.

Tuesday, November 28, 2017

How (Some) Schools Sabotage Computer Science Education

There are many problems getting more computer science into schools. There is a shortage of teachers. There is a problem with room in the schedule. I could go on but there are also problems for schools who have computer science programs caused by people inside the schools. And I keep hearing about them.

Problem number one seems to be the people who manage the school networks. Now you might think these people would be natural allies of computer science programs and you’d be right in some cases. In far to many though your would be wrong. A lot of school network managers have priorities that can run counter to those of teachers. Not just computer science teachers mind you but they can hit computer science teachers especially hard.

There is always a trade off between keeping a network secure and keeping it easy to uses. Finding the right balance is key though. One of the biggest issues I keep hearing about is technology decisions that don’t involve the teachers who will be using the technology. For example lately I have been hearing a lot of teachers complain that their PCs are going away to be replaced by Chromebooks. Now one can do a lot with Chromebooks. One can even teach computer science with them. More or less. But telling a computer science teacher that they are losing the tools they have used for years and asking them to figure things out on their own is not fair.

Far to many hardware decisions are made in schools based on cost and ease of system management without considering the impact of teaching.

Sometimes decisions are made that actively prohibit teaching some things. IT people block useful websites. IT people refuse to allow some software to be installed. All this with the goal of locking down the systems and making them easy to manage.

And then there are administrators who don’t seem to understand the needs of computer science courses. I recently heard from a teacher who was told they were losing their computer lab for two weeks so the school could do testing. What? Teach computers without computers? OK sure there are many CS concepts you can teach without computers. CS Unplugged is a wonderful resource for that. But to have that decision made for you one short notice – for and advanced placement course? Can you imagine?

Picture the music department told they would have to teach music without instruments for two weeks? Or the art department being told to teach without art supplies?

It’s hard to get too upset with the principal here though. They are in a hard spot and need the computers to do the standardized testing that people who know nothing about education insist that they administer. On the other hand since it is unlikely that these tests come as a surprise to the principal they should at least let the teacher know long enough in advance so that they can properly plan. But they don’t understand what it is like teaching computer science. How could they if they never even took computer science as a student?

We really do need more educators to understand computer science better.

BTW my school has an administration who absolutely do understand enough about CS to bring the department in on decisions that impact them. And our IT people put students and teachers first and do all they can to make teaching easier for us. Faculty has lots of input on new devices. We do it right. I just wish every CS teacher had the support we do.