Showing posts with label Teaching. Show all posts
Showing posts with label Teaching. Show all posts

Monday, February 23, 2026

Who Is Driving Changes to Computer Science Education

There are a lot of Changes happening at code dot org The Slashdot article linked there lists several of them. While the changes include a number of people changes including President Cameron Wilson stepping aside, Chief Academic Officer Pat Yongpradit leaving to join Microsoft, and some staff layoffs the change in direction, to AI, may be the most concerning. From Hour of Code to Hour of AI? Some interesting comments follow that post.

The questions top of my mind are "who is driving the direction of CS education" and "is CS education moving in the right direction?" A lot of people believe that industry is pushing CS education in the direction of being vocational. The new focus on Artificial Intelligence often feels like a vocational direction.

My involvement with computer science education predates code.org and even CSTA so I have seen a lot of changes. In my first teaching days computer science teachers were pretty isolated. There was SIGCSE which accepted K12 teachers though welcomed sometimes felt like aspirational rather than actual. ACM, of which SIGCSE was and is still a part, was doing some support for CS education. Cameron Wilson was a huge part of that and worked policy.

CSTA was developed by some wonderful people in and around ACM. This started the real movement towards expanding K12 CS education. CSTA helped train and organize teachers to push for more more CS education. Code,org came a bit later and brought something new to the effort.

Code.org brought money and industrial production values. From the first set of videos that went viral to some very good curriculum resources as well as connections to industry and political leaders. Getting policymakers to push for CS education stepped up.

We’ve come a long way.

Coming back to my earlier questions. Is industry driving the directions that CS education is moving? A lot of people think they are. Industry has money and it has funded a lot of the work by code.org and CSTA. The modern Golden Rule is that the people with the gold make the rules after all.

Industry has some motivation here. I spent a few years working at Microsoft myself where my job was to promote the use of Microsoft tools for teaching. I didn’t get much in the direction of what to teach. I always felt that teachers should decide what to teach and I just wanted to help teachers find ways to use tools to teach those concepts. Teaching computer science as vocation was always there though. Senior mangers often told me that industry needed more people to know CS because there were jobs that needed to be filled.

CS as vocation has always been a selling point for CS education of course. It’s what helped sell school boards and other elected officials. Among teachers that was usually a secondary motivation. For a lot of teachers, including me over time, CS education became more about understanding how the world works. We don;t teach physics because we want to make more physicist. We teach it so that students understand the world around them.

People who are not working for tech companies often have to use computers and make decisions about computing. From spreadsheets to databases to internet searches. And now AI. People in all walks of life use computers. Understanding computer science can make those people more efficient. Computers are an important part of our world.

It seems like all the big tech companies are betting huge sums of money on AI. There is a lot of pressure to move the direction of CS education into AI. Is the industry push vocational in intent? Is is all about helping these companies to make money? CSTA and code.org are both pushing AI these days. Is this because of industry (gold making the rules?) or would it be happening independently?

That leads to the second question – are we moving in the right direction? I think that question may be different for K12 and for university. Personally, I still think CS education in K12 should be about understanding and not vocational. Someone else can address higher education but K12 should be about preparation for life and not for vocation at least in comprehensive schools.

So is AI the right direction? I think it is indisputable that AI is important to learn. Students should learn prompting and they should learn what AI can and cannot do, They should also learn how to think about what AI should not do. They need to know something about how AI works and that is core computer science.

I think that computer science, in the old analogy, is the dog and AI is the tail. The tail should not wag the dog. Making AI the focus at the expense of basic  computer science would be a huge mistake. We do have to teach the basics that make AI possible. Students need to understand where AI comes from and where it might go. Understanding code is an essential part of that understanding.  There is always going to be more to CS than just AI. We didn’t stop teaching arithmetic when calculators were invented. We should not assume that AI code writers mean we don’t have to stop teaching basic computer science.

CS in K12 should not be just vocational. Is industry driving CS education? I fear they may be. Are we moving in the wrong direction? Maybe. If so, it will be up to educators to provide some course correction. 

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, 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!

Friday, October 31, 2025

Unexpected Help With Coding Projects

Fair warning, this is a post in two parts. First a project idea and second musings on the tools I used to create it.

I really do like to write code for fun. Nothing complicated (been there, done that, got the T-shirt - literally) but just little things to "scratch an itch" as they say.

Lately as I played Wordle I was wondering which letters appeared most in each place in the five letter words in my word list. A couple of nights ago, I wrote some code to find out. I had my code output a comma delimited file so I could use Excel to look at the results. That’s what the image to the side shows.

Now this sort of thing is highly dependent on the word list of course. But for my list, S is the most common letter in the first and fifth location. Not surprising as S is used to make plurals. Wordle doesn’t use plurals so I note that the second most common fifth letter is E with Y a close second.

The letter A is the most common second and third letter. The letter E is the most common fourth letter.

If I were ambitious, I could probably use this information to make a smarter Wordle solver. I’m not quite that ambitious though. I am toying with gathering some other statistics though.

I develop using Visual Studio – the full blown version. That means that Copilot jumps in to help. That’s not something I anticipated when I started but I confess that I found it surprisingly helpful. I did specifically ask Copilot to write one specific method – generate a string array of two character combinations – but it jumped in on its own with a couple of small bits of code. I was surprised at how well it anticipated what I wanted.

The implications for teaching programming are something to think about. On one hand it’s scary that AI tools can so easily write coding solutions to simple programming assignments. That turns our process of evaluating learning on its head a bit. At the same time, I am not ready to blindly trust AI generated code. I do not want students to blindly trust it either. So asking students to test generated code seems like a reasonable thing to assign. Yes, I suppose some students will ask AI to generate test cases but if we can’t trust AI to write the code in the first place we can’t trust the generated test cases.

We could ask students to explain the test and related tests. Could be quite a recursive rat hole.

We can also ask students to explain the generated code. We should probably ask them to do that either verbally or by writing manual in class so they can’t ask AI to do it for them.

What I keep coming back to in my own thinking is a focus on abstraction and top down design. Can we ask students to break the problem down to component parts and have them prompt the AI to implement various methods and code pieces. A focus on design rather than writing code. We could have students submit the design document and the various prompts that they use. Add to that some serious examination of testing and verification.

Students are going to have to work with artificial intelligence. They can’t let it do all the work for them because AI is not I enough yet. I don’t think it ever will be either.

Thursday, September 04, 2025

An Interesting School Year in Computer Science Education

Mike Zamansky is Looking at the start of school for 2025 on his blog C’est la Z He’s thinking about phone bans and AI in schools. I have been thinking about both of those as well. I spent some time recently with the teacher who is now teaching in my old computer lab. He’s also a former student of mine. We had a great conversation.

We talked a little about the cell phone ban in schools that was passed into law in New Hampshire among other places over the summer. It is not clear how it will be enforced and what sorts of consequences will be in place for violations.  For a while, I taught with AppInventor which meant that phones were an active and essential part of the class. I wonder what these bans will mean for all the many teachers and students using AppInventor and similar tools.

Phones were a distraction but teaching in a computer lab with computers in front of every students means the Internet is still going to be a distraction. Classroom management is hard enough without computers and cell phones.

Artificial Intelligence is going to be even more interesting this year. How much to allow? How to check for its use? What to teach about it? All interesting questions that teachers and schools will struggle with this year.

My son, a school administrator, find AI tools very useful. So do many others both in and out of education. Clearly, students need to be taught about AI. That debate is, I hope, over, What and how to teach it are still largely to be determined.

Students are going to use AI to write code for them. It would be foolish to deny that. They still need to understand the code that AI is writing for them. Talking to my teacher friend I used the example of HTML. I write these blog posts using Open Live Writer which builds the HTML that gets posted. It does a great job but I still find myself jumping into the HTML to do some fine toning. In this post, for example. I went into HTML to edit the text for the link to Mike’s blog. A small example but knowing what to do saved me a small amount of time.

To be honest though, students using AI to write their code is not my most serious concern. Ethical concerns around AI use is my biggest concern. There are all sorts of issues around copyright for example. The use of books and art to train AIs to create without giving credit to original creators is an important discussion topic. Taking credit for AI output is another. I want students to think about these sorts of things. There is a lot more and more issues will be showing up.The old question is not so much what can we do but what should be do.

So, yes, we want to teach students how to prompt AI. We want them to be able to evaluate to AI product as well. There is a real risk of AI having a negative effect on people actually thinking. Teachers need to find ways to encourage students to think about what AI is, how it can be used, and most importantly how it should be used.

This year is going to be an important one in the future of AI in education.

Saturday, December 28, 2024

Three Keys To Being A Great Teacher

For the last 20 years or so I have been able to meet some truly great teachers. Some I visited in their schools. Some I met at conferences. Some I have become good friends with. I have concluded that there are three things that make good teachers into great teachers.

One: Relationships with students. Great teachers truly care about their students as people. They build relationships with students. They may not be close to all of them but they try to build relationships with as many as they can. They listen to students. It’s not about the struggles the student is having with the subject, thought that is important. They hear about the students struggles with life, with other subjects, and with what happens today. They respect students as people. Students feel that the teacher likes them because the teacher does like them. That is what lets them build a relationship.

Two: They are enthusiastic about the subject or subjects they teach. This can be difficult in elementary school where teachers have to teach a lot of different subjects.  Great teachers can fake it to some extent because they are passionate about enough of what they are teaching to know what that feels like. Passion is contagious. It also means that one wants to share that passion as well as the specific knowledge they are trying to share.  Students who have a relationship with a teacher will naturally want to learn what is being taught so enthusiastically.

Three: Innovation. A superintendent of schools once told me that there is a difference between a teacher with one year of experience 20 times and a teacher with 20 years of experience. The great teachers I have met are constantly innovating They may start with a canned curriculum, though rarely, but if they do they make it their own. They add, subtract, and move things around. More often though, they make their own curriculum. Oh, sure, they abide by necessary standards but they teach their own way. They are rarely satisfied. You’ll find a great teacher modifying their presentation, their project, anything, before teaching that material again. They often make up their own courses and adapt them to meet the needs of the students in front of them. And the times in which they live.

They also borrow from other great teachers. They are not afraid to find ideas from others and fit them into how and where they teach. These are the teachers you find at conferences. They are presenting but they are also there learning. If they present at a conference or PD session they welcome feedback and new ideas. They are talking to others in the “hallway track”, sharing meals and activities outside the conference. They are always listening and learning.

Bonus: The great teachers share their knowledge with others. They will share their curriculum. They will present at conferences. They share not for ego but because there is something about being a teacher that just makes one want to help everyone become better. Better about teaching. Better at knowing things.

Seek out the great teachers. Become a great teacher.  Make the world a better place. Make that part of your New Year’s Resolution.

Tuesday, November 26, 2024

Hour of Code and Corporate Involvement in CS Education

An interesting article was shared on Facebook recently -Is the 'Hour of Code' the New 30-Minute Saturday Morning Cartoon Commercial? Take a look at it. It may make you think.

One statement there is that "corporate-sponsored Hour of Code tutorials for the nation's schoolchildren have blurred the lines between coding lessons and product infomercials." Well, that is something to think about. Blurred or crossed?

Those who know me know that for over nine years I worked for a big tech company supporting computer science educators. So clearly, I think that a lot of "big tech" involvement is a good thing. Is it now manipulating children? Well, that gets interesting.

BTW I am also friendly with people at Code.Org and have done work for them in the past. While I don’t/haven’t agreed with them on everything I think they are good people with good motivations. Just being clear on my biases here.

First off, I think there is a big a difference between Hour of Code and Saturday morning cartoons. Prime among those differences is teacher involvement. Teachers are the gateway to Hour of Code. And in fact, they are the gateway to just about all tech influence in CS education. While there may be some students finding and participating in Hour of Code, most students use Hour of Code in the context of the classroom, computer lab, or library under adult supervision.

My understanding is that many of these product placement modules in Hour of Code are solicited to attract/interest students in learning computer science. Put another way, computer science is the product and Minecraft or Disney characters are the show bringing the audience. In a sense, Computer Science is the advertisement and the corporate tool/characters are the show.

Does doing a Minecraft Hour of Code encourage students to play more Minecraft? Perhaps. Though my ten year old grandson hardly needs more encouragement as it is.

This can be a slippery slope or course. Where is the line between promoting computer science and promoting a commercial product? That’s hardly unique to Hour of Code. My grandson has a Chromebook because that is what his school uses. I doubt that is the only product that children want because they see it or use it at school. I trust teachers to be a good influence on their students. I don’t see they becoming salespeople for the companies helping support Hour of Code. I think they know when to encourage and when to point in other directions.

Companies know that Hour of Code is a gateway towards learning computer science. They see that as a good thing. If that leads to more students interested in their products as well I am sure they are happy about that. But they are still selling computer science first. Blurry lines are not the same as crossed. We should keep an eye on that though.

Tuesday, November 19, 2024

Online Programming Environments are Poor Preparation

Got your attention didn’t I? More and more teachers are using online coding environments to teach computer science. I used one myself to teach Advanced Placement Computer Scie3nce Principles. I’m not sure I did the right thing. Let me explain.

Recently I attended a panel talk at the CSTA New England conference on what high school teachers could do to better prepare students for university level computer science. Yes, I know that not all of our students will take CS in university but a great many of them will. So what did university people suggest?

As with most things, it’s complicated. Apparently, university professors are finding that students do not know how to do some simple things like deal with file directories or install software or use installed IDEs. Phones and apps are responsible for a lot of this. Students do not know where there work is stored or how to move files to a download location.  Some universities have actually added class modules to help here. Yes, remedial computer usage! Do your students need that?

They are also struggling with the tools that university professors expect them to use. Like installed IDEs. In university, students are expected to use IDEs like Eclipse, Visual Studio, Visual Studio Code or others. They are also expected to know where the files are being placed. They do not learn any of that with online IDEs.

Now I understand that for teachers working with incompetent IT departments, of which there seem to be far to many, are limited to online IDEs. It seems like IT departments are often the biggest obstacle to teaching computer science. But teachers need to fight back more. Teachers who can use installed IDEs should do so.

Online IDEs really do to much. Or perhaps I should say that they hide to much from students.  I am not advocating going back to the punch card days, fun as that might be, but we need students to get closer to what universities and industry are doing if preparation for later CS is our goal. And it should be a goal.

Installed IDEs do a lot for students. That’s true. They also force students to do a lot for themselves. That’s good. It helps them later on.

Friday, August 11, 2023

Do You Remember Struggling to Learn?

Dave Largent, a CS professor at Ball State University, had an important reminder on his blog -Dave's not here, or is he?: Teachers need to struggle to learn (davidlargent.blogspot.com) Our students often (usually?) struggle to learn new things. I think this is especially true in computer science. We as teachers with lots of content knowledge sometimes struggle to be empathetic. We forget our own struggles.

One if the things Dave struggled with on his trip through Europe was different languages and customs. It’s a reminder to me that many of our students come from different cultures, customs, and languages. It’s a good reminder that examples in American culture and English can add to the struggle. Being aware of where our students come from is important.

I often shared my own story of my first computer class. Greatly did I struggle in that first class. The first couple of projects were only completed with a lot of help from peers and TAs. Things came easier eventually and with a solid and broad base (I have been programming for 51 years now) most new topics are easier. But not always. Having those struggles is character building. And helps develop empathy.

I think that having new experiences that involve struggle to learn is a valuable experience for teachers (anyone really). It also helps us model life long learning for extra value. I encourage everyone to seek out learning experiences that do not come easy.

And above all, remember that our students struggle and we need to be patient with them and support them. Have a great school year!

Tuesday, June 06, 2023

Conversations on AI in Education

Pat Yongpradit from Code.Org tweeted an image of what they are seeing in conversations about AI and Education. (The link on the image below goes to that tweet)

Now I am not having the detailed conversations with policy makers that Pat is but these boxes pretty much match what I am seeing in my social media these days. That bottom right hand box is where I’d like to see myself and others but it feels like people in power are more on the left hand column.

The usual tech bros are touting the AI can replace teachers line. We’re a long way from that and I am not sure we’ll ever be at a point where that is a good thing.

Lots of teachers are afraid of cheating. That’s not an unreasonable fear. There are pundits, some of whom are teachers, saying “just change the way you teach and all will be well,” I see a shortage of detailed information about just how to teach differently to avoid AI cheating. I think some of those people are fooling themselves if they think they have all the answers. Students are very good at finding new ways to cheat no matter what the assignments are.

The right hand column is where I think we need to be but there are more questions than answers there. Frankly, I think the technology is still to new and experience with it is to little to answer these questions with any strong level of confidence. We really need teachers to experiment with these tools in actual classrooms. That takes some freedom that doesn’t exist in as many places as we would like. Government and administrators in too much of the US are more interested in constraining what teachers do in the classroom than giving teachers freedom to develop new ways to teach.

The question is, are schools going to still look the way they did 100 years ago, as they do today, or are we going to see real change that uses technology to the fullest?

Monday, June 05, 2023

Let’s Try it and Find Out

Facebook memories reminded me of a frequent conversation I had with students. They would ask me what would happen if they tried something and I would answer “I don’t know. Let’s try it and see.” Students often expect teachers to know everything. Well, if they believe their teacher is a real content knowledge expert. Of course there is more to be known than can ever be known. This is especially true in a subject like computer science.

Too many students expect teachers to find answers to questions they have. That’s not the best way for them to learn. Trying things for themselves is a lot better. That’s why I loved to suggest that students try things for themselves. Encouraging students to try things for themselves and to experiment helps them grow more independent as learners. It also helps them develop their creativity.

This is similar to another exchange I used to have with students. I might say “One of us should look that up. You’re the student so I think it should be you.” Again, students who look things up for themselves remember information better,

Thursday, May 25, 2023

Coding With AIs Prompts Are Important

Last night, when I could not sleep, I got up and wrote some code. I added some features and data checking to my Wordle solver helper program. When I finished I felt good about my work and myself. I think that made it easier to get to sleep and I slept well.

It got me thinking this morning. When I was in university and still learning how to code I would occasionally get frustrated and feel less confident. So I would write some simple program to help me feel like I could actually code. I must have written code to display the multiplication table from 1 times 1 to 12 times 12 at least once a semester. It worked for me.

Now that is a trivial program but it involves nested loops (for me anyway) and I am not sure I would assign it to students today. It’s really a meaningless program in today’s world when everyone has a calculator app on the phone they don’t leave the house without.

I did wonder how an AI would write the code. So I opened the chat option in Bing and asked it “Write some C# code to display multiplication tables in a list box” It gave me some code that displayed this:






Not what I wanted at all. The problem is ambiguity! So I tried again with “Write some C# code to display the multiplication table from 1 times one to 12 times 12” and got this:

Not what I wanted either. So I specified at grid format “Write some C# code to display the multiplication table from 1 times one to 12 times 12 in a grid format”

This reply required a dataGridView object and the program did not work. Looks like I need to set up the dataGridView object in ways the AI did not explain. Now there is a problem worth thinking about. I asked Bing what settings I needed for the dataGridView and it gave me several. Program still did not work. At this point I gave up on the dataGridView option. It sort of feels like overkill anyway.

So I tried another prompt “Write some C# code to display the multiplication table from 1 times one to 12 times 12 in a grid format in a list box”

Finally I got what I wanted even though I am not thrilled with the formatting.

I’ve got a number of takeaways from this. Yes, students could use  these AI tools to get code for typical school assignments. On the  other hand, I think it would be fairly easy to tell when they do. The use of features that are not typically covered in class lectures or demos would be one clue.

It’s not always easy to provide the right prompts to the AI. Sometimes it takes some iteration. I think though, that teacher have to reduce ambiguity in assignment descriptions in many cases. Arguably some amount of ambiguity is helpful to allow for creativity. It can be a fine line,

As noted, I didn’t like to formatting so I did modify the code to get closer to what I wanted. I think programmers are going to be needed in a lot of cases to finish off what AIs generate. Both providing the right prompt and finishing off will be important skills for some time to come. Finishing off is going to require some serious skills in many cases BTW. Programming is not dead yet.

Monday, January 23, 2023

What Jobs Are Safe From Automation?

“It's tough to make predictions, especially about the future.” – Yogi Berra

That doesn't mean people don't try. Recent advances in Artificial Intelligence have a lot of people predicting what jobs are an are not likely to be replaced by computers. Technology is challenging the ideas about what jobs can and cannot be replaced by technology. Doug Peterson, who shares a lot of interesting articles, recently share this one predicting that leaders will not be replace. It's an optimistic article. 5 Reasons Leaders Shouldn't Worry That Generative A.I. Will Take Their Jobs | Inc.com

A lot of jobs we once thought were completely safe are being seen in a new way lately. AIs are creating what looks to many like art for example. This is forcing us to take a hard look at how we define art. Some recent visits to museums had me already asking “what is art?”

Today we joke about AI attempts to write short stories, poetry, and other narratives. A lot of our stories in movies an even books are formulaic. How long before AIs can write Hallmark Christmas movies I wonder? What used to be a joke may be a prediction of the future.

A lot of people are speculating on  the future end of the programmer profession. People have been predicting that would decades but we are closer to that than ever before. Software developers today think they are safe though because they (we) know that end users are terrible about describing what they want a program to do. Will the future bring courses and training on how to talk to AIs? Possibly. I can sure see the need for it.

People who are not teachers are suggesting that AIs will take over for human teachers. As someone who spent 15 years teaching I am not so sure about that. I think the human touch will remain important for the future. Teaching is a lot about reading people and establishing relationships. Wil AI be able to do that? I am not sure anyone knows.

One area I think people have an advantage over AI is that we are bad with risk analysis. What may seem like a flaw leads people with some luck, some imagination, and some hard work to beat the odds. We see potential needs when a pure look at the data would not see anything. And we are often willing to defy the odds for things we believe in. I am not sure AI will get there.

Thinking about the possibilities of AI and what it means for the future of work is a critical topic. It’s something we need everyone, but especially students, to be thinking about.

Saturday, December 31, 2022

Looking Back and Looking Forward in CS Education 2023

Traditionally I write a year end look back on thee previous yest in CS education. (Last year at Looking Back on Computer Science Education in 2021) Honestly, that post would largely work for 2022 as well. I attended SIGCSE, CSTA, and the New England Regional CSTA conference. They were all great. There was good learning at all of them. But new stuff? Not a whole lot. A few new tools. Some new robots. Some new AI and cyber security curriculum. But really not a whole lot.

I think we’re in for some disruption in 2023 though. Tools like ChatGPT and GitHub CoPilot are probably only the first of tools that are going to shake things up in teaching programming. Are we even going to still teach programming in computer science? If not, what will computer science courses look like? If we are still teaching programming how will we do it? What will it be all about?

We’re still going to see a need for teaching about cybersecurity for sure. Artificial Intelligence is also going to be more important. We’re seriously going to have to think about how we teach about it. We have to include not just how it works but how it should be used. Ethics in computer science has never been more important.

The discussion about ChatGPT and what it means for education in general and CS education in particular is going to be ongoing. We have to reink how and what we teach. It’s going to be an interesting year. Have you been thinking about it? What are your thoughts so far?

Note: I highly recommend Mike Zamansky's blog post at Kicking off 2023

Saturday, December 17, 2022

Coding with ChatGPT–Armstrong Numbers

Trying out ChatGPT seems to be all the rage these days in certain geek circles. I may even be late to the game but I tried a few things over the last couple of days.

I started with one of my favorite little projects. Armstrong numbers are a form of narcissistic  number which is a number that is the sum of its own digits each raised to the power of the number of digits. I first wrote a program to calculated these as an undergraduate when I wrote programs for it in about a half dozen different languages.

I fed in the following prompt using C#, Visual Basic, and Python as the programming language.

Write a [programming language] program to calculate three digit numbers were the sum of the cube of each digit equals the original number.

The results for C# and VB were the same algorithm written in the specific syntax. The Python code was slightly different. You’ll probably not be surprised that the code ChatGPT showed me is very similar, if not identical, to code examples you can find with Google or Bing.

The C#/VB plan depends highly on integer division and the modulus operator to break down the number into its digits.

for (int I = 100; I < 1000; I++)
{
     int sum = 0;
     int temp = I;

    while (temp > 0)
     {
         int digit = temp % 10;
         sum += digit * digit * digit;
         temp /= 10;
     }

    if (sum == I)
     {
         Console.WriteLine(I);
     }
}

The Python sample changes the integer into a string and used that to address the individual digits.


for num in range(100, 1000):
   # Convert the number to a string so we can access each digit
   num_str = str(num)
   # Initialize a sum to store the sum of the cubes of the digits
   sum_of_cubes = 0
   # Iterate through each digit in the number
   for digit in num_str:
     # Convert the digit back to an integer and add the cube of it to the sum
     sum_of_cubes += int(digit) ** 3
   # If the sum of the cubes is equal to the original number, print it
   if sum_of_cubes == num:
     print(num)

Note that the Python example nicely includes comments. A dead giveaway that a student didn’t write it. All samples come with simple explanations of how the code works. The explanations tend not to be very deep so oral questioning of a student would probably still show if the student understood the code or not.

It looks like, for some simple, student exercises can be solved by ChatGPT. It is not much different from doing any other online search for the most part. How worried should teachers be about ChatGPT especially? I’m not sure. Cheating goes on all the time and there is a lot of sample code already out there for many common assignments. It’s going to be a bigger problem for educators who have very large numbers of students who can’t be familiar with the code their students write. Or who can’t ask them questions to make sure they understand what they turn in.

I think I would ask ChatGPT to solve some of my assignments before I assign them just so I know what sort of answers I might see.

Side note: Neither of the ways ChatGPT suggested is the way I solve this program. There are more than one ways to skin this cat.

Tuesday, October 25, 2022

The Computer Science Professional Development Problem

Mike Zamansky is stirring up trouble again. OK not really his intent I’m sure but people can get defensive. I have to say that I agree in principle with most of his post at Why PD doesn't work for CS

Mike lists four different types of PDs.

  • Teachers sharing practices
  • conferences and meetings that teachers choose to attend
  • PD run by content providers, that is, people selling something
  • PD required by schools and districts

It’s as good a break down as any though the fourth kind can really include any of the first three. So I will zero in on those for now. Full disclosure: I have given all three of those types of PD in my time. This includes working for a content provider, Microsoft in this case, that was more or less selling something even though the stuff I was presenting to teachers was free.

I think that these types of PD can be great things for improving a teacher’s knowledge and skills. None of them are really good for starting from scratch.

Teachers sharing practices is a wonderful thing. At least if the audience has a solid base to start. We see a lot of it in social media. Not as much on blogs as I would like but still some valuable stuff is shared on Facebook and even Twitter. I have learned a lot from teachers sharing practices. I hope I have helped some teachers as well. Short bursts of knowledge is not a foundation to start a CS teaching career on though.

Conferences are wonderful. The sessions are short, typically 45 minutes to an hour and a half. They are great for sharing and for helping teachers to build on existing knowledge or to lead them in new directions for further exploration. But one should not expect a new to CS teacher to attend a conference (or two) and expect them to be a trained teacher.

PD run by content providers are typically longer form. Usually a week, sometimes two. These can be awesome especially if they are given to educators who have prior experience For example, a teacher who has taught simple web page building attending a session of a more advanced toolset for a more advanced course. Or a teacher who is learning a new programming language who can relate it to previous knowledge. These sorts of PD can be a mixed bad of course. Some focus totally on the tool and not much of pedagogy. Others are concept focused as much a tool focused. Regardless, these can be very valuable especially when the content provider is a non-profit with goals beyond selling product.

We’re getting to an interesting point in the development of CS for All. We’re rapidly outgrowing the availability of strong technical CS educators. Qualified CS teachers are hard to find. We’re not doing students any favor by putting untrained or antiquatedly trained teachers in the classroom. Colleges and universities have been complaining about having to reteach students who were poorly taught in high school for years. Do we really want to see more of that? I think not.

We really need more long term training for CS teachers. We’re starting to see some programs and more universities are developing CS education research programs and working with schools of education. That really needs to ramp up. States have to start requiring more training for CS teachers AND put some money into making it happen.

Thursday, September 22, 2022

Dealing With Student Misconceptions

I was reading through The Big Book of Computing Pedagogy, as one does, the other night. Specifically, the section on student misconceptions. Misconceptions are one of my favorite topics in teaching computer science. The articles in this book are very helpful in understanding what student misbelieve and why they do so.

I’ve seen students with all of the common misconceptions and, of course, I try my best to help them overcome them before they get students into trouble.I tried to remember if I experienced any of them myself but memory of 50 years ago is very selective. What I do remember is that I had some experiences of getting very close to the hardware early on. While my first course was learning FORTRAN the computer we used required some extra (compared to today) to run. Specifically, it requires that one toggle in some instruction in binary using toggle switches to get it to read in a couple of punch cards that did the next phase of the boot up.

Not long after I learned the first two of what would be 7 or 8 assembly languages over my career. There is something about toggling a memory address so that one could read (in binary lights) or enter information in binary with those same switches to program a computer that give one a good understanding of what memory actually is.t

Those days are long gone of course and while assembly language still gets one close to the computer and gives an understanding of how things like memory work it can also be a gate or barrier to students. It’s actually not the ideal way to understand concepts that one might think. It’s not the sort of visual experience that today’s students are used to learning from.

What we really need is some better visualization tools for introducing concepts. My first thought was using debugging tools such as those built into tools like Visual Studio. One can single step though instructions and view the contents of memory (variable) locations. It works but it is slow and tedious. That may be fine for debugging but for learning it has a high cognitive load that gets in the way of what we’re trying to do in teaching.

So I have been thinking about how to create visualizations that are simple to use and that might help clear up misconceptions. Two things my thinking is focusing on are how variables and memory work and how loops and loop control variables work. Eventually I have to narrow it down to one of them to start. I should probably look at what might already be available first. I thought I would start by asking you, my readers, for suggestions. So, any ideas? How do you help students visualize these concepts? Any suggestions on tools for creating visualizations?

Saturday, September 03, 2022

Names Have Power – Names and Programming

"A rose by any other name would smell as sweet" William Shakespeare.

There are cultures where people have a sort of public name and a secret or true name that is rarely shared because knowing ones true name gives people power over them.  In fact, knowing a name is powerful in all cultures. Consider the difference between calling “hey you” versus calling a child by their actual name. Which way draws them up sharp?

Naming is important in computer programming as well. It’s not always as easy or as simple as beginners assume it is. Mike Zamansky’s post Subtle Errors gives a good example.  Having more than one item with the same name causes the sort of ambiguity that computers do not handle well. Some names (identifiers as we often call them in programming) have special meanings. Getting names slightly wrong can cause other problems.

A name can provide a great deal of information to a programmer. To the compiler names are pointers to more information. A variable name identifies a location to the computer. Other information about the data stored in that location is specified in other ways. The computer doesn’t care what characters make up the name. That it is unique is important but not the characters involved. In many programming languages the case of the letters makes two names completely different. People tend to see them as identical.

Beginners often think that “the computer” pays attention to everything in a program the same way people do. That’s not the case though. I’ve had students write comments in their code believing that the computer will read the comment and perform the action. They may also assume that naming conventions, starting all integer valuable names with “int” for example, will influence the computer. Again, not usually the case.

[Note: back in the day, any variable starting with one of the letters “I” through “n” was automatically an integer.]

Names/identifiers can communicate a lot of information to programmers. They are pretty important for sure.It is easy to gloss over them and minimize their importance. Getting them right though is something worth spending time on.

Saturday, August 13, 2022

Cyber Security and CS Education

Way back in time, cybersecurity was all about controlling access to the computer in the locked room with the raised floor. Well, you had to trust the people you did let in of course. I will not say much about the students I went t university with who competed to create the best, most realistic login emulator to steal passwords because, you know, that was all in fun. Later in life I actually had supporting the real login software as part of my job responsibility.

We were more aware of security by then. It was the real world. We spent a lot of design time on our various OS subsystems to make sure that access was verified and that people could only access what they were authorized to access. Dial in lines and then networks made things a bit more risky. I remember one system that required a second password of 16 random characters that changed every 5 or ten minutes (I forget which). Someone broke in anyway. Social engineering not technical engineering. People were and are still the weak link in computer security.

In the early days few people had access to a computer. Fewer still had technical knowledge enough to crack into systems And most of them were (it seems) fairly trust worthy. As more people got access to both computers and knowledge breaking into systems became more common.

Today there is a lot of talk about cybersecurity and the need for more people to be trained in the field. What does that mean for high schools? For one thing, it means a lot of people are saying that high schools should teach it. What teaching cybersecurity means is a question with still developing answers.

Should schools offer a whole course in it or can they cover enough in an existing course? If a full course, a semester? A year? Some part of a year? You’ll get a lot of answers but little in the way of a consensus. A lot of discussion about this on Facebook group for  Cybersecurity Educators. Resources at CYBER.ORG are helpful as well.

For now, individual schools are making their own decisions. These decisions are based on things like teacher knowledge to teach such information, room in the schedule, and resources available. Some school IT departments are not willing to let students experiment on networks in a school. Or even, in some cases, to have students learn about network vulnerabilities! I suspect that career technical schools are going to be the main source of high school courses in cybersecurity. There is less focus on AP exams and more focus on preparing students for the work force sooner rather than later. Oh yeah, colleges and universities but they are not my focus.

Comprehensive high schools are more likely to add some cyber security information into existing courses. AP CS Principles for example. A few will have longer courses but I suspect most of those will be independent high schools and charters as they have fewer restrictions and their politics is different. (Different does not always mean better or worse to be clear.)

Maybe when (if?) we get to a place where the learning of coding is done well enough and deep enough in middle school we can move away from HS courses that “just” teaching programming and start using that programming to learn about other things in computer science. Like cybersecurity. Like data science (although we are seeing some of that in middle school already (Bootstrap:Data Science ) which is pretty exciting. And like more artificial intelligence.

Programming is cool (to me) and important (to everyone!) but there is more to computer science than programming. Security is an important part of that and high school CS educators have to have it on their radar and give serious thought to bringing it into their curriculum.