0009 – My First Python

I have actually made some of my best progress in a long time during this last silence. Working at Adobe really has gotten me into the programming mindset more even though it's not directly part of my job.

Part of how Adobe handles evaluation and growth is to have employees work with their managers to set Key Performance Indicators over a given year which give you a target for growth that is personalized to what you're interested in but also increases what you can bring to the table in your job. So, it's different for everyone. I surprised my manager and came in swinging with my idea for a first KPI:

I will learn enough Python to write a script that downloads the latest daily build and installs it for me to test.

Keep in mind, I have only done a very basic learning of Objective-C and Swift. I haven't completed an app or really anything that could even be considered a project. I've just completed some tutorials, barely, over long enough periods that my brain hasn't really even kept it all together.

It turns out, it was exactly the push I needed. You see, bonuses are tied to KPI performance. Not to mention that if you fail you are then failing to meet a goal that you set with your manager and he/she sees that.

So, I worked my way through a Lynda course enough to get the basics and then jumped in. It was easier than I expected. My script basically needed to:

  1. Check the local build directory to determine the latest local build
  2. Check the FTP to determine the latest build there
  3. If FTP is newer, download it and run the installer

It sounds simple, but as any programmer knows it can be surprising how many things start to shake out from what appear to be straightforward steps. What I thought would be the hardest part would be interfacing with the FTP. However that actually turned out to be the easiest part, using the ftplib library. While I found the overall process easier than I feared, the hardest part turned out to be sorting out the logic to parse my build folder structure and determine what the latest local build was there and then set up a new folder if need be. It was easy to get a quick first pass up, but a lot of string parsing edge cases to consider.

One of the most obvious downsides to my script is there is no indication at all via UI or terminal output that the download is happening. I relied on iStat Menus to see the download speed ramp up to know it was working. But, I managed to get this script put together and repeatedly working and even demo for my boss. He was impressed!

So, what is my next KPI? I bit off even more by making it two fold:

  1. Revise my script to the point where I would be able to share it with coworkers
  2. Create a Mac menu bar app that shows which version of Premiere is installed and allow for uninstall or kicking off the downloader Python script

Even writing that out now feels daunting, but having this semi-rigid goal has proven to be exactly what I need to get things done!

The first few lines of my script

The first few lines of my script