The Stories Your Code Tells

Developer Tea


What is the story of Your Code? That's what we're talking about on today's episode. My name is Jonathan Trail and you're listening to develop see. My goal in the show is totally different developers like you find clarity, perspective and purpose can their careers. When I say the story of Your Code, what does that mean to you initially? How it came to being certainly. But what exactly your code tells? What does your code explain both in the code and beyond it? It's important to recognize that all code. Every piece of code you right will have a story where it came from. Why was written that way? Why certain decisions were made? Even if those decisions were made quickly, maybe made with your gut verses arduous thinking. That is still a story. And here's the critical factor that I want you to understand for today's episode, and this is a short episode today. Something for you to kind of meditate on to think about as you move through out the rest of this week. The stories that you have around your code. Continue to. Accrue as time moves forward. So let's say you're writing. An object oriented programming language. Something like Ruby or Java. And you build up these names. These name conventions classes these objects instances of classes and. You create an idea. Some kind of mental wrapper around a bunch of values, maybe some primitive values or relationships to other things. and. It's important to recognize that that idea. is necessary to grasp what's going on in your code. But it's also important to recognize that the idea has more meaning than the code gives it. Think about that for a second. The idea has more meaning. than the code gives it. A class means more to the person that is writing it then it means to the computer that is interpreting it. This is necessary to understand because. It means that name our classes for example. In ways that constrain the way we can think about them. And so the narrative of our pass code in many ways constrains, or helps define the narrative of our future code. You can imagine that if you were to rename every class in your your code base that you might come up with a different structure entirely and. Perhaps more importantly a lot of those relationships you might have to rethink. Additionally it's very likely that you have concepts that are named one thing. But are referred to as something different, or at least they're understood by us the programmer or other engineers on your team as something different than what they're named. Perhaps, there's more meaning that is imbued on that object. Maybe that meaning is living slack conversations, or maybe it's living in your own personal memories or conversations that you've had, or maybe it's an documentation, but we tend to overload the code that we write with more information and that story exists somewhere else somewhere beyond the code. So there's two simple pieces of homework here for this episode. The first is to consider what that story is. What is the history of the code? How did it become the way that it is today in whatever project you're working on, and then secondly? It makes sense to consider whether that story lives. Where do you go if you want to understand story of the code? which you'll find very quickly is that there's not just one story. That everyone has a different experience with the code base. And in many ways, the code is a snapshot of those various experiences. My one engineer may have fought for a long time with a particular class in the code base, and other engineer may not have ever touched that class, or maybe they wrote the original class, and now there is some kind of interpersonal dynamic as a result of those two people interacting with that code in that particular way. Take time to consider what the stories are. The you're telling yourself about the code. Take, time to consider what the stories are about the objects that are in your code base. And if it's not object oriented, there are still other things that are in your code based processes functions. Definitions, all of these things that we add we add meaning to. Go beyond with the computer can understand. The culture surrounding your code is important to

Coming up next