Skip to content
Taming software development with teamwork, S5E5 episode artwork

Feb 28, 2018 19 min

Taming software development with teamwork, S5E5

from Engineering Out Loud Hosted by Engineering Out Loud

How are Oregon State researchers impacting the apps on your phone? Danny Dig and his team have been improving software for companies like Microsoft, IBM, Intel, Boeing, and Google for years by developing tools that find and fix bugs. Dig is an associate professor of computer science at Oregon State and an adjunct professor at University of Illinois at Urbana-Champaign.

Episode details come from the podcast's RSS feed.

Embed this episode

Ready to play

Taming software development with teamwork, S5E5

0:00 19:10
of matches

Transcript Auto-generated, may contain errors

From the College of Engineering at Oregon State University, this is Engineering Out Loud. Johanna's in the house. Johanna, did you want to introduce yourself? Yes, I'm Johanna Carson, and I'm with the School of Civil and Construction Engineering. And on the podcast team, I do photography and visuals, so I haven't been in the booth in a while. Well, welcome back. And I'm Rachel Robertson. So, Johanna, last time you were here, we were talking about networking speed and how it can affect the performance of your phone. And listeners, if you want to check that one out, it was Season 4, Episode 2. And today, we have another issue that can affect performance of your phone apps, the software itself. So software has become pretty critical in our lives these days, and it can be frustrating and almost nerve-wracking when it doesn't work.

I think it's interesting how quickly we become so dependent upon software from when you get in your car to drive somewhere. I can't remember the last time I pulled out a paper map to examine it or even looked online at a map. I mean, it's usually I'm using this kind of software on the go. Right, exactly. And I almost have like panic if I feel like, oh, no, my battery's dying. I'm not going to know where to go. I'm going to get lost in the city. You'll be in the abyss. Right. And so having apps that we can rely on to work when we need them and not freeze or crash at the wrong moment is pretty important to most people. But few of us think about what goes on behind the scenes.

The task of creating reliable software has become increasingly difficult as software has become more complex. In fact, it's estimated that the software behind all the Google apps spans 2 billion lines of code. I can't even imagine what that looks like. It's hard to fathom. And those 2 billion lines of code are being modified by 25,000 Google engineers. That's pretty crazy. And I think a lot of people don't realize that software is written by teams of people, or in Google's case, teams of teams. Yeah, that makes me realize I don't really understand how all of that is created. You know, I haven't done programming myself, but I have quite a few family members who do that. And so I'm familiar with that in rough terms, but I don't really understand.

how the process is done by the software engineers. In my mind, I picture someone sitting down and it'd be similar to composing a piece of music or blocking in a painting and then creating a painting. That's good imagery, and I think maybe a lot of people think the same way. And it may have been like that at one time, but I talked to Danny Digg, who is an associate professor of computer science here, and he explained how complicated software development has become and why it has created challenges for developing bug-free code. So a widespread myth is that software engineering and software development is writing brand new programs from scratch, which is going to be further away from the truth.

When you think about all these large software systems that we have today, think about Microsoft Office Suite or everything that we have on the smartphone, those are gigantic large projects. No one single human being or no one single engineer writes them from scratch. In fact, 90% of the software development costs arise from changing existing code, not from writing brand new code, but by changing existing code. Danny's area of research is software engineering. In particular, much of his work involves developing tools to help software developers fix bugs that can make your phone app or other software slow down or freeze.

The tools are to benefit software developers by finding errors and inefficiencies in their code, but users benefit indirectly by having software that is more reliable, faster, and more secure. We have been very fortunate over the years that we have had lots of our research incorporating the official release of highly popular software tools that are used by millions of Java programmers or C Sharp programmers who work on Microsoft platform are used every day. And that's to me the greatest reward and the greatest sense of accomplishment of doing research is whether the industry adopts and uses our inventions. Because, you know, in the end it's not just about us, but it's how can we make other people better? How can we make them more productive? How can we empower them?

Just as programming is not a solitary experience anymore, neither is research. And Danny has a team of students, both graduate and undergraduate, who work with him. And the story I want to tell you today is about a project by one of his graduate students that caught the attention of a Google engineer. I'm Amaya Kitkar. Amaya was inspired to come to Oregon State to pursue research when he was working in industry. For a couple of years, I worked as a developer at a bank. And while working, I realized the value of having the right tools in hand and how important the tools are to a developer. I love tools. I think tools are what makes a developer a better developer.

Well, that sounds pretty cool. But if you're like me, you have no idea what a tool for software development could be. So I asked Amaya and Danny to explain how tools work. So we've got source code, which is the program itself. So we develop tools which analyzes the source code and then edits the source code in a very interactive manner. And we are very keen on saying this is interactive. So don't believe that the tool replaces the human. The tool is mostly augmenting the human. The tool finds out what are problems in this particular usage of this new construct that the Java programming language introduced. And in the end, it ultimately is the decision of the human whether to accept.

that recommendation and to allow the tool to also change the code it's a nice combination of where we have a lot of automation but at the same time relying on the expertise and the insights from humor it gives the tool a lot more leeway you know the tool can be much more aggressive in the kinds of edits that it suggests to the programmer because in the end the programmer has to decide whether to apply or not apply those edits so actually it's like grammarly for source code like those applications that you use on your text while you write which goes and checks your grammar. Have you written it correctly? Or it suggests, oh, you could write it this way. So basically we do that for source code in a way. We try to improve the readability of the text. So people are using editors. And when you're using the editor, sometimes it highlights errors that you make in the text when you're editing the text. So now we have both highlighting and finding those errors, especially those that have performance implications, but they're also fixing them. So it's not fully automated, but we ask them, this is the fix that you want to apply this fix.

But we're getting ahead of ourselves because before they even get to creating the tools, they have to first figure out what problems need to be solved. So our process is something that I call problem-driven. It's a problem-driven research approach in which we first spend a significant amount of time figuring out what's a problem that software developers experience in practice. And then to find this problem, we first conduct one or several formative studies where we analyze, we look at pain points. Essentially, this is a discovery process where we look at the pain points. Danny and his students use both qualitative and quantitative methods to find where the problems are.

They use surveys and semi-structured interviews to give them initial direction on where the developers are reporting issues, their pain points, as Danny calls them. But then they back that up with evidence by looking for errors in the source code that correspond to the reported issues. Once we nail down what's the problem, then we work on what is a solution that solves this particular problem. And now when we come up with a solution, it fits naturally, it fits almost like a perfectly matched glove on your hand. And the reason why we have then such a high adoption rate of our research in practice is because we really spend a lot of time understanding what is the problem and figuring out what's the heart, what's the essence of the problem.

before we design a solution. What they found over the years gives us a significant chance of coming up with research that is widely adopted in practice. As I said, this is the number one value that I care about, whether we produce research that makes a difference for the lives of the practitioners. So as we talked about earlier, the way they do that is by creating tools for software developers. What EMEA creates are two major tools, one that reads and analyzes the source code, and one that actually does the edits. These two tools communicate with each other, so they are essentially two tools in one. But you may be wondering, as I was, why these tools are necessary. When software grows at gigantic proportions that have millions or tens or hundreds of millions of lines of source code, the code can easily become what's called a spaghetti code, where it's so intertwined, you make a small tiny change here that has huge ramifications somewhere else in the program. And this is the number one root cause for software bugs.

So that's the complexity. That's the challenge in our research is how do we verify? How do we make sure that this change that we are carrying out with the tool doesn't have any unintended consequences? So it is systematic. It only changes what we desire to change and doesn't have any unintended consequences because of all the dependencies of these code modules and the way how they are intertwined with many other parts of the software. So that's one of the most fun parts, I guess, in our research is taming this complexity. So the code can be so complex and it's so tangled. And how do you make changes in this gigantic scale of spider web?

It's one of those situations where a computer can outperform a human. The tool can more efficiently analyze the code and find what are called corner cases, bugs that will only show up in certain conditions. And it can also look at all the ramifications of a change. Amaya describes the issue of making changes in software as being analogous to making a big change to a novel, such as changing the protagonist in a story from male to female. Now I'll have to change everywhere I used he, I'll have to change it to she. Everywhere I had used his, I'll have to use her. Now imagine doing this manually for, let's say, a J.K. Rowling book, like a huge book. Like I just, tomorrow I decide Harry Potter is female. It's a tough task to do it manually. So in some way we're trying to do that. In some way we're trying to do that for source code. So sometimes if you want to make a big change, like change the gender of the main protagonist, you're going to end up doing a lot of work.

Although software does not normally need to change its gender, there are certainly some analogous situations. Consider that the hardware on our phones is constantly changing. All of your mobile apps have to adapt or die. Some changes may be surface changes like he to she, but there are some changes that go deep into the code. You can imagine that if Harry Potter is now female, that may also require some changes to the plot. That was the kind of issue that a man covered in a product called Apache Cassandra, which is an open source database used for managing large sets of data. Huge, huge, huge capacity.

And if you need more capacity, you just add more machines. That's Jeff Jersa, who is an Apache Cassandra committer and member of the Apache Cassandra Project Management Committee. I learned that a committer is a person who can modify source code for an open source project. Open source means the code is available for anyone to look at and suggest changes. So Jeff receives changes from people who submit them and after evaluating them decides whether or not they will become part of the software. So he is the person who commits the changes to the central repository. And in this case, he's the one who received several patches from EMEA, which we will get to in a minute. But first, a little more about what Cassandra is. It's used by probably thousands of companies.

And here's where we get to that spider web of code that Danny mentioned. The beautiful things about open source software is that anyone can contribute. The downside of that is you occasionally get people who contribute code that is non-optimized. And what Danny's team was able to do is actually find some cases where people used features of the privileged language in ways that are perfectly correct but slow. And in particular, they generate more objects than they should, which ultimately goes down to slowing down the database. Now this is where EMEA comes in.

I have submitted more than 30 changes to the Cassandra project. And one of those changes was at the plot level, from our analogy. Here's Jeff to explain. And they fixed probably 20 or 30 different places, but one of them in particular was deep inside the database and actually is very important to performance. Okay, and did that surprise you that they were able to find that? I wouldn't have expected that situation to exist there. I'm not completely surprised, just due to the way that the software evolves over time with multiple contributors and many of them being volunteers. It's not hugely surprising that an inefficiency like that would sneak in.

But it was definitely nice that they did find it because it was unlikely that anyone else would have ever gone and looked forward and found it. Submitting patches to open source projects is one way that Danny and his team are able to have their research go out into the world. But the other way they do it is to work directly with software engineers inside companies. In the past, Danny has worked with Microsoft, IBM, Intel, Boeing, and Google. Danny usually cultivates these relationships with companies, but at a recent conference where they were presenting their research on the Cassandra project, they were surprised to have a Google engineer in the audience who took a keen interest in their work. So it turned out that this problem of fixing this misusage of this particular construct,

It was important for him and for the code that they have at Google. So we started to talk more, and he was very excited. He talked with us, I think, for about half an hour at the end of the conference, at the end of our presentation, which is not typical. It's unusual for someone to show that level of excitement and interest on a project. So that was for us a nice challenge. How can we make it work in an environment where the code is so large that it doesn't fit on any one single computer? So that was for us a nice challenge. And of course, the potential of having an impact and having our tool being used by engineers to work on Google Codebase, that was another big draw for us. Partnerships and collaborations are essential for Danny's research.

And he's always out connecting with people in industry to find out what their major challenges are and what they see as big upcoming opportunities. So during those trips, I've been at more than 30 companies, and I ask them what they're excited about the next big growth of computing, and everyone talks about being excited about using intelligence that is personalized. So think of Siri, Alexa, or Cortana, except better, an assistant that can anticipate your needs. Danny's vision is big, really big. The size and the complexity of this big dream is something beyond what any single researcher or what any single university, what any single company can accomplish on their own. So it requires a team effort. So I have put together first a team of researchers from several universities and also a consortium of companies. So right now we have more than 30 companies who are interested to join us with this consortium. Danny's big dream is still a work in progress, and he is currently working on securing funding for the consortium, which he hopes will become an established center for Internet of Things development. I'm super excited myself. I think if we can use devices to learn about us and to augment us so that...

Again, I'm not saying that they should replace us. I'm not talking about the world where the robots are going to take over and say, hey, they're going to take our jobs and are going to automate us away. They are going to remove us. But I'm excited about the world where software intelligence and all these Internet of Things and all these smart objects are going to take us to another level of productivity, are going to probably semi-automate the lowest repetitive jobs, but they're going to help us to maximize our time, to help us to excel, help us to just go beyond what we can do on our own. So this is what I'm excited about. How can we augment human intelligence? It's not how we can replace human and remove them out of the equation, but how can we augment human intelligence with this huge intelligence that we can harness from all these devices that are monitoring our lives. That's it, my friends. I hope you enjoyed learning more about how researchers at Oregon State are applying their work to real software problems out there. And now, ladies and gentlemen, here's Johanna.

This episode was produced and hosted by Rachel Robertson, audio editing by Brian Blythe. Our intro music is The Ether Bunny by Eyes Closed Audio on SoundCloud and used with permission of a Creative Commons attribution license. Other music and effects in this episode were also used with appropriate licenses. You can find the links on our website. For more episodes, visit engineeringoutloud.oregonstate.edu or subscribe by searching Engineering Out Loud on your favorite podcast app. Thanks, Johanna. Anytime. Get me out of here.

Frequently asked questions

How long is this episode of Engineering Out Loud?

This episode is 19 minutes long.

When was this Engineering Out Loud episode published?

This episode was published on February 28, 2018.

Is there a transcript available for this episode?

Yes, a full transcript is available for this episode. You can read the complete transcript on the episode page.

Can I download this Engineering Out Loud episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.