From Trial to Triumph: Learning to Code at SkyTruth

When I was brought on to intern at SkyTruth, I was presented by one of our analysts, Ry Covington, with a rather open-ended challenge: “Here at SkyTruth, we want our internships to be a learning experience first and foremost. With that said, you can learn almost anything you want while working here. Think about your main goals, what you hope to get out of these next few months and let me know so that we can decide together how best to help you achieve your goal.” This isn’t verbatim, but it hits the mark in regards to the message he was conveying. I already knew the answer to this question, because it was something that I had thought about even before I started at SkyTruth: I had a strong desire to learn programming, especially as it pertains to the field of geospatial analysis. Now mind you, this is coming from someone who is brand new to programming in any respect. I had one class in C++ my sophomore year of college and all of that information has since slipped my mind, as most unimportant (or at least I regarded it as unimportant at the time) college course material does. I also had attempted to teach myself Python the summer before I started at SkyTruth while rehabilitating a nasty toe fracture, but that information didn’t quite encapsulate what I hoped to achieve with coding. I only knew the foundational pieces of what it means to communicate with a computer through coding, such as iterators, variables, and Boolean operators.

Around a month or so into the internship I received my opportunity to work towards my goal. Ry had a project he was doing with the Heinz Foundation that involved creating a map which detailed potential well pad sites in Allegheny County, PA (to see my blog post detailing the final results of this study, follow this link). We worked out a research approach and came up with a plan to map out these locations that seemed logical to both of us. Great. Now here’s an idea: let’s take all of those things that we want to incorporate into this project and write that into a Google Earth Engine (EE) script. On top of that, let’s also publish an app which uses this same Earth Engine script. These suggestions made by Ry seemed fine and well, until the moment where he delegated the task of writing this script unto me. In his words, “It’s a steep learning curve, but you’re a smart guy. You’ll figure it out!” He left the room as he was making this statement, leaving me stunned like a deer in headlights. Yes I wanted to learn to program, but this seemed excessive! After a few moments of processing, I collected myself and turned to the most trustworthy source of them all for guidance: Google Search. Looking up “Google Earth Engine tutorial” led me to a website which detailed the functions which you can use to make neat little UI plugins in your EE code. After a day of playing with them and applying some of the sample code they offered, I figured out how to display the elements of interest on the map. Following this discovery, I excitedly called to Ry to come and look at what I had made. He took one look at what I had done and said, “Good job Brendan, that’s an excellent start. Keep going.” Wait, this wasn’t what I was trying to get? It was an excellent start, which meant I was nowhere near the end. So it was time to expand my search for information.


An example of the guides found on Google’s official Earth Engine site.

At Ry’s suggestion, I looked at the code that one of SkyTruth’s other analysts, Christian Thomas, had written in EE for global ocean monitoring. This turned out to be an invaluable source of information for me but it was intimidating at first glance. The script itself is composed of over 500 lines of intensely in-depth code that made no sense to me whatsoever. On more than one occasion, I found myself becoming lost in the script’s intricacies while trying to find answers to my own predicament. Nevertheless, I remained determined to figure out how to compose my script, so I proceeded forward with the examples Christian’s code offered me. My program would involve creating a panel on which I’d load on a few buttons with different unique functions that built off of each other to display different text and layers on the panel and the map, respectively. Needless to say, my first few stabs at all of this led me to fall flat on my face. I could create the buttons that I wanted, but I couldn’t for the life of me figure out how to put the buttons on the side panel that I’d made. I spent roughly two weeks trying to get over this hurdle.

It was nice to have the encouragement of my mentors to keep me motivated to seek the answer to this question. Without Christian and Ry’s calm demeanors and calculated approach to solving these programming issues, I probably would’ve lost hope quickly. Days of work would go by and I’d spend a lot of time carefully combing through my code trying to discover the answer to my plight. Even when I was at home at night, I’d think about ways I could get to the result I desired. Then one day, all at once, it hit me. It was like the roadblock in my mind was slammed into by a Mack truck and just like that I figured out how to get the buttons to display on the side panel. To describe the feeling as a whole is difficult, but I think I could compare it to the way I felt as a little kid on Christmas morning when I rushed down the stairs and saw presents underneath the Christmas tree. I jumped up out of my seat, did some silent yelling, and added in a few fist pumps for good measure. I was elated! The cool part about it was that once I broke through that wall, it was like the rest came naturally. My fingers fluttered across my keyboard as I coded exactly what I had in mind for this project. Before I knew it I had an EE script that was logical and effective. I remember when Ry and Christian first looked at my latest script and they had nothing but good things to say about what I had accomplished. That positivity made me feel great; it was a huge payoff after a great deal of tribulation. I had finally done it!

A screenshot from my finished app.

Now that I reflect on the path I followed to create this code, I’m astounded by how much I learned. I learned more in those few chaotic weeks than I would typically learn over the course of a semester long college course! It was a chaos that you can’t quite replicate in the classroom because there aren’t people depending on you when you’re doing homework or taking a test. The urgency to make your product the finest ever conceived is palpable. You do the best that you can for your coworkers, who end up being more like your friends here at SkyTruth. I think that hits the nail on the head when considering the mission of SkyTruth overall; we’re all here to provide information for others so that they can do meaningful work in defending our precious environment. Every task you work on here could have an effect on your world, so you do everything you can to give every project your all. I definitely got way more than I bargained for when I said that I wanted to learn to program at SkyTruth. Despite that, I couldn’t be more satisfied with the work I was able to do over my first few months here.

If you would like to view my completed app, please click here!