Saturday, December 27, 2025

AI Written Code and Making Assumptions

I’ve been writing some code for my own amusement the last few days. I have happily using Microsoft CoPilot to help me out. One really has to be careful with prompts though. CoPilot loves to make assumptions about what the developer desires. Often, it assumes correctly. Often enough, it assumes incorrectly.

I spent a good bit of time trying to figure how where it was doing some things I didn’t want done at all and other places where it got my intentions backwards. For example, we both had different ideas about what a variable called _defaultColor should refer to. That took me a bit.

I could have tried to ask CoPilot to fix the problem for me but if I had a better idea of how to express what I wanted it would probably have gotten things right, for my definition of right, the first time. So I fixed it myself.

I also made some assumptions about what certain methods were doing. I mostly assumed correctly but mostly is not really good enough when dealing with code. I really should have spent more time reading the code and making sure I understood it before trying to modify it. Yes, I said it before knowing how to read code is more important than ever.

Reading code on a screen can be painful though. One tends to get a sort of tunnel vision looking at little bits of code at a time. Many years ago I worked with a developer who had a terminal that was originally developed to typesetting at newspapers. It was tall and could hold a lot of lines of code. It was great for reading code. I don’t have anything like that. For me, the answer is printing listings out on paper. Maybe its just me but that is what has worked well for me for over 50 years of writing code.

I have more modifications I want to make to my program. I’ll spend some serious time reviewing the generated code before I try to make those modifications.

Related read: "Source code is the literature of computer scientists." https://www.cs.uni.edu/~wallingf/blog/archives/monthly/2025-12.html#e2025-12-26T18_28_37.htm A post by Eugene Wallingford

One other note, CoPilot added a lot of helpful error handling code to what I asked. That’s awesome in a lot of ways. I think that spotting a lot of error handling code may be something that tips off an educator that a student used artificial intelligence to write their code. Keep a look out and be sure to ask the student to explain it all.

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.

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.

Sunday, October 26, 2025

User Interfaces and Microwaves and Artificial Intelligence

It seems like just about everything has a user interface these days. It is sometimes hard for me to question them. What sort of decisions go into their design? Microwaves are one such thing that I keep thinking about. My current microwave defaults to pushing a number button running that many minutes. That’s great when you want it to run in whole numbers of minutes. What about fractions of minutes?

For fractions of minutes there is a button that is pressed first to let the microwave know you want to enter the number of seconds. So far so good. It can get complicated though if you don’t have the default whole minutes option.

My previous microwave did not default to whole minutes. If you enter 100 is that one hundred seconds or 100% of a minute? i.e 60 seconds? How is the decision made on something like that? What is intuitive to the user? Actually, I don’t know what my current microwave would do if I asked to seconds and entered 100. I think it would do 100 seconds as 90 does run for a minute and a half. I should try it I suppose.

It’s a computer related question of course because there is a little microprocessor in there somewhere and someone has had to program answers to these questions. I wonder how artificial intelligence would make UI decisions about things like this. It largely depends on the instructions or prompts given to the AI. People are going to have to have some input there. Right?

Will AIs have access to research on things like that? Will they be able to design and run human factors research? Will they think research is necessary or even desirable or just assume they know what is best for us?

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.

Sunday, August 24, 2025

Tiny Book of Simple Cryptography

For the last several years, I have been playing around with simple cryptography. I have made some of results of this available as a free PDF download as a book I call Tiny Book of Simple Cryptography. (TinyCrypto.pdf) I recently put some additional work into it and the latest version is available at the link above.

There are currently a baker’s dozen cryptographic methods described in the book. (List at the bottom of this post) Each write up includes a section on:

  • Introduction
  • Encrypting
  • Decrypting
  • Cryptography Issues
  • Project Suggestions

If a PDF is not to your liking and you would like an actual book, I have created a book you can order through Amazon.com. Maybe for a classroom or school library? Or maybe because you find books easier to browse through. It’s there. There is also a Kindle version available here.

 

Methods covered

  • Caesar Cipher
  • Vigenère cipher
  • Wheel Cipher
  • One Time Pad
  • Polybius Square
  • PigPen Cipher
  • Columnar Transposition Cipher
  • Keyword Columnar Transposition Cipher
  • Random Block Transposition Cipher
  • Steganography
  • Bacon’s Cipher
  • Book Ciphers
  • Playfair cipher

Friday, August 15, 2025

Has Computer Science Education Become Too Vocational?

That’s the question Mark Guzdial asked in a recent post on the CS Education Facebook group. He references an article (Labor Market Outcomes of College Graduates by Major) that shows the unemployment rate for computer science graduates is twice that of philosophy majors. Now there is a lot to unpack in those numbers. The employment market for CS majors is complicated to say the least.

There is the perceived higher cost of American employees, H1B Visas, the hype over artificial intelligence, and more. It may be that the vocational focus in CS education is a big part of the problem though. It may be that CS education has become so narrow that the only job path for to many CS majors is software development..

As my friend Neil Plotnick points out in a recent YouTube short “Computer work is not just programming or web design” but that is a lot of the focus in much of CS education. Especially in K-12

So what do CS educators need to work on teaching their majors? I think that Ed Lazowska had some good ideas in a recent interview. (After 48 years at UW, Ed Lazowska reflects on computer science, education, AI, and what’s next) Key quote:

“Design is not dead, working in teams is not dead, figuring out what problems need to be solved — and what the right approach is to tackling those problems — is not dead, and understanding how humans are going to use and be influenced by digital technology is not dead.”

I will be attending my 50th university reunion in October. Back then there were few computer science majors. We did not have a CS major where I went to school. We did have a major in Systems. Yes, there was a lot of computer science as part of the program but there was a lot more. We learned about the people part of systems including how organizations work, how they use math and computer science, and what sort of impact computers were already having. Frankly, it was those other courses that helped me have as eclectic a career as I wound up having.

I was prepared for a lot of jobs in a lot of different types of companies. Yes, I spent a lot of time developing software, especially in my early career, but it was understanding systems of which software was only a part that make me a good hire. It was knowing how to work as part of a team, to figure out what the problems were, and how to design solutions with the system in mind.

Those are not necessarily easy things to teach and they may be easier to teach at the university level than in the K-12 level. That being said, if we are serious about the idea that CS education is not just vocational and that CS is not just programming we have to made an effort.

We can start with more group projects. [I can hear some of your groaning] Not the easiest projects to create or grade but necessary. We can start by requiring design before coding begins. We can start by having students actually think, talk, and even write about the impacts of technology in society.

We also have to support the liberal arts. We require a lot of subjects that are not CS in K-12 and that is great. We also need to help students see the value in those courses at the college and university level. Well rounded people have more job opportunities than narrow focused people. They are also better problem solvers, better designers, and more interesting to be around. We need good people not just good computer scientists.

Thursday, August 14, 2025

Reading Code For Fun and Learning

For some time I have been writing up information about some historic, and simple compared to modern, cryptonymic algorithms. They are collected in book form (a PDF actually – new release coming soon) that I have made available on my website. One algorithm that I have struggled with has been the Playfair Cipher. I don’t know why but for some reason I’ve had trouble with the algorithm. Mostly, I have struggled with how to code it up. Recently, I decided that I should work on that.

First step was to use something called Notebook LM. More on that in a future post. It’s pretty amazing. In any case, that tool helped me find a coded implementation of the Playfair Cipher. Great! Maybe I can learn from that. It turns out that I can.

The code was in Python and I am not very experienced with Python. Still with well over a dozen languages under my belt, figuring out the code was not hard. After reading the code I feel like I have a better handle on things.

I also learned more than I expected about how Python does things. So double the win. I do believe that reading code is a great way to better understand a programming language. It’s especially valuable if it helps you learn the idiom of the language.

So I now had a console application that worked and that I could play with. Now to me, a console application is so late 20th century that my next step was to convert to C# so I could use Windows Forms. Since I was already using “artificial intelligence” (that’s in quotes because I don’t completely buy that these tools are actually intelligent.) I asked Copilot to convert the Python code into C#. It did so quickly and easily. It wasn’t the way I am used to doing things though. Maybe that is why I was struggling with my own code? It’s a possibility.

The old joke is/was that a good FORTRAN programmer can write a good FORTRAN program in any programming language. Apparently, Copilot can write a good Python program in C#. Yes, the code looked a lot more like the Python code than I had expected. More than I really wanted as well. But along the way I learned that C# could do some things in some ways that I didn’t realize. There have been a lot of changes and updates in the language and I have clearly not kept up with all of them. Well, more learning is a good thing I guess.

Once I had the converted code I built a nice Windows application and have had some fun with it.

I am toying with messing with the C# code to make it look more like what I am comfortable with but that may not be the best use of my time. I might be better off experimenting with the new (to me) features of the language. Either way, learning is a good thing.

Sunday, July 20, 2025

Tech Promised Everything. Did it deliver?

This TEDx talk by Scott Hanselman has been shared a lot on BlueSky, and probably other places, over the last few days. I finally had (made) some time to watch it today. It is something I would show early in all my classes if I were still teaching. I recommend it for everyone though.

Technology promised us Community, Convenience, and Creativity. This talk asks the question “Did it deliver?” It’s a good question and the answer is both yes and no. A lot of the answer is up to us. And by us I mean everyone but especially those of us deep into technology.

As CS educators, most of us talk about computing, especially programming, as a creative tool. Does AI help or hinder that? A lot is going to depend on how we teach it and how people use it. Just as social media promises community and connection but so often results in isolation, AI can go in different directions. We’re still early in to the AI “thing” and that means there is a lot of potential for helping move in a direction. What is the direction we want for it?

Just about everything has unintended consequences. Technology is perhaps first among those things. We need to think deeply about how we use it.

Monday, July 07, 2025

Thoughts on Advance Placement Computer Science Results

My Facebook feeds are full of teachers discussing the results their students received on the AP CS exams. Lots of the thrill of “victory” and the agony of “defeat.” I can relate.

The thing is that most of the results are a lot more dependent on the students than the teachers. If the student does the work all course long they are likely to get a good grade on the exam. If they didn’t do the work, especially if they cheated a lot, they are not going to get a good grade no matter what the teacher has done. Even if they did the work a lot of factors the day of the exam can make a big difference.

Sometimes a student takes the exam sick or while over tired. Somethings their boy or girl friend broke up with them the day before. Sometimes the student just doesn’t care about the exam. None of those factors are under the teacher’s control. I had a class of very smart students who all just decided they didn’t care and would blow off the exam. Nothing I could do about it. Guidance wanted to blame me but fortunately there were no long lasting consequences. It was my first year teaching the course and I was given another chance.

Speaking of that first year, my assistant principal, who had taught several AP courses, assured me that it takes most teachers three years to really get the hang of a specific AP course. I believe him. I see too many teacher beating themselves up after their first year teaching AP CS. Most of them have done their best with what they had in the way of curriculum, professional development, and the students who show up in their classroom. They should be happy with the good scores. And happy to have survived. They can learn from this year and move on.

Most of all, remember that the AP exam is one test on one day. Using it as a determination of success for the teach or of the student would be a huge mistake. Life is a marathon not a sprint. Most students will not know for years how much they really learned. It’s usually more than they think after the exam.

Monday, June 30, 2025

Teaching Computer Science in the Age of Artificial Intelligence

An interesting article was posted on Facebook recently. (https://archive.ph/Jwd7m) Carnegie Mellon is spending some time over the summer rethinking how, and probably what, is taught about computer science. It’s an important topic.

A lot of people seem to think that the need for teaching computer science, or at least, programming is past. I’m not so sure. Yes, the job market for software developers seems to be in a steep decline but I wonder if that will last. Is it a reverse bubble that will pop at some point? Maybe. A lot of people use computers and even write code, even if they don’t think of it as coding. So we still need to teach computer science but we probably also need to think more about what and how we teach.

I do think that some basic programming knowledge is still needed. People have to be able to read code at some level. But learning how to deal with abstraction and how to break problems down to manageable pieces is going to need more attention than we have traditionally give it in K-12. Oh, we pay lots of lip service to it but we have students spend most, if not all, of their time on projects that don't require as much of breaking down into pieces and building blocks as students need. We assign projects that could be prompts to an AI and act surprised when students feed them to an AI.

Ultimately, we have to change the way we teach. I've been thinking about things like assigning different routines to different students where the routines have to fit together to create a larger program. Students would have to do some work to make sure that interfaces worked to communicate properly with other routines. Maybe that would help.

I agree that we need to teach something about artificial intelligence of course. We need to teach prompting, the ethical use of AI as well and the ethics of training AIs. Part of that education needs to include testing and verification of what AI produces. A lot of what we are getting from AI is worse than useless. Students been to learn about limits and verification. Blindly trusting AI leads to bad things.

Regardless, we have to do a lot of rethinking. Kudos to CMU for seeing that and doing something about it.

Monday, April 21, 2025

Different High School Computer Science Strands

A recent talk by Bjarne Stroustrup at Stanford has sparked some conversation in the Computer Science Educators Facebook group. The talk itself doesn’t seem to be available but it was reported online at The Stanford Daily - C++ creator Bjarne Stroustrup reimagines how coding is taught

There is a lot there and I agree with some things in the article and disagree with others. I have less enthusiasm for C++ as a teaching language, especially in early courses,  for example. I’s like to share some thoughts on the idea of different strands and early courses for different audiences. These are initial thoughts intended to start discussion. I am open to the ideas of others.

First off, I understand that the idea of different first CS courses is difficult at the high school level. Stroustrup seems to be focused, as it seems most university CS faculty are, on the university level. Offering different courses is easier there as the size of both faculty and students tends to be larger. I do think that, where possible, high schools should give the idea some thought.

Stroustrup suggests three strands:

One would serve nonprofessionals, or those who only want basic tools. The second caters to scientists who want to focus on application-based programming instead of theory. The third emphasizes engineers or specialists who want to dive deeper into the complexities of software engineering.

I think universities need a strand for scientists who want to delve into theory. Regardless, I think high schools should consider a different set of strands.

One strand would be less theory and more applications based. Probably using Python or R with a focus on libraries more than theory. Statistics could be included as that would be particularly useful for students in the liberal arts. Skip the data structures that computer scientists love so much. Not everyone needs to spend a lot of time on those. Know what they are and where they fit in but not deeply how they are implemented. It’s more important to understand concepts like normalizing data and how to use libraries.

The second strand would be more theoretical for those students who want to be computer scientists and/or software developers. My time in industry taught me that theory is a lot more important than many self taught developers want to admit. There may be a place for C++ here though I would prefer that early in the strand start with C# (or Java if you must). This is where one would get into data structure implementation, Big O and optimization, and theory of computation.

I do think that in high school either strand should start with something like APCS Principles. It is a good base to start with. True multiple strands are very difficult in most high schools of course. If I had to pick one strand it would be the first one. Why? Because that would serve the most students well. Keep the AP CS A course for the serious CS geeks (my people) and make sure that teachers allow those students to go beyond the basics in the other courses where possible.

We need more students with computing skills and knowledge than we need high schools to turn out computer scientists.

Tuesday, April 15, 2025

Hardware–Heat and Cold

Not all computer problems are caused by software. Sometimes the hardware is the problem. It’s not always easy to tell where the blame lies. One underappreciated factor is the environment. Both mechanical and electronic parts are impacted by heat and cold. There is a reason that computer companies specify operating temperatures.

I think most people understand about overheating but maybe not the problems of to cold.

One day I received a support call from a customer. They were a tomato distributor receiving tomatoes and sending them to supermarkets and grocery stores all over New York City. The problem was that their computer did not work on Monday moorings. Monday afternoon was fine as was the rest of the week. Sure, people have trouble getting started on Mondays but computers should not care about days of the week.

Their computer used floppy disks. Now floppy disks were not sealed in vacuum and the read/write heads had to be a specific distance from the disks. I’d visited the company and knew something about the office. Most of the building was unheated for the good of the tomatoes. I asked if they ran the heat in the office over the weekend. The answer was “no.” The office got pretty cold over a winter weekend. The cold caused the parts of the computer, especially the disk read/write heads to contract pulling away from the disks. As the office  warmed up the tolerances returned to normal and the computer worked just fine.

Electronic parts get hotter as current runs through them. This can cause expansion which can cause all sorts of problems. That’s why fans are installed in computers – to keep things from getting to hot.

Back some years ago, Microsoft donated  a bunch of computers to a school. The computers had been purchased as part of an investigation into counterfeit software. Once the court case was over there was no need to keep the computers. Now these computers had been sitting in a warehouse for quite some time and not all of them were in perfect running order. I was one of several volunteers who were tasked with diagnosing and, hopefully, fixing some of these computers.

One of the computers had a note on it that said it was crashing at a certain part of the installation of Windows. Software problem? Perhaps. So I started an installation and sure enough the computer crashed at the noted location. I tried again but this time the computer crashed almost immediately. So probably not software. I opened up the computer and it seemed a little hot to me. And the fan was not working.

Aha! It turns out that one of the wires connected to the fan was not actually connected. The fan was not getting power and so was not running when the computer got hot. Connecting the wire fixed the problem and everything went perfectly.

It pays to be aware of environmental conditions both inside and outside the computer.

Wednesday, April 09, 2025

Software Learning Stories - Comments

Continuing my software learning stories series, I will talk a bit about commenting code.

One customer I supported many years ago was a Jewish cemetery. In the Jewish tradition, visiting grave sites is very important. For this reason, a database had been created that stored the location of every grave in the cemetery. This allowed the people there to easily draw maps so that family members could visit their relative’s grave sites. Unfortunately, the database started losing records. I was called in to find and fix the problem.

It was quickly determined that the database software created by the company I worked for was at fault. Now this was proprietary software which means that the source code was not readily available. Especially not externally to the company. Someone from corporate headquarters came out with the source code to help find the problem.

Now apparently, someone at another company had purchased a source code license for the software. A junior developer was told to remove the comments from the copy provided to that other company. (Mean I know!) Unfortunately, they neglected to keep a fully commented copy for internal use. This meant that we, the home office person and I, had to do a lot of figuring out what was happening in some very complicated code.

We eventually solved the problem, if I remember correctly, but it took a lot longer than it should have. Or would have if we had had commented code.

One more comments story. While I was an undergraduate I wrote some fun graphics programs. They were mostly written on punch cards in FORTRAN IV. Years later I decided to rewrite one in Visual Basic to display on a screen. I figured that I was a smart guy and it would be easy. Unfortunately, when I first ran it the program drew what sort of looked like random lines and not the cool geometric shapes I was aiming for. The mess looked strangely familiar though.

Now it turns out that in my attic I had the original card deck. I dug it out and there were comments for many of the key lines. One of them was a reminder that a key method expected degrees to be expressed in radians. Ah ha! That was the missing piece of my new program. I fed a method in radians and my new program worked perfectly.

A good reminder that we can’t remember everything and even our own code can benefit from a good comment in the right place.

The software learning stories series: