Echoes from 308 logo

Echoes from 308

Subscribe
Archives
October 11, 2021

Mental Models to Source, and Back Again

I’m writing another newsletter (blog post) later in the day again. This time, I’m at Adam’s place. After being brutally headbutted over and over again by a feline apex predator (see below)

cat.jpeg

I finally have time to write down my thoughts on what happened over the last week. I don’t really have a plan for what I’m going to write about, so I’m going to channel my inner James Joyce and try a stream of consciousness.

The Fun Stuff

Braxton has organized a “sock war” for the lab. This means that I am legally allowed to hit my assigned target in the lab with a sock 1. If you’re someone from the lab that’s reading this (and I really hope there aren’t many of you), then I’m sorry - you’re not gonna get any more information about my target.

I’ve honestly talked a big talk over the week about sock wars, but I know for sure that I’m probably gonna get eliminated in the first week. I’ve never been super good at these types of games. Honestly, being vague to people in the lab and pretending like I have them as a target has been pretty fun. How I love sowing mistrust and chaos. Take, for example, a recent message I sent to a friend in the lab:

Screen Shot 2021-10-10 at 8.28.35 PM.png

Definitely being a bit melodramatic here, but who hasn’t wanted to be a Bond villain at some point in their lives.

The Fun Fun Stuff

I met with Gail last Thursday to talk about what I’ve been doing in terms of research. I’m not sure if I’ve written about this yet, but I’ve moved away from thinking about code search for now. Instead, I’ve returned to a paper that came out in 2010; “Developers Ask Reachability Questions.” There are a ton of definitions of “reachability” in computer science. One that most people are familiar with is probably asking whether the control-flow of a program will reach a certain point in its source code (I may be mistaken but I think optimizing compilers would likely run this type of analysis to located and remove “dead” code). In this paper, LaToza talks about reachability questions as being a

search across feasible paths through a program for target statements matching search criteria.”

This is a pretty broad categorization, but it serves to capture a lot of the questions that developers have about the programs they work with and modify each day. For example, a question that Samantha the production engineer at Facebook might ask on a Tuesday morning at approximately 8:39am PT on October 5, 2021 might ask is “Huh, is this change going to break anything?” This is, in fact, a reachability question. Gregor the engineer might want to trace where his method goes when specific parameters have some values – this is also a reachability question.

These questions are incredibly difficult to answer. Not only because there isn’t a lot of modern tooling that helps developers ask reachability questions, but because the translation from a developer’s mental model to their source code (and back again), is an incredibly error-prone process. When developers have reachability questions they want answers to, they usually have no choice but to translate their question into something that they could find in source code, and then translate the answer back again. What my (current) research idea attempts to do is help make this process less error-prone and easier for developers (at least for a smaller, constrained set of questions).

I was pretty happy when Gail told me that I had “done a lot of work.” I know that relying on external validation is pretty bad, but the fact that I appear to be getting somewhere is a nice change. I’ve recently began the process of setting myself daily goals. These could be something like “Read a paper and make notes,” or “Think about one more reachability question that you could imagine developers needing help with.” I find that setting concrete goals that I can “tick” off of a list is helpful in showing me progress and lighting a fire under my ass.

It is a long holiday weekend, but I couldn’t tear myself away from re-reading a paper about the “Hard-to-answer Questions about Code” that developers ask. It was pretty insightful about some of the reachability-related questions that I could explore in my work.

That’s it for this week, I’ll have some more news about research (and more importantly, about sock wars) next week!


  1. a clean sock. ↩

Don't miss what's next. Subscribe to Echoes from 308:
Powered by Buttondown, the easiest way to start and grow your newsletter.