Thursday, June 22, 2017

Student Programmer Fix This Code

Recently I came across this cartoon and shared it on Facebook.


Responses were interesting. The newer one was to programming the more likely people seemed to be to explain why the if statement wasn’t working correctly. The more experienced one was the more likely they were to point out that you probably shouldn’t have written that code (an option to kill humans) in the first place. There is some validity in both responses of course.

In teaching we often create code that is less than ideal to force a particular observation of a concept if less code. How often do we explain that to students? And how well does it take? I’m not sure but it does concern me.

Returning to asking students to debug code. I like the idea and it is something I want to do more of in the future. The problem comes when students don’t have enough experience yet to find the less obvious errors. On the other hand how will they get experience if we don’t let (make?) them practice debugging? Most debugging practice students get is on their own code. Often they are too close to it to see what is wrong.

Last semester I gave students code written by other students and asked them to test it. Most of the code worked as advertised and what students reported out was missing functionality rather than “broken” code. Maybe I need to write some broken code of my own and have students look at it?

How are you helping students learn to debug code? Any ideas to share please leave them in the comments.

BTW there is some discussion if asking students to debug code is better than asking them to write code on the new CS Educators Stack Exchange. You may want to join in there as well.

Wednesday, June 21, 2017

Become A Computer Science Teacher in Five Days

Garth Flint is a computer science teacher in Montana. While most computer science teachers are a bit isolated, most are the only CS teacher in their school. Garth is more so because Montana is a big state with a small population and few computer science t3eachers. Recently he attended a workshop to teach CS teachers. He wrote a review of the experience - A week of in-service: Another Python course

Some of the teachers had no previous computer science background let alone experience teaching computer science. They were mostly told to teach a course in the fall and figure it out.

Only a couple of us had actually done any CS/programming teaching.     It was a bit interesting talking to the teachers that had been give the directive to offer a programming course at their school.  It was a “come up with something” type of directive

I hear this a lot. You know a good teacher can teach any subject with a little prep time. Well no they cannot. Can you imagine asking an English teacher who spoke no French to teach a French course after a one week PD even at a local college? I don’t think so. Why is it less crazy to do the same for computer science?

As Garth points out in his post, teaching (and learning) programming syntax is the easy part but there is a lot more to teaching computer science than programming language syntax. One doesn’t just learn syntax rules and some vocabulary and suddenly speak French. No, there is idiom involved in a new natural language and that is no less true of computer science.

A week long course can give a CS teacher enough to get ready to teach a new programming language or a new curriculum. What it can’t do is really get you seriously into computational thinking or go deeply into the how to teach or why things are done they way they are. There is just no time.

The best professional development for teachers new to the subject are more involved (and longer) than 5 days. They involve pre-workshop work, post workshop work and ideally the workshop[ is longer than a week.  Even then things are going to be pretty tough that first year (or three). What worries me the most about assuming enough can be learned in a week is a) students will get turned off b) students will have to be retaught later (if we can get them in class again) and c) that teachers will get frustrated and quit before they get good at it.

There are many who believe that it is easier to teach a teacher to teach CS than to teach a CS person how to teach. Please do not mistake me for one of those people.

Tuesday, June 20, 2017

Movies for Computer Science Students

Today was watch movie day. I watched two movies that I have been thinking about showing to my computer science students.

The first one I watched was "The Imitation Game" about Alan Turing. Frankly I didn't like it. I like it even less for showing to my students. Why? Because I don't think students will identify with Turing. He is just to weird. Make no mistake I think Turing was an amazing individual and there are lessons in his story. But, well, it just didn't inspire me to want to do things.

The second movie was "Hidden Figures." This one I loved. Even though few of my students are females of color these women are real and normal in ways that Turing wasn't. They had children, families, and were concerned about others. They had things to overcome and fought to overcome them. That is a message that resonates. I think my students will see people to aspire to be like in this movie.

My experience is that students who see stories like "Hidden Figures" see the injustices against both women and minorities. They understand how wrong that treatment was and is. Sure there were horrible injustices against Turing and his death was a tragedy. But his personality, at least in the movie, is not one to make people feel as sympathetic as the women in "Hidden Figures." And the women won! And in their winning they opened the doors for many others.

So what other movies should I think about showing my computer science students?”

Micro:bit Small-board Computer Launches in U.S. & Canada

The Micro:bit (nee BBC Micro:bit) is now available in the US and Canada. This little device has been in classrooms in the United Kingdom for about a year and a half but is only now become commonly available in the US and Canada. Now at first glance this may not seem like a bit deal. It is a little device that must be connected to a larger computer to program. Seems like an extra step.

Microbit%20render%202%20no%20background But it is a big deal and it is more than just a little device. In a word, the thing that makes the Micro:bit interesting is “Making.”   This little device is easily included in little projects that can really interest students. Just programming the device on its own might get boring quickly. It was for me. But including it in a maker space sort of project is a game changer.

Now you’re asking for resources. The device is programmable in a number of languages and tools from Scratch to Python and JavaScript. There is a 14 week curriculum developed for students by Microsoft. Project Lead the Way also has a curriculum. Both are designed around making things that include the Micro:bit.

The Micro:Bit web site has a bunch of project ideas if you are looking for what others are doing. This could be fun!

Wednesday, June 14, 2017

How To Teach Computer Science

I always read articles like this one - The 5 Worst Ways to Teach Computer Science – with some trepidation. I always expect to find out that I’m doing it all wrong. The other thing that always concerns me is that the author will be all wrong. Everyone who knows how to code thinks they are an expert in teaching computer science. Many of them are wrong. But this article is a good one. (In other words it mostly talks about doing things the way I already do them.) I think to most experienced CS teachers it is review. I think it is written for teachers who are new to teaching CS though and it fits that role well.

I do think there is a place for individual projects though. Not every project needs to be or even should be a group or team project. So the second thing that article did was get me thinking about good practices.

One of the worst ways to teach computer science that the article doesn’t talk about is Do Everything On The Computer. I am seeing that that can be a real problem. My teaching focus is always concepts first and while after 40 years of writing code a lot of things on the computer seem obvious to me. Not so the “digital natives” I am teaching. Many of them separate real life from what is going on in the computer.

We think they see them as the same because of the social aspects of computer use we observe but I don’t think that is really the case. Young people see the communication aspect of using computers as somewhat parallel to their real life but that is much different from most computer science concepts.
Take counters and accumulators for example. They don’t think in terms of those computer science type words even though they use both in their daily lives. It’s hard for them to make the connection using code. I have them count a hand full of coins. Then I have a student total the value of the coins. Now we can have a conversation about counters and accumulators in the context of a loop.
Speaking of loops I have students walk as a loop. Walk seven steps or walk to this point – demonstrates counting and while/until loops. I’m struggling with how to have them act out recursion though. Ideas?

cs unplugged
More and more I am looking for kinesthetic learning that gets students physically involved in computer science concepts. There are some great ideas at CS Unplugged which I use with several classes. “Steal from the best” I always say.
We use some exercises from there when we teach sorting, parity checking, and more. They work well and get students involved. Of course kinesthetic learning is far from just a computer science teaching thing. The growth of maker spaces is one newer aspect of it and “making” has some potential in computer science education. We can also connect computer science to other subjects which will help students learn both/multiple subjects.

The important thing is that we don’t narrow our teaching to just lecture and things the students do on the computer. We have to be more interactive and include ways to get students doing things.

Friday, June 09, 2017

What is the purpose of a computer science education?

One of my former students posed that question. He then asked if it were:

  • Building computer scientists
  • Building software engineers
  • Building citizens

Now context is important in this question. At the university level, many schools see the first item as their main priority. Some see the second a a priority but then they may also see software engineering and computer science as very different majors. Where does the third item – building citizens – fit? Recent events (think Volkswagen diesel issues and hacking and more) suggest that building good citizens should have some thing of a higher priority.

At the high school level , where I teach, the questions are different still. We are not, for the most part, trying to turn out job ready CS students. Oh sure, many of my students have gotten summer internships and part time jobs based on what they have learned in my classes. But I’m not trying to make everyone a professional developer. Nor am I expecting the end result of my course to be a serious (for example published) computer scientist. No, high school is more about preparing students to take their place in the world as informed and (hopefully) ethical citizens. I teach in a Catholic school so we are allowed to emphasize values pretty strongly. In fat that is part of our mission.

I see the purpose of teaching computer science in high school as about several things. Not about making professional developers but giving students the tools to understand computers.What can computers do? What can they not (yet?) do? And how do these things impact the world they live in?

I see my role as building enthusiasm for the subject. (See What CS Should a Student Know Before High School) Not every student will major in CS in college nor should they all. But if I can encourage a few smart kids to do so that is great. At least I don’t want to kill enthusiasm that students might have.

I really want to instill some ideas about ethical practice. High school should be something what about citizenship. That  is where I want students to start thinking about the consequences of computer science and what it enables. They really have to understand CS to understand what is happening though. They need a vocabulary and some understanding of basic concepts. They need to be able to participate in conversations intelligently and with some knowledge. And they have to learn how to learn more.

High school computer science is a beginning and not an end in itself. A high school diploma is not a terminal degree. If students are a little more prepared for a world where computers are important we have been successful.  

Wednesday, June 07, 2017

What CS Should a Student Know Before High School

Recently a middle school teacher asked what computer science knowledge would high school computer science teachers like their incoming students to know. The first answer was the obvious “send them with enthusiasm and we’ll work with what ever knowledge level they have.” Pretty unsatisfying. I know because university CS faculty tell me the same thing when I ask what they want. So I had to think about it a bit.

So what would I really like? Well I’d like them to know the way around the operating system they use. Creating folders, moving files, renaming files, connecting a network printer, and connecting to wi-fi. That’s not computer science you say! Yes it is. It involves knowing something about how computers work and how to get around in the system. It will save me a bunch of time and the students some heartache. I’d also like them to have some experience trying things out. They should know were to look for different things in menus, in tools, and online.

How about understanding how the Internet works? DNS, packets, IP addresses, and stuff like that. I don’t mind teaching that. It’s actually fun. But students could learn that earlier.
For programming things? I’d love to spend less time on variables, loops, and decision structures. Can they use them to solve simple problems? Do they understand the connections between a variable name and a location in memory, a variable type and how much memory is uses, and how values are identified? Can they understand how a loop works and how an if statement works? If so I saved about three weeks that I can use for more advanced things like arrays and objects and methods and scope and a whole lot more. Even if they know those concepts in something like Scratch or Alice I can jump right to syntax for text based languages.

Honestly though few of my feeders are going to do all that. So I’ll still need my current freshmen course. But if a couple of kids can jump right into Honors Programming or AP CS Principles I could be very happy.

Thursday, June 01, 2017

Need Funds to Attend the CSTA Conference?

OK this is an opportunity too good to pass up if you are a K12 computer science teacher. Seriously.

If you are a K12 teacher, then Rolls Royce wants to help get you to the conference in STYLE!

CSTA and our partner Rolls Royce are excited to announce a scholarship to help K-12 teachers attend the CSTA Conference in Baltimore, Maryland this July.

Thanks to a generous contribution from Rolls Royce, over the week of June 5 - 9 we will give away a total of twenty-five (25) $1,000 travel scholarships for the CSTA Annual Conference. Each day we will release five (5) scholarships until they are gone.

How do you get one of these scholarships?  Here are the rules:

  • You must be a K12 Teacher to be eligible. No exceptions.
  • You may only receive one scholarship to attend the conference. Recipients of other CSTA conference scholarships are not eligible.
  • Each day by 9:00 AM EST we will post a unique application link for that day via Facebook, Twitter, and other media.
  • Applicants can submit one entry each day. All applications become the property of CSTA.
  • Each day there will be a simple question or activity to complete.
  • Each application will remain open for 24 hours.
  • Recipients will be randomly selected from eligible entries and notified by email.
  • Recipients will have 24 hours to confirm the scholarship or it will be released to another applicant.

Have fun, and we look forward to seeing you in Baltimore for fun and learning at THE event for and by CS teachers & teachers that teach CS!

The CSTA Annual Conference will be held in Baltimore, MD on July 8-11 and we have a great lineup of sessions, workshops, and exhibitors planned.

Click here to find out more about the conference.

Need more information?

How To Make Computers Work For People Like You

Years ago I was giving a career talk in Roxbury (a heavily minority neighborhood in Boston) to a group of students. At the end a young African American woman asked me why I, a middle aged white male was interested in seeing more people like her in computer science. A fair question for sure. My reply was basically that I worked for a company, Microsoft, that wanted to have customers of all types. While I have a pretty good idea of what middle age white men want, young African American women probably have different wants and needs that I don’t know so well. So to serve the needs of diverse customers we really need diverse people in the field.

While that is true now and was then I have sense learned that things are worse than I knew without diversity. Take this article - Algorithms aren’t racist. Your skin is just too dark. – for example. If I am living in an all white world I might never notice this sort of built in bias – intentional or otherwise. It reminds me of other stories I have heard during my career.

A company I worked for created color CRTs where the default colors were red and blue. The developers had no idea how common red/blue color blindness is. And there is thee famous story of the developers who were so proud of the handwriting recognition of the Apple Newton. Until they gave it to Steve Jobs to try. It turns out they hadn’t tested it with left handed people – like Jobs – and it could not read his handwriting. There are more examples out there but you get the idea.

A reason to increase diversity in computer science is so that computers work better for more people. It’s a diverse world out there and we can’t have computers that only work for white and Asian males. Especially not if they are all cookie cutter examples of a few narrow types.

The best way to have a future that is built for you is to build it yourself. With computers becoming more and more central to daily life we need that diversity building out future.