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.