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.