Sunday, April 05, 2020

Coding For Fun and Mental Exercise

Recently, I started reading a book about the mathematics of cryptography. (Mathematics of Secrets) Fascinating. A lot of the math is hard (to put it lightly) for me but the stories that go along with the development of it all are fascinating.

So far I have learned a few things and made my Caesar Cipher program much more efficient. I really need to revisit my Vigenère cipher program and make it more efficient and more interesting. The other night I coded up a quick transposition cipher. It was fun and once I got the algorithm down in code it was easier to get to sleep. Writing the code does help me understand what I am reading and that is a real benefit.

We’ll see how I am feeling when I get to the chapter on public key encryption. So far, I am sticking with the easy math and playing with ciphers that are far from modern cryptography. I'll leave that to the professionals.

Caesar and Vigenere are common enough programming assignments but I may write up the transposition cipher as a project for future use. If not for my own classroom for a project book I have in mind. Miles Berry pointed out that teaching ciphers by having students write a little code and experiment with different variations is much more fun and engaging for students than exercises away from the computer. Doing this stuff by hand can be a bit tedious.

For now though I am finding some pleasure is writing some not very complicated code as a way of exploring ideas that I am learning. I’ve had a chance to play with some libraries and methods that I haven’t really gotten to use before. That’s been fun. So much of my coding the last couple of years as been limited to the stuff I teach in a first programming course. I’m using this time to stretch myself a bit. Perhaps get my coding “muscles” back in shape.

In any case, for me,  coding == fun

No comments:

Post a Comment