Looking for more podcasts? Tune in to the Salesforce Developer podcast to hear short and insightful stories for developers, from developers.
107. How to Write Seriously Good Software
Hosted by Rick Newman, with guest Marco Faella.
Writing legible, functionable code is the aspiration for many programmers. Defining what that actually means is another matter altogether. Our guest, Marco Faella, has written a book on the subject. We'll explore the characteristics good software demonstrates. We're also going to give away a 40% discount code for Marco's new book!
Rick Newman is a Director of Engineering at Salesforce Heroku. He's joined by Marco Faella, a professor of advanced programming and author of "Seriously Good Software." In Marco's view, there are of course several ways ways to characterize "good" software. Excellent software that goes above and beyond correct functionality includes code that is readable, robust, and performant. Each of these have different importance, depending on context. Robust software, for example, includes addressing issues with scalability, but only if one expects the software to be in such a high availability environment.
It's important to address these requirements from the beginning, when the software architecture is being mapped out. Marco gives the example of developing software for an external client. This client might know all the business logic and how it ought to function, but addressing the code's future evolution and maintenance are just as important, and whose responsibility lands squarely in the hands of the developer.
It can also be worthwhile to make an investment in education, learning about algorithms, data access, and other key concepts in the world of computer science. Such a foundation would allow one to adapt to the changing conditions of programming, whether those are caused by new hardware or modifications in the languages themselves.
Links from this episode
- "Seriously Good Software" is Marco's book on the subject of writing strong code -- get a 40% discount with the code podish19
Rick: Welcome to the Heroku Code[ish] Podcast. I am your host today, Rick Newman, and I am a Director of Engineering at Salesforce Heroku. I'm here with Marco Faella. He is a professor of advanced programming and an author of Seriously Good Software, which is what he and I are here to talk about today. Marco, welcome and thank you for joining me.
Marco: Hi, Rick. Thank you very much for having me.
Rick: Excited to hear about what we're about to talk about, Seriously Good Software. I, at least in my role and roles have encountered seriously good software, at least I thought so and I've encountered not so seriously good software. So I'm interested in hearing your perspective, especially given your background and your current role.
Marco: There are certainly many different ways to characterize good software, from my point of view, what I'm mostly interested in is having software that takes care and covers all requirements and not only the functional requirements, which are those that usually people focus on, but also nonfunctional requirements like readability, robustness, performance, various meanings of performance.
Rick: Right. Right and you mentioned functional and nonfunctional and talk a little bit about that non-functional. Do you have other ideas or examples around those non-functional requirements, especially robustness, when you say robustness, maybe as a tag at the end? What are you thinking about when you say that?
Marco: Well, I'm thinking about, for example, the amount of testing that to you perform on your software. So robustness in the sense of how sure you are that your software is going to work according to specifications and at the same time, I'm thinking about issues of scalability.
Marco: So your software may be functional with a small number of users, but maybe breaks down when external conditions change such as the number of users or other external factors.
Rick: When you're looking at these functional, non-functional, both set of requirements, how do you go about addressing that?
Marco: I think first of all, it's a matter of addressing these requirements from the beginning, from the specification stage. So say that you're developing software for an external client and this external client is not into software. He or she is a domain experts for their own business and most of the time when you talk to your client, they're going to focus on functional requirements.
Marco: So they probably have in mind what the software should do, but they're probably going to overlook most of the non-functional requirements, and so I think the first step for eventually and ultimately getting a good software is flesh this nonfunctional requirements out at the specification stage.
Marco: So don't overlook them and think about what performance constraints your project has, how important to code readability is for the future evolution and maintenance of your software and stuff like that, that can be easily overlooked and of course, there's same attention to these non-functional requirements must then carry over to the development phase, must be transmitted over all your organization from people in charge of specifications, to all developers.
Marco: Now at the developer level, I think something that should be encouraged is that developers should be aware of the alternatives. In other words, they should be aware that there's many different ways to achieve the same functional effect, many different ways to design a single class, for example, which is what I try to show in the book.
Marco: You can design a class, aiming at readability, a very readable and clean class, or you may aim at performance and sometimes there's trade-offs between these different code qualities. Sometimes if you really want to squeeze performance to the maximum, you're going to have a less clear code or other kinds of compromises like that.
Rick: This is fascinating and I would say fundamental stuff and in your role as professor of advanced programming, this is a portion of your curriculum of what you are teaching. Is that right?
Rick: So how do you go about teaching this?
Marco: So I was lucky enough that I was given a lot of freedom in designing my own curriculum. My own class is advanced programming language class. So what I did, what I tried to do is to mix and match different topics that usually are taught in different classes in college, like software engineering, programming languages, programming techniques, and some algorithms, all of this stuff is usually taught in different classes, which of course makes perfect sense because in college, you go vertically in depth in each of these topics but I think that from time to time, you also need to have a broader perspective to appreciate the relationships between those topics, to appreciate the fact that they all contribute ultimately to designing good programs and so what I try to do is mix these topics and compare different ways of doing the same thing or similar things, to give students this broader perspective.
Rick: That's a great idea, just focusing on kind of that horizontal integration across the number of almost siloed focus in for example, different languages or maybe compile--compilation and algorithms and seeing how those interact with each other is likely very beneficial for the student.
Marco: Right, and so I tried to do something similar in this book where I take a single class, very simple, a small system and then I show how you can refactor it according to different software qualities when you want to optimize for performance or memory footprint, readability, and so on.
Rick: How does this translate from the students that you see that come through your classroom and as they go out into industry, how does this particular class and your method translate into them taking this out into the workforce?
Marco: So my impression is that, what I'm talking about, so this broader perspective, I think it's something that all of them sooner or later acquire from experience, but it usually takes two or three or a couple of years to get from a more narrow, more focused college, like folk process to grow their engineering industry like perspective and I hope that with my class and perhaps with my book, I shortened this timeframe. So give them a quicker introduction to the industrial coding perspective.
Rick: So do you think that this is meeting those industry needs at least in part from your students?
Marco: Yeah, at least in part and at least locally. Of course, I'm mostly in touch with local companies in Southern Italy. So actually I'd be curious to hear your thoughts or your experience about it from a very different and a lot larger industry that you belong to.
Rick: I've been a hiring manager at a number of places for teams of different sizes for maybe 15 years, but absolutely there, I see some gaps in new graduates coming in and it really depends obviously on the individual and even the school that they're coming from or the path that they're following, if they're pursuing a master's degree in computer science, for example, or a bachelor's in computer science or a different mathematics but one of the general gaps that I see just in general is that of fundamentals and you actually mentioned that, thinking about algorithms and how do you do, and what do you balance, how do you consider the different factors coming into, I want to develop a feature, I want to implement something, are you considering efficiency or maintainability, are you considering things idiomatic to a particular language?
Rick: So I can absolutely see the necessity of the kind of teaching that you're bringing and that you reflect in your book of pulling these things together and instead of just having separate categories in a person's head of these are data structures and this is sorting and here is the language that I know, or here's the ecosystem within which that language exists. Being able to pull those together, will certainly be helpful.
Marco: And of course, like priorities between different requirements, change a lot with the industry, for example I'm thinking of the video gaming industry. So their time performance is super important because like big games try to squeeze all of the performance out of the hardware, whereas in other contexts it may not be crucial or critical.
Rick: Right. Yeah and I guess we're talking a little bit about wisdom. We're thinking about really in any field or any endeavor that it's going to take a little while to be able to absorb and understand, and almost internalize the balance, the different priorities but I do think that we could help accelerate that a little bit and I think the way you're thinking is a step in that right direction.
Marco: I hope so. Obviously there's other very good resources. I'm a fan of this like horizontal type of books like, The Pragmatic Programmer is another one where it's not about technology, it's not about any in-depth technical knowledge. It's rather about the broader perspective.
Rick: So coming out of this, thinking about just the work and the book, and you mentioned past students and include your book, obviously include your book in this question, but what are the biggest learnings? What are your lessons learned as you kind of interact with students and seeing them go out in the world and having this conversation, and I'm sure many others, what are your lessons learned if you were to share some bit of wisdom with me in particular and our audience?
Marco: I think it really pays off to make an education investment, even these days where there's so much free and easily available tutorials and education on the internet, because that kind of foundation that you were also talking about is your best guarantee to be flexible, to adapt to the changing conditions and our field of programming, computer science and computer engineering are extremely dynamical fields. The technologies change all the time. So I think strong foundations are your best bet to remain flexible and relevant, and then get the best positions in the industry.
Rick: Great, good advice.
Marco: I think it's also good to read good code, and there's a lot of good code around, for example, I'm mostly familiar with the Java Ecosystem. So everyone can take a look at the Java Standard Library, the Java API, the source code, and that's a simple way to compare your coding style with the pros, with an established and high quality code base. That's a good exercise.
Rick: Yeah, that's great and that really does pay off. It might not pay off frequently, but when it does pay off, when you do have to dig in and find something that is just a gnarly, gnarly, strange bug, it is deeply satisfying when you make use of that experience in that and that knowledge.
Marco: Yeah and then often you get, after you pick into a library, you end up using it with much more... Much more aware of how to use it. You're going to just use it better.
Rick: Well, this has been fantastic, Marco. I know we've mentioned that you have a book out a couple of times for those listening and those interested it's on the Manning site and there is a 40% discount if you use the code Podish, which is P-O-D-I-S-H-19. Podish19 and you can use that on the Manning site, and those will be in the show notes as well and thank you again, Marco.
Marco: It was my pleasure. Thank you very much for having me again.
A podcast brought to you by the developer advocate team at Heroku, exploring code, technology, tools, tips, and the life of the developer.
← Previous episode
106. Growing a Self-Funded Company
Next episode →
I Was There: Stories of Production Incidents II
January 26th, 108. Building Community with the Wicked CoolKit
Director of Engineering, Heroku
Rick likes to think about culture and trust and how they can enable smart people to do great things.
More episodes from Code[ish]
Ifat Ribon, Chris Ostrowski, and Corey Martin
Growing your monthly active user count is the goal for every startup. But can your popularity actually work against you? In this installment of I Was There, Ifat Ribon and Christopher Ostrowski share their experiences tracking down... →
Alli McGee, Lewis Buckley, and Greg Nokes
Most companies talk about building for the customer—but when you’re a self-funded company like BiggerPockets, building a product that users pay for can be the difference between success and shutting down. Guests Alli McGee and Lewis Buckley... →
Andrzej Ludwikowski and Robert Blumen
Organizing data into a sequence of CRUD operations have a long history in software. But with newer and never-ending data streams, different models are emerging. Guest Andrzej Ludwikowski, a software architect at SoftwareMill joins host... →