My spreadsheet tracking shows that I’ve been studying Python programming for about three months now and just about 75 hours total. How is that going?
Meh, can’t say I know too much.
I didn’t pick up Python programming until about mid-February, just before I dropped studying Japanese from my schedule and as the Coronavirus became an issue all over the world. At that time I was doing a lot of reading and listening to others about the current state of programming and where I should focus on my attention. You can read about the start of my programming journey here.
As my studies progressed throughout the month of March, I finished off the tutorials in the SoloLearn APP and went through some of the extras also available. SoloLearn was alright to introduce concepts and what not and the comments from other users were extremely helpful in getting through the quiz sections. Although some commentators said the questions weren’t always worded properly, I found it was more my own understanding of the concepts and how to actually write the physical code that prevented me from working through some of the questions on my own. Luckily the APP allows you to check comments if you get the answer wrong so you’re not just stuck on the same question until you figure it out. (Or look online for the answer).
I also tried to start programming on my cell phone itself by way of the PyDroid APP which seems like a good idea, but the keyboard layout for a cellphone isn’t conducive to doing a lot of programming. Maybe it would be good for studying snippets of code or possibly making quick fixes, but it wouldn’t be ideal to do a large program. One neat thing that I was able to do was to reference the geeksforgeeks.org website while using the PyDroid APP via the split screen function on my cell phone. This made things a touch easier but still wasn’t a replacement for a larger screen and keyboard. I could see this being of use on a tablet.
So this is my progress throughout the month of March:
You can see I’ve gone through a few chapters of the Automate the Boring Stuff with Python by Al Sweigart. Whereas SoloLearn introduced a lot of concepts very quickly and very briefly, Sweigart goes through each in a little more depth and has you try out the code as you go.
After going through the first chapter I thought I would jump straight to Chapter 12 which deals with spreadsheets, but, once I got to the practice questions I found I was stumped as I didn’t even know what to enter at the beginning of a program. Comments around the web have voiced similar concerns so, instead of trying to jump around the book, I’ve decided to follow it chapter by chapter.
One thing I have been doing, since the code snippets are rather short, is physically typing out the code into my IDLE so that my fingers get used to typing Python code. I liken this exercise to writing out the Chinese characters or even practicing drum rudiments: it helps build some “muscle memory” while also getting you closer in touch with what you’re trying to figure out. It’s easy to gloss over something and say “Yep, get the concept,” but then when trying to remember what to type, it might not be as easy. So this is one thing I’ve done more and more, though I’ll still copy+paste larger code snippets (10 lines or more).
In addition to Automate the Boring Stuff, I’ve been picking away at some other projects that I found of interest. One notable project was the Speech Recognition program found realpython.com, in which the author, David Amos, goes through step-by-step how to install and start using the speech recognition abilities of Python:
This was a fun exercise as it all of a sudden made very real the possibilities of the Python programming language and, more generally, the ability to work with audio files and speech with computers (which is surprisingly still a developing field).
To be clear, it’s not so much the Python language itself that does the speech recognition but you can create programs that interact with other sources that, as one example, then can spit out a transcribed audio file. For these exercises Amos goes through, we use the Google Speech Recognition API. It’s free to use but is limited to only 50 hits per day. Further, since Google doesn’t work in all parts of the world, you may need to have a VPN turned on in order to access that server. There are other methods, notably the PocketSphinx module, but I couldn’t get them all to work.
It wasn’t all easy, however. There were several errors using pip install (on MacOS you must use pip3 install) for various modules and some of them were quite big so they took some time to finish installing. I did finally get it to work but I had to make my own audio files since the ones Amos provided links to were no longer available. Once it worked, it was neat to be able to record a file and then have the computer spit out a near-perfect transcription of what was said.
(For recording my own files I used Audacity and spit out uncompressed .WAV files, which the program requires, along with AIFFs.)
I was able to work my way through the “Guess the Word” game Amos has at the end of his article and test it out. Overall, it was an interesting project to go through and something to think about developing further.
(It’s speech recognition programs like these that Apple, Google, Amazon and others are developing with their respective products. Although powerful and they can be modified, it can also be a little bit unsettling when you realize that your computer can be constantly recording you, not just the key strokes, but your voice and face. Something to be aware of, at least.)
Further, as I progressed through the different tutorials, I started taking even more notes on my spreadsheets so I could keep track of all of the things I had done. It was during this time that I learned how to enter different lines within a cell in Open Office Calc (press Cmd+Enter and you’ll skip down a line but not exit the cell):
Having finished the speech recognition program, I sifted through some of the other projects on geeksforgeeks.org and thought about what else I could do. One thing that would be neat to do is to build some sort of Twitter bot if only to test pulling out articles by their keywords. Why? It would be a method to further filter through the endless stream of stuff that happens on Twitter. I also thought about making a bot that would compliment me whenever I said something good or positive, you know, as a counter to all of the trolling that goes on in the digital world. 😀
But I understand I still need to develop the basics, so I’ve continued with Sweigart’s book. I’ve done most of the work for Chapter 5: Dictionaries but it is here that I seem to have hit a wall. Going through the chapter was easy enough to understand but the practice questions hit me: I don’t know what to type first. Even trying to break down the questions into chunks had me wondering what the actual code would look like. You can see my confusion in my notes below:
I skimmed ahead to the end of Chapter 6 to see where things were going. Thankfully, Sweigart gives some hope that, by the end of Chapter 6, you’ll have learned most if not all of the basics you need to type / program in Python. So, at the end of Chapter 6 he includes a link to another library of projects which he calls “Games by Example”.
So, feeling a bit frustrated with not being able to write any code, I decided it might be a good idea to simply start reading through what Sweigart did in his other programs.
So that’s where I’m at right now in my Python studies.
I can’t say I’m having all the fun in the world doing this but I’m also not bored to death nor do I not see the point of all of this. That is to say, in more positive terms, it’s interesting enough to keep going and I can see the use of Python, programming in general, and its applications in the future. Although I still have zero aspirations to switch careers and become a programmer, I do see the interest and applicability to what I learn today to what tomorrow could bring.
That being said, given the current absence of work, I do understand that I need to prepare for the fact that work may be limited and/or I may be forced into finding other work. I don’t like this idea but it also makes me wonder about the immediate applicability of programming and how I can work on more useful stuff rather than just theoretical ideas. So, with that in mind, I continue to look at how I can apply what I learn to my daily life and to possible work scenarios.