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.