Showing posts with label what. Show all posts
Showing posts with label what. Show all posts

Wednesday, 23 October 2024

Bill Coughran Bell Labs researcher, Google executive, Sequoia Capital VC

What I've always done in the last many years is I will give you my advice as a leader inside a company, but then I will also give you my advice as an individual. And I think, to me, that's been one of the things that I think has bonded people to me over the years. [MUSIC] >> Hi Everyone. Welcome to Behind the Tech. I'm your host, Kevin Scott, Chief Technology Officer for Microsoft. In this podcast, we're going to get behind the tech. We'll talk with some of the people who have made our modern tech world possible and understand what motivated them to create what they did. So join me to maybe learn a little bit about the history of computing and get a few behind-the-scenes insights into what's happening today. Stick around. [MUSIC] >> Hello and welcome to Behind the Tech. >> I'm Christina Warren, Senior Cloud Advocate at Microsoft. >> And I'm Kevin Scott. Today, we're going to be talking to a person that I have long admired, Bill Coughran. I met Bill when I was a young engineer at Google, and he was one of the executives running all of the very important bits there. Ultimately, Bill went on to run Search, Infrastructure, Security, Maps, Local, so this huge swath of all of the big, complicated, important things at Google. And like in a prior life, he'd been an entrepreneur, he helped run a networking company, and before that he had been a computer science professor and was at Bell Labs running the computing sciences research division during a period where they invented things like the C++ programming language. So, I still to this day am slightly in awe of Bill, and he is the engineering executive I would like to be when I grow up. (Laughter.) >> I don't blame you. >> So, I'm curious, Christina. Just like everyone else that is on the show, including me, you've had not necessarily a straightforward path into technology. I was just wondering, like, you know, can you tell us a little bit about what that path has been and which mentors you've had to help guide you as you sort of figured out your own journey? >> Yeah, definitely. So, before I joined Microsoft, I worked in media for a decade, and I was a journalist and an analyst and reported mostly on technology and business stuff. So, I did have tech and I've always had an interest in tech, but it was obviously a different perspective. And what's kind of great when you ask about mentors, I think my -- probably my biggest mentor would be a man whose name is Jim Roberts He was my editor-in-chief at Mashable for a time, and he previously was the deputy managing editor of the New York Times, and he's now currently the editor-in-chief and chief content officer at Cheddar. And just he's got like this great longstanding like old-school journalism career. But what I love about Jim is A) we used to fight all the time, so he really kind of pushed me, right? Like we used to fight all the time. But B) he saw what was happening to the media landscape, and he decided that he wasn't just going to sit back and not evolve. You know, he was early on Twitter, he was early on embracing social and digital platforms, and really pushed to get the New York Times online and to make -- to bring the two divisions that used to be separate, like to bring the print and the online part together. And so, when I switched careers, he was somebody that I kind of looked at, because he -- even though he didn't switch careers, was willing to evolve and wasn't just going to stand back and hope that things continued the way that it'd always been. And so, even though we used to always fight, like I learned so much from him, and I continue to learn so much from him. >> Yeah, the thing that really always amazes me and inspires me about people who are willing to spend their time mentoring others is that-- these people have extraordinary generosity in sort of taking the time and then sort of sharing their perspective. And like to be a good mentor, I mean, it sounds like because you guys were like fighting all the time, like that requires a lot of energy. Like that means that he cared enough about you and your success and what you were doing that he was willing to like fully engage with you and push, which is not an easy thing to do. >> Not at all. And I have to say the most gratifying thing is that in recent years he's actually reached out to me for my input on different things, which has just felt amazing. And I know that I can do the same with him, so yeah. >> Yeah, I bet that is -- that's really awesome. And one of the things that we're going to hear in my conversation with Bill is like Bill was one of the most influential mentors in shaping my career path. Like there were many, many moments where the advice that Bill gave me was perhaps the pivotal thing in like these very pivotal decisions that had these sort of long-term repercussions for my life, and my family, and the people that I worked with. And you know he was incredibly busy at the time, and like he was incredibly senior relative to me. He somehow or another decided to take the time, like and I will -- I will always be grateful for him. And I've sort of had the same thing with Bill that, you know, it sounds like you have with your mentor where, I will try to return the favor to Bill and like help him out with some things that he's working on. But like maybe the -- you know, sort of the biggest reciprocity there is that I was so moved and so appreciative by what Bill was willing to do for me that like I try to do the same thing for other folks. He's really informed like my philosophy on coaching and how I give advice to people, and like he's one of the reasons why I more often than not will say, you know, yes when someone asks me for like a little tiny slice of time for advice. >> I love that. I love that so much. And I -- I can't wait to meet Bill. >> Yeah, it's awesome. So let's go ahead and chat with Bill. [MUSIC] >> So, next up we'll meet with Bill Coughran. Bill is one of my engineering heroes. He's a researcher, teacher, entrepreneur, and business executive whose career includes big jobs like head of the computing sciences research division at Bell Labs, the birthplace of UNIX, the C and C++ programming languages and other technologies that are foundations of our modern tech world. And Bill was SVP of Search, Infrastructure, Maps and Local at Google. Bill is now a partner at Sequoia where he invests in, advises, and coaches tech entrepreneurs. [MUSIC] >> The thing that I think everybody will tell you about Bill is he is just by temperament and depth of knowledge one of the best people in the world to work with as an engineer. And everybody who's ever worked for Bill wants to continue to work for Bill as long as they possibly can. I'm thrilled that you are here with us today. I've been hesitant to ask you to come on because we've had lots and lots of people on the show, you in some ways are the most intimidating one because I admire you so much. (Laughter.) >> You're very kind, Kevin. Thank you for the invitation. And I also, as I think you and some of the audience probably knows, I don't spend a lot of time doing public things. But with a kind invitation, I'm very pleased to be here. >> Yeah, and we're delighted. So, I really want to get into your story. So, you got your PhD in computer science -- >> Yes. >> -- from Stanford. >> No, I finished my PhD and then I went to Bell Labs. I did do work as a commercial programmer while I was at Caltech, but that was a side job. But I went to Bell Labs and I did a lot of work in fluid modeling and semiconductor modeling early on. And then became interested in what today would be called distributed computing and kind of shifted to that. And then I was asked at some point to become the leader of a group, and then ended up I stepped up a few steps and ended up as the head of the computing science research center. >> So how did that transition go for you? I mean, I've always been interested in this because you know I think the people who have worked for you and with you admire both your ability as a like a technical leader as well as your technical ability. And, like, those two things don't always go hand in hand. >> Some people think they're inversely proportional. (Laughter.) The -- it's interesting, I've always tried to read and explore different technology areas. My sense is, Kevin, you're the same. And so I try to stay conversant. I also try to develop relationships with people that I work with who I believe are experts in the areas that they understand more deeply than I do. And I just try to synthesize as much as I can, but over the years, I've also learned like it's silly of me to descend into the code in a major project because I can't contribute that -- in that way anymore, but I can think about how does it fit in end to end? What are the constraints it's operating under? You know? There are often big choices about what to do in terms of the basic algorithmic approach and so forth. And I try to stay current with that. But over the years, it's funny, I shifted away from the numerical modeling stuff, even though it's sort of come back in the form of machine learning and became much more deep on the distributed systems side. But you can learn new things. One of the things that always amused me when I ended up at Google was I had never worked on a Web service before I joined Google in early 2003. And yet, somehow, over a fairly short period of time, I became responsible for the engineering associated with Google.com. So, you know, it appears old dogs can occasionally learn new tricks, so -- (Laughter.) >> I think you're being very modest. (Laughter.) But you -- you've done all this work in distributed computing and like you had founded a network company. So, like you had tons of very relevant experience at how to build, like, high-scale systems. >> Well, so what happened to me, so I started life at Bell Labs very much in the research mold. So, success was writing papers and giving talks and what was a very academic style, success metric. Over the years at Bell Labs, I felt like I was going to conferences and seeing the same subset of 3- to 500 people over and over again. And I got a little bit frustrated with my ability to impact things. And so, I guess somewhere along -- during my run at Bell Labs, I decided to get more commercial. So, I took over as a general manager of a business that we started as well as the computing science research center, and I tried to start to think more about what's involved with actually building products and doing sales and so forth. And so, we decided to try to put a Bell Labs in Silicon Valley near Stanford. And so I came out to do that in late 1998 or 1999 and what I ran into I think is a little bit of what we see today in the Valley, which was it was just a very frothy time. It was before the dot-com bubble burst and you know, people were funding stuff that probably didn't make a lot of sense, but there was a lot of money chasing after ideas and eyeballs at that time. And I was trying to establish this sort of more traditional research lab. And after trying to do it for a year and a half or so, I threw in the towel and went off with a colleague to found a small startup in the area that was doing a telecommunications system project. And I was the CEO, he was the CTO. And we built that company up from the two of us to about 140 people and then I -- we brought in a CEO to do the go-to-market side. I left and was going to start another company and then some old Bell Labs colleagues called me and said we needed adult supervision at Google, and that's kind of how I ended up at Google. >> So, how did you get interested in technology in the first place? >> So, I'm old enough that I think we call ourselves "baby boomers" now, but at least when I was a kid, we were part of the -- what was then known as the "Sputnik" generation, which were people who -- you know, the U.S. was responding to the space race with the then Soviet Union, and there was a lot of interest in science. And so, from a very early age, I was interested in science and mathematics. >> Were your parents engineers or technical folks? >> No one in my family were technologists. It was just something I was attracted to and I was reasonably good at. And so, I went down that path. >> Where did you -- I'm just sort of curious, where did you even find knowledge back then about how to program? Did you have mentors? Were there people helping you? Were you able to find books in libraries? >> I mostly found books in libraries and then when I got access when I was in high school, I got access to the local university's 1620 machine. I got to speak and spend some time with some of the people actually doing programming. And so, they acted as mentors to help me. >> Yeah, I'm, it's -- one of the things that I think is easy for all of us to take for granted now is how not just sophisticated our programming systems are and how much power is at the disposal of your average programmer, but how much of the information about how to learn how to do software development, how much of computer science is all out on the Internet publicly available. There are, like, all sorts of useful videos explaining it from sort of elementary like super high-level, you know, sort of perspectives all the way down to, like, the deep nitty-gritty research. >> No, I agree. I think the other thing that's changed over the years is access to computing equipment. When I first got access with the first two or three machines, they were machines that, you know, today would have cost the equivalent of hundreds of thousands of dollars. And they weren't machines that were in every elementary school, every high school, every home. And so, there's just -- your exposure and availability to compute -- both learning materials, but also just the mechanical machinery, the actual computing devices is much easier. Although one thing I have noticed over the years, having been a leader in different groups over the years, I think the knowledge of the actual computing devices has gotten weaker and weaker. And it's been interesting in the last few years as people have become interested in machine learning and high-performance computing again, people are rediscovering all the nitty-gritties of limited memory cache lines -- a lot of the very low-level stuff that I think the early developers, for instance, the people who created Unix thought about how do you fit lots of capability into a very small footprint? >> Yeah. >> Both memory-wise and computing-wise, and we've lost a lot of that. And we're rediscovering it. >> Yeah, and like one of the things that I've always noticed is you know we operate on all of these high-level abstractions to do our jobs. And the engineers that I've found who are sometimes able to do the most extraordinary things are ones who sort of disrespect -- or are able to disrespect the abstraction boundaries, where they can sort of say, okay, this is not working, I don't understand what's going on, I'm not getting the performance I want out of this. Like, there's some weird bug and they just sort of punch through to lower and lower layers. So one -- like, one of my theories about Jeff Dean, like, he was a compiler guy, right, by his PhD work. And compiler folks they're very good at just getting this end-to-end view of computer systems and like being able to wring extraordinary performance out of things even though, like, they're not actually writing the optimizer bits of the compiler anymore. >> No, I completely agree with that. Having worked with Jeff and his colleague, Sanjay, they both I think were willing to go very deep into the technology and bypass layers. And some of the people I've known for years, I've worked with before like Ken Thompson were definitely of that ilk as well. I think one of the things that modern software suffers from is I think people sometimes do not spend enough time thinking about what the right abstractions are and how to make them very simple. I think one of the things I've admired about Unix, which you can see in Linux today, is a lot of the very low-level system calls that were introduced in Unix have stood the test of now multiple decades because they were very thoughtful about what should be here and what shouldn't, and they didn't add a lot of complexity or cross-functional capabilities. They were all pretty clear interfaces. It's something a lot of modern software designers don't take the time and thought to do it right. >> And how much of that do you think were the individuals and their tastes and how much of it was just the constraints they were operating under? I mean, like obviously, like a lot of people at the time were operating under the same constraints and not all of them invented Unix. But the constraints have to be useful, right? >> The constraints are useful, but it is true that we live in a much more complicated world now. I think in the period where some of these early time-sharing systems were built and a lot of the mini-computer work that then led to the personal computer work, you know, people had glass teletypes, they were 24-by-80 character fixed-width kind of devices for output, very simple input, and now everybody expects a lot of graphics, a lot of visuals. I think just the human-computer interface stuff that we do is much more complicated. You're right, I think the best systems designers know how to think about simplicity and scalability, but our world has continued to get more complicated, so -- >> Yeah, it's like one of the most interesting tensions I think we have in modern software engineering. >> I agree with that. >> So, you get access to this machine at a local university, like you continue to get better and better programming. You go to college, you major in computer science? >> Well, I think like many entering freshmen at Caltech, at least in those days, I wanted to be a physicist. I think probably about 90 percent of the incoming class at that time wanted to be physicists. >> And was Feynman there at the time? >> Feynman was there. >> Okay, so that's a good motivator. >> Yeah. And I had the opportunity to meet with him a few times in the years I was there, an amazing person. Although, his books are much easier to read than it is to take the exams associated with them. (Laughter.) But that's -- but I think like many of the entering freshmen I discovered I wasn't smart enough to be a physicist. So, that got me into math. My first published paper in a refereed journal was actually when I was a freshman -- it was a computational chemistry paper that I did with a post-doc and one of the faculty members. And I had the opportunity to do things like that during the four years I was there. >> Do you remember what the paper was about? >> (Laughter.) There's an approximation to a quantum chemistry problem that's called a Hartree-Fock equations, and so this was a simulation on, at that time, a very large IBM 370 or 360-something-or-other that we ran overnight and calculated a bunch of ground states of different small molecules. >> That's super cool. >> A long time ago. >> No, but super cool. You know, and again, like, we'll get back to this later. You already mentioned that you know like we have this sort of resurgence in like all of the things that like people were interested in in high-performance computing back in the like '70s, '80s, and '90s with all of the like large-scale machine learning stuff that we're doing right now. But you know, I think that the things that you were doing back then are probably like largely transferrable to like things that people are doing now to train machine learning models. >> Yeah, it's interesting. When I went to Stanford, my primary work as a graduate student was in numerical modeling. My thesis was on numerical techniques for partial differential equations, fluid flow, and things like that. Did a lot of work with linear algebra and so forth. But it was all early high-performance computing work. And in those days, you know, there were controlled data machines around and Cray-1 was starting to appear and so forth. And so, there was a lot of interest in different ways to do abstractions in early high-performance computing work. And it's interesting. All that linear algebra, things that I got familiar with then have been rediscovered, of course, as part of the machine learning revolution that we're having today. >> Yeah, I mean, it's really, really fascinating like as I spent a bunch of my time trying to figure out like what the infrastructure needs to look like to support training very large-scale models. I, in a very small way, had been doing work when I was in grad school in high-performance computing. And it's just remarkable to me. Like, I thought, you know, funny enough when I took my job at Google in 2003 that all of the stuff that I'd done in graduate school was like gone forever and like I would never -- I'd never see the day where it was useful again. And then I'm, you know, sitting here in 2019, and surprise, surprise. Relevant. (Laughter.) >> No, it's true. And, of course, high-performance computing developed hybrid machines, NUMA architectures, all kinds of things that are reappearing now in the machine learning context, so -- >> Yeah, well, you know, it's sort of interesting, right? And I'd love to get your take on this. We're at this moment now where there are certain flavors of machine learning, so this simulation-based reinforcement learning stuff that has achieved some fairly spectacular results that have been publicly disclosed over the past few years, like mostly in game playing, and then there's like recent stuff and natural language processing on unsupervised learning. And in both of these cases, like the workloads are just because you have gotten human supervision out of the direct training loop, like you don't have to produce a bunch of label training data, like you're sort of -- reinforcement learning, you're gathering all of your data to train the model inside of a simulation environment, and the unsupervised learning, like, you just have like a large, like, Internet corpus of data that you're training on and you're trying to like induce some structure out of it. So, they're like absolutely insatiable in terms of their compute appetite. I mean, it's just mind boggling and like at least with the unsupervised models, and I think the same thing is true with these reinforcement learning models, the more compute that you can throw at them, like the better the result you get. And so, like there's just this real tangible incentive to like throw them more compute. And it's happening at exactly the same time where Moore's Law is running out of steam. And it's not Moore's Law that's the problem, it's sort of the Dennard scaling that's the problem. Like, we can put, you know, tens of billions of transistors on a die now, we just can't power them all. >> Correct. >> And so like you've -- like, we really are having to like revisit computer architecture and, you know, like, how do you cool these things? How do you design their networks? Like, what is the memory hierarchy? I mean, it's just crazy that all of this is relevant again. >> No, I agree. And we're having, obviously, a revolution again in computer architecture for all the reasons you point out. And you know, John Hennessy and Patterson just won the Turing Award for basically having thought about computer architectures in different ways, done RISC written their book, and kind of I think they reopened the door as part of their Turing Award speech and some of the speeches they've given since, suggesting it's time to rethink computer architecture. So -- >> Yeah, I completely agree with them. >> The other thing that's been interesting with the insatiable appetite for computing, and it worries me a little bit, I still believe that universities are the best training ground for people doing computer science work. You know, maybe not everybody should take the time to go get a PhD, but I think having a rigorous program with lots of mathematics and theory and so forth and not just -- it's more than just programming, but I think one of the challenges with the rise this time of machine learning is I think the universities are at a disadvantage. >> Yes. >> Because, you know, the big platform companies which of course would include Microsoft, Facebook, Google, Amazon, and others, are the best place to get your hands on lots of data and lots of computing resources. I think it's very hard for MIT or Caltech or you know Stanford to compete with those capabilities. And so, I think it does call into question what's the right partnership between universities and these large companies? Because I think otherwise we're going to have a lot of people who are deficient in their training as they enter the workforce and try to do novel things. >> I completely agree. And it's become especially obvious I think over the past year where some of this stuff on like the very frontier of AI, like the computations have become so large and it's so expensive that we even sort of have to think carefully about it inside of like these big tech companies. Like, you just can't have 5,000 people all like doing each a $10-million computation to train their model. Like, you have to sort of think about like how you want to focus these efforts in ways where you can, you know, where you can get leverage out of your compute infrastructure. And I think it's especially hard for these universities. I've joined the advisory board of the Stanford Human-Centered AI Institute. And thinking in general about like how we can form these partnerships where we can make resources available. I think it's beyond just training, though. You also really need you know sort of dispassionate third parties, you know pushing in interesting new directions. Like, one of the things I really worry about with the state that we're in in machine learning right now is that we have made a bunch of subjective decisions about how these computations should be performed by virtue of the frameworks that we've built. And so like it's sort of like MapReduce, right, back in the day. So, as soon as you have MapReduce, it's like such a powerful abstraction mechanism that it solves like a ton of different problems and like abstracts away like all of this tedium from you know like how to you know massively you know in distribution fashion run these workloads. And, you know, the tool is simple enough and powerful enough where all of a sudden like everybody wants to try to bend their computation around where it's like a MapReduce job. And I think we have a little bit of that right now. I mean, so like you look at these deep learning algorithms, like, whether it's TensorFlow or PyTorch or like the numerical kernel of all of these things is stochastic gradient descent. And, like, because you've chosen SGD as the way that you're going to like do the fitting for the models, it just sort of excludes a whole bunch of things that you might want to do. And so, like we're -- in a real sense, we have been pushing people down to this like what has to be a local -- like a local optima. And you know, I would love to have like just a much, much larger pool of people sort of pushing at those assumptions. But in order to do it and to compete to show that the new thing is as effective as the, you know, the old thing, like, they have to have the compute resources. >> Oh, I agree. And I think the other thing which, of course, has happened more and more with machine learning is not only are we constrained by the frameworks, but we're also I think even in the unlabeled case, the case where you're not pre-labeling data and you're doing unsupervised learning, I think you have the risk that if you feed it the wrong sets of data, you can generate biases of various kinds without even realizing it. And it's tricky. There have been a number of published results on this stuff, but it's kind of insidious. >> Yes. So, let's go back. So, tell me a little bit more about this experience with starting a company because that is a very unique thing. It is not at all like managing researchers, it's not like -- you know, even though Google hadn't gone public when you got there, like it was already a reasonably big thing. >> Yeah, it was 4- or 500 people. >> But like zero to 140 is like -- I mean, that is a -- that's something else >> Well, you learn to tell stories to venture capitalists. So, now that I'm doing that as a full-time job, you get to play the other side of that drama But you have to think about what's the product you want to build? What kind of team do you need? How much funding do you need? You have to think about everything. And starting as you say from zero, you've got the challenge of, you know, you're the janitor when day one starts, right? And so, you have to think about everything -- you'll laugh. I did the payroll and the bookkeeping for the first few, I think, first few months, Not that I'm particularly good at that, but I can do a little bit of accounting math. >> Well, and it must have been good preparation for what you ultimately had to do at Google because at some point you weren't just an engineering director of like a group of people, you were sort of like the CEO of like an army of engineering people. And so, like you had HR issues, you had finance things, you had facilities things. I mean, like I remember walking into your office at one point, you know, where you were, you know, sort of looking particularly exhausted. And I was, like, you know, what's going on? And like you had this spreadsheet in front of you like where you were thing to like figure out where everybody was going to sit who was being hired in the next unit of time, which is probably very far away from writing papers about, you know, ground state simulations of quantum chemistry systems. (Laughter.) >> No, it's true. I, well, so I think the role I fell into at Google was I was willing to take on stuff that not everybody else was willing to take on. So, there was a small executive committee that ran Google, of which I was a part for a few years -- number of years. And I -- for a while, worried a lot about things like facilities and HR. And you have to do this in a young company. You have to do what you need to do to make it successful. And part of the challenge and you saw this at Google, I'm sure you also saw it in your experience at LinkedIn, it sounds very hard to go from zero to 140, it's also very hard to go from a few hundred to several thousand. The scaling, trying to figure out what works. You want to introduce more process and structure, but if you introduce too much, it kind of kills all the energy and excitement in the team and so forth. And so finding a path through a heavy growth phase of a company is pretty tricky. And I did a lot of that for Google in the early years. >> What do you think was the most challenging thing that you -- or problem that you had to solve in those early years? >> I didn't join Google until early 2003, but I think from when the dot-com bubble burst to probably 2004 or '05, recruiting was hard, but it wasn't crazy like it is today because there weren't enough kind of growing, powerful new companies forming because of the sort of downdraft that happened because of the dot-com burst. I think today, one of the challenges I see with the young companies I work with is just figuring out where to recruit and what to do. One of the things you see from more and more companies is looking at doing engineering away from Silicon Valley. >> Yeah. >> And then I think one of the biggest challenges I saw in the early days at Google was it was still very much a startup, even though when I joined it had a few hundred employees. And there were key areas inside the Search product, for example, where only one or two people actually knew some of the key things to get things done. And so one of the challenges that I found particularly hard was figuring out a way to not disempower and take responsibility away from the people who had been standing in the breach, so to speak, but building a team around them so that you could actually have turnover and have organizational stability, but you sort of transition from a few kind of superhero type people that know all these key things to teams that actually own things. And that's an enormous cultural change, which we went through. I think we managed to preserve a lot of what was good about the original culture, but it was hard. >> Yeah, another, I mean, just sort of outside looking in, like one of the things that you always seem to have a real talent for was managing the very senior, like, very most capable engineers and like figuring out how to you know let -- give them the space to do their best work without like sort of having the crush of like all of the sort of outside world and you know sort of friction that can sort of land on you as an engineer. I mean, like, at one point, you had like almost all of or maybe all of the principal distinguished engineers and fellows reporting into you. And like they're not an easy group of folks to manage. I mean, I know many of them, I love them. Like, they're like fantastic human beings. But they're smart, they're -- they have strong opinions, they're you know sometimes their interactions you know with one another or like with other engineers are sort of like interesting. But somehow or another, like, you built this environment where all of these folks could like really flourish because at some point, like, they just don't -- they don't have to work for you, they don't have to work at Google, they can do anything that they want to do. >> So, I think what I tried to do, and I think I was successful more often than I wasn't, was find areas that were important to the company that different individuals were interested in. That's how we -- you know, we spawned a project called Borg internally to do cluster management. There were a group of people -- if you look at the work that was done there, it was very good, it was very deep, it was ahead of its time. But it also was rediscovering mainframe timesharing, but on a cluster. And so some of it was recycling ideas that were prevalent in the '60s and in the early '70s, but finding the right set of people that were interested in that problem, were motivated by the problem, and putting them together. So, finding things that were interesting, you know, we had the challenge of managing locking and global namespace stuff, and that was an area that Mike Burrows was particularly attracted to and did a terrific job with. And I think so it was just picking individuals. But it didn't always work. >> That particular one is sort of genius like sort of saying like here's this person who can work on these problems and like we're going to go build infrastructure that everybody else can use. I mean, those are some of the hardest problems in software engineering. Like, proving that you know, Paxos is implemented correctly in like one of these locking systems. And like Mike is, you know, maybe the best person in the world, like, one of the best persons in the world. >> No, I agree. And Google had -- and still has people that are absolutely world class and strong. But you're right, some of them don't mix well together. You have to figure out the right problems, and it didn't always work. The other thing I often tell young companies that I work with now is Google also could cheat. And I don't mean that in a nefarious way, with the advent of AdWords, it started to become you know lots of positive cash flow--it gave flexibility -- the fact that the business was so strong gave us access to resources and capabilities we wouldn't have had. And one of the things I always find amusing is when I am working with a very young company and they want to talk about creating 20-percent time. And I often will tell them when you have a massively profitable business, why don't you come back and ask me about 20-percent time. So, I think people need to be more realistic about what constraints you're operating under. And at Google, one of the things I did is like we started storage projects we weren't absolutely sure we would need because we had the flexibility and at another company you wouldn't do that. Most of those bets turned out to be good bets, but not all of them. >> Yeah, well, you know, it's sort of interesting, like even 20-percent time, like there are things like that that take on these mythological proportions. And, like, I don't ever remember using 20-percent time. And it wasn't because I didn't think it was available, it wasn't because my manager wouldn't have supported it, it was because I was so interested in the work that was my 100-percent time that I didn't want to stop doing that to go do this other thing. I mean, it was nice to know that I had it if I wanted to use it, but I think a whole lot of people like -- >> Most people did not use it. >> Yeah. And not everybody had an exciting new project they wanted to start on their own, so -- >> The thing that I really enjoyed out of Google as it was growing as fast as it was, so I was there like I joined I guess a few months after you did in 2003 and then I left the first time in the middle of 2007. And, you know, the thing that was just extraordinary for me over that period of time is like because we were growing so fast and we were solving so many problems for ourselves the first time, you got to be this sort of participant in the unfolding of like this really interesting great business and this really interesting great technology stack. And you sort of got to see, okay, this worked, this didn't work. And like in a very quick period of time, like I felt like I got exposed to like a whole bunch of things that I never would have been able to get exposure to if I had been at some place that wasn't growing that fast. >> Oh, I think that's right. >> Like, when I left to go do AdMob, which was already a company I joined in 2007 to run the engineering team when it was like -- the whole company was about 25 people I think. And like I felt just because I'd been able to raise my hand and say, oh, yeah, like I'll go help with the mentorship program. I'll go help set up a faculty summit. I will go like you need someone to go due diligence on like an M&A thing that we're doing. Like, none of which I was qualified to do when I raised my hand, but because no one else was there who was raising their hand to do it, like I got all of this experience. And when I went to AdMob, it was like, okay, like, I'm like there's still a whole bunch of stuff I need to learn, but at least I'm confident in like a big enough set of things where I can, you know, I can have some modicum of comfort that I'm not going to screw everything up. (Laughter.) >> Yeah, you can learn a lot. And you get a lot of advancement and opportunities to do different things, right? It's a special time in many companies, so รข€“ >> So, you were at Google for how long? You left in 2011? So you were there for -- >> Eight and a half years I think, yeah. >> And so how -- what was the biggest team that you had? So, you were up to 5-, 6,000 people? >> Yeah, it was probably a little bit north of 6,000. Google broke itself up into product divisions, they call product areas. And I think at one point, I had amassed what are today four or five of their product areas. So, let's talk about the transition to venture capital. So, you've been doing this for I guess almost eight years now. >> Close to eight years. >> And so like what made you could have done anything. You could have stayed at Google, you could have like gone to another company and done a similar thing, you could have started a company. You could have retired. You could have basically done whatever. >> Yeah, I think when I look back at my career, so I thought -- one of the challenges of the role that I had at Google is I was unsure what I could do at another company that wouldn't feel like a step down. And it's not that I'm in love with a particular title or a particular role, but there aren't a lot of Googles in the growth phase out there. I think there are probably a small number, but they're very few and far between. And so, I didn't see how to repeat that. And I think one of the things I've gotten better at over the last ten or 15 years is mentoring and spending time with people and helping them think through their problems and their challenges and so forth. And it felt like I could do that as a board member, as a mentor to a bunch of young companies. And so for me, some of it's what people I think call "giving back," but some of it is I think at this stage of my career I'm probably better as a coach than as a player. >> Yeah, well, I mean, I remember some of the best advice that I've ever received has been from you. And I remember like just vividly this one like sort of critical moment in my own career. So, this is when I was thinking about leaving Google to go to AdMob, I'd chatted with a few companies, like I had chatted with Omar, who's I guess now one of your partners at Sequoia, who was like the founder and CEO of AdMob. And I remember I asked you for a meeting, which you were always generous enough to take when you were much, much busier than I was. And I remember coming into the room and I was like very reluctantly admitting that it's like, oh, I've been out talking to these companies and like I'm thinking about leaving and you already knew because somebody had -- whose name I will not name had -- (laughter) >> Yes, I think I know who, yes. >> And, you know, like done a background check, I'm guessing. But you gave me the best advice . You were like, okay, like, here's the advice I'm going to give you with my Google hat on, which is you know, whatever that was. And then here's, you know, the advice I'm going to give you without the Google hat on, which was like just super helpful to have both of those perspectives in making that decision, which was really hard. Like I had a hard time leaving because it was really -- it was a great company and I had so many friends there and I felt so grateful for the opportunity that I had gotten, which I think a lot of it was luck. There's no way that -- >> There's a lot of luck in many outcomes in life, I've decided. (Laughter.) >> There's a lot of luck. Just extraordinary amounts of it. But, you know, like that advice you gave me was like one of the -- and it was certainly like a pivotal moment, like the whole -- my experience with AdMob, like without that, I wouldn't have been able to you know get the role that I had at LinkedIn. Without the role at LinkedIn, I wouldn't be sitting here as CTO of Microsoft. And so, you know, like in -- so, you know, I'm glad that you're out there like giving other people this like really good advice. So like, what made you decide that like this is the sort of thing that's worth your time? Because you were doing it even before it was like officially your job as a like a venture capitalist. You didn't have to take that meeting that day or like any of the other times, you know, because I was way below you in the org. And you weren't just doing it for me, you were doing it for a bunch of other people. >> So, maybe this is one of the things I've tried to do as a leader, I think most people -- you know, when you're employed by a company, you're employed by Google, now I'm employed by Sequoia Capital, you have to have loyalty to your employer, but I also think as a leader inside of any organization, you also have to be authentic. And you have to -- if somebody asks you for advice, they don't want the company line. They want real advice. And so what I've always done in the last many years is I will give you my advice as a leader inside a company, but then I will also give you my advice as an individual. And I think, to me, that's been one of the things that I think has bonded people to me over the years, because they feel like they're not getting a bunch of political mumbo-jumbo, which unfortunately I think particularly folks in large corporations, I've known a number, they can only talk in the sort of party line mode and they never get out of it. And it makes them appear, even if it's not true, as phony. And so I think part of it's just being genuine and authentic when you talk to people. >> It's sort of scary to do because when I was running engineering and operations and LinkedIn, which grew over the course of the six years that I was doing the job from a couple hundred people to about 3,000. Like I took this queue from you that I was going to try to be as authentic as possible when someone came to me and like they were struggling with a problem and like trying to figure out like what the next step was for them. And like I would do almost exactly the same thing that you did for me. Like if they were contemplating a job offer, it's like here are all the many reasons why I would like you to stay like because we really need you here and, you know, like we walk through the whole thing. And then I would give them, you know, my unsolicited advice, and sometimes it would be like, hey, I don't think that this is like based on what I know about you and what you've told me about your aspirations, like I don't think that this is a good move for you. And sometimes I would tell people, it's like this isn't a bad option. Like, you are now faced with a tough choice, like I think it's a -- you know, you've got a good option here and you've got a good option there. And the thing that I found, though, like even it's a horrifying thing like when you are leading you know a group of people and like you and in a very sort of very concrete way are dependent on them to like be able to achieve all of the things that, you know, you're trying to get your company to achieve. But I found like having those conversations like I think because people believe that I had a genuine interest in like their success and their happiness, like I wound up being able to hold onto a bunch of people like way longer than I would have otherwise. >> I think that's right. >> But it was hard to do because it feels very scary. >> Yeah, it's risky. It feels risky. I understand I think the other thing which I saw at Google and I suspect you've seen in your arc, too, is Google hired a lot of very bright kind of new grads or it was their first or second job, and it was fairly common for people after a few years to kind of wonder what the world looked like outside of the particular confines of Mountain View at the time. And that's not irrational for a young person. >> No. >> And on the other hand, Google wanted to retain those people. And there were some difficult challenges in that. >> So, what's -- what are the most interesting things that you're seeing in venture now? So, like, it's -- it is an exciting time right now because like, there's a lot of venture capital out there. It's never been easier to start a technology company because you have open source, you have all this cloud infrastructure, you have like an increasingly powerful set of capabilities that let small teams accomplish big things. And like you're at Sequoia, which is like one of the top venture capital firms in the world. So, like, what's interesting right now? >> Well, there's clearly a lot of interest in software around machine learning. I think that there's a bunch of companies trying to create tooling or do vertical applications. I think there aren't very many companies proposing to do platforms because you've got TensorFlow, PyTorch, and other things in the market from companies that have, obviously, much larger resources than you can mount from a startup. But the sort of machine learning software and getting machine learning that's usable and digestible by a broad community is very hard to do. And I think there are some interesting ideas and companies around that. There's a lot of interest in processor technology both for machine learning, but also I'm starting to see some companies that are talking about rethinking more server processors more generally and so forth. And so, I think there's a lot of that. Those are harder companies I think for venture capital just because it requires hundreds and millions of dollars of investment rather than you know tens of millions of dollars of investment. So, I think -- but I see interest in that area. There's a lot of interest in quantum computing, which is -- you know, people will debate whether it's about to go commercial or whether it's still going to be research for a few more years. It feels to me like we're on the cusp of a bunch of things right now in that area. Those are very interesting. And then there are interesting companies in storage and networking and so forth, but I think the big things have been processors, machine learning, and then quantum are areas that I think are particularly interesting. >> And the processor trend, aside from the machine learning stuff, so like we're seeing with distributed systems, right now that like architecturally, like one way to compose these things now is streams and stream processors, which are going to have different compute requirements than normal sorts of processors. There's also like this interesting thing where you sort of reach your sort of power saturation point with transistors for logic, but you haven't yet for memory cells. >> Yeah, I think there's tradeoffs now that people are rethinking about -- between you know actual logic-type processing versus memory, what kind of embedded memory do you want, what kind of memory structures, you know, there's obviously new kinds of memory coming into the market that don't require DRAM refreshes, but are faster, that's another area that may be interesting. I think the other thing which strikes me as a big challenge as people think about processors themselves is you know, there's been some fascinating work on the security side and very scary, people did not think through all the risks with speculative execution. And on the other hand, if you throw speculative execution out, you hurt performance a lot. And so I think there are people trying to think about how do you think more from first principles about what the security risks are in processor design so that -- because when you admit security weaknesses at the very bottom layer of the hardware, it's pretty hard to defend against. >> Yeah. >> And it's scary in new ways, right? And so, I think there are a lot of interesting things happening in and around that area. >> Yeah. Are you seeing the stuff with the -- in the IoT space? Because processors there like still have a couple of generations of, you know, real Moore's Law left in them. >> So, we're seeing a bunch of companies around -- there are a lot of people looking at processors for the edge where they can do some inference, maybe a little bit of training I think, and very low-cost kind of microcontroller-level designs and so forth. There's a number of interesting new ideas and companies in that area. I'm -- when I've looked at IoT, I've mostly looked at things related to industrial IoT because I think consumer IoT has been tricky for a variety of reasons. One is, it's often driven by brand and consumer reach, which I think advantages companies like Apple and others. And I think the other thing is smart phones are too good at doing a lot of different things, and so the killer apps for the consumer IoT I think has been pretty limited so far. Personal opinion, but there you go. >> Yeah, I mean, we can certainly see that the industrial IoT stuff, like the applications there are like rich and like there's an enormous amount of opportunity there. I think we sort of see the world in similar ways. >> Yeah, no it's -- consumer IoT I think more and more devices are connected and have some ability to respond to command and so forth. And we'll see a proliferation of that, but special use cases I think are -- there aren't enough interesting use cases. I talked to people that have Alexa devices or you know the Google Home devices and so forth and they use them to set alarms and timers and play certain kinds of music and so forth, and then they rapidly seem to run out of other things do with them. >> The thing that I think is a little bit interesting, though, is that the capability in these devices already like in both the hardware and the software is much higher than what we're using it for. >> Absolutely. (Laughter.) >> So, you know, like just as a proof of concept thing, I'm building an AI coffee machine right now, which probably sounds weirder than it actually is. But like the idea is, can you build a consumer appliance from scratch, like as an individual, although like you know, one with slightly more resources than an average individual. But, like, can you build a device that has like a modern AI-powered user experience in it? And so, like this thing will have no buttons, no displays. And it will have a camera, a speaker, and a microphone. And so like when you walk up to it and like it knows that you're paying attention to it using very straightforward computer vision models, it will say to you, "Can I make you a cup of coffee?" And it will be able to recognize who you are and remember your preferences and -- >> Yeah, no, that's true. >> And, like, that's an entirely -- you know, entirely doable mode of like building a user interface on a consumer device right now and it's going to be not too terribly expensive in the not-too-distant future. Like, I'm going to be able to do this with 30 bucks' worth of electronics and like the price of that's going down to two over the next few years, I would imagine. >> I think you'll see that in a lot of consumer devices, but they'll be very limited and narrow use cases. >> Yeah. I just -- I'm just super excited about (laughter) about what's possible there, so I want to get people inspired to do more. >> I think human interfaces that are voice driven and have some aspect of computer vision is clearly where things are going. >> Yeah, awesome. Well, thank you so much for taking the time to talk with us today, Bill. It's been a pleasure. >> It's been my pleasure to be here. Thank you for again for the invitation. >> Awesome. ***[MUSIC]*** >> Well, we hope you enjoyed Kevin's interview with Bill Coughran. So, Kevin, one of the really interesting things that you and Bill were talking about is what was old is kind of new again, and kind of how the tech that was -- the problems that we were trying to solve in the '70s and '80s and even the '90s are now kind of coming back in vogue again. Why do you think that it is that those problems are so relevant and that we're still going back and kind of revisiting some of those ideas? >> Yeah, it's amazing to me how cyclical technology is as a business. Like I've been coding since I'm 12, I'm 47 now, so, you know, 35 years-ish of like paying very close attention to what's happening in computing. And like just inside of like the 35 years like there have been multiple cycles where you'll like have this intense enthusiasm for a thing and then it will sort of fall a bit out of fashion, and then the next thing comes in and you'll sort of forget temporarily all about the old stuff. You know, I think these older technologies that pop back up, it's almost a puzzle why they went out of fashion in the first place. You know, it's like you look high performance computing for instance, we were building in the '70s, '80s, and '90s like these very sort of idiosyncratic supercomputers and very high performance machines that all were different in little ways. So, like they had a good idea about how do the memory hierarchy or a good idea about how to do networking or a good idea about how to split the computation up across a bunch of different processors. And the thing that caused them to go out of fashion is like there was this sort of catalyst, you know, driven by the rapid growth of the Internet to sort of standardize your compute architectures on commodity CPUs, commodity memory, commodity networks, like commodity everything. And so, like you just sort of created at massive scale like large, large amounts of compute where all of the like individual units of compute looked exactly the same and were built as cheaply as possible. And like that works really well for, you know, sort of the problems that we had for the first 20 years or so of like the commercial explosion of the Internet. What we're seeing right now is like the problems are different again, but like different in the same way that they were like a bunch of years ago. And so, like now we are -- we're digging back up all of that good work that folks did a few decades ago and are realizing like how valuable it still is in these new contexts. It's really fun, because I spent a bunch of the early parts of my career thinking about these things. Like I did an internship at the National Center for Supercomputing Applications like where we like when I was there we had just taken delivery of this machine called the CM5 from a company called Thinking Machines, founded by, you know, a famous computer scientist, Danny Hillis, who like I hope we will get to come on this show at some point. Like Danny is like a super awesome human being and like just like maybe the most brilliant mad scientist I've ever met. I love Danny. But anyway, you know, this machine was just epically big and like epically cool and just sort of like it was -- it was a challenge to program this thing, but like when you could harness all of its power, it could do miraculous things. And, you know, I never in my life would have thought that all of this stuff that I did back in the '90s was going to be relevant again one day. So, it's like really I'm sort of glad that technology has these cycles, because it's almost like I get to do two things at once, sort of be nostalgic about like all of this cool old stuff and like I get a set of techniques to solve a set of problems that are very relevant today. >> I love it. No, it's so cool to be able to revisit the past but also use the advantages that we have now in solving those problems. That's great. >> And the -- the cycles are -- like can be really long. Like the other thing, too, like I think is worth thinking about AI right now and some of the disruptive effects that it could potentially have, like we're learning lessons even from the Industrial Revolution, which is like not just a couple of decades ago, it's like centuries ago. >> No, that's so true, I hadn't even thought about, but you're right, I mean, these cycles can be really long and we can learn lessons from them -- or hopefully we can, right? >> Yeah. So, the -- the message for the young ones is like pay attention to history, very, very important. >> Okay, so we need to wrap up, but before we do, remember to tell your friends, your colleagues, your neighbors, your barista, your Lyft driver, your dental hygienist -- real talk, I actually have told my dental hygienist and my dentist, I have. Okay, you know, you get it, tell everybody you know about the show and you can write to us anytime at BehindTheTech@microsoft.com, to give us your feedback and tell us what you'd like to hear more of. >> Yeah, we really would like to hear from you. See you next time. [MUSIC]

Azure Functions Less-Server and More Code

all right what do you guys what do you guys get ready to film we are going to do a visual studio tool box at the soda I'm one of the co-hosts of visual studio tool box to show that Robert Green started and myself and Batman Brown there now co-host the episodes and I have my guess you Jeremy yeah I just randomly wandered into the studio I'm actually a cloud developer advocate and have been doing a ton of things without your functions we're going to talk about serverless today both compute with functions and then we're going to do another episode that focuses on cosmos DB which is the less server version of the database I always say flip it backwards what's cloud developer advocate I advocate for developers in the Clausura less is less server it's not no server yeah and then a full-time job I'm actually the product manager for visual studio team services which is our DevOps cloud offering so I have a lot invested in Azure and I mean this guy did a so pretty recent about that as well so being able to Jeremy in the show a lot more stuff together I'm sure all right well we're ready to get started and talk about as your functions so Jeremy why don't you kick it off those what are we gonna talk about today in detail yeah so one of the best ways to get familiar with the technology I think is the dog food it right and I wanted to talk about a project that I made that's my own URL link shortener so you're familiar with these we have a kms here for example who isn't know exactly and what I wanted to do was take ownership over the data so I'm very interested in when do people click through links what links generate the most click throughs right is it Twitter is it LinkedIn is it Facebook is it one of these social media sites yeah and then I wanted to also look at different statistics like what time of day is the most popular time of day for people to click or day of the week so I thought what better way to leverage functions and server lists than to build a link shortening tool awesome so what don't we just roll it back just a little bit because I think sometimes people might be watching the video and they're like what would it what are you talking about what is this functionary so at like five words or less summary what is functions and we are talking about something on a so it's a cloud hosted thing but what does functions give to a developer well if you're going to restrict me to five words I would say events and code right it's functions but but the idea when we talk about server less I like to flip it backwards and say it's less server yes so it's the ultimate realization of focusing on your code and not having to worry about necessarily how your codes hosted it's not even platform-as-a-service because we're not necessarily talking about web applications right we're talking about some sort of event that triggers the code and then we're talking about the code that actually runs right and that code could occur in that the X or Y right it's all it's all dependent on what you do in the implementation it's not specific the code doesn't care what you do with it you can write to to a script file something you could generate some data it could execute a web service call it could return something to to an end user but really it's agnostic it doesn't care what codes inside of it I think that's something that you and I took awhile to overcome as a train of thought right this is like you said a function in the cloud right I mean it feels to me like the ultimate realization of the dream that's microservices if you will I hate to use an overloaded term it's a valid term in this case I mean so some of the things that are really neat about functions are number one you can write them in different languages I'm gonna demonstrate it in dotnet through Visual Studio but you can do them in Python PHP node.js you can even write bash shell scripts that launch function so that's one neat thing the other cool part about the way Azure implements functions is we have a concept of triggers and bindings and these are ways we set up the environment to allow us to interact with things like storage and queues and and it can be file storage it could be blob storage and it makes it really easy for the developer to work with those resources and I'm going to show that in the application that I built that's awesome well let's jump into it it sounds like a great demo alright so what I'm going to do is is jump into the portal right now so I've already deployed this application I'm going to take a step back and show how this is built but I want to set the stage with the link shortener that I have I wrote a web front-end but just to focus on the function side it's a small window but you can test functions directly from with inside the the UI which is pretty cool yeah so what I've loaded up here is a link that if I just paste this link in a new tab you can see goes to some of the azure functions documentation so if I run this through the tester I'm just going to click run here it will go out and call that function and I see a little completed success and I get some text back that has what is the short URL that I can use for tracking so I'm just going to copy that and paste that so you can see the way the experience works so jli K which is my first name and part of my last name dot M e right and then BW is the short URL when we hit this it goes through my function and redirects now for the end user it's a very simple experience you just end up where you're going for me a ton of data is generated from that that really simple event right if we have collects quite a bit right it does and looking at that I actually wrote the part that shortens the URLs I wrote that as a script that's this run script so you can see my shortener there's an encoding routine but the the main part of this grabs a request and you know obviously if I have no requests I'm going to return and say basically not found there's nothing there we get the input we check the input for null we go through and basically I'm tagging if it's coming from like Twitter or LinkedIn or some other things and then at the end of the day I'm really just creating a record here that map's the short URL to the long URL and I'm saving it to table storage and that's it so when I'm putting the link in it's here's the long link and then give me something short back that I can use yeah now the real power of this comes from this function host that I have here and by the way all of this code is available on github so I open-source this so people can work with this project yeah well link it in the show notes definitely right so the the redirect comes in and this is when you're hitting the short end point so you're hitting the the BW e for example so what happens here is it'll grab that short URL and then I have a keepalive that sort of pings the server make sure it's running I also get requests from robot so I tell them not to follow right because this is my link shortener yeah and then we come out and we go in to table storage now this little piece of code here where you can see the start time and I'm starting a timer this is something that I love about functions because when you create the function app you can check a box and say you want to use application insights and this will automatically start building telemetry and analyzing response times and basically giving me the feedback I need to know the health of my application right what I wanted to do is because I'm using table storage is I wanted to measure how long it takes to read from table storage so with this telemetry I have this operation that goes out to the table and finds the long URL if it gets it back it says it found it gets that redirect URL and it's tracking how long that operation took and this is that's the most sensitive operation you don't people to wait when they're being redirected that's I mean it happens all the time now these public link shorteners you get to some URL and write events whining whining whining exactly so I wanted to test that and I wanted to just highlight how easy this was to put this custom data and I literally am tracking tables storage that's the thing I'm tracking retrieve is the action I'm taking and then I'm just passing it how much time elapsed the first two like strings it or they have any bigger significance or they're just the way you decided to store just the way I decide to categorize the data with application insights and then it's as simple as two two steps one is I want to do some more operations with this data but I don't want to slow down the redirect so I'm going to add some information to a queue that I can pick up in process later right now the event is an HTTP trigger it came in and requested an endpoint I throw this on the queue and then I redirect them that's it that's the redirect code then I have will ignore keep alive for now I have this process queue so again we said that serverless functions were events in code right in this case the event is there's an item in the queue and my code pulls that off and does some additional processing so I'm breaking apart the message in this code and I'm writing some custom information one of these is what I call a custom event which is literally this came in from Twitter or this came in from LinkedIn the source yeah right and then the other thing so you can see I do the the track event here the other thing I'm doing and that's actually adding a document I'll get to that into a minute there is a page view so with this piece of code I'm highlighting a page view so now I know which page it actually went out to so I'm saying what was the medium what was the page right and I'm adding that all through application insights and I want to show what that looks like and then this is a piece that we can probably dive into at another time because this is creating a document for Cosmos DB and I added this on later I started just tracking through application insights but then I decided to create a Cosmos DB database because then I can stand up a power bi dashboard and do some exciting things around that well and so what what is it Cosmos DB database or those they don't know yeah it's the actually the function is serverless compute the cosmos DB is a server list database it's a not only sequel right no sequel document based database that's hosted in the cloud what's really neat about cosmos DB is that you can pick your interface we have a document DB interface that was developed for the previous incarnation document dd what well it was cold document DB when it first came out on Azure right was you know very comparable to that's how people wasn't talked about it at Microsoft Center no sequel space and then more recently be renamed at the cosmos so there's any confusion out there that's sorry Microsoft love to rebrand but right the product has been very solid very you know long development cycle already for it and then quite you know the the cloud scale player I think is what they often call it right this lady right lives in a ton of data centers as a concept and use the developer of powerful flexibility to deploy your data across the world well you do you you get to choose your consistency levels and you get to just click with replication which is pretty powerful and the other thing I'll point out is this is using the document DB interface and the reason why I call that out is because you can use sequel syntax to query with document DB however there are a ton of developers are used to MongoDB as you mentioned yeah and you can use a MongoDB interface and write an application around so it's very flexible in that respect yeah it's very cool that you have these options and you know I'm a sequel developer most of my life and I've been toying with no sequel I kind of like it and it's awesome to see this not not really stopped me because I actually start with is my first database that I learned you know just the basics around that that claim me I'm a developer yet on that space right having sequel I didn't realize we've even added that so that's awesome I'm working something new in each episode here and that's what I'm finding out with cosmos DB it's so easy I'm a sequel developer myself I worked with it for 15 years yeah so I had that mindset transition to a document DB but after standing up actual applications using this for my analytics I'm finding out that it's not only easy to work with but it is scalable and fast which is is everything someone wants and I don't have to hire a DBA yeah it's literally inexpensive I run this shortener on my own subscription through Azure and one of the huge benefits I see four major functions is I only pay when someone clicks through the the function yeah right and with the model I get a million calls per month right now I'm sure it may change at some point but with that it's literally pennies for me a month I think last month there was a quarter for the storage and the function calls so cheap to handle and it's 2,000 requests a day yeah it's pretty cool that the thing about you know all of this technology on top of azure is that you you are living in the cloud that your credit card is plugged in they're yours or your companies or whatever in the trial we do give you a limit so if you want to now go over the free trial limit we provided an azure but I'm always kind of encouraging developers thinking about moving to the cloud as the first things they think about telemetry so it's awesome to see application in size built-in you actually want to know what's going on with your cloud service it's not just you know consuming your resources of your service it's going to cost you money potentially depending on how much you know requests come in and people just need to think that way it's a right slightly different world you know the other day money matters so it does and speaking of application insights what I thought I would do is show some of application insights just so people can see and this is just the check mark out-of-the-box when I created the function app and some of that custom code and I want to show the reports that it gives back and then we can look at what it looks like to create a function from scratch three visuals thank you let's take a look so let's pop over back to the the website so this is the the function app I had running and I've got all these features that are configured one of the things I wanted to call attention to is this is using a feature functions called proxies and that allows me to map one route to another route so the function app itself is something like blah blah blah as your web sites dotnet slash API slash URL redirect question mark short URL equals totally friendly which is is not a short URL so in in my proxies and you can see this in in the code this is part of that code base I've mapped what is a short URL right here so just slash and what the code is to that longer URL and that allows it to translate behind the scenes no one sees that happen and and Maps it on to that longer function so I have my custom domain and then I have the azure functions running behind it cool if we come into the application insights portion the very first thing that application insights pulls up for me which I love is the overall health of the system so we've got this live stream which I'll show you in a second but this is really informative to me here because this has given me an overview of response times over time and you can see that I'm averaging a few hundred milliseconds but this is across all of my services so it's not necessarily just the redirects right you can also see a count of requests and then up here we've got something called smart detection this has actually alerted me several times when it finds something that's outside of the norm it will automatically email me and tell me you know what your redirect usually only takes a hundred milliseconds suddenly it's taking two seconds you should look into it it automatically does that and when I click on it if there was a smart detection it also helps me diagnose and shows me the sessions that were slow sessions so I can look into them and try to figure out what's going on I'm gonna scroll down here to performance and when we see performance this will let me pick so overall you can see 122 milliseconds what's really important to me is the redirect experience right that's what the end users are experiencing so we've got a 94 millisecond average and if I want to drill into more detail I can come up here and over in this graph I've got my percentiles so I can see what the 99th percentile looks like and you can see the majority Falls even faster than that yeah so and this is the least expensive version of functions you can back it with beefier servers but even with minimal resources it's still giving me this type of performance the other piece is because I tracked that custom application insights telemetry if I click on dependencies you're gonna see my as your table storage operation right and you can see the average there is 17 milliseconds which is more than fast enough for my needs and what I'm doing here yeah it's cool the fact that you can drill down all the way from like what the requests are doing overall to the custom tracking that you did but in a particular block of code I think that's super powerful the fact that it alerts you is even more awesome I've used application insights kind of since the beginning I'm okay in some products so I do have dashboards but I haven't implemented recently and it's cool to see it even though they added that new automatic notification yeah it's pretty cool the other thing that I call this the the sad portion of the application because it is sad to think that you might be sitting in a hotel room watching the livestream of your website saying it so when clicking it is someone clicking it but it's a think it has its own level of use Melissa when you when you sort of create something this is your your baby one of your babies now you know better or worse it's it's fun to watch so this is a live set of requests and as the requests come in it's it's going to show me those and I may actually force the issue over here but let's go ahead and do a redirect and I'm just going to the generic as ER Doc's so that's the shortcode to land on the azure documentation you can see it here I'll show me the request that showed me how long it took and then I have all my trace information on the side so if I want to drill into details I'm not going to click on this now because it'll go into IP addresses a Mac and like everything you want to know about right session but you can drill into the detail the other piece with app insights and again this is just out of the box without me adding anything is this nice little tab right here for lytx if I click on this it's going to drop me into basically everything that it stores is Coria Bowl for insights so I can set up pie graphs and charts I'm gonna just open up my folder here and look at mediums over the past 24 hours and run that and this will give me a pie chart that breaks down Twitter clicks LinkedIn clicks blog clicks etc so you can see Twitter is definitely my main medium of choice for for generating links yeah yeah I remember somebody showing showed me this at ignite actually this this is like a sequel light language right yeah yeah they call the language itself but it's to me when I saw the first times ago this is the sequel close enough I guess it allows you to query all the various parameters and this is again this is the back end of application insights data has been collected it's not any other kind of data but but it can I think be mixed with other kind of data sources to give you a more holistic view of your environment if you have complex deployments these doesn't help the person described this I mean the dumb right ya know it cannon it's all prompt able if I'm inside and I start to type it's giving me a tell us and intellisense so it'll walk you through creating these these queries and that's exactly how I built the one you just saw and I'm gonna open top page views and we'll just do this talk these rolled ones you built yourself right yes they didn't have those and it saved it for me and then I just drop in the table and I could see channel 9 it's actually one of the more popular links in the bag 24 hours right so that's always nice to pull up on the fly we've got a juror this is actually interesting these are all Microsoft properties I actually do tweet other links but these are the popular ones for 24 hours yeah that's cool so that's the application insights experience let's pop over to visual studio and just show someone what it looks like to start a new function out yeah that's really great I think I think it's awesome when we show how we did something and we provide the code but often forget this part right exactly how do you get started yeah so the the prerequisite here is I'm working with at least 15.3 right so it's a preview version of Visual Studio 2017 right think we're up to 15.5 any of those versions will work for functions yeah if anybody has been kind of away from the visual studio versioning game for a while that's the versioning scheme we've gone to and if you like go into about dialogue for a second under the help menu sure yeah you'll be able to show so if anybody has any doubt which version they're on you can jump in there and there's 15.4 preview of that particular you know preview branch and you can install side by side so I have always the RTM version and the preview right machine it tends to work really well I've never had any issues asterisk a string like now you said it I know I care but your machine in your environment users out there yeah that's how people know in case they don't know which version yeah so once you have that install and you have to pick the cloud work load will go into a new project and as your functions lights up and the way I like to talk about this we talked about a Vincent code the function is the actual piece of code that gets executed the function app is the host for those different events and pieces of code right so you have a host that's what this as your functions is it's a minimal amount of you know stuff around it to make it work as a function and the rest is up to you right so what this will do is it'll create an empty project for me that's just ready to host an endpoint so then I can click on that and add a new item and fortunately these are sorted alphabetically so as your function comes up right off dial this yeah that that's convenient and I'm just going to give this a name of echo name and click add and what will happen is it's going to create a class for me the entire experience for functions within Visual Studio is is attribute driven so it's very easy to add what we call bindings or connections to things like table storage and queues what I'm gonna do is create an HTTP trigger this says basically you know what call this piece of code in response to an HTTP request which is a pretty common scenario and I'm making it anonymous so anyone can test it out and access it but you can we support permissioning but for our example here right no big deal and I think they also good just to connect line so we've gone the dependency is like what NuGet packages is this team bringing into to make this the default so you just got the function SDK and that's about it it's very bare-bones at this point there's no application inside there's no you know there's no gunk if you don't need that stuff it's not right by default free right and then if you want to start tracking custom telemetry you would just you know add a new get package going to the Explorer and add that that experience yeah I think if your right click on dependencies it would give you that yep as reference so what we've got is our async task and what's coming out of this is a response message because we have to respond to the request what's going into it is a trigger there's two types of parameters we're typically gonna pass a trigger is what actually causes it to get called and then a binding is something we might interact with and I'm going to show how to do a binding in a second cool so we've got this anonymous it supports getting posts the routes no here's to the request and here's the log and by default it creates some code that expects you to put the name in the request body or in a quarry string and it's gonna echo it back right but what I want to show is before we even touch a j''r I've downloaded the prerequisites I've created a function app I can put a breakpoint right here and press debug and what will happen is it's gonna run a full version of the function host right on my laptop and we just announced that we have this experience available cross-platform cool so it's not just Windows machines this will run on on Linux as well and and Mac OS nice so it's a been waiting for that when I give I kept hearing it was coming in it's awesome that we we finally announced that I I missed that part not not that I'm a Linux person or anything I still run a PC so I'm quite biased alright I spent a lot of time I actually was having fun running the function host in my Ubu - on Windows 10 yeah through the windows subsystem for the neighbors I should try then accessing it so all I'm doing is pasting the URL it gave me and you can see we hit the breakpoint and if I continue for that it's going to slap my wrist and tell me that I needed to pass a name so we'll go ahead and give that a name name equals vs toolbox hey Brandon go and we hit our breakpoint again and we'll go ahead and continue through that and what we'll see is it'll echo back and say hello this toolbox so that's a great start we've got it running locally we were able to debug it let's take it one step further and load it into Azure what I'm gonna do is just right click and go into publish and the publish experiment experience will allow me to create a function app in the portal and connect to an existing one or I can spin up a completely new application right from right here so we're gonna use live there earlier put the publish experiment that hey sometimes the world can be a public experiment yeah we're gonna try for the publish experience today let's see if we get that so we're gonna call this my vs toolbox app use my subscription and I'm gonna give it a second to spin because what's validating is making sure that is indeed a unique application name yeah I'll give it an agree eating the cloud you know resource that's assigning it to to the research group of your choice or new ones so there's a lot a lot to do there but you never have to leave the ID in this case right I'm gonna pick a location will do West us since we're filming here and let's the biggest machine can we do here oh my goodness you would want to do this right so one thing I do want to call out I can pick these various course to back my experience I can also pick the consumption plan the consumption plan is what I call the easy button for functions I don't have much control over size of the servers but I'm allowing Azure to do all the scaling for me it will automatically look at incoming requests and do what it feels it needs to do to accommodate those listen there's always trade-offs right if you have dedicated machines you can configure them to be always on so they're ready to start where with the consumption plan it may go to sleep and you have a new request and it takes a little bit longer to start up but again you have flexibility of options and I think consumption there's a reason to go at a price wise right there's some different right that's a good deal if that's good enough for your production environment right and that's what I'm using for my redirect experience as well I just have a cheat a little bit with a keepalive that pings the server to keep it awake yeah well that's valid they know you're consuming it nobody feels cheated in a dream I'm sure right yeah know it they're keeping an eye on you but for good reason that's right yeah so this is going to deploy there's really I like to share when people are watching this spin there's two steps to this the first step is creating the assets to host the application so it's going to create a resource group which if someone's not familiar with Azure that is a a logical group of related assets I think of it as life cycle if something's going to be created or destroyed with something else so you have an app and a database if they're related they probably belong in the same resource group and you can track cost by resource group and you can script out and even delete entire resource groups yeah it's a very powerful idea at first that was you know when resource groups were introduced I was a bit frustrated like another thing to do there's a girl wait oh there's a lot of benefits to this other thing to do so now I don't even think about it twice I really started to memorize resource groups I'm getting that bad on my glasses my out of my miscellaneous one if I need to just throw something out versus okay this is a bunch of real stuff together then I group right and it's great to if you're giving demos or meeting meetups or user groups because you can create a resource group for that experience and go through the same demo but partition it off so once it spins up those assets it's got the hosts it's got the function app the function app has storage with it next thing it does is builds and creates a set of assets that it then bundles up and deploys out so the first step is what is my target and then the second step is publishing and now it says publish succeeded so what we'll do is we'll just copy this in point right here I click copy to clipboard and we'll paste it in and notice now instead of running off localhost I'm doing the full my vs toolbox after we selected that was the unique name yeah and we called it echo name I believe so if we hit that it's going to spin up and it should slap me on the wrist again and tell me that it's expecting me to put a name inside the corey string and what we're seeing right now is that spin up you know for the first time and we'll let that go and and I always encourage people to use the mouse trick right if it's a clockwise mouse rotation should speed things up for that that is definitely the matter right there I mean you know Jeremy's magic tricks and look at that so please pass the neighbor Cory string now that it's spun up if I correct this and we'll do this again name equals vyas toolbox boom immediately it comes back hello vs toolbox and that that's the experience so basically I showed you how to create the function app from scratch from visual studio but then if you want to see what a mature application looks like something I'm using in the real world then that's going to be on the the github site for the link shortener that I created yeah and the fact that you can write this thing many languages the fact that it's so globally hosts the bowl I mean it's it's amazing what you can do nowadays it is yeah the only thing I don't have in production for more recent stuff is probably functions but we should some find some excuse do to put a function up there but it's cool yeah yeah no it's a great experience and and it's something that I'll be looking at too is is how do we take existing web applications and migrate them where it makes sense just because you can't move them doesn't mean you have to but where it makes sense because ultimately what happens is instead of one app with five endpoints that if you make one update you have to redeploy the entire line with the function you can literally just test and redeploy that one endpoint in isolation and you know you are very familiar with DevOps and and that experience and being able to continuously deploy at a micro service level is a huge benefit in my book yeah it's super awesome in the fact you can monitor it you can really get a sense of T to roll something back how is it doing or if there's any underlying performance issues in the infrastructure like the table storage slow down whatever I mean I have lots of flexibility nowadays to understand what is going on with my production environment and my staging environment if you put everything up on Azure you have all that same telemetry for all your environments which is really awesome right I've always loved love that part of a my def the Devon's experience is awesome right to get you going but get it up in the cloud you get all Morris or a benefit absolutely I'm digging am a one-man shop right with your shorting tool but I get all the telemetry and information I need to make sure it's running and up and healthy awesome well is that all you wanted to demo for this particular there was epic all right well thank you for being on visual studio toolbox and we hope you folks enjoyed the episode we'll make sure we'll put the links to the github repo and to any other resources we mentioned in the show notes and we hope you come back again and watch another episode of visual studio toolbox so thank you Jeremy for being on and see you folks later thank you see ya [Music]

Monday, 21 October 2024

ASP.NET 5 & .NET Core (RC) announcement & Scott Hanselman demos

[Music] >> Scott G.: What I'd like to do is actually start off this event with some cool demos. And I'd like to invite Scott Hanselman on stage to actually show off both what you can do with VS 2015, as well as highlight a whole bunch of new capabilities that we're excited to bring to market for the first time as part of this week's announcement. So here's Scott. [Applause] >> Scott H.: Cool. Thank you, sir. So today we're going to be showing a whole series of demos based on a health clinic theme. We'll be using healthcare throughout. Everything will be based on this health clinic. In this particular application, it's going to be the public facing app for the health clinic. And this has been written in ASP.NET 5 using the .NET Core CLR. And this is kind of a Hello World demo you've seen before, and I'll go run this app. You'll see what you've usually seen. This is a standard the Hello World. And now of course ASP.NET 5 is open source and .NET Core is open source. We use a lots and lots of open source at Microsoft. And, in fact, I can usually bring in additional open source. From Visual Studio, I'll say Manage NuGet Packages. NuGet is where .NET service side libraries come from. You can see a number of popular ones there. But I'm going to try to bring in a library called RequireJS. This is a JavaScript library. It's a client side library that people use in other platforms. And you'll notice here that in Visual Studio Update 1, it's actually promoting that I use Bower instead. Bower is a package manager that's appropriate for client side technology. So now we've got tooling within VS for me to go and bring in that JavaScript library. And you'll notice here on the side Bower and MPM are both available as package manager options. And now I've brought RequireJS to that client side loader. So we've got all that rich tooling for technologies that people want to use. Now, I want this Hello World app to look a little bit prettier. So I'm just going to pick these up, some existing assets, and drop them in and then replace. And then I'll come over here to Edge and I'll hit refresh. And then the front end of my application looks nice. And that kind of make a change and hit refresh experience is what you would expect with static things like CSS and JavaScript. But I can also go back into Visual Studio and look for the home controller, for example. And I'll grab some actual C# and I'll make a change to the code, best health clinic ever. And then I'm just going to hit save. But I'm not going to do a build. I'm going to come back into Edge and then hit refresh. When we go over to the About page, it's actually recompiled that app. So I can have that kind of make changes to code and hit refresh. Make changes to code and hit refresh. The experience you'd expect with a Ruby or Node, but you're getting that with the power of C# and Core CLR. That actually compiled the application itself. So Visual Studio didn't do the compilation; ASP.NET did the compilation. And that's going to enable us to do that across platform as well. A really nice experience. This application is going to need diagnostics and telemetry. I'm going to bring in Application Insights. And this is going to send all the performance and availability and diagnostics information and send that telemetry up into the cloud. So as I run this application, if errors occur, exceptions happen, either in JavaScript or in .NET, that will be sent off to the cloud. So we'll right click and hit publish. And we're going to send this to the East U.S. We've got datacenters all over the world. In this case we're going to send this one to the East U.S. While that's happening, I'll run over into the Azure dashboard, and there's a thing called Traffic Manager that allows me to do geographically load balanced systems. We have this not just in the East US but also North Europe and Brazil all at the same time. So this public facing website is now suddenly available everywhere. What can I do with that, it just got published, it popped up. I'll switch back over to the dashboard and pick that website and click on tools here because I want to do some performance testing. Now that I have a scaleable website that's been sent all over the world, I'm going to performance test it. And I'm going to do that using the power of the cloud to create that load. We're going to generate load from the East U.S. And with Azure and Visual Studio Online we're going to collect a whole bunch of computers that are going to now start hitting that machine and generate load. That's going to take a few moments to start up. So I'll show you some load that I generated just a few minutes ago. You can see here we had 130,000 successful hits. I can see how many requests a second. We're hitting that sight. So already I know that I'm going to have a great experience no matter where in the world that we are. And all of that information is being sent into Application Insights. Now, I can look at that Application Insights diagnostics and telemetry in Azure, but also I like spending time in Visual Studio and with Visual Studio Update 1 we have included the ability to look at that telemetry from within the IDE itself. So I'm going to come in here and bring up the Application Insights search and look at the time range over the last few hours to see that telemetry data. And here I've got all this information that I can query and see page views, what browser it used, where the data came from. Look at time ranges. I can dig in on individual page views and see all the detail, both server side and client side, and query that richness of the telemetry. But I can do it from inside Visual Studio. So you can see that with ASP.NET .NET Core and Azure and Application Insights I've got everything that I need in one place. >> Scott G.: Great. Thanks, Scott. Excited to announce today some of the things that Scott also showed there in terms of the ability to use the new ASP.NET 5 based on the new .NET Core runtime that enable a bunch of new capabilities, including the dynamic compilation, that we're releasing the release candidate of both of those technologies this morning. And they're now available for you to go ahead and take advantage of and use. And what's great about the release candidate is not only can you download them, build apps with them, they also include a Go live license and enables you to also now start to go into production and start deploy real apps to real customers using all those technologies. Let's take a look at what you can do now with the new support that's cross platform. So here's Scott. >> Scott H: Thanks. I liked that little bit applause when we talked about how we can get this to run everywhere. I hope you enjoy this. I'm going to go right click, say publish again. When we publish something to Windows, we can go to Azure, we can go to IS, when we publish to Linux, you'll not necessarily FTP that up to Linux, you'll send it maybe up to Docker in a container. You can notice here, when I hit publish in Visual Studio, that Docker appears in the list there. It's first class inside of Visual Studio. So I've gone and said publish to take the exact same ASP.NET 5 application running on the .NET Core RC1 and I'm going to send this now up to Azure on a Linux VM with Docker inside. This is using the same Docker tools we already know how to use. Just like we saw that integration with Bower, a tool that people know how to use at the command line, here's an example of using Docker, another tool we know at the command line. I'm going to bring up the command line. And in fact I'm going to use the new SSH client that you may have heard we're going to be shipping with Windows. Little tiny clap for that. Appreciate that. [Applause] So what we're going to go and SSH into this machine over here. This is now switching from the command line now. We are looking at Ubuntu running in Azure. I'm going to hit top to prove it. You can see Docker right there using up some CPU as Visual Studio is sending that up to Docker and that build is being sent. And that Docker container is going to be one of these images. Those are Docker images. You can see here's my health coming in here. I can say Docker PS A. Just 14 seconds ago was created the image called My Health and in the background, in the bottom left, you can see Visual Studio trying to talk to Docker to get that fired up. That is going to be a version of this exact same website. So I can publish to the operating system of the choice that I have, publish to the container that makes me happy. And in this case that's going to pop up. Now this again has been kind of a Hello World demo. Sometimes when we see Hello Worlds we're not really impressed. We're like okay there it is. Hello World. But we are not joking when we say this is ready today. This is a Hello World demo. Let's see a more advanced one. Let's see the private section of this health clinic with authentication, with SQL and entity framework with Linux talking to SQL Server. This is real data on a real app, running in Docker. Now, you could run one app on one VM in one Docker container, but in a real sophisticated production environment you might start including things like many Docker containers on many virtual machines. This is in fact running in a cluster of virtual machines running multiple Docker containers. And we managed all of that with the Azure Container Service. That takes care of all the complexities of creating all of those containers. And then I can go and layer on top of that and include technologies like Mesos or Marathon to manage them. So I'm getting to use the technologies that I want to use on the cloud that makes me happy. So hopefully that gets you excited. You can go and make this happen. You can start writing apps with ASP.NET and C# and putting it on Docker containers and Linux today. Start doing that now. This is some of the stuff we're doing today. Let's take a moment and talk about the potential for tomorrow. So I'm going to switch to another machine here. Here we go. So here I'm on an Ubuntu machine, and I'm going to look in this folder and see that I've got some C# code there. And, you know, wouldn't it be nice if at some point in the future I could do something like App Get and ask Linux for .NET and be rest assured that .NET was there and ready for me; and wouldn't it be nice if I could say something like .NET compile and then compile a .NET application and run this on Linux. This is a preview of some of the work that we're going to see early next year where .NET and the .NET command line here is going to allow us to go and run an application like this with a .NET Core on Ubuntu. Now, this example is the .NET that you know and love. This is the .NET where we've created a DLL and we have a Jitter and we have a garbage collector and all that. But wouldn't it be nice if I could do something like this and say dash dash native and use that .NET Native technology that you're familiar with for Windows that makes Windows universal apps so nice. I'm going to go add dash dash native there. And I'm going to compile the application, same exact application, same compiler same command line .NET compiler. There's the original one and there's to be clear a statically linked, no dependency required, native code application compiled from C#. And when I run it, it's fast because it's native code running on Linux that was compiled with the open source .NET Core and this is where you applaud. [Applause] I know it takes a moment to absorb. But that's a big deal. So I'm going to go ahead and just pull that applause from you. So this is some of the future work that we're doing. But I want you to know that you can take .NET Core RC1 today and start building applications. You can deploy them in Docker, deploy them on Linux, Ubuntu and Red Hat, and put them in Azure. And I hope you have as much fun working with it as we had building it. >> Thanks, Scott.

Building Bots Part 1

it's about time we did a toolbox episode on BOTS hi welcome to visual studio toolbox I'm your host Robert green and jo...