Friday, February 23, 2018

Accessibility and Computer Science

I’ve been following, as much as one can, the SIGCSE conference via Twitter this week. One of the comments I read talked about how many places don’t teach accessibility because they don’t see it as part of computer science. I can see that – sort of. On the other hand, accessibility is really an important part of human computer interaction and few fail to see that as an important part of computer science. Human-Computer Interaction is one of the 18 Knowledge Areas discussed in the CS 2013 Final Report

These days are we increasingly recognize diversity as important in teaching computer science I think it is important to realize that accessibility is essential for improving diversity in all areas. That means it should be included in any discussion of Human-Computer Interaction.

Speaking of HCI, the video below is a fun and useful look into what HCI and good design means. It was shown at SIGCSE by Tim Bell of Computer Science Unplugged.

Thursday, February 22, 2018

Modeling Good Coding Practice

Facebook showed me this cartoon this morning.

Programming alone

Teaching computer science means you are often programming while someone watches. I confess that I have been known to write something “quick and dirty” but that is not really an option for anything that students might ever see. Or really anyone else might see. “Do as I say not as I do” really doesn’t work for anything.

Generally I’m pretty careful about how I write code while I am doing a demo or creating a scaffold project for students. It requires a few extra minutes but I think it is important to model good practices. I think I have to make a point of explaining why I am taking those extra steps as they are not obvious to beginners.

Sure it seems unnecessary to rename a label box when there is only one label box on the form. Or to change the text property of the form. Or any one of a number of things that appear to be cosmetic and that don’t keep the program from working. But habits are important.

I remember once asking my father why we had to have perfect table manners at home where no one could see us. My father explained that by developing the good habits at home we would be less likely to mess up in public. It’s a lesson that stayed with me. It is why,even in the small simple code, using good coding practice is important. That way you don’t have to think about it when the coding gets public.

Wednesday, February 21, 2018

Open Letter to People at #SIGCSE2018

The Annual SIGCSE Technical Symposium is taking place in Baltimore this week.  Some of the best minds in computer science education are sharing ideas in sessions, panels, birds of a feather, and hallway conversations. At the same time most of the people who really need that information – classroom teachers, adjunct faculty, and others teaching computer science – are not there to hear it. It’s reality. We can’t all be there. We are starving to hear about what people learn at SIGCSE though.
Now some of us who are members of ACM and SIGCSE will get the papers later but that only goes so far. My request to the people at SIGCSE is that they find ways to share some of the things that don’t make it into the printed papers. Things like the keynotes. What an amazing lineup of keynotes this year it is too!

And the birds of a feather and the hallway conversations and the rest of the stuff that is just so hard to capture.

How should you do it? Well lots of ways. For one thing live tweet the event. Use the official hashtag - #SIGCSE2018. There are people at home watching. We may even ask you questions.

Share things on Facebook. There are a couple of good groups there that would probably welcome SIGCSE posts. I can think of Computer Science Education: Researchers & Practitioners and Computer Science Educators as examples. Or post them as public on your own account so people can share them.

For another write posts on your blog. Don’t have a blog? I tell you what – I will post guest posts from SIGCSE attendees here on my blog. Send them to me at with your attribution information and I’ll post as many as come in.

Consider offering to talk about SIGCSE at a future local CSTA chapter meeting. You’re probably going to share information at your home institution but there are lots of others who would love to hear about what you learned at SIGCSE.

Programming Patterns For Beginners

Ever since I read those papers on the Rainfall program (How Hard Is That Programming Problem?)  I’ve been thinking about patterns in problem solving and programming. There are many of these types of patterns in programming but most of us learn them through experience.

The Rainfall problem is one example. It’s basically a counting and totaling loop that handles exceptions. Anyone who has done one of those (or maybe two if they are like me) probably sees that pattern as soon as they read or hear the problem statement. It’s new to beginners though.

One of my favorite patterns (much more complicated for beginners to see) has to do with avoiding special cases for boundary conditions. Take for example the lights out project (Taking Things To Another Level ) it involves checking the squares above, below, to the left, and to the right of a box in a 5 by 5 grid. Beginners tend to see that as calling for special cases for the corners and edges. Experienced programmers create an invisible row above and below and an invisible column to the left and right of the visible grid which allows all boxes to be checked the same way. It’s a pattern many of us have seen before.

After a while I think most of us don’t even consciously think “oh that is a pattern I have seen before” but we just go with it. Of course there are far too many patterns to teach all of them in a single semester (or single life time I suspect.)

lately I have been asking myself “what are the most common patterns I can think of and how to I create projects to give students experience with them?” And more than that, how can I get them to recognize those patterns in the future? I can’t assign enough projects so I think we’ll be reading some code. Maybe playing with Parsons Problems. But definitely I need to have students read more code.

Do you teach patters explicitly or just implicitly? What patterns do you see as most important for beginners to learn?

Friday, February 16, 2018

Self Driving Everything

Nissan put together this cute little video that starts with self driving slippers and moves on to self driving pillows and chairs and, well, watch it.

What's next? That is the question I would ask students - what else should be self driving? And why?

Thursday, February 15, 2018

Jumanji and the While Loop

Cultural references (term used loosely) can make projects and exercises more interesting for students. Now that there is an updated version of the movie Jumanji out I decided to use that reference again for working with while loops.

If you remember the movie, you will probably remember that people playing the game can be forced to wait in the jungle until another player rolls a 5 or an 8. There are several ways you can use this in an exercise. You can “roll” dice once and use an if statement to report if the person can leave the jungle or not. OK but boring. Or you can simulate rolls to see how many “moves” it takes to get someone out of the jungle. That’s what we did.

There are several things I like about this exercise. We start by asking if the loop should check at the top or the bottom. Of course you can write it either way but the discussion is the valuable part.

Next we take on how the Boolean expression is formed. Finally we talk about the code inside the loop. One die with a range of 1 to 12 or two die with a range of 1 to 6? Which one better simulates real game play and why? Finally we talk about how to do the counting inside the loop.


All in all I find it a helpful exercise. As a demo it is simple enough to show the basics but involved enough to have some good conversations about how and why we do things different ways. And it is relatable to things outside of school.

Tuesday, February 13, 2018

Quotes About Programming and Computer Science

While looking for a quote that was mostly remembered except for who to credit with it I found a couple of fun sites with quote collections in them. Some of these I already share with students. I think I may print out some more of these quotes for my bulletin board.

This first site is a single (longish) page with some of the best. One of my favorites is:

When debugging, novices insert corrective code; experts remove defective code. ~Richard Pattis


This next list is collected by Rich Pattis who is very quotable himself as you can see above. His list covers more than just programming. I love this one:

Those who know, do. Those who understand, teach. - Aristotle


This next one shows you a quote of the day and has a long list of sources in a menu on the side of the page. Lots of great people to check out. I like this quote by Bill Gates:

"Measuring programming progress by lines of code is like measuring aircraft building progress by weight."
- Bill Gates
Read more: Gates#ixzz570txjSqE


This one has two pages of quotes. Some are more interesting than others to me but I did like this one:

“That's the thing about people who think they hate computers. What they really hate is lousy programmers.”
Larry Niven


Do you have a favorite source for computer science quotes? Or a favorite quote that you don’t find on one of these lists?

Monday, February 12, 2018

Teaching Diversity in Computing

One of the important topics in computing these days is diversity. Why? Well there are things like concern about equal opportunity. (Why Can’t Silicon Valley Solve Its Diversity Problem?) and that is part of it. It’s often hard to make people understand why that lack of diversity is a problem. People are only starting to understand how bias creeps into software. It creeps in because we all have biases – some more subtle than others. And that influences how we write software.

Here are a couple of issues that have come up based on race for example.

It should be obvious that something like facial recognition should be tested with a wide variety of people with different faces and skin tones. Right? Well apparently it is not so obvious.

Some early color computer monitors used a mix of red and blue colored letters. This is actually a problem because there are a surprising number of people with red/blue color blindness. No one on the design team had the problem of course so it slipped by until the product was released.

There is a story, I haven’t been able to verify it but it is a good example, that early models of the Apple Newton had a very good handwriting reader. Well until they handed it to a left handed person and it could not read their handwriting.

I’ve been talking about testing and debugging with my students lately. It seems like a logical place to talk about algorithmic bias and the need for testing with a diverse population. We talk about how different viewpoints also contribute to more and different ways of looking at problems.

I feel like this is an important topic to cover. Having a more diverse population in computing is clearly an issue of fairness and that is enough of a reason to promote it. But I don’t think it hurts to point out that diversity also results in better software which benefits all of us. If we don’t explain this and teach it than I don’t think all of our students will understand this on their own. Some will of course but it is too important a topic to leave to chance.

ajllogo_wetnmgBTW there is a regular Twitter chat on ethics and computing using the #EthicalCS hashtag. Highly recommended.

For more on the topic of bias in algorithms you  may want to visit the Algorithmic Justice League.