Thursday, December 11, 2025

Computer Science Education Week Greeting Cards

Seems like several years now I have joked or perhaps half joked that there are no Computer Science Education Week greeting cards. Have any of my readers seen any? It turns out that someone on Etsy offers some. I wasn’t impressed but at least someone else was thinking about it. Having students create cards might be a fun project.

What would they look like? What sort of message might they have? The most obvious might be some sort of thankyou to CS educators. That’s what the Etsy ones look like. It’s not a bad idea really.

Perhaps some sort of message encouraging students to try An Hour of Code (or An Hour of AI) might be a good idea.

Perhaps something related to Grace Hopper as the week her birthday falls in is the week selected for CS Education Week.

I have to give this some more though. I am looking for suggestions. I will have to remember to bring this idea up earlier next year.

Monday, December 08, 2025

How Much Debugging Knowledge Do CS Teachers Need

Mark Guzdial's blog is number one on my “must read” blog list. If you are a computer science educator it should be on your list as well. Mark had another particularly interesting post recently.

Dr. Tamara Nelson-Fromm defends her dissertation: What Debugging Looks like in Alternative Endpoints | Computing Ed Research - Guzdial's Take

In it, Mark talks about some of the work by his student, Tamara Nelson-Fromm. interesting stuff and I hope to read her papers when they come out next year. One question from Mark’s post really hit me:

“[W]hat does a K-12 teacher need to know about debugging?”

A partial answer given is “maybe it’s enough to just have checklists.” of things to check. Now “maybe” is a big word. I wonder how far it goes? That is to say, how often is a checklist enough? What happens when it isn’t enough?

I’m reminded of Kernighan's Law:

Everyone knows that debugging is twice as hard as writing a program in the first place. So if you’re as clever as you can be when you write it, how will you ever debug it?

Students write code that is as clever as they know how. If a teacher is more experienced and more knowledgeable than their students they maybe able to handle any problems the students have. The word “maybe” comes to play again. Over the years I have had a number of teachers approach me with a student program they could not debug. I’ve had to get help myself from time to time. Debugging is hard.

[As an aside, I love debugging code. It may be more fun for me than writing original code. I may also be weird.]

Experience helps of course. I have debugged student code without looking at the code. Lots of teachers have done the same. We do see a lot of students making the same errors year after year. Students are good at coming up with unique bugs though. They’re clever that way. (See Kernighan's Law) That’s where checklists are likely to come up short.

Why is this a problem? After all, students do, generally, fix the problem. Sometimes on their own and sometimes with help. For different definitions of “fix the problem” of course. There are always workarounds. That is especially true of the type of projects assigned to beginners.

My concerns start frustration levels. The cognitive load of learning to program is high already. Spending a lot of time on a bug can be very frustrating and that can be a turnoff for students. A demotivator. Worse, if the teacher can’t solve the problem what chance does the student have? Maybe programming is too hard!

Circling back to the teacher, if they don’t have a good plan for debugging than they are not likely to be able to teach students how to debug. Sure they can share checklists and that’s not a bad thing. Like most things, students will learn more by watching a teacher model debugging than from reading about it.

Now when we are teaching, most of us try to avoid making mistakes or creating code with bugs. Generally, we practice demos multiple times to make sure we can demo the code error free. Yay us, looking like we are amazing. The occasional error, planned or otherwise, is a teaching opportunity that should be welcomed however!

Circling back to the question asked earlier, how much should a k-12 CS teacher know about debugging? It’s hard to come up with a definitive answer. Probably more than is covered in most professional development though. Arguably, it should start with technical knowledge a good bit beyond staying a chapter ahead of the students. So more than a lot of teachers who have been voluntold to teach computer science have.

They should also have some solid experience reading code. Now a few years of teaching will give you some good experience reading code. It will give one a lot of experience seeing errors as well. That’s not much help for a beginner teacher though.

I’m not sure what the answer is and finding time in the already far to limited time for training that new teachers have now is a struggle as well. I am uncomfortable with the idea that “it’s enough to just have checklists.” though.

Wednesday, December 03, 2025

Are We Really Teaching Artificial Intelligence

According to Code.ORG

The Hour of Code is now the Hour of AI

The Hour of AI makes teaching AI literacy easy, engaging, and fun. Empower your students to become the next generation of innovators with AI.

Of course the web site has a lot of activities that are still labeled “Hour of Code” but it raises the question: What does it mean to teach artificial intelligence?

In a conversation, a very smart friend talked about how there was a time when we taught Office applications (Word processing, spreadsheets, and the like) and called those classes computer science classes. That’s not real computer science and the CS education community has fought that characterization for years. With some success!

My friend made the comment that much of what is called teaching AI today is the AI equivalent of teaching the Office application of AI and not the science of AI. For example, is teaching AI teaching how to use an existing AI tool and having students train it to recognize some type of object. Is that the same as teaching how the AI works or what sorts of algorithms are behind the training? Of course not.

Likewise, teaching students how to write good prompts to a LLM is not the same as teaching how a LLM works. In fact, I would argue, its not any different from teaching students to write good instructions to another person.

Now I am not saying that learning how to write a prompt or train a machine learning tool is not valuable. Clearly it is. Arguably it is even necessary. But is that really teaching Artificial Intelligence in the same way that a course like AP CS is teaching computer science? Or is it more like teaching applications without teaching how it works?

I have heard the argument that students are not ready to learn how AI works or that the algorithms are too complicated. I would agree that students may not be ready to create an AI at the level of ChatGPT but that doesn’t mean they cannot handle the concepts behind that sort of software.

The truth is that a lot of what AI, especially machine learning and Large Language Models are doing is not really that new. What is new is that we have lots more data for AI to work with and we have processing speed that is a lot faster than what we used to have. Machine learning is heuristics on steroids. LLMs are data analysis with lots more data and faster CPUs.

We had software learning by asking questions and trying different options 50 years ago. Now we have the software asking itself the questions and finding new paths based on data. We had rule based software for decades but now we have better algorithms to evaluate data against rules. We’ve been studying text looking for hidden meanings throughout history. Now we have more text for algorithms to analyze and the ability to analyze in more ways in less time. We can start with simple data sets and basic concepts that teach the roots of AI. Students can deal with it. They do that sort of thing with human intelligence all the time.

If we are serious about preparing students for the future of AI we really need to get serious about teaching some depth of concepts. Let’s not stick with the Office applications equivalent and lets move on to the real science.

Saturday, November 29, 2025

Teaching Reading Code–More Important Than Ever

Thanks to Facebook memories and a link that was almost a dead link I reread a post on my old blog – How To Read Code. It got me thinking about Artificial intelligence writing code. What? Let me explain.

If students are going to use AI to write code they are going to have to know how to read and understand it. There are several reasons for this. One is that AI almost never write 100% of the code necessary for a project. Without being able to read and understand the generated code students will be unlikely to be able to take the project to the finish.

Reading code for understanding can also be helpful to learning more about computer science. Not just coding but computer science. Code is the language of CS but there is a lot more to understanding computer science than just writing code.

AI systems have been trained on a wide variety of code samples from a wide variety of developers with a wide variety of coding styles. That means that students reading AI generated code, potentially, have exposure to more styles and techniques than their instructors are likely to show them.

Having students read explain the code they read can be a powerful tool for their learning and for teachers to use for evaluation. Keeping students from asking the AI to write the explanation is probably a good idea though.

All of this makes me think about code reviews (Archived blog post on that - The Art of the Code Review)  Organizing code reviews may also be a good teaching tool. Reviewing student code, AI generated code, or perhaps publicly available code examples on the internet. If AI can train on other people’s code why not students?

I am wondering what having an AI explain student code would look like. Would it help students understand their own code better? It might. I have seen a lot of students tossing different code snippets into a project hoping it would work but not really understanding what the code was doing. Would it also help them understand the process of reading code? Interesting idea I think.

Wednesday, November 26, 2025

Monty Hall Problem and the Problem of Artificial Intelligence

I’m always looking for interesting projects. The other day I ran into the story of the Monty Hall Problem. The brief version of this logic/probability problem is based on a famous game show. In the hypothetical, a player is trying to win a car. Behind two doors are goats with a car behind the third. The player picks one of the doors. Before opening the door the show host opens a door, a different door, and shows that there is a goat behind it.

The player is then given a choice – stay with their first guess or switch to the different door. What’s the best option? The answer from Marilyn vos Savant who has the highest recorded IQ was that the player should change their guess.

This answer was highly controversial with many experts in probability and math saying she was wrong. Computer simulations showed that she was right though. There is an explanation for this in the Wikipedia article linked to at the top of this post.

If you know me at all, you can probably guess that I had to write a simulation myself. Trust but verify! I think it makes a good project to assign students as well.

There is a little fly in the ointment for me though. I crated a project with the name “Monty Hall” and with almost no other hint than that and Copilot in Visual Studio started writing code for the simulation!  Well, that was a surprise.  I have mixed feelings about the help. It made writing the simulation easier for me but it kind of took some of the fun away from it as well.

Copilot’s code assumed form objects that I had not created as well. It didn’t create those objects automatically. Fortunately for me, I know enough about Visual Studio and Windows Forms that I could add them easily enough. I am also experienced enough that I added other code and objects to make the project more me.

Also, as an experienced programmer, I was able to easily understand the generated code. The code generated is a little different than what I would have generated. Better? Worse? Really, just different. No big deal for an experienced programmer.

What about students? As teachers, we probably don’t want students having AI write 90% of their code for them. Copilot can be turned off and doing so is a very good idea in classroom and school lab situations.

Will students understand the generated code? In many cases, probably not. In this case, the generated code used the the ternary conditional operator. This is a perfectly valid operator in C#, Java, C++, and several other languages. It’s not often taught to beginners however. It also used a break statement which a lot of software purists do not approve of and strongly teach against.

So determining if a student used AI to write their code may, in some cases, be easy to determine. Not something you want to bet on though.

Circling back to the assumptions that Copilot makes – like objects and variables not defined automatically – students may struggle with adding the missing pieces. I would expect that in some cases trying to add what AI leaves out may be more problematic than writing code on ones own. Frustration is a common problem for students already. Artificial Intelligence may, in some cases, exacerbate the problem.

As I have noted in several blog posts, AI often creates solutions different from how I would code them. That has been a learning experience for me. I love seeing different solutions, different language features, or features used differently.

It is potentially a learning experience for students as well. My concern is that without a solid knowledge base will students be able to really understand and learn from AI generated code? Some will. Many will not.

We’re all trying to figure out what artificial intelligence means for software development and especially for teaching software development. It’s going to be a wild ride for a while.

Tuesday, November 18, 2025

CS Education Researchers On Regrets

Pay Yongpradit recently posted (LinkedIn post) about asking a number of computer science education leaders and researchers “about their biggest regret in their respective research areas.” The answers were interesting to say the least. I think they are important as well.

Natalie Rusk -  Research Scientist and OctoStudio Team Lead at MIT Media Lab

That education has focused on Scratch as a tool, where students “learn Scratch” rather than the ideas/mindsets it was designed to develop, and for only a short time (e.g., a 3-week module), rather than as an experience that can be revisited constantly and grow with students.

It does seem like Scratch is often used as a sort of quick introduction to programming. It's big with An Hour of Code and that is fine as far as it goes but Scratch, and similar block based programming tools, can be so much more. It could be incorporated into other subjects, used as way to help students think and explore.

Sue Sentance - Research Professor, University of Cambridge

That the UK didn't fund scaled, organized teacher PD when they rolled out their national computing program in 2014. They had a bottom-up approach with their network of master teachers, but it wasn't enough to train teachers at the scale and quality they needed. Also that the UK hasn't emphasized the importance of CS Ed research when introducing CS in schools, especially for the youngest kids.

Professional Development for computer science educators and for educators who use computer science but don't always see themselves as CS educators is woefully inadequate. A week or three is not enough time. Worse still is that most PD is skill based rather than pedagogic. Most PD is "here is a neat tool and now we are going to teach you how to use it." That's different from "here is how to teach using this tool." It's even more different, and less than, "here is how we use this tool to teach this concept." That later is what teachers really need. We are also not seeing enough research in how to teach computer science. Teachers are often reluctant to incorporate the learning from that research as well. A lot of what is sold as research based has had a short shelf live over the years.

That doesn't encourage teachers as they have seen too many "research based" ideas last a year or two and then be replaced with something new. I think that sometimes these new ideas come from people with something to sell rather than from people who have done reproducible research. That's a problem and a reason that we need rigorous research with reproducible results. That requires funding.

Tim Bell - Professor at University of Canterbury

That CS Unplugged has been viewed as a replacement for programming, not as an entree, to the extent that in some places, CS Unplugged has been used as an excuse for not investing in devices and comprehensive programming education.

I love CS Unplugged activities and when I use them I use them to lead into programming. I think that a lot of people use them as a filler for times when they don’t have equipment to use with students. That’s a shame. I think some of this is because there isn’t any real PD in how to use these tools as integrated into introducing programming concepts. PD and education research play into all of this.

I think the messages from all three of these wonderful people tie together and show the need for research into pedagogy and education for teachers. Education into how to teach concepts!

Monday, November 03, 2025

Flag on the Play AI Let Me Down

My latest coding involves an attempt to memorize nautical signal flags. I’ve played with this idea in the past but never had the time to really dig into it. I’ve had images of the flags for years. I’d even started created a class to hold the data.

Image _flag;
String _mnemonic;
String _shortName;
String _morseCode;

Yes, at some point I want to learn Morse Code as well. Always plan for additions. Semaphore is in my thinking as well.

Once again, Copilot, the AI in Visual Studio, has jumped in to help. Or to try to help. It was pretty helpful with some tedious coding. Specifically, with a couple of lines entered it figured out how I wanted to add images and what not to the individual flag objects I wanted to create. Hitting tab and return was pretty easy compared to typing whole lines in.

A = new Flag(Flag_Host.Resource1.alpha, "Alpha", "A", ".-");

I had already added the image files to the project of course. Copilot was not always so helpful though. I created a couple of additional forms for the project and wanted to pass the array for flags objects to the new forms. Copilot struggled to code that properly and there were several false starts.  I used to do that sort of thing regularly but it’s been a few years. I guess my memory isn’t what it used to be. I finally figured it out. Honestly, this should have been easy for Copilot and for me.

I have heard from a number of teachers about how Copilot is showing up in their classes. One teacher uses MonoGame and tells me that Copilot is so unreliable with MonoGame that his students turn it off. My suspicion is that there is not enough good MonoGame code loose on the internet to properly train Copilot.

That leads to a major concern I have about using AI for coding. It’s usability and reliability depends on the quality and quantity of the code used to train it. Programmers love to reinvent the wheel so there is a lot of code available for doing common things in coding. I would expect AI to handle most common data structures pretty well. Some things that are not as common may not have as much code to study. I wonder how well AI will handle new programming languages?

I also wonder how well AI will handle new and unique problems. Will the AI be dependent on very detailed prompts from user developers? I think that is likely. I also think that some person is going to have to do a lot of verification of said code. We are still going to need people who can read and write code.

In a related note, several times while writing this post, I have dipped into raw HTML because I didn’t like how the program I use, Windows Live Writer, was formatting the text.