2018: A Python Odyssey

I had already started working on my project — a flashcard program to help people learn the most frequently used Russian verbs — before I decided to apply to be a mentee in Chipy’s mentorship program. My journey had brought me into contact with some new libraries (new for me, anyways). I found an open source Russian dictionary with a frequency list, so I decided to figure out enough Beautiful Soup to scrape some data from it. I offloaded that data into text files, and then used boto3 to send the data to Amazon’s Polly API, which can turn Russian text into passing fair audio. I had even started trying to knit everything together into a little desktop app using PyQt on the frontend. PyQt is kind of a pain in the ass, but with a little fiddling around I had managed to get it to more or less do what I wanted. My problem was the backend. I had been reading a little about design patterns and object oriented programming, so I decided to create a nice “verb” class with “getter” methods to access the data for a given instance. I was watching some Python videos on udemy, and I just happened to watch a couple videos on Pickle and Shelve, so I decided to use shelve to store my data as serialized objects.

Stage 1 in the evolution — Shelve

Several weeks later, after I had gotten my Shelve-based backend going and plugged it in to a slowly expanding PyQt front end, I was having lunch with a friend who asked me whether I had considered using SQLite for my backend. He touted the easy-to-use SQLite database API for Python, so I decided to look into it. Part of the motivation for my project is learning marketable skills, so I thought some exposure to SQL (which I knew nothing about) would do me some good. A few weekends of work later, I had managed to swap my amateurish Shelve backend for a slightly less amateurish SQLite backend.

Stage 2 — SQLite

However, after the mentorship started, I found that multiple people (including my mentor, Steve) asked me variations of the same questions: “Why are you building a desktop app? Why not a web app?” Previously, my answer to these questions had been that I would like (eventually) to get some software into some Linux software repositories. I’ve been using Linux for almost a decade now, and I would like to give back to the community, even if only in a small way. But the question about web apps would not go away. The more I thought about it, the more I realized that if I am serious about developing my Python skills and transitioning into the world of programming, I need to study tools that are in demand. PyQt will never be very impressive on a resume, and I think I have already gotten about as much out of it as I care to. And building a webapp would give me an opportunity to learn more about databases. So I started reading the Django docs.

The Monolith — Django

I’ve built several websites (or more accurately, the same website twice) using HTML, CSS, and Javascript before (even delving a little into Angular), but I am still a novice when it comes to web frameworks. I’m only about halfway through the tutorials on the Django site, and I am still trying to make what I’ve learned my own, but I feel ready for the challenge. I feel good about having a definite path ahead. I am sure my first attempts to turn my program into a web app will be clumsy muddles, but you cannot play a Rachmaninov piano concerto the first time you sit down at piano. I am just happy to have the keys in front of me and a mentor to guide me along my journey into the world of web development.