Unix · python perl · 2022-05-20 · Daniel

I have been programming in Perl since the early 1990s. My early scripts were what you would expect them to be, but my skill of course increased over time. I have never found a thing I wanted to do that I could not do in Perl and/or shell scripting (Bourne when portability is needed, Bash when it is not).

For my job, I need to learn Python, and a friend recommends the book Automate the Boring Stuff with Python. In addition to the book, the author also has a Udemy course, and I am working my way through that right now. One of the examples given in the course is a Tic-Tac-Toe game.

Earlier this week, as I was going through the course, I had WarGames playing silently on the TV. Right when the movie got to "put X in the center square," my course also got to "put X in the center square." See attached pic ... not faked, and not timed. It just worked out this way.

Anyway, I decided to write a Tic-Tac-Toe game in Python, and seeing as I have 1- never written a game in my life, and 2- never written a line of Python, I think this is a pretty good first attempt. The only thing I took from the course example was the idea for the hash data type; 100% of the rest of this was my own.

WarGames