The Hard Part of Computer Science: Algorithmic Thinking

Most students come into a CS class thinking that the real challenge of Computer Science will be learning syntax for a particular programming language.  And while curly braces and semi-colons do indeed sometimes trip people up, the real challenge is creating the algorithm you want to code in the first place.  You can always look up syntax, but constructing the algorithm is where the hard work gets done.

Dawn DuPriest and I are on the same wavelength these last few days.  She, too, is thinking about this problem, and has some good strategies for helping students through.  She’s working with 6th graders.  I’m working with sophomores and juniors and I’m having the same issue.

My CS II students were asked to write a program to encode a message and then write a program to decode a message.  The pattern they were to use was a Caesar cipher (shifting each letter over a few in the alphabet), so that the decoder could more easily be written.  This is a program I thought they could have done in a single class period (1 hour and 15 minutes), but so far, we’ve taken about an hour and a half (end of one class plus all of the next).  I wrote the programs in 4 or 5 lines each in about 15 minutes total.  This is supposed to be review, not new material.

A couple of things come to mind.  I think last year I held their hands too much, helping them come up with code snippets to solve their problems, so they can’t remember, for example, how to loop through a list.  But two, I think they didn’t abstract out from the coding they did do to the algorithmic level.  They’re not really breaking down the problem into parts.

Here’s how I broke it down:

1. Get a string via input.

2. Loop through the string and change each letter according to a set pattern.

3. Save the resulting string.

That’s pretty basic, though that second item can get broken down further, because you have to figure out how, exactly to tell the computer what the pattern is and do the substitution.  I’m not allowing the use of dictionaries/hash tables yet, so that piece is a bit tricky, and there are at least two ways to do it that I thought of off the top of my head, but there are probably infinite ways!

They have a quiz on Wednesday, which is open book, but I think I’m going to add an algorithmic thinking question to it and discuss it with them thoroughly.  They’re not going to make it through object-oriented programming if they can’t break down their problems into parts.  I’ll let you know how it goes.

We’ve already talked about algorithms in CS I, but seeing what’s happening in CS II reminds me that I need to really drive this concept home.  I have changed some things in CS I that I think will work better, including more pair programming.  Dawn found that group work really helped.  Talking through the possible strategies and having a peer steer you correctly can help.  So, we’ll see.

Net Neutrality and other hot topics

This year in CS I, I decided to start each class with a current event article.  We did this last year in my Race and Gender class, and it was a great success.  So far, we’ve discussed the naked photo fiasco, the rumor that Twitter might change its feed to be more like Facebook’s and filter stuff, and today, net neutrality.

We’ve had some great conversations around these issues.  We’ve talked about how hacking happens, from social engineering and brute force attacks to code cracking.  We’ve talked about how algorithms shape what we see on Netflix, Amazon, and Facebook.  And we’ve talked about how networks work.

And that’s just in the first 10 minutes of each class.  I really like placing what we’re doing in context.  We haven’t started any coding yet, but I plan to continue the current event thing, with the students taking over in a couple of weeks.

Saying that CS is everywhere is one thing, showing that it really is, is another!

Where Are the Women?

Once a month or so, back in the early days of blogging, this question would be posed by a male blogger. And then, the female bloggers would respond, um we’re here, you just don’t link to us or include us in your lists. Because many female bloggers were writing about so-called women’s issues–family policy, sexism, parenting, etc.–men just didn’t pay attention. And so women were made invisible in the new economy of blog networks.

I think we’re past that now, mostly, thanks in large part to those female bloggers, who were good writers and who insisted that the issues they cared about we’re important to everyone. It took some work.

MAKE Magazine featured a where are the women story about makerspaces, written by Georgia Guthrie who runs my local makerspace, The Hacktory. I have been to many events at The Hacktory and it has always had a good mix of men and women. She’s done a fantastic job of making the space welcoming.

In the article, she talks about ways that women ar made to feel like they aren’t good at maker activities. Often, they’re deterred by teachers. I got lucky in middle and high school. My teachers would say things like, maybe you should consider being a genetic engineer. And even when I struggled, they assumed I would figure it out, and helped me and never indicated that my struggles meant that I couldn’t do math or science. My trouble began in college, when my science professor scoffed at me taking the real intro rather than the one for non-majors, so I dropped and never took science again, except the one required mom-major class.

As a teacher myself, and a teacher of girls, I am careful about what I say to girls, especially those who struggle, or who say, I’m not good at this. I always compare CS to sports or an instrument. It takes practice. If you’re in a coed environment, there are often other things you have to do. Build girls confidence and call on them when they have the answer. Praise their work. Make sure the boys don’t take over, especially in group projects. Make your classroom inviting. Don’t have posters featuring just men or that mainly represent interests for boys, like first person shooters. Consider varying your assignments to appeal to girls. That war assignment you do might leave girls cold. Try having an art or music assignment, too. Also make sure your assignments don’t emphasize sensitive issues for girls: food, body size, looks, etc. Don’t have a data assignment that requires students to weigh themselves, for example. And consider having your students do some research on the gender gap. Of course, you’ll have to be prepared for a challenging conversation about that. Some boys will insist that the gender gap exists because women are not as good at stem or that they’re not as interested. Bring in an expert if you want.

To be sensitive to gender issues in your classroom means thinking about it and examining it in everything you do. But you can improve the landscape for your female students with some small changes and perhaps gain some new students in the process.

Getting into the groove

I’m getting there . . . sort of.  I teach back-to-back every other day, and I’m working getting a rhythm to that pace.  I start with homeroom, move right into CS I.  I have a weird 15 minute break, then a MS study hall.  Then lunch, then Creative Computing, then another CS I.  Some days, I don’t have that study hall, which means I have about an hour.  This week, that slot is being taken over by meetings.  Bleh.  Tomorrow, I normally don’t have anything in the morning after homeroom, but guess what? I have a meeting.

I will get there.  I will settle into a routine, and it will be smooth sailing.  The classes are rocking.  I’ve had some technical rough spots getting software to install, but the kids are great and I’ve had some great classes so far.  They’re all really lively, and everyone seems eager to learn, so yay!  I’ll have more to say about the teaching tomorrow, but now I need to close up shop.

First Day Impressions

Yesterday was our first day of classes.  It was great to have the students back, even though we had a weird schedule so we just had time for administrative stuff.  I have 3 CS classes in Upper School:  2 sections of Intro with a total of 29 students (I think; people keep adding and dropping), 1 CS II with 7 students and an 8th Grade elective with 7  students.  I lost a couple in the elective over the last couple of days.  No friends in the class.  Yay Middle School.

My CS II students were talking about how hard CS I was, especially the midterm exam.  They now want to make t-shirts that say “I survived the CS I exam” both for themselves and to sell to the CS I students.  I really didn’t think it was that hard.   It’s kind of cute that they think they survived.  Given that, I’m surprised by how many signed up.  Still, I took the feedback to heart and over the summer, I added some more assessments and readings to make sure they’re prepared.

The 8th Grade Elective is going to be interesting.  I’m trying to make it a “maker” like class with a heavy dose of CS.  I have some things planned, but I want to leave some room for them to plan some things.  There’s also a few ideas I have in mind that I don’t exactly know how to do yet, so there’s some things that I’ll be learning along with the kids, which I’m kind of used to.  But the class, despite only having 7 kids is going to be a challenge to wrangle.  They’re all pretty high energy and their interests are all over the map.  I’m hoping once we get started working on things, that energy will be channelled productively.

I think it’s going to be a great year!  I’m looking forward to seeing how the new things I’ve added go, and more importantly, seeing what the students come up with.

How to Assess “Computational Thinking”?

Assessment is one of the hardest things teachers do.  Yes, sometimes we can grade tests and there are right and wrong answers, but often, we’re trying to assess and provide feedback on how a student thinks.  Or we’re assessing the process of how they got from point A to point B.  I like how Dawn address this issue in this post, using a pre-assessment as a starting point.

Standards-based grading helps here a lot, giving some good language for the students to understand where they are: you don’t know this at all, you’re learning, you’ve almost mastered it, you’re a ninja (to simplify).   After going through her papers and assessing them, she came up with a list of things the students need to understand.  She looked at their misconceptions closely and determined what exactly they were.  Such a great idea!  Here are here conclusions:

Some common misconceptions I ran into that I’ll need to watch as we go through the unit:

- Not understanding that one block = one instruction
– Not knowing what variables represent or keeping track of more than one variable
– Changing variables, assigning variables, substituting values in place of variables
– Not understanding what a Repeat block does
– Not understanding “if” and especially nested “if” statements
– Not seeing that instructions are run one at a time, starting at the beginning and following an order of execution
– Not understanding that the instructions inside a Repeat loop can do something different each time depending on values of variables and conditional statements
– Thinking of the narrative of a game instead of rules that are followed

All of the above things are things most of us teaching CS see quite often, but it’s nice to see it in a list like this.  When I go over quizzes and tests, I sometimes make lists like this, of things that hung people up.

More importantly, Dawn addresses the thinking and learning strategies that have gone awry:

- Not actually reading the prompt on an assessment
– Not answering all parts of a question
– Being sad about not understanding a pre-assessment
– Not writing in complete thoughts, let alone complete sentences
– Getting lost and giving up and lacking strategies to understand the text

The one about being sad and the one about getting lost really get to me.   Those are the things that sometimes stop kids in their tracks and keep them from learning the material even when they are capable of doing so.  In Computer Science (and in other STEM fields), that feeling of being lost or sad (after a test or other assessment) often drives people away, especially women, who are more likely to blame themselves rather than appreciate that there’s a learning curve and that they’re at the beginning.

I’m looking forward to seeing more from Dawn on her assessment strategies.   It’s something I think about and work on all the time, especially those thinking pieces.

 

More on habits

A while back, I posted about trying to establish some new habits.  It’s a work in progress.  It’s difficult to establish habits when you’re not yet into a routine.  Our routine really won’t begin until Wednesday.  Today is a weird administrative day for passing out schedules, getting pictures taken, etc., so it’s not normal.  So, I’m taking it a day at a time, which is what I think I’m just going to have to do.  I never know when I’m going to need to stay late for a meeting or to help a student.  Geeky Girl sometimes wants to do things with friends after school and I’ll just wait for her.  Days just don’t always go as planned.  Over the last couple of weeks, I have managed to keep a few habits that have helped me keep the house a little neater.  I’ve been putting things away rather than to leave them sitting and then have a pile to deal with days (or weeks) later: dishes, clothes, shoes.  Whenever I notice something isn’t where it’s supposed to be, I take it where it needs to go.  So far, I’ve been good about this.  I might miss a day, but never two.

Mr. Geeky and I also started finishing up some long neglected house projects.  We put up the drywall in the bathroom and I spackled the front porch to prep for painting (it’s been naked drywall for about 5 years).  I think we both feel better about keeping things neat when the rooms under the clutter look good.  Speaking of which, we still have a lot of clutter to get rid of, but we’re working on it.

Fitting in exercise is still a challenge.  My fitbit shows my walking activity to be all over the map.  I’d say I’m averaging between 5 and 6K steps per day, far below the 10k recommendation/goal.  I know myself well enough to know that trying to get in an extra walk in the morning isn’t going to work.  I only give myself about an hour to get ready and get out the door.  Squeezing in a 1/2 hour walk isn’t going to happen.  And there’s no getting me out of bed any earlier.  If work started at 9, that’d be one thing, but I start at 8.  I’m planning to walk in the afternoon/evening, bringing clothes to work every day, so that I can go from work if I want.  I’m just really good at talking myself out of taking a long walk.  It’s too hot, too cold, raining, not enough time, etc.  Those are the things I really need to overcome.

Once school really starts, I think there will be other things I want to do, so I’m sure I’ll revisit this issue again.  I keep trying.  At some point, I’ll succeed.

I’m not new anymore

I’m headed into my fifth year at my job.  For the first time during this week of opening meetings and training sessions, I don’t feel new.  I’m not sure why, though I have a working theory.  I think this year we reached a tipping point where there are as many people who are newer to the school than I am as there are those that have been here longer.  Newer people ask me questions about things in ways that they didn’t before.  And I actually have answers.  I know the history of some stuff and can explain it.  On the other hand, a lot of the legacy things (especially in the technology area) that I was dealing with have been replaced with systems I’ve put into place.  The program I was hired to build is now nearly fully formed and thriving.  Advisors, college counselors and division directors now recommend my courses rather than having no idea about their existence.   4 years ago when I offered my first intro to CS course, I had 7 students.  They’ve all now graduated.  My Intro course this year has 29 students in it (I gained another yesterday!).  My upper level courses have a total of about 25 students in them.  Students want to take my courses, which is super cool.    And this year, the 8th graders I started with as an advisor and teacher will graduate.  This graduating class will be the first class where I know almost everyone and had almost everyone as a student.

But there are still things that are new.  I have new department members, with an actual department.  Woo hoo.  We have a new middle school program.  I have two new classes to teach this year.  I’m planning to add another new class next year.  And even in my “old” classes, I’ve changed things up and brought in new things.

And I still love the job as if it were new.  I’m someone who thrives on change.  I almost think you have to in order to be in my field.  Even if the only change is fresh new faces in the classroom, I need something to be different every year.  I’m looking forward to facing this year as someone who’s “been there done that” but who still hasn’t seen it all!

10100

Today is our 20th anniversary.  It’s hard to believe.  I don’t feel like someone who’s been married for 20 years.  We’ll do a little celebrating tonight and more this weekend.  But we’re kind of practical about the whole thing, what with school being right around the corner.  I’ve written about our anniversary almost every year since I started this blog over 9 years ago.  Here are some of those posts:

It’s been fun.  Here’s to 20 more!

 

Putting Together a Course

I’ve been building classes and syllabi for over 20 years. Which is kind of freaky. I still feel new to it somehow. I think because I challenge myself to do it better every year. Putting classes together is hard work. I was explaining this to a non teacher the other day. One thing I said was that often it takes 2 hours to plan an hour long class. Which is sometimes true though thankfully not always. I thought I’d share my process and get others to share. I’m curious about the many different ways of thinking through building a course.

I begin, usually, by thinking about the end. Where to I want students to get? I often think about a capstone project an what they should be able to accomplish by the end of the course. Then I think about how to get there. I think about themes or topics and what order to go in.

Here’s an example. I’m still thinking through my 8th grade elective. It’s a CS/maker course and I want my students to be able to create a complex project that involves something physical like a robot or lights or any object and something digital like a program that drives the physical or that he physical drives the digital. So I’m thinking of themes like this: digital design, physical design, from digital to physical (programming an object), from physical to digital (using sensor data). There are sub themes in there like interface design and working with data.

From the themes, I start to develop discrete assignments and projects. In the 8th grade class, I begin with web design, then do game design. Well do two games, one in scratch and one in JavaScript. They’ll learn HTML and CSS and about how web servers work. I’m thinking 4-6 weeks for the first theme, though I haven’t mapped it out yet.

And that’s what I do next. I start deciding what exactly we’ll do each day. Will we need to read something before class? What activities will we do? How much explanation will I need to give and what supporting materials will I need to have on hand? I try to map as much of this out ahead of time as I can, but sometimes I’m planning these single class periods the day before. And sometimes things change. Projects take longer or shorter than I thought. A snow day hits. The students really want to learn X. And so I adapt.

Adapting is key. Though I always have a plan, I always try to gage where my students are and where they want to go and adjust accordingly. I want them to have a sense of where I think we might go but I try to make it clear that it’s their journey and they have some say over how we get there.

How do you plan? And how flexible are you?