Homepage for The Texas Tribune's engineering team

Spring 2022 Fellow Reflections

Spring ’22 engineering fellow Eric Lau reflects on 21 weeks of building new features and being a Texan.

Photo of Eric Lau.

Eric Lau is a rising junior at the University of Michigan and studies Computer Science. He served as the Tribune’s Spring 2022 Engineering Fellow. Learn more about Eric here.

What was your path to the Tribune? Why did you want to apply?

As a high school senior, I took a course in web development. I learned a bunch of things including D3 — a JavaScript data visualization library. By way of D3, I discovered the world of data journalism. The summer after graduating, I made visualizations for fun and read a lot of data stories. I read a lot about newsroom engineering too. I started to grasp the fact that there are many facets to programming in journalism and I began to realize that not all viable programming career paths have to go through Silicon Valley startups or big tech companies.

As a freshman at the University of Michigan, I joined The Michigan Daily (the student paper) as a data journalist. I did some cool data journalism. And though I didn’t join as a developer, my nosiness led me to poke around a lot of the engineering work too. Fast forward to sophomore year. After a year at The Daily, I wanted to know what it’d be like to work in a real newsroom. One day, I saw a quote tweet from Jason Kao about the Tribune’s fellowship program. Jason is a former data visuals fellow and we happened to go to the same high school (albeit in different graduating classes). I came across his work during my post-graduation summer, and it was through him that I first believed that I could work in a newsroom.

I applied to the Tribune because I valued its nonprofit status and its commitment to informing Texans, specifically on politics and public policy. I applied to the engineering and data visuals fellowships because I sensed attention to detail and care for journalism that I wanted to learn from, both from a product and editorial standpoint.

What did you do during your fellowship? What have you learned?

I’ll highlight three areas of work that I did during my fellowship.

About pages

The Tribune has about pages which contain information about our organization (privacy policy, board of directors, etc.). They were built into our codebase as Django templates injected with HTML. Each about page had a different template, though they shared common elements (such as a side navigation and a documents section). If someone wanted to change a page’s copy, they’d have to edit HTML or ask the engineering team to do so. Either way, this wasn’t a great system. The solution was to turn the templates into flatpages. Flatpages are standalone pages on our site that are separate from regular news articles. However, flatpages are like articles in that they come with our rich plugin system and text editor. Staffers can easily edit a flatpage without HTML. Flatpages can also have special layouts (essentially a Django template). I created a new layout for about pages that included all the common elements and, with the help of Ashley, replaced all the templates with new instances of the layout. This allowed me to do one of my favorite things: delete a bunch of code (over 700 lines of Django templates)!

The header of a GitHub pull request deleteing 700 lines of code.
The best code is no code.

Working with the data visuals team

I also did some work to help the data visuals team. Of note was a task regarding their campaign finance viewer, a tool the team uses to download and analyze Texas campaign finance data. The app is built with Django, but the main point of interaction comes through a fancy Python shell. My task was to put the app into a Docker container such that the developer experience when running the app would be consistent across different computers. If you’re familiar with Python virtual environments and dependency management, you know how ugly it can be. Using Docker would put all of that in a neat little box such that the person using the app wouldn’t have to deal any of it. I learned to love and hate Docker throughout my time working on this task. The Tribune uses Docker in most of their repositories, so I knew how to be a user of existing Dockerfiles but I was not at all versed in writing one. Shoutout to Brandyn and Matthew for their guidance in helping me think through this task.

Working with the photo team

The last major arc of my fellowship involved implementing features requested by the photo team. One request had to do with the photo grid, a layout plugin that acts as a container for photos. I worked on allowing for photos in a photo grid to have different aspect ratios. Previously, photos in a grid were rendered all with one aspect ratio, even if the original dimensions of the photos were not in that aspect ratio.

The header of a GitHub pull request changing one line of code.
The best code changes are one-liners.

This feature ended up being a one-line (13 character in fact) change to get rid of a conditional in a Django template. So, why am I writing about this? Because there was so much more that went into that one-line change than the change itself. For one, I had to consider what impact getting rid of this condition would mean for how all currently published photo grids would be rendered. So, I had to spend time querying for all articles that had photo grids that might be affected. Miraculously, only one article would be affected, and we dealt with that photo grid accordingly. Aside from delving into the ramifications of the code, I also spent a considerable amount of time taking all the screenshots in a video demo to showcase what this change could mean for the photo grid plugin.

A demo video showcasing various aspect ratios possible with the new photo grid change.

What I learned

I explored a lot of new technologies that I hadn’t used before. This was my first time using and learning Docker. With the media library, I even got to touch some Web Component code. I learned about HTMX (thanks Jonathan), the new hotness when it comes to frontend data fetching.

I think the most important thing I learned was how important it is to document your thoughts. One of the tools that Ashley showed me early in the fellowship was GitLens, a Visual Studio Code extension that will show a git blame-ish popup next to a line of code. The popup links to commits and pull requests on GitHub. I used this all the time to understand how previous engineers at the Tribune thought about a piece of code and why they made certain changes. As a recipient of such great PR documentation, I made an active effort during my time to leave detailed (borderline verbose) PRs for future engineers and fellows. Often, I would spend more time developing a PR than I spent on the related code change (the photo grid being a great example).

What was the most surprising part of the fellowship?

I was and am still surprised by how nimble and quick the engineering team is. Whenever staffers had technical issues or needed help with the CMS, they’d send a message in our #team-engineering Slack channel, and someone from our team would always respond just in a matter of minutes. I was especially surprised because there are only a handful of people on the team. I thought having a small team meant things would naturally move slower but that isn’t the case when the team is full of rockstars!

What is your favorite memory from the fellowship?

If it can be a series of memories, it’d have to be all the crazy stories that John Jordan told me during our mentor sessions. From his childhood in South America to his time as a touring musician, there was a mix of funny and absurd, but always profound. These always served as a nice break from long coding sessions.

If it must be one memory, it’d have to be the surprise virtual baby shower that Ashley planned for Matthew. We pretended like we’d be having a knowledge share session on expenses but instead we had Baby Yoda in a grocery store, guess that baby animal name, and list as many songs with baby in the title as you can.

What is your advice for anyone applying?

You might feel unqualified. You might feel that you don’t know enough web development. I certainly felt that when I applied. And I applied anyways because there was going to be no other time to apply. If I waited another year, I probably would’ve still felt like I didn’t know enough web development. What’s a fellowship if not an opportunity to learn? The best time to apply is now!

If you’re not from Texas, you might feel weird applying to the Texas Tribune. I certainly did when I applied. And I applied anyways because I felt a calling to do so. You’re allowed to feel something about Texas or the Texas Tribune even if you’re not from Texas. Evan Smith is not from Texas. Sewell Chan is not from Texas. A lot of fellows are not from Texas. Yet the Tribune would not be where it is today without them (and it wouldn’t even exist without Evan).

Also, somehow, you’re on texastribune.github.io and you even read a previous fellow’s reflections so you must be at least somewhat interested in the role. And if you’re at least somewhat interested, you should just apply! You have to!