What really is software. In this episode, we discuss what software is and where it comes from. Our welcome to COPEC Explain Software, the podcast where we make computing concepts intelligible. I'm David copeck. I'm an assistant professor of computer science and a software developer, and I'm here with my wife, Rebecca.
Hi, everybody. I'm Rebecca Kopeck. I work in education and I'm married to Dave.
So, Rebecca, this podcast was actually your idea. So how did you come up with the idea?
Well, in our relationship and day to day lives, I've been asking you lots of questions about how computers work and how software works, and I'm always surprised by the answers. I find them really interesting and intriguing, and they often lead to some cool conversations. And I just thought it could be a fun podcast.
And our goal is really to give listeners an intuitive understanding of software. We're not going to go into formal definitions. We really just want everyone to understand the concepts. So today you had a question for me that sounds like a great way to start a podcast about software. What is software? Right.
Yes, that's my question. What is software? How does it work? And all the little bits in between, I guess.
And it is about bits. We're going to talk about what bits are, but software is about ones and zeros, which we call bits. We'll come back to that a little bit later. But software has a lot of different formal definitions. But my definition of software is actually what it's in opposition to, which is hardware. So, you know, your computer, of course, has a physical component, and then it also has a virtual component, the physical components, the hardware, and the virtual components, the software. But another way of thinking about it is the hardware is the part of the computer that can't change, whereas the software is the part of the computer that can change over time.
That's really cool. So the software is the malleable part of a computer. That's something that someone gets to create and change and work with once the computer arrives in the mail to them.
Yeah, exactly. Once the computer comes out of the factory, the hardware, which is physical, which is at its most fundamental level, actually what we call transistors, is set in stone. We can't actually change how those transistors are configured and how they interface with one another. But what we can change is the electrical signals that go through the hardware and the electrical signals are actually the software. And so the software is what gets interpreted by the hardware.
I really like the idea of imagining the different parts talking to each other.
Yeah. And it really is like two different systems and people specialize who work on software and hardware, usually in one side or the other. So we have hardware engineers and we also have software engineers. Software engineers are the people that you probably are more familiar with from the movies and from television shows. Hardware engineers have quite a different kind of job. They're really working at the physics level and also in a field that we call electrical engineering thinking about how current flows and thinking about how we can use fundamental transistor components to make digital logic. But software is a really creative field. Software is a field where you can really create almost anything you imagine. The screen is your canvas and you can paint a picture of any idea that comes to your mind, which is what I love so much about software development.
So where does software live? In a computer.
So software resides in what we call memory. And I think in a future episode we'll talk about the different kinds of memory. But to put it in the most basic terms, memory goes into a few different layers. There's one layer that's kind of permanent storage. And we used to call that a hard disk. Sometimes you'll hear it referred to as a disk and usually today it's a solid state disk. There's also a part of memory that is transitory that starts and comes into being when the computer is turned on and goes away when the computer is turned off. And we call that random access memory and that's faster to access than the disk. And then there's also little bits of other memory all over the computer. There's memory within the microprocessor itself. You can think about the microprocessor as the brain of the computer. It has little bits of memory that we call registers and then it has little bits more that we call a cache. And some of the hardware devices will have a cache too. And what a cache is is like temporary memory while a program's kind of or data from a program is in transit. But all these different kinds of memory, they hold software. And so software has to come from the memory to the brain, which we call the microprocessor, to actually be interpreted. And the brain only speaks certain languages. And in the case of microprocessors, we call those languages instruction set architectures. So somewhere in this memory is something that's encoded in a language that the microprocessor understands. And I'm going to call that language machine language for the rest of our conversation.
So the machine language is the most basic language, the least complicated?
Yeah, the machine language is the only thing that the microprocessor understands. So the microprocessor, like every component in computer, speaks ones and zeros. But those ones and zeros need to be in a particular configuration to represent what you can think about as words in the machine language.
So if that's the most basic layer, then software is going through some other layers.
That's right. Yeah. So when I create a new program, I usually write in what we call a programming language. And what I write in the programming language isn't yet ready to be understood by the microprocessor because the microprocessor only speaks machine language. So we have a program called a compiler. And what a compiler does is it takes that higher level language that programming language and converts it into machine language. Now technically it would be possible for you to write your program directly in machine language, but it would be very unpleasant because writing in machine language means literally writing in the most elemental form that the microprocessor understands. And we like to have higher level conveniences when we program. So the early programmers working in the 1940s and 1950s, they would actually program in machine language and that would look so foreign to you, it would basically look like some kind of mathematical notation almost to you. But programming languages, they look somewhere more like a cross between something that's mathematical and English. They're almost like somewhere in between the two. And that's much nicer to work in.
So every time I turn my computer on, I see images, I can decide if I want to check my email, if I want to open up a word processor, what I have to do during that day. Each time there's this process that's happening of something getting pulled from the memory and loaded up.
That's absolutely right. So when your computer first starts, we talked about those different kinds of memory. The operating system, which we also will get into in another episode, what is an operating system? But the operating system will actually load from the disk into memory and then it will reside in memory. And what the microprocessor is constantly doing is it's constantly going to memory and looking for the next instruction, in other words, the next word, if you will, in machine language for it to interpret. So it's constantly pulling another instruction from memory and then once it's finished with that instruction, it pulls the instruction right after that.
So everything that I'm interacting with on a computer or even on my phone or anything really is software.
Yeah. So everything that you do is really software. The hardware is interpreting the software and allows the software to work. But in terms of the hardware by itself, it doesn't actually do anything until it's given the software.
So is the software it's not just on my computer though, it's on anything that has kind of that sort of interface, like our appliances are going to be running on software?
Yeah, the vast majority of computing devices have some kind of software. So there are computing devices that have almost no software that are purely implemented in hardware, but they're pretty rare and they're not the vast majority of devices that we think about as computers. So every time you use a computer, whether it's your phone, your laptop, whether it's even your television or your car before you turn it on, the hardware by itself isn't actually doing anything until it loads that software from memory.
So who's creating the software?
So we call the people who create software a few different titles. We sometimes call them programmers, we sometimes call them software developers. And some people in some corporations like the term software engineer, but they're people usually who are trained in computer science. So computer science is a discipline that studies how to solve problems using computational tools. And most people who work as software developers have a degree in computer science, although some people don't. And actually, I should say a lot of people don't as well. But either way, they're trained in what's called computer programming. So they know how to write in that programming language. There's many different programming languages, but they know how to write in at least one programming language that then gets translated into machine code.
And this is different than the people that I call when I can't get something to work on my computer or there's some kind of interruption like the Help desk kind of folks. These are people whose job it is to build the software that all of these different devices are going to be able to utilize on a day to day basis.
Yeah, I think you're talking about the distinction between it what's typically called it and software development or computer science to go even further and deeper. So people who work in it know how to use software. They know they're experts in how to use software. They're experts in how to configure software and how to fix problems with software. And it is a big field, but people who work in like a Help Desk in It, as we say, are experts in how to use software. But people actually create software. They're software developers or software engineers or programmers. And so that's actually quite different. So I often get I'm an assistant professor of computer science. I get asked a lot by my family, hey, can you help me fix my computer? Can you help me with fix something that's going wrong in Photoshop or whatever it is that they're having problems with? And oftentimes I can because I create software. I happen to use it a lot, so I know how to use most pieces of software, but that's not what my expertise is in. My expertise is actually in creating new software, which is different from somebody who might spend all their time studying how to configure Windows well or how to use Photoshop perfectly. So those are two different things. But it just so happens to create software, you have to use software a lot. So you usually become a pretty big expert in configuring it and using it. It's a great question.
So shifting back a little bit to the types of software and I guess this may be more focused on a computer, but you can tell me if I'm right or wrong. We talked about there are just some different layers. You talked about operating systems. What are some other layers or categories of software?
Yeah, so there's a few different layers, the two that most people are probably most familiar with are operating systems and applications. So the operating system is what sits on the lowest layer of the stack between you and your computer. So the operating system is the foundational component that the applications sit on top of and so it actually talks to the hardware. So the operating system is there sitting on top of the hardware and interfacing with it and providing all kinds of features from the hardware. So for example, maybe you have some software that wants to access your microphone. Well your microphone is a piece of hardware and your microphone might be plugged into your computer and then your computer is being controlled the hardware by the operating system and then your application talks to the operating system and says hey, can I use that microphone or do you know how to start a recording on that microphone? And the operating system knows how to do that. Now there's a lot of different pieces of hardware in your computer and on top of all the hardware there's also a lot of repeated things that all the different applications need to do. So for example, one application might need to connect to a web server and another application might need to connect to a web server. So maybe what we need to do is put that repeated code in the operating system so that we don't have to keep repeating ourselves when we write the applications. So in other words, to summarize what the operating system does is it controls the hardware and it also provides services for all of the applications to use.
It's like a bridge between the software and the hardware. So it is telling the hardware like turn this part on, do this and there's some almost like shorthand that all programs, all software can use to access those pieces because they're going to get used a lot.
Yeah, that's one way of thinking about it, absolutely. And then like I said there's also that services component so that could be things beyond just the hardware. That might be things like hey, I really want to draw a rectangle and yeah it will interface with the hardware, the graphics card maybe to put the rectangle on the screen but specifically how the rectangle looks. Well maybe that's defined in the operating system so that each application that needs to draw a rectangle doesn't have to redefine how to draw a rectangle. So the operating system provides both the interface with the hardware I like your term the bridge with the hardware and then it also provides services that all the different applications might need to use. And so operating systems you might be familiar with are things like iOS, Windows, Android, Linux these are operating systems and then there's apps. Of course you're familiar with those. Those are things like Microsoft Word or Internet Explorer or Safari or Chrome or some game that you like playing. Those are all apps. Those are the two main layers that most people are familiar with. There's other layers as well. There's also software called firmware and firmware. I said the operating system is the lowest level and that's usually how we think about it. But there is actually a layer even below the operating system. There's software that actually runs on some of the individual hardware devices. So for example, your graphics card might have its own firmware and that's actually a piece of software that resides on special memory that's just on the graphics card. So that's separate from the main memory of your computer. But there's some memory that exists just on the graphics card itself that might hold on to this firmware. And other devices have firmware too. Your car has firmware. Your Toaster might even have firmware. Our washing machine, our washing machine for sure has firmware because we just got a new one and it's really interesting. It updates its own software all the time. I'm not sure how it's getting better at washing our clothes, but it's doing something. But yeah, so there's other layers as well. But the two most important layers are the operating system and the applications.
And I think one thing that we can sometimes forget is that applications are really everything that we're doing on a computer. It's not just surfing the web, it's also using Microsoft Word. Even things that we are preloaded onto a computer are our program or our software or an application.
Yeah, most computers will come preloaded with a lot of different apps and a lot of those apps are actually separate from the operating system even though they came preloaded on the computer. So you mentioned Microsoft Office for example, right? That's actually four different apps. That's Microsoft word, Microsoft PowerPoint, Excel, Outlook, et cetera. But all of these different apps are what really make using a computer exciting. Right. The operating system by itself, it'll have some built in features and do some basic things, but the type of things that we really like doing each day, like playing a game, browsing the web, listening to music, watching videos, those are all apps.
The things that let us do our.
Work, right, the things that let us do our work. And the vast majority of software developers work on apps. Some software developers work on the operating system, but that's actually a relatively few number. That's going to be a few thousand people who work at Microsoft, a few thousand people who work at Apple, a few thousand people who do open source work on Linux and other open source operating systems, and a few thousand people who work at Google. The vast majority of the millions of software developers out there work on apps.
And do operating systems. I guess we'll talk about this in a future episode, but what it sounds like is operating systems are going to stay pretty consistent because they're shipped with the computer. And while programs can be preloaded, you're also going to add your own and customize it. So that might be a place where a developer is going to be changing and updating things in a whole different way.
Yeah, of course any modern operating system will get updates over the internet, but if we go back even just a couple of decades ago, it was not like that, right? The operating system that came on your computer, not everyone was on the Internet, for one thing, but it was pretty stable over several years. And even today there has to be a lot of stability in the operating system because everything else depends on it. If there's flaws in the operating system, then the entire computer is going to be unstable and it's not going to be the fault of app developers when there's crashes, if there's flaws in the operating system. And that's just a terrible situation, of course. So we put a lot of trust and a lot of responsibility on the shoulders of Microsoft and Apple and Google and the open source developers who work on Linux and other operating systems to do a good job. We really, really rely on them. They're so important. If you think about our infrastructure in the world, they might be as important as the people who work on our planes or on our trains in many ways because the trains and the planes are running on computers, running those operating systems.
Yeah, software is essential and it's also, as you're speaking to, I was thinking, yeah, it's really important that we keep up with the updates because that's the developers changing some of the way that this software runs to run better.
Yeah, it's crazy. One thing I think about a lot is video games from the 1980s and 1990s. They would come on cartridges. The software had to be perfect basically when the cartridge went out because there was no way to update it later. Right. Nowadays, because we're on the internet all the time on our computers and they're always connected, they're getting updates all the time. And so those updates in some ways there's a little bit of moral hazard here because it means they can have more mistakes because they can fix them later. But on the other hand, operating systems today and apps today are so complex, there's so many different moving parts, it's inevitable that there's going to be mistakes. Unfortunately, software development is not a precise science. There's a little bit of art to it and there is a little bit of science to it, but it's not a precise science in the same way that, let's say, chemistry is or something like that. So there's going to be mistakes, mistakes will be made. And we need to be cognizant about always keeping our software up to date because software developers are always posting security and bug fixes.
I really like the idea of thinking about software as not just a science, but it has some art and creativity into it. I think that sometimes when we think about computers and think about the people that work on them, we can put people into a box, I guess, in a lot of different ways. And really you do have to be creative to imagine, here's this task, or here's something I want someone to be able to do on a computer, and I'm going to create a whole ecosystem, really, to make that happen.
Yeah, software developers usually are creative people. It doesn't mean that everything they work on is creative. You can think about somebody working at a large enterprise company and having to just do, let's say, accounting software all the time for them, and work on building accounting software. Probably not the most exciting job. And you know what? You don't really want people being too creative with accounting because then we have all kinds of SEC issues. But a lot of software development is really creative. You can express the same thing many different ways in software. There's many different ways to write the same program, but at the same time there's also just this beautiful canvas of anything you can imagine, you can create. There's no other discipline, really, other than software development where a single person can have such leverage and impact on the world. You think about a lot of the great companies in the computer industry and they were often started by just a few people, usually software people. And they really sometimes you think about something like a Facebook or Twitter or a Microsoft that were really started by two to five people each of those companies. And just two to five people were able to create software that later on had an impact on millions and millions of people's lives. I don't think there's anything else like that in the world.
So one thing that you spoke to, we spoke to a little bit, is that software developers use programming languages. That's one of the things that I find really interesting and I'm looking forward to in a future episode, talking about how program or programmers sorry, pick out which language they're going to use and how each language has different strengths and different considerations.
Yeah, absolutely. There's pros and cons to different programming languages in things like performance and things like expressibility, in things like feature sets and the things that you can do easily in them versus what you can do easily in another programming language. And we'll get more into that in a future episode. But people tend to specialize in a few different programming languages. So somebody who's an expert in Java, let's say, and let's say they've never before used Swift, which is another programming language, they could probably learn Swift pretty quickly. Once you're an expert in one programming language, it's not too bad to be able to learn another programming language, but they are slightly different languages. And so it takes time and it takes experience and expertise and practice to really become an expert in any one of them. So there's a lot of nuances to software development. There's a lot of different avenues and roads to go down and we can't just say that you can't just take one software developer and replace them with another software developer necessarily. Each person has a unique set of expertise and a unique set of different apps that they've worked on and that they know how to build.
Overall, I think being a software engineer sounds like a pretty cool field or role to be in.
Yeah, absolutely. It is a cool role. One thing we didn't touch on is how different software is not able to run on different computers. Always, let me phrase that another way how the same software is not able to run on different computers. Always. At the beginning of the episode we talked a little bit about instruction set architectures and we said that the computer's microprocessor speaks what's called machine code or understands machine code. Well, it turns out that there are more than one instruction set architecture and therefore more than one machine code. And so some microprocessors speak one certain kind of machine code and other ones speak another kind of machine code. I'll give you the two most popular today. The two most popular today are X 86 and that's the one from intel. And that instruction set architecture powers chips from intel and AMD that are in your personal computers, your laptops, your desktops, and also in a lot of servers. And then there's another really popular instruction set architecture today called Arm. And that's what's in most of your mobile devices. So your iPhone, your Android phone, your tablet, usually those run an R microprocessor. Your Nintendo Switch also happens to run an R microprocessor, whereas the PlayStation Five and the Xbox whatever the next one is called, run X 86. You can't take software that was compiled for one machine language and run it on a microprocessor that speaks a different machine language. And so you can't just take software that is for your phone and run it on your desktop computer for one reason because of the machine language difference, but also because of the operating system difference. The different operating systems, like we said, will have different services available and we call those services usually APIs. It stands for application programming Interface. And so if we have some software that uses a different machine language and it also uses a different set of APIs from a different operating system, it won't run on a computer that uses a different machine language or a different operating system. So programs are actually specific once they're compiled to one particular type of microprocessor and one particular operating system.
That's really interesting. I think it's something that we don't think about a lot is how diverse the devices that we're using and we have pretty nowadays think high expectations for how those devices will communicate with one another and can sometimes get frustrated if something that we access on one isn't available on the other. But it makes a ton of sense why it can't.
Yeah, and there's also we talked about the diversity of programmers using different programming languages, but there's also different specialization within these operating systems. So somebody might be an expert at programming using the APIs for the Windows operating system that would take them then months of training and study to be really good at building apps for the Macs operating system. macOS so there's all these different niches and different avenues in the software development world, and one person is usually not an expert on all of them.
Well, you can't expect one person to be an expert on everything.
Yeah, but there's just so much it's almost overwhelming. And then we're not even talking about third party libraries. So that's another kind of software too. So there's the APIs that come built into the operating system that might say things like, hey, send this message across the network, or draw a rectangle on the screen. But then there's also libraries that are there that you can download as a software developer and bundle within your app to provide additional services that you don't have to write yourself. So let me give you an example of that. Maybe you are writing a chess program and there's already a library out there that somebody's figured out how to generate chess moves. So you don't want to have to rewrite that functionality yourself. So you download the library and you then get for free, quote, unquote by using the library, the ability to call those APIs to generate chess moves. Now somebody else might download and use the same library, and now we have that reusability. But you might have now become an expert in how to program a chess program using that library. And then you go work at a different company and they use a different library for generating chess moves. Well, now you're two different pieces of software that the code you've written in the past is not going to necessarily be compatible because it was using a different library.
Well, now it sounds like building software really requires some collaboration if you're going to use these other libraries. And it's almost like a hive mind in some ways, in a positive way of utilizing information that's been developed or in some ways maybe best practices or knowledge to be able to implement them in new and different ways.
Yeah, doing anything sophisticated today, you're probably not going to write everything from scratch. You're going to use other people's code, quote unquote through libraries. And so there's a lot of nuance to that as well. There's legal issues, there's licenses that different libraries are under, there's learning the different libraries, and then there's even trends and fads in fashion where libraries come into favor and then a few years later they go out of favor because people decided that there's a different library that they like better or that works. In a way that they think is better or library stops being maintained as well. There's so many nuances, and there's a whole world of just dealing with the libraries as you go from making one piece of software to another.
Software, when you first say the word, maybe you have an idea, or I can speak for myself, or I have an idea of that. Oh, that's this program that I'm going to run on my computer. But really there's so much to it. It's such like a rich environment and so many different pieces that are working together to make these what now in some ways, I would consider default. Simple things be running.
Yeah. Software is really a very complex set of different components that all work together in concert to create what you see as a seamless experience on your computer. And it's really amazing when you think about how many different components there really are on your computer, whether that be your phone or your PC. There are literally, right now, thousands of libraries working together with the operating system and with the apps that you use to create the experience that you see. And the operating system is made up of tens of millions of lines of code, and there's millions of lines of code in those libraries altogether. And each of your apps is made up of thousands, tens of thousands, hundreds of thousands, or even in some apps, millions of lines of code as well. So the idea that they all work together and it all actually works, and it works reliably is amazing. Well, thanks so much for joining us. And if you want to reach out to me on Twitter and give me some feedback about the episode, my username is at Dave Kopeck. It's D-A-V-E-K-O-P-E-C. Don't forget to subscribe to us and like us in your podcast player of choice, and we'll see you next week.
Bye, everybody.