Can computer science improve our lives? On the previous episode, host Angelo Kastroulis made a case computer science as a potential force for good. In this continuation of the theme, he talks about why excellence is a value to strive toward and how it differs from perfection, how simplifying the question can lead to a more valuable answer, and how questions about personalized medicine point to the potential for quantum to make big improvements to life.
On the most recent episode, host Angelo Kastroulis made a case computer science as a potential force for good. In this continuation of the theme, he talks about why excellence is a value to strive toward and how it differs from perfection, how simplifying the question can lead to a more valuable answer, and how questions about personalized medicine point to the potential for quantum to make big improvements to life.
Angelo begins with a revelation that excellence is value that he holds dear. He distinguishes “quality”—which he defines as some standard that you're measuring yourself or others against to try to compare to similar things—and “excellence,” which means being outstanding or extremely good when compared with peers. He cautions against striving for perfection, as the benefit rarely exceeds the cost of the pursuit of perfection. This spurs musings about the limits to continuous improvement and how to balance costs and quality.
He illustrates this through the example of parsing JSON and rest servers and asks how, instead of micro-optimizing a solution we might go about eliminating serialization completely. Ultimately, he posits that the single most important factor that delineates a mediocre developer from a phenomenal developer is the ability of the latter to step away from the decades-old tendency to meet requirements and instead find ways to rethink the problem space, eliminating limitations at the onset rather than mitigating later. Relatedly, he contends that attainable smaller goals are far more valuable than ones that are very, very lofty and unreachable because we can achieve those small goals.
Angelo recounts part of a conversation he had with Kerri Patterson, Chief Strategy Officer at Carrera, on the importance of solving really hard problems and how they can impact our lives. She spoke about how most healthcare data systems are set up based on insurance rules, not patient outcomes and needs. She suggests incorporating quantum computing into clinical decision support and, ultimately, personalized medicine. This is taste of conversations that will appear in more detail later in the series.
Angelo concludes this episode with a brief discussion of what machine learning is, how its two main categories—unsupervised and supervised learning—differ, and how these concepts will fuel much of the content in the upcoming episodes of Counting Sand.
About the Host
Angelo Kastroulis is an award-winning technologist, inventor, entrepreneur, speaker, data scientist, and author best known for his high-performance computing and Health IT experience. He is the principal consultant, lead architect, and owner ofCarrera Group, a consulting firm specializing in software modernization, event streaming (Kafka), big data, analytics (Spark, elastic Search, and Graph), and high-performance software development on many technical stacks (Java, .net, Scala, C++, and Rust). A Data Scientist at heart, trained at the Harvard Data Systems Lab, Angelo enjoys a research-driven approach to creating powerful, massively scalable applications and innovating new methods for superior performance. He loves to educate, discover, then see the knowledge through to practical implementation.
Citations
Bruce, V., and Young, A. (1986). Understanding face recognition. British Journal of Psychology, 77, 305-327. doi: 10.1111/j.2044-8295.1986.tb02199.x
Foer, J. (2012, February). Feats of Memory Anyone Can Do. TED2012. Retrieved September 16, 2021, from https://www.ted.com/talks/joshua_foer_feats_of_memory_anyone_can_do
Siegler, M.G. (2010, August 4). Eric Schmidt: Every 2 Days We Create As Much Information As We Did Up To 2003. Retrieved September 16, 2021, from https://techcrunch.com/2010/08/04/schmidt-data/
SINTEF. (2013, May 22). Big Data, for better or worse: 90% of data generated over last two years. Retrieved September 16, 2021, from https://sciencedaily.com/releases/2013/05/130522085217.htm
Further Reading
Urs Hölzle on Infrastructure for the Long Term
Host:Angelo Kastroulis
Executive Producer:Kerri Patterson; Producer:Leslie Jennings Rowley; Communications Strategist:Albert Perrotta
Music: All Things Grow byOliver Worth
© 2021, Carrrera Group
Angelo Kastroulis: Can computer science improve our lives? There have been some amazing advances. The future is looking very interesting. Artificial neural networks, machine learning, artificial intelligence, quantum computing. Those are just scratching the surface. I'm your host, Angelo Kastroulis. And this is Counting Sand.
Last episode, we focused on some of the things to be cautious about when producing a solution, especially with machine learning and artificial intelligence. In this episode, we'll talk about some of the positive sides of computer science. How do we approach some solutions and what are some things that we can look forward to?
If you never had the opportunity to examine yourself deeply and determine what your core values are, I encourage you to try it. Now, I know that we might have a little bit of fatigue in doing that kind of thing, because it seems like every corporate culture tries to do this kind of thing. Right? What are my core values? How do they align up to my organization? And we did that, too. But if you do it with an aim of actually seriously understanding not only yourself, but others and how can you best interact with each other, the experience is invaluable. See if you can think about maybe five values that you hold most dear.
I did the exercise and I found that one of my core values is excellence. What exactly is excellence? Well, it can mean different things to different people, but to me it's a little different than quality. Quality means that there is some standard that you're measuring yourself or others against to try to compare to similar things. That could be comparisons that are different for different people. For instance, you may, as a computer scientist, think that code is quality if it fits prettier than someone else's or if it's less buggy or maybe if it's more performant or any number of things. One person defines quality one way and another may define it another way.
For instance, the low bug count versus some beautiful idiomatic expression of code. And each person will assign relatively different priorities to these facets of quality. None of them are wrong in particular, but it's just the way that they view the world. All of that is fine.
But when we think about excellence, similarly, it means different things to different people. The definition for excellence is a quality of being outstanding or extremely good. That is what we should strive to deliver. Now we may think that the code we're delivering is respectable or maybe outstanding, but would you call it extremely good? To do that, you have to compare it to other code, to its peers. That means that we need to build a culture of testing our code, both functionally and for performance. Many organizations test their code functionally. Unit tests are something that almost everyone says they do, but I haven't met many organizations that treat performance the same way they treat software defect. Performance has to be designed, has to be built all along the way and proven. It's not any more the case as we used to think some years ago, when we would make code functional and complete first and then go back and remediate for performance. That doesn't work anymore. Nowadays, we have to design for performance first. Big data has taught us that the way that we approach the problem matters. You can no longer micro optimize your way to better code.
I mentioned performance so thoroughly because I think it's a key recipe for success. It's a part of my DNA. It's what makes people say wow to your solution. Indeed, without it, I think people would just shrug at unit tests and pretty code. Oh, that's nice. You have unit tests. It's what makes my organization very interesting. And it's what makes me enjoy work. And probably what makes you feel pretty good about what you do. Without highly performance solutions, we will be lost in the sea of mediocrity. You'll become a commodity.
So does excellence mean perfection? No. It doesn't mean perfection. Perfection is being free from any flaws of any kind. Think of it this way: I'm a computer scientist. So of course I want to think of it in terms of an algorithm. So let's think of this algorithm. I have a while loop that says while I'm not perfect, keep improving. And I never break out of that loop.
That is an infinite loop. What we can do can always be improved. You will never reach perfection. And all you'll do is you'll burn money. Eventually in reality, we just break the loop somewhere between better than most and diminishing returns. That area is the point in which we can be proud and if we’re lucky it's the point in which we can do it again, substantially the same way. That point is excellence.
That's not to say that every line of code has to be this way, but rather to illustrate the guiding principle, the pursuit of perfection has a tremendous cost, not just in terms of hours spent on polishing code, but in opportunity cost. The more time we spend doing something the less time we spend on something more important.
Dr. Urs Hölzle, associate professor of computer science at USC before joining Google as the first vice president of engineering had this to say about the idea of balancing our time with what we think is important and what actually is. He said, when you have a list that's longer than you can deal with, you have to prioritize. If you give a project, a quick improvement, that gets you 80% of the way to solving the problem, you haven't solved it, but it drops below the line versus one that you haven't worked on at all. Once a problem falls below the line, you should work on something else, even though you haven't finished it. Even if something starts big, it decays in importance as you work on it because you fix some parts of it. Success is managing what is above the line. And honestly, I have used that principle in my day to day hacking of my tasks. I create a line and I determine what goes above and below the line. The more I work on something above the line and it begins to decay in importance; because it's always about juggling what is the most important. Now I know that can be stressful. It can sound crazy to think that you're never going to finish a task, but is that contradictory to excellence? I don't think so. The point is that we need balance. For example, does removing commented code matter? Well, not really to cost. Or should I refactor something that may become a problem next time we address it? Well, not comparison to bringing some value somewhere else. At some point code just needs to be used. And what code have you had that stays there for years? Eventually it'll just be deleted anyway. In fact, I would argue that that's one of our jobs as computer scientists is to reduce code because code is a liability. I'll get to that later in this series.
So you have to use some discernment. In fact, Urs mentioned above once said “Forget quality.” In fact, forget anything we can get away with forgetting. Does that mean that I, or he, for that matter mean that we should just be able to sloppily put together some deliverable or just truly forget about quality. It has no value. No, that's not what he's trying to say. And that's not what I'm trying to say either that wouldn't make any sense. Should we spend a week working on something that is good enough in a day? Well, that's the other extreme, probably not. So it's a constant balance.Value is where we determine how we tow the line in balance. That means we have to have constant self-examination. It's not uncommon for us to revert to what we've been taught for decades: that we should get tunnel vision and focus on our task; that we could lead down some path of micro-optimization unit tests. Again, I'm not saying the code shouldn't work and it shouldn't be high quality and it shouldn't look nice. Those are good things. But after we understand the problem we have at hand, we should stop step out of the problem and ask, what are the factors contributing to the problem? How can I eliminate those rather than be stuck in mitigating them? This is what I think is the single most important factor that delineates a mediocre developer from a phenomenal developer.A phenomenal developer is able to step away from this decades, old tendency will, we've been beaten to meet requirements. Just think about the problem in a different way and see if you can just eliminate it.
Consider the problem of parsing JSON and rest servers. JSON comes to a rest server as a binary string, which then gets torn to pieces, put into little buckets in some model class only to be pulled apart and put back together over and over and over again before finding rest somewhere. Now here, I realize I've used rest ambiguous. When I say rest here this last time, I mean, it's final resting place. So it may be tempted to find a better library or maybe to try to do some algorithmic trickery to try to micro optimize ourselves to better solution. But I urge you please stop, step back and ask, how can I eliminate serialization entirely. That may seem crazy. How do you get rid of serialization? It's impossible. It's not impossible. We might be tempted to think, well, you know, this is C++, this library is written that, and I'm a Java developer. I promise you: It's not that hard. Your first step should always be the head, the scholar.google.com and scan for papers. Is it an open research question what's being done in that regard? Learn from the backs of researchers who are proving these methods. And guess what? Academic papers are scrutinized, rigorously tested, and mathematically proven you now have something in your hands that no one else is implementing. That is excellence.
The rule of thumb is this: You'll get slight improvements by micro-optimizing, but you'll get orders of magnitude by rethinking the problem in a fresh perspective. So resist the tendency to think that we are bound by libraries that are out there or by some language or tech stack, because it's one that we know. Resist the temptation to be afraid of new technology, and that it's going to be a whole thing to implement or that we don't want to even get into that. Sure we do. And I know for a fact it can be done. Take a look at our repositories. You'll find game-changing patent-pending AI code. You'll find column store code that's a hundred times faster joints and scans and Postgres and all kinds of stuff. There's a lot of really good code on GitHub.
As I mentioned, an effective solution always provides value. If code needs to be refactored, there should be value tied to it. For example, refactoring code simply to make it more idiomatic or pretty is a waste of resources. Would you pay for a car to be repainted the same color just fresher? But refactoring code to reduce bugs, reduce code liability or future effort is absolutely valuable. Maybe we're just splitting hairs here. Are we just saying the same thing in different ways? Well, not really any more than saying some conceivable yet unknown future changes will be easier if we make this refactor is very different than in the next few sprints changes will be easier if we refactor. So I would argue, and in fact, I'll make the bold statement that attainable smaller goals are far more valuable than ones that are very, very lofty and unreachable because we can do those small goals, if we rethink the problem, space. Excellence is doing that better than anyone else. Ultimately, whatever it is that we produce, if it's usable and provides value and has an impact that's excellence.
I had a chat with Kerri Patterson, a friend and colleague of mine and my chief strategy officer, on the importance of solving really hard problems and how they can impact our lives. If you have any question that computer science can make our lives better, listen to what she has to say:
Kerri Patterson: 640 deaths a day because the medical errors is unacceptable. The way we have technology, we should be able to solve this problem. And when you think about the way in which healthcare IT was set up, it was set up based on payer rules, meaning your health insurance companies, their rules as to when they're going to pay for a patient. So all the EHR system, your electronic health record, and everything around that is all based on payer rules. Then the after fact is, okay, what do we understand about the population? And then we go into, oh yeah. But then there's the patient that we're dealing with. And the doctor would like to interact with them and have records about what's going on with them.
Angelo Kastroulis: And I think that is one of the things that disturbs me. Patients just aren't in the conversation about their own healthcare. It feels like it's a conversation between the payer and the healthcare provider and patients just are along for the ride. That just doesn't feel right. If we can empower patients, we can most certainly improve healthcare.Because ultimately educating us is what the providers try to do to be able to help us with our problem. If we're not on board with it, we're never going to improve. So we should be driving the conversation. And that means data and computer science can help us become more empowered. Kerri went on to say:
Kerri Paterson: And so when you, you think about that and you think about the new technology of quantum and how might quantum help us solve problems in the healthcare space, one of the big areas is to think about clinical decision support. In there, you're taking clinical guideline, that's written for a population to solve a particular healthcare condition, but what if I had a patient module that has quantum in the backend that can take my personal data that I bring to it—because the total determinants of health has to do…11% is medical care, that's it. 11%. And then if you look at your environment, it's 7%, and genomics and biology is like 20%. My individual behaviors is 36%. And then my social circumstances is like another 20%. So 50% I pretty much control. So why not, and I have all that data, the healthcare system doesn't. I have my personal data of my social behaviors. Then I could plug my stuff into the system, keep it private to me and be able to optimize across the healthcare continuum so that the care plans that are set up specifically for me can be done.
Angelo Kastroulis: OK now you hit some of my hot buttons. Quantum is something I am seriously interested in, but I have a whole bunch of things to say about clinical decision support, which includes rules, engines, parsers, execution, and data storage formats. But we'll have to save that for another day. However, right around the corner Is individualized medicine in which technology can help deliver care that is specifically designed for us, individually. The care can include a lot of things. It can include specific interventions, but it can also include tailored drugs just for our genome or just for our own phenotype or our body. Kerri had one more thing to say about this:
Kerri Patterson: Individualized medicine so that the medical errors sometimes is based because the problem they're solving is looking at it more populous wide. I’ll give you a personal story about that. My son is a type one diabetic, and with type one diabetics, sometimes when their blood sugars are really high, they're on insulin pumps that keeps that blood sugar level down. But if anything malfunctions with that, their blood sugar goes up and they're in a state what they call a DKA, diabetic ketosis acidosis or something like. I don't know if I pronounce it right. But anyways, when he's in DKA and we go into the hospital, the hospital tries to treat him like he's a type two diabetic. In the emergency room, they know exactly what's going on. They treat him great. Automatic two IVs, one with sugar, one with insulin and stabilize him. If they admit you into the hospital, they look at you like a type two diabetic. And I've had them multiple times, like, “we'll take him off insulin.” A type one diabetic can not be off insulin, but they treat them because majority of the cases of diabetes that shows up in the hospital is typically type two, not type one. It's a little less common and they think, “oh, well, it's because you don't know how to eat properly. “No, that's not it, his pump malfunctioned and his blood sugars high. And once you're in DKA, you have to get help to get that under control. But you know, you have providers that are treating you like type two, which is the wrong approach. And so these are the medical errors that come into play, especially when you're in rare diseases. And so wouldn't it be cool to have your data specifically to me, I plug in and that 11% when I need it, because we need it sometimes in desperate situations, it's able to provide the information appropriate for me.
Angelo Kastroulis: Hopefully that whet your appetite for some things to come. We'll have some interesting topics and we'll get into some things and some practical methods in which computer science can change our lives.
One of the ultimate measures of value is that something can change our lives. Now, not every bit of code that we write is going to change our lives, but in order to change our lives, it has to be able to provide us with something that is actionable.
What do we even do with information that we have? It's not just about informing us about. For instance, we can learn about all these posts and the amount of data and that 500 YouTube videos are posted every single minute. But what does that data do for me? How does it actionably change my life? It's not just about being informed. Arguably we live in an age in which we are the most informed in human history. Eric Schmidt, CEO of Google, said that every two days we create as much data as we did from the beginning of human history, all the way to 2009. That is a lot of data. Intuition tells us that if we could just have the right amount of data at the right time, we could intervene and take control of our lives.
My journey through machine learning taught me a few interesting things. In 2015, when I decided to go back to grad school, I started seeing that the world had data moving now, but analysis was still a problem. How would we analyze all this data? Well, naively, I think, since I had been in computer science for decades, it seems like just an algorithmic problem. All I have to do is learn some new-fangled algorithms called machine learning, and we'd be able to get new insights, pop it into the magic box, and out come the answers. When I took my first class, it had been some years since I had been back to school. So I decided to start with stats. Statistics has a very interesting way of sterilizing the world around us. We ended up boxing things, looking at things as averages and standard deviations and not really realizing the meaning underlying it. It wasn't until later that I started learning really interesting and cutting edge things like artificial neural networks, machine learning techniques. All of these things—and we'll talk about them more in the series—opened up a new way of thinking about. It was not just some new kind of algorithm who was an entirely new kind of practice. It was a new branch of computer science. In fact, a data scientist is a bit different. And I don't know that we necessarily have a real definition for what one is today. But a data scientist is part computer scientist, part mathematician, and part something else. Part of some domain that are trying to understand. For example, if you want to be a data scientist specializing in healthcare, you have to understand healthcare. That data is different and interesting. Or if you're a FinTech data scientist, you have to really understand financials. You have to know that. This is a completely different way than computer science seems to kind of chop up their particular roles. Computer science tends to think that a computer program or can work on anything that any other computer programmer can work on. And so any computer programmer is interchangeable. That just isn't true. And it's also not true with data science. And it goes a little bit beyond that, given that a data scientist might be a computer scientist, a mathematician and something makes that a really hard person to find, I think most in the field jokingly call that person the unicorn because they just don't exist.
Okay. So what does a data scientist actually do? What is machine learning and artificial intelligence and artificial neural networks? Well, to answer that, let's acknowledge that humans are amazing pattern recognition machines. So to understand what machine learning is, we really don't have to go any further than trying to understand what are we. Ultimately, a pattern recognition machine is what machine learning is. It's just understanding, trying to find patterns. I'll talk about the kinds of patterns throughout the series and we'll go into that even a little bit today.
We have observed for thousands of years, that humans are very good at recognizing patterns. The ancient Greeks used to have a technique called the memory palace. They were famous orators. They were able to memorize long speeches. How are they able to do that? The memory palace technique worked like this. You would memorize a giant palace, a place with lots and lots of rooms. Or maybe if you're familiar with some local Bazaar, you would memorize the layout of all the shops. Then you would imagine yourself walking from room to room, shop to shop. And as you follow this path, there will be an object and every room that you would associate, this, something that you want to memorize. Then all you needed to do was memorize the layout of all the rooms, which objects are in which rooms, and then the path you would take through it. And then as you gave your speeches, or as you tried to recall your memory, you would simply walk the path. Now, each of those objects had to mean something to you in order for this to work. The more significance we attached to the item that we would put in the room, the easier it'd be for us to recall, especially if there was some emotional or story attachment to it. Think of it like this, how much easier is it for us humans to remember a story or an event in our lives then is to memorize some random data. The technique really works. In fact, I encourage you to watch a TED talk by Joshua Foer, who talks about this technique and how it helped him win a memory competition. He memorized decks of cards and barcodes of items in a shopping cart. Why does it work? Brain scans of people who were very good memorizers, 90% of whom by the way use this technique, have shown that it involves activation of regions of the brain involved in spatial awareness. The medial parietal cortex and the right posterior hippocampus light up. And these kinds of studies, for example, the one by O'Keefe and Natal, propose that the hippocampus is a core of a neural memory system providing an objective spatial framework. So we're able to tap into that part of our brain and use our spatial awareness to be able to store data. And that's interesting. If you want to test to think about this, try to memorize some numbers. Just the numbers all by themselves. You'll find that it becomes harder and harder to memorize more and more digits. For example, if you ever tried to memorize pi, how many digits can you get? Well, you can maybe memorize some, but eventually our memory bank will fill up and it'll become harder and harder to remember them. We'll try to group them or do some other techniques now by comparison think about how many faces you've seen in your life. You've probably seen millions of faces. And we've all had that moment where we've seen someone before someone that we can't really remember. And we think, I know you, where do I know you from? And you may not have seen that person for decades. Maybe you knew that person when they were a child and they look different, but your brain was able to fill in what they might look like older in life.
The Bruce and Young paper done back in 1986 in the British Journal of Psychology entitled “Understanding Face Recognition” suggested that there are seven distinct types of information that we derive from seeing faces. Those types range from structural features of the face. Semantics that might indicate who we are. Our names are expressions or even speech codes, ways that we talk and communicate. It makes a lot of sense. What can you see from a face? You can determine someone's age or history, expressions, their feelings, the way that they're talking, you could probably even interpret their language. Even if you don't speak their language, you can tell if they're happy or if they're upset in the way they're communicating with. The brain is indeed a very amazing categorizing machine sometimes for our good, and sometimes for our bad. We tend to make snap judgments of people based on seeing. But what does that have to do with machine learning? Machine learning actually is all about pattern recognition and we seek to kind of mimic what the brain already does in a far superior way with computer algorithms.
What are the various types of machine learning algorithms out there? Well, we haven't discovered them all and certainly that field is just in its infancy, but there are roughly two categories of machine learning. They're called supervised and unsupervised learning. I'm going to put artificial neural networks aside for the moment, but they can fit into these categories as well. Unsupervised learning is about categorization. It tries to group data into cohorts and saying, well, I don't know what this is. I'm not making any prediction or judgment as to what it is. I'm just telling you that these are similar, so I'm grouping them together. And so it's building these cohorts. That means though, that it's kind of hard to interpret why it is that it puts something in a group. It just does it. The human brain does that kind of thing, too. And, in fact, as we mentioned, it's a very good pattern recognition machine. We can see things are large or small and kind of group similar things together quite easily, even from a very young age. What makes a brain interesting, at least the human brain, is that as we group these things together, we can kind of explain them. We can say, why did you group these all together? Oh, well I thought that they were about the same size. In a machine learning algorithm, though, it is not that straightforward. It just says mathematically they're similar. That's not very satisfying.
The other category is called supervised learning. This is where the machine learning algorithm is trying to predict something. It's saying, I think this is a cat, or actually more realistic, there's some probability this is a cat. Or maybe it's saying, I'm going to predict the gas mileage of this vehicle, in other words, a continuous variable. Well, how does it know what that is? The reason we call it supervised learning is because some human supervised it. The data had to be labeled. Something said that this data represents a cat. And then this data represent a cat, but this data is a dog. And now as it's starting to kind of categorize these things in terms of similarity, it starts to determine why these features make it a cat or make it a dog. And it starts to kind of predict that. Now it doesn't just have to predict the categorization. It can predict a number. Like we talked about a continuous variable, like a number of miles per gallon. It begins to learn the mathematical similarities by figuring out how wrong it is. That's all machine learning is, is it's just some algorithm that's fed data and it tries to see how wrong it is based on what you told it. At least that's what supervised learning is. So you can see, returning back to our idea of bias, introducing the bias into this equation is very, very easy.
So while this was a brief digression in machine learning, artificial intelligence and computer science, we're going to get into these in this series in a little bit more detail. As promised some of them are going to be more theoretical while others become more practical. This season, we're going to tackle ideas like bias, explainability, in a bit more detail. Theory, like where did artificial neural networks come from all of a sudden and why are they so amazing? What other machine learning techniques in artificial intelligence is out there that have been very, very interesting? How can we use them practically to do interesting things or to help us live longer or better lives? How can we empower people with the information that we're given? And we'll even get into some really interesting topics like the future. Hopefully that whet your appetite for some things to come.
I'm Angelo Kastroulis and this has been Counting Sand. Please take a minute to follow rate and review the show on your favorite podcast platform so that others can find us. Thank you so much for listening.