Speaking of Python, Dave Hamilton (of the Mac Geek Gab podcast) bragged that his son Lucas had written a solver for Wordle in Python as well. It was in a private repo on GitHub so I asked for permission to see it. I bring this up not to talk about Wordle, or even to talk about his solution method. I bring it up because of how it made me feel to try to use his solution.
In my programming journey, I’m often frustrated and feel as though I’m super dumb and I’ll never catch on. Bart and the other people in our #pbs Slack channel are very quick to tell me that I’m wrong to think that way and that everyone feels that way from time to time.
But when I tried to use Lucas’s Python script, I felt positively powerful. You see, I don’t know Python at all, but I still figured out how to use it. From Programming By Stealth, I’ve learned a lot of little pieces of information that are just stuffed back in the dusty shelves of my brain and they surfaced right when I needed them.
We’ve learned how to put our code into GitHub to share with others, so once I had permission, I knew how to clone his repository down to my computer so I had a copy of the code. I knew that to run a script, you type
./ and then the name of the script. I tried that, and it didn’t work. Then I remembered Bart saying that you have to change the permissions on the script to make it executable (
chmod 755 nameofscript).
That started the script up, but it didn’t work properly. I knew how to open an issue with the developer (in this case Lucas) on GitHub. Lucas asked me what version of Python I was running. Hmmm. I seem to remember something like putting the application name followed by
--version would answer that question. Sure enough, it found I was running an old and busted version 2.7.18 of Python.
Apple ships Macs with programming languages like Python but makes no effort to keep them up. Their solution is that they’re going to stop shipping the languages at all, and I wish they’d get on with it! Anyway, Lucas suggested I upgrade to Python 3.
Ok…where do you get a programming language? Bart taught us about a tool called Homebrew where you can get all kinds of nifty command-line open source tools. On a lark I typed into the Terminal,
brew install python. In a few seconds, I had Python 3.9.10. Boom.
I even figured out that this method, while downloading the new version of Python, did not get rid of the old one, so I had to call it by
python3 instead of
python and that pointed me to the correct version.
After that, and a bug that Lucas squashed, I was able to run his cool Python script to solve the Wordle puzzle. In the few times I’ve actually played Wordle, it’s taken me 3-4 tries, and with the help of Lucas’s script, it still took me 3 tries!
I went back to GitHub, let Lucas know it worked, and then closed the issue.
While playing the game of Wordle is great fun, learning to program has been even more fun. I was amazed at how much I had absorbed from Programming By Stealth and how comfortable I was with all these different tools.
When I was a little girl, my mother said that if we asked my dad what time it was, he’d explain how to build a clock. She tried to convince him that we couldn’t possibly understand all of what he was trying to explain to us. My dad had a great answer. He said that he thought of it as trying to pour wine into a wine bottle. Sure a lot of it would spill on the outside, but some of it would get in. Well, Bart has poured a lot of wine over the last 130+ lessons and a lot more of it has gotten in than I ever realized.
Shortly after I finished writing this up, Michael Westbay posted a wonderful story about Programming By Stealth that he gave me permission to share.
Our son interviewed at an independent gaming company a few days ago. They asked him if he knew Git, which he replied “Yes.” Later in the interview they mentioned that he’d have to issue pull requests on his work. He knew about push and pull, but this was the first he’d heard “pull request.”
I told him about PBS and that there were about 10 episodes about Git and one of them focused on pull requests in particular. I gave him the gist of it, you have to fork the project on GitHub, check it out on your workstation, make a branch, make the modifications, commit those, push those back to GitHub, then issue the pull request from the original repository. That was a bit too much to handle all at once, so I sent him to https://pbs.bartificer.net/pbs119 and suggested we go through the process on one of my repositories for practice.
He put it off for a couple of days, then last night he came to me and said that he finally got it. He said that listening to the accompanying podcast was the most helpful because “the dumb one asking the questions asked all the right questions.” (No offense intended on his part. I told him about the tagline “I’m the stooge who asks all the dumb questions,” but I don’t think he’s familiar with the word “stooge,” so that was his attempt at quoting it.)
Personally, I find the show notes to be extremely helpful for looking something up quickly. But I’ve already heard the podcast. Our son doesn’t like reading English stories, and that’s how much of the notes are presented, as a short story using an aspect of tech to solve a problem. It’s not a transcript of the show. Instead, the audio podcast is an extension of the story with an additional character helping to make things more clear.
I don’t think I’ve convinced him to become a new subscriber. But he does appreciate the stooge in the front row asking the dumb questions. Thank you, @podfeet for asking them and helping tech be more accessible.
I love this story so much because it shows how Bart’s reach is helping so many people. But I also love it because it supports what Bart always tells me, and that’s that my playing the stooge who keeps asking questions from the front row of the class is actually valuable to other people. I’m grinning from ear to ear.