Showing posts with label Good. Show all posts
Showing posts with label Good. Show all posts

Wednesday, 23 October 2024

Browser Mechanics for ASP NET Developers

hey Jack John good to see you how are you right we're doing one yep let me bring it properly caffeinated yes haha one second my speak is seem to be hold on they're coming out in the wrong place why is it always the audio settings on these things never remain the default there we go now it's working hey guys sounds you sound good can you share your screen I sure can one sec for just a little bit the guy and we have screen sharing can you will see that yes there we go - fantastic and I let me just move that out of the way the screen is Jimmy there we go alright well welcome everybody who's watching who's watching Donna come wherever you are and well good morning from the UK my name is Benjamin haloth I'm an ASP insider and an independent asp.net consultant and today I'm going to be discussing browser Mechanics for asp.net developers now normally this is a longer talk that I give at various meetups and conferences regarding non dotnet tools for measuring website and web app performance and in fact Jeff's being kind enough to host me on his twitch stream before to discuss various of these tools so we're gonna dive straight in to some specifics and we're going to discuss firstly what web performance really is which I think can be grouped into about three different distinct buckets which are the HTTP request itself how frequently they are and what sort of size they are things like network latency and then we also have how long it takes the server to render something whether that's a JSON API endpoint or whether it's HTML or CSS and the browser load and pain how long it takes for your web browser be there on a tablet or a mobile to be able to draw what's on what's you know what's being delivered and be able to present a working app or site to your user so there are a number of different tools that exist within this space and we'll get straight into how we going measure performance on the front end we have we're going to briefly touch on a project called lighthouse in google crime and a great host service initially started by Google but now an open-source project it's called webpagetest and on the server side we're going to discuss jmeter and mini profiler in the asp.net sphere so without further ado let's get right to it I am gonna jump straight into an old project that I've got now this is a website I used to look after called Verbier comm it got taken offline last year it runs on Umbraco it runs using old web forms technology and it really hasn't been optimized for mobile at all and I'd like to use this as a great example of what lighthouse can do now if we use f12 dev tools we'll find all the usual bits of elements console let me just maximize us elements console sources Network and over the last few months and years there's this new tab that showed up which is called audits and this is Google Chrome's project lighthouse this will run a number of different tests on your site or your app you can choose whether you want performance progressive web app best practices accessibility and SEO you can also apply throttling so if your users if you're expecting your users to be working on three or four G networks you can actually simulate a network slow down to then see what your users are experiencing out in the wild you can also choose between desktop or mobile emulation and what we're gonna do here is we're gonna run this test now and I'm just going to move this over to the side so you can see what it looks like and as you can see it's now actually using a mobile render to then try and load the page and then gather some metrics about it so and interestingly all the tools that I'm going to demonstrate well the majority of them with the exception of mini profiler can also be run in an automated environment because performance testing is nice but at the same time automated performance testing alongside your core unit testing and integration testing should be something that you should be considering as part of your application build so we'll notice that this scores a 40 out of a hundred which isn't particularly good but it does give us some places to actually improve on things so for example we have let's see stove serves static assets with an efficient cache policy so these are items that are being served up be they pictures ESS or JavaScript and basically they're not being served with an expiry header or a cache control header what this means is that your browser doesn't understand it does not understand that it should be trying to hold on to these resources between page navigations and as a result it's gonna try and load them every single time and that's going to just increase more and more bandwidth being used for example this 340 kilobyte CSS file is going to be loaded on every single separate page load as you navigate around the site so that's a pretty big overhead that we're looking at there we've also got some other bits like removing uh new CSS turns out we can actually save 328 kilobytes there's a large amount that can actually be removed from that CSS file and let's see eliminate render blocking resources so this will be a lot of CSS that needs to be modified to avoid interfering with the paint of the page what else do we have let's see reduce the JavaScript execution time now because we're using things like jQuery and in fact I think this website's a really great example of something done badly it's got both jQuery and a legacy UI library called mootools in there and both of those are creating UI overheads too which shouldn't necessarily be there so and then it will also give you a list of things that have passed as well so properly sized images minute minify CSS and JavaScript and so on and so forth now this is built into Chrome but can also be run as I mentioned as part of a CIN CD pipeline and it's something I highly recommend so that's lighthouse the next thing we're going to look at is we're looking at web page test and if we quickly just nip back here this is web page test it's a free online hosted service as I mentioned it was originally started by Google and what it allows you to do is put in a URL and then it allows you to choose a location from where you want to test including lots of different profile so you can choose Android desktop and iOS you can choose Chrome Firefox age and ie 11 you can choose different locations in fact if you want to target users in a specific location you can notice that there are end points all around the world so Africa Middle East Asia Oceania let's just go with London UK and let's with that one and this is a website I used to work on for the formula e motorsport championship so we're now gonna run start test oh and now you want to do the capture verify there we go and let's run this so what this will be doing is this will be running three separate instances of a test and then it will be measuring all sorts of performance issues such as large images using a CDN minification all the things that lighthouse individually tests for but there's a great feature that's part of webpagetest which is something that a lot of sites and projects don't necessarily think about and that is the actual bandwidth cost to the user and this is a very very important metric which we'll come to in just a second because the average webpage are over the last few years has just grown and grown and ballooned in size we're now looking at the average site now constitutes I think it's 3 megabytes of code and that's JavaScript and CSS and assets and that is larger than the original doom game on floppy disk in fact Jeff and I coined the expression how many dooms is a webpage how heavy is it in a number of Doom's in terms of bandwidth size so as this goes now we get the waterfall breakdown here which is the same as you get in dev tools when you're looking at the network operations it tells you what's blocking what's not how long this is taking and yeah first view in 6.9 seconds that's particularly slow and we just wait for this to finish running through and let's see what that second view looks like oh that does not look like it's improved much either 6.91 and hopefully we should get our third result coming through just now now I picked this site as a particular example because the foreman area championship it's a motorsport championship it's designed to be serving up big images you know very high resolution fast pace action images for media press and fans so here we go yes if you look at the actual cut sort of breakdown in terms of bytes 70% of the entire home page is just image and that's 2 Meg now the feature I want to talk about is I mentioned the cost here we go and this opens a little project called what does my site cost and this is a great feature because this actually demonstrates how your site costs to an average consumer on a data plan in various different countries around the world so for example on a postpaid plan in Canada that page would potentially cost 40 cents to a user and that's pretty expensive if you haven't got a good caching policy within three or four pages you've already racked up a Starbucks coffee so this is a fantastic feature and webpagetest again also has a node wrapper around it so you can again integrate it with your CI CD testing and we'll come to that a little later on but this is an important metric that a lot of people do not consider when they're building their sites is the actual cost of the consumer especially if you look at places like sub-saharan Africa and the Indian subcontinent you'll find that 75% of mobile users are still only on 2 or 3 G data plans and as a result they may not necessarily have the sort of data plan that you or I do in the Western world so if you are looking to target those sorts of audiences tools like this really put a fresh perspective on what that performance and what what those sort of that byte overhead is actually costing your consumers for using your website and it's an important one to bear in mind it just offers a fresh perspective as to how much it's really costing you in terms of development in terms of potential user traction if you're losing out to users because your site is quite literally too expensive for them to access I believe youtube I hope did an experiment with an app called YouTube Lite and they noticed that once it had been deployed they noticed that the average load times had gone up now the reason was is not that the service had gotten slower but that people who previously couldn't access the service were now prepared to wait a few extra seconds waiting for their videos to load with it with lower quality advertising and that's a very important thing the response the average response time may have gone up but the number of users they got increased exponentially so this is an important thing to take away from this all right so we've covered sort of some front-end tools here and you know discussed things like minifying or CSS and some basics like header management cache control and the actual overall cost to your users what about on the server side well first thing we're going to talk about is another little tool that I have where I wait called Jamie - now jmeter is a project from the Apache Software Foundation it's mainly used as a load testing tool but it has so many versatile uses it's quite remarkable at what it can achieve so we're going to quickly pop this open alright so what we do is we set up a test plan and this is basically stored as an XML file and what we can do is set up here there's a number of threads or users so we can simulate anything from 10 to 100 even potentially speaking we could simulate a hundred thousand users what's great is that this - these plot this test plan does not just have to run on a single machine or a single server you can effectively set up slave agents to run tests so you can run a test let's say you want to run a hundred users on each machine you could set up ten virtual machines in the cloud and suddenly you've got a thousand users each looping over a single request a hundred times that gives you a million requests to your website with some very very low overheads and what you can do is simply set up an HTTP request and we've got the name of our website in here in the path we want to test interestingly the number of tests that we can actually conduct is quite substantial and if you look there is a samplers here we go so the common ones HTTP requests you also have FTP requests JDBC requests LDAP requests SMTP and TCP samplers if you really want to go down to low-level traffic and test your infrastructure the amount of information that jmeter will allow you to connect collect from all across your infrastructure whether it's API endpoints whether it's testing that your load balancers are correctly spinning up extra instances in the cloud whether your services are correctly serving even the right byte code you can test just about everything you want using jmeter i've yet to meet an example where jmeter could not do a successful it could not successfully monitor some sort of web traffic it's very very low level very powerful and completely open-source and extensible so it also allows you things like conditional controllers so you can go if or loop or while or a 4-inch there's lots and lots of different ways you can run very very customizing very extensive testing so we'll just quickly have a quick look at the graph result and we'll just quickly run this here and let's have a look to start with no pauses and over here in the top right we can see that the number of running thread is a hundred and we start to get some graph results in and we can now start to see how quickly the responses are coming back from that Forman area websites so we've got the average and median and the deviation and that seems to be doing pretty good in terms of performance that seems to be doing very well the average response time is about two seconds given the amount of traffic that we're generating that's quite impressive we'll just go ahead and terminate that and then we will kill this because that normally ends up with a thread lock now Jamie tis fantastically powerful and you can save this file as an XML file as you can seen by the file extension up here it's a JMX it's a custom XML file that you can include within most of your CI TD setups and in fact most common cloud providers have some sort of jmeter agent set up so you can have a master server that runs the report and coordinates with these slaves and it sends the test runner over to the slave and then the slave will run your test accordingly so as I say if you want to be able to successfully test that your app can handle a million two million five million people when they're set period you can do that and more importantly it's not just limited to web pages you've got every single option for every single HTTP verb within the request so you can test API endpoints you can test maybe you want to test that your API can handle you know a hundred thousand inserts let's say you're expecting a rush of signups if your new startup you can go ahead and extensively test that so that gives you je Mena and lastly we're going to quickly go over to mini profiler now many profiles are fantastic - all built by the guys over at Stack Overflow and you can see it in action over here on the Left what it does is yet some CSS and JavaScript if you're running in debug mode and it will then tell you view by view in MVC view which how long those views are taking to actually request and it will do that for every single request that's been run over time so these are all individual requests and it's telling me how long each one Terk and then it will also tell me how long the entire overall page took as well so if I reload this now this will probably take a while cuz I suspect the app pool has just fallen asleep ah there we go and suddenly that's a lot slower here we go and we can start to see even things like duplicate queries we can start looking at query execution time there's a lot here that we can look at now this is a site based on Umbraco which is why a lot of this I kind of don't look at in too much detail because a lot of the duplicate queries have good indexing on them but if you're building your own custom site with your own custom things like entity framework there's also support for things like raven DB and various other providers but yeah this is one of my favorite tools for diagnosing if there's any problems within a site this tells you where it's taking certain milliseconds to render certain partials or certain views and then you can go in into Visual Studio and take a look in some extensive detail as to what might be causing those slowdowns there is another tool like what a given honorable mention to here which is called glimpse no glimpse provide to you a bit like Elmer does for asp.net logging it provides me the dashboard unfortunately doesn't appear to be updated in the last couple of years it does have a node.js plugin it does have an asp.net plug-in I'm not sure if that means it's just stale from lack of lack of contributions from the community but I'm not sure if it's still out there so if if anyone doesn't anything about plans please leave something in the comments that would be great now I mentioned about you know how do we measure all these things and so we've got loads of different metrics from lighthouse from webpagetest and from jmeter and from mini profiler so I will cursorily go over a few bits and pieces which are some easy things which should just be straightforward to do to improve your overall website in that performance so firstly make your requests as small and as infrequent as possible used like cookie free demands move your stuff over to blob and CDN storage it's cheaper than a coffee per month gzip and deflate static resources if you can it will save you probably between 20 and 40 percent on your resources if you can gzip or deflate things and in fact as you'll see own CDN supports this out of the box if you want to gzip or deflate dynamic resources there's a couple of security risks involved in that so it's Germany not recommended I also wanna briefly touched upon HTTP 2 which is a brand new extent it's a effectively the upgrade to http 1 and 1.1 it supports single connection but multi casting multiple resources over a single connection now whilst I think that's great as a concept it's only available on later versions of Windows Server 2016 and Windows 10 so on older platforms it's not available and won't be available so it does not necessarily solve everything because you're also having to rely not only does your server have to support delivering content over HTTP 2 but then so does your client and if you're looking at devices that have got older browsers older versions of Android maybe aren't being updated again I refer back to 75% of people still and only being on 2 or 3 G and the chances are they probably got feature phones rather than smart rather than what we expect to be modern smartphones so whilst HTTP 2 is a great step in the right direction you can't necessarily rely on it to solve everything that you need caching on static resources is straightforward you can use e tanks which are generally a hash representation of your file so that if the hash changes your server can then go oh I need to re-request that resource cache control requires a little bit of configuration if you want to use that header private versus public can catch you out especially if you're in an enterprise environment and you're using a proxy in the middle which could accidentally cache things without you knowing about it and the expiry expires headers is one which then falls back on cache control right and reducing asset size this should be a given these days let's have a look so we want to minify your CSS and JavaScript if you're building single page apps my suggestion would be don't lower as you load unless you it will work reliably a good example is using an app let's say on the London metro or the New York metro if you've got Wi-Fi in the station that's great but you've only got it for two minutes if you lazy load your views in then you go through a tunnel there's no Wi-Fi the app ends up being a broken experience using an in-memory cache to boost speed if you need to use a cache to store data in temporary places whether that's Raven T being reduce or memcached use it and send 304 ever possible which is simply a 304 not modified so but again I refer back to the method of etags and I think the latest version of Windows iOS 10 supports this out of the box in terms of server render we've discussed J meter and we've discussed many profiler in terms of isolating potential issues within your load balancing infrastructure your server response times and mini profiler for isolating those instances down within your razor view one of the word of caution based on experience is that using the dynamic keyword whilst it might be popular for handling JSON objects it can cause a massive memory overhead I've worked on projects where a home page has used dynamic to cast content out of a database into what was basically a five page carousel and because it was using coarse to dynamic it was taking roughly three and a half thousand milliseconds just to produce the HTML once we'd remove that replace the dynamic calls with calls to static types the total size for the entire page was reduced to about a hundred and forty two milliseconds which was about in 97 96 percent improvement dynamics can have its uses if you don't know what the contract is for example social media API is but generally speaking they should really be avoided from a performance perspective all right and lastly ongoing monitoring as much as it's great to be able to measure your performance on an ongoing basis and make sure that you have targets that you want to hit as part of your CI NCT you also want to want to have some ongoing monitoring so there are application monitoring tools such as New Relic which I've used on a number of projects and personally quite like you brought us off loop is a fantastic project which builds off post Sharps AOP framework and it's mainly designed more for desktop environments or environments that don't have a o P so non MVC environments but it allows you to log up to the cloud I believe they also have a free tier and of course this wouldn't be done at comp without mentioning as yours own application insights which I believe also has various free tiers as well in terms of automating your performance testing I have discussed lighthouse and webpagetest and J meter and I'll briefly just go over to nudge it to the NPM package repository to show you that lighthouse can actually be run as a node module so if you take a look at the node CLI down here you can install it as a global tool and then run it against one or multiple URLs there's lots of different options for what you want to do in terms of whether you want to save those logs whether you want any particular chrome flags to be run let's see audit audit mode which will process save artifacts you can then put an output path so you can then specify JSON HTML or CSV ampere and I believe most modern CI CD environments support reading the JSON output for this and of course webpage tests as well has an NPM package that wraps it so you can then create a web pair or tomato web page tests from options all around the world whether you want to test in multiple locations depending on what sort of what sort of excuse me what sort of information how frequently you want to run tests for this you do need to request an API linking and generally speaking they will let you use the sort of global service with an API key however if you're performing an extensive number of tests it's recommended that you download web page tests from github yourself and running around private instance to be able to do your own automated testing so a plenty of options you can specify an individual server you can specify an out file as well and different locations sort of connectivity profiles as you see 3G slow 3G 3G fast 4G LTE edge and so on and so on and so forth number of runs you want to run number of late if you wish to label your test lots and different extensive options heads for you to really put your web app on your website through its paces so unfortunately in the words of Jamie Carroll apologies to Matt Damon we ran out of time I do have this in a docker image that's not quite ready yet but if you want to basically follow me on my where do we go if you want to follow me on my github at some point I will make sure that that's released later on today alright that was a quick blast around the various tools of a at the open source arena in terms of what you can do in terms of performance measuring I really hope that was informative for everybody and if you want to find out more as I say follow me on github and follow me on Twitter oh my gosh Benjamin that was great you know we we got a number of comments in the chat room as you're showing the tools hey how does this work with blazer and folks we're following along with you in trying ah with the web assembly stuff so certainly see how things you're saying about JavaScript and CSS yes they definitely apply going forward as we look at web assembly oh absolutely in fact one of the things I've chatted and so Steve Sanderson's working on web assembly and one of the things I haven't had a chance to get into the performance side of webassembly yet but one of the things I have noticed is that there is some issues with things around lazy loading and about selective assembly loading and there's a lack of bundling and stuff in there at the moment and I do I do actually want to try and contribute to that at some point so I'm not a hundred percent how this is I mean as much as those these tools will be relevant for Blaser what I want to do is I want to get into some of the detail to find out when you do actually do a full deployment what sort of build mechanisms can be tied up with this stuff to make sure that your bundles are as small as possible cuz obviously we are going to want to start delivering Blaser applications in the same sort of way and we're going to want to measure that sort of performance as well using tools like lighthouse so so yeah there is something to be said there the answer is I don't know yet how blazar handles that but the answer is I want to find out and if you want to follow me as I say if you want to follow me on Twitter or github I'm fairly certain I'll be digging into what what are those at some point once right under in fantastic samples I love the real-world application I mean that's that's great thank you no hey no worries I mean you know one of my specialties is basically I've been working for the last I'd say five years or so on high traffic right you know high performance asp.net sites going from let's say 10,000 users up to five six seven ten million and it's something that really is missing you know we we have all these fantastic tools to build all these amazing things and then we go wait hang on how do we actually you know get the scaling right and still manage to keep our hardware cost low I mean as much as the cloud is great in terms of our scalability you still need to be able to actually think about what you're you you know the balance between what your budget allows for what you're running along with the budget of your consumers but you know if your consumer is accessing your site on a slow phone and it's fast it'll be fast on a fast phone basically that's that's sort of the rule and that's why I keep I keep somebody knocking around here I keep a really old feature phone that's got like Android 3 on it and I only supports 3G and I keep that around and just go right guys if it works fast on here it'll work fast anywhere else sorry bug well thanks so much Benjamin and I we're so glad you could join us for dotnet con for 2019 it's time for a code party it's time for a code party we'll catch you later Ben fantastic thanks guys real pleasure all right

Bring AI and ML into Visual Studio with IntelliCode - Visual Studio Office Hours, 57

good morning everybody and welcome to this week's episode off the visual studio remote office hours my name is max Kristensen and I am delighted that you are joining us here today because we have an exciting show for you we're going to talk about machine learning and artificial intelligence intelligence rather inside visual studio because we actually have some inside visual studio and what does it do how does it help us and what will it do for us in the future these are all great questions that we're going to look into now I will give you a little update on my home office because I kind of do that every time here's my latest little gadget that I bought this is a USB speaker you can see there's our cable here that is just up on my pegboard here on the my work bench so if you go there's a picture of what it looks like today this morning so if you go check out my Twitter you can see what that looks like but this is basically like a ten dollar USB speaker and it's a hell of a lot better sound let me tell you then then sort of a laptop slowly getting into a more professional estate here in my very unprofessional home office so with that out of the way let's say hello to our two guests and so Katie why don't you start by introducing yourselves hi my name is katie and i am one of the program managers for visual studio in tellah code i'm looking forward to this conversation today awesome and mark hey yeah i met you and i have worked together for a long time I'm a program manager I've been a program manager on Visual Studio for like 12 years something like that now I don't know I'm getting too old and now I'm working with Katie as a program manager on the Intel akkad team been at this for like two and a bit years now and thoroughly enjoying it so looking forward to chatting with all the folks about what we can do with AI fantastic yeah I think mark I think the first time I met you you were the program manager for the visual studio editor just the editor itself that built with you know syntax highlighting and intellisense and all that sort of stuff so this is this is quite some years ago I guess so for the people that are online please remember that you have on your right side of the screen you have a Q&A panel so that means that you can ask us any question you like anything for mark and Katie about machine learning and AI inside Visual Studio but you can ask any question about Visual Studio and you know with three people here that works on the visual studio team there's a good chance that we were able to answer that so just keep the questions coming and we will answer them as we go along okay let's get into it so mark I know that you're on the year while you're both on the intel eco team and i've heard a lot about Intelli code I think I know what it is but every time we talk I learned that it is more than I think it is it happens every single time like it's expanded the role of the machine learning is is doing something I didn't even know that it used to do and stuff like that so things are moving quick it seems like but what is in Teleco can you kind of give an overview of what it is and how we use the machine learning and AI yeah for Angelica glad to do it I mean you know I've been at this I say I was looking back a bit yesterday and realizing that I've been playing this game now for two two and a bit years working on Intelli code and we first previewed some stuff way back in 2018 a build but we've we've really kept the same focus all the way along right so from the start we were looking at ways that we could use the power of the machine to delve into your code as data and the things wrapped around your coders data and present back to you based on the kind of wisdom that it harvested and distilled down some useful insights right some useful insights that can actually help you to do your job in in a more effective fashion and so when we talk to customers when we talk to developers we found that you know there were various areas where there were struggles in their you know their development life and they for instance you know they might say well I'm coming at an unfamiliar API I really don't quite understand how to how to use that API but I could really use some assistance or actually and and this is a conversation we've been having more recently i'm reefa miller izing myself with an api i don't quite know what to do you know i'm really trying to get myself back up to speed again whilst using this thing and i want to be effective and so that got us into thinking about how can we do better in terms of not just the completionist but other places too in terms of presenting the right stuff to you so helping you code with confidence right so that you can actually get right into something and the machine can help you out by presenting the things that you're most likely pattern choices right so the power of pattern is really a big theme across the whole of intel acade right that machines can do stuff now can delve into patterns that they were simply not able to do a few years ago okay and all of our code and all of our things around code what I kind of call code metadata all of that stuff is like a substrate there's a big scientific word for you but you know just a place where things can grow or where we can grow that insight and and bring it back to you right so that's that's really the the founding insight was that we believe that that machines can grab grab those insights and bring them to you at your point of need and then we talk about you know how that can help you out when you're trying to find issues so think about anti-patterns think about things where you your your team has done a great deal of work perhaps to to go ahead and fix some problem that's actually a common auntie patent that keeps coming up in every single flippin code review and it drives you nuts and what about if the machine could spot those patterns and put those fixes out there for you so that you didn't have to keep reminding everyone in every single code review that'll be neat wouldn't it and so we talk about that as being kind of how we can help you find issues faster and then we talk about focusing your review so you heard a little bit yes there about how is code reviews can become messed up with a whole bunch of repetitive tedium we were looking at ways that we can relieve that pain as well but all of this it comes down to the capacity of machines to learn huge things across giant substrates that would be really hard for a human to learn and bring those useful insights back to you right you need them that kind of makes sense yeah I think that's that's really helpful so you know it reminds me like 10 years ago when I first started on working on Visual Studio at Microsoft I had this white board in my office and at the very top I had written in big letters the thinking IDE and the idea was that an IDE should be sort of anticipating your next move and make that as seamless as possible and it was sort of a pipe dream and it was more like a vision or more like a Northstar to shoot for but what you're talking about is seems like that it seems like a way that we don't have to deal with this sort of trivialities or the mundane things of programming we can go straight to solving the problem that we were hired to do and there's worry about like I guess like formatting and other such things in a code review that seems trivial right exactly so and and it doesn't have to be restricted to the trivial either that's the thing so you know these can be reasonably complicated things I mean we got some stuff to show you later that's that I think you'll find fun that will help you find actually cut complicated things and repeated patterns that you know you maybe wouldn't even have had time to spot and might have bitten you on the posterior later on and you know that's that's something we we want to make sure that you know we let the Machine loose on that kind of stuff as well so it's not so much just the the mundane and the repetitive but it's also the stuff that is too big for you to wrap your head around because you just don't have time right and we'll talk a little bit about that yeah maybe a bit later when we talk about suggestions all right so that makes good sense so it's both the mundane and the complex so mmm when when Intelli code first was introduced he was it was doing something in my intelligence it was augmenting the analysis and in the beginning I didn't really know what to make of it like I I it was you know my cheese got moved something changed the intellisense had looked a certain way for like maybe two decades or something it was different so what happened there and how how did how did that solve problem how do how do I guess I my big question is how and why did you do two intelligence of what you did and can you explain what it was that you did okay sure I don't know if you're still hearing me okay cool so yeah so what what we did was we actually learned and trained on open source repos and we learned just like the common usage of various classes and what you're seeing sort of as you see those autocomplete pop-ups is you're seeing sort of what it what are those like top views or most used or commonly used types or or functions or methods for that class so it really allows and enables developers who may not be quite familiar or might just forget or not recall what is the right function or the right method to use in a certain circumstance it allows you to sort of provide it provide you with sort of contextual method recall as you're typing so this is very very helpful for a number of scenarios so imagine if you're a developer who's just onboarding to a particular class or namespace this really just sort of gets you sort of helps you sort of assist you as you're as you're typing is also super valuable for even those more seasoned developer who might have not used a particular class in a long time or might just be you know not super familiar with like an internal library for instance with one of our other features team completions and sort of gets you sort of set without having to navigate to the web or have to navigate to stack overflow you just have everything at your fingertips okay so that's really cool yeah the it seems like being able to figure out how to use something based on how other people use it is pretty much what we do when we go and Google something right and or we go to stack overflow to find out like how do I use you know this method and this class from this library that I just installed but now that's just that's just right there in my intellisense list and that's and that's all coming is that all from github or is there any other sources to that and how do how do and how do you determine what sources to choose from okay so we determine which sources to use so there right now are our base completions model which you're seeing you know as you start typing in digital cedar versus video code that is based off of open top open source repos and so those are the repos that hope have over a hundred stars so we we've done a couple things so we've trained our completions model based off of this learning of these open source repos so like seeing these top repos and just learning from those but we've also sort of curated that learning so we've we've actually it's a supervised learning model where we're we're actually like saying which ones are the top even within those top repos what are the top most use types or classes within those repos to ensure that you're getting the contextual usage not just sort of like the methods or properties that are used just broadly they're getting sort of like a more intelligent or more catered sort of experience or tailored experience so I guess to answer your question Mads this is what we're providing for the user is not just sort of a comprehensive dictionary of methods but sort of providing them with the right methods the right properties to use at the right moment and when they need it so we don't want to provide you everything we sort of want to just provide you what we believe you'll actually what will be useful in order to enable you to be productive at the moment when you're trying to use it okay that makes sense so I don't know maybe it was like a year ago I came to I came to you mark and I said hey you know visual studio extensibility is a kind of a complex set of api's so if you've ever tried to rewrite a business to do extension you know that all the you guys there maybe not so well documented and it can be hard to find out exactly how to use them so I went to mark and I said hey can we can we in takes a bunch of sample repositories and github and other apps that use these so that we can give better intelligence using those machine learning models for all these API and and Mark was so kind to say of course and you know what did it take two weeks or whatever and boom it was there in the product and everyone benefited and we actually made it so that Intelli code was now I optional but recommended component when you installed the workload for Mitchell three extensibility so I think that was an example where we took we saw there was an itch problem granted it's an itch it's not the biggest space in the world right Visual Studio extensions but we were able to like tailor and optimize the machine learning for that so mark is that possible if people run their own nougat packages they have some users of those newbie packages can they also ask that you indexed to improve their users experience for there is that a thing well there's a couple of answers to that question Matz and you know I want to start from the top one of the first things we kind of heard from people when when they started to use these that these new starred in Telus and suggestions was exactly what you've said it's like hey you know I use this library or that library right but it's not super common right just exactly like what you were talking about with these extensibility not you know it might not reach the bar of being in enough of the open source github repos for us to pick it up and the in what Katy was referring to as our base models right so how can we solve that problem and for some libraries absolutely where there's there's usage out there we're happy to hear from people and ask your asking us to put certain library sets into our base models and that can be a very effective thing for us to do if we know where there's great samples to be had right so we can train on it pretty much any github repo if it's open and so if we know it's important you can point us at it and we can go at it and do exactly what we did for the various extensibility space but I think I'd want to ask Katy to talk to us a little bit about some of the things that are going on for cases where it might not be something that's for everybody but when it's more about your own internal code bases and you've got internal classes and stuff like that right so that's the other problem that comes up right once people get hooked on this stuff right and what we what we've heard from people is that they kind of like getting these stars but they were upset that they weren't getting them for other classes they were commonly using sometimes those other common classes are actually in your own code and and Katy I don't know do you want to have a bit of chat about what we're doing for that sure mark yeah so so what mark is referring to is a feature that we call team completions and so as Mark was mentioning you can currently get Intelli code start completion suggestions for like from the base model just as you're typing so it's sort of predicting what you're gonna say what what's next but that's based off of common usage and that common usage as Matt and I were talking about earlier is based off of training on open source repos or the top open source repos but what if you're working in an internal library or you're working on code or tight or four types that aren't commonly found in open source repos so what do you do and so for us we have now enabled team completions and team completions not only like augments that sort of base completions model that Mark was referring to with your custom types that it automatically also shares that with everyone who has access to your codebase so so that is the super cool part of like let's say that you're working on in a git repo and I want to train a team completions model so I get dice so I can get those start completions for my own types well once you do that training you've also shared that with with the rest of your team automatically anyone who has access to that git repository automatically gets all of those the start completions for those unique types which i think is is super super cool so yeah I think that combined with the context of your code you can just imagine as as you're typing and as you're developing you're starting to not just code faster but you're also just sort of being assisted along the way so you can sort of stay in that developer flow with having these start completions okay so if I have an open source library for instance or a nudey package that people are using can I then do this team completions for my own for my own set of API so whatever that I've developed and then whoever has access to my github repository will also get the benefit of those completions is that is that what I hear Katey repository let's be very like it will be specific so for right now we've enabled this for just get repositories and so it fits on github or if it's an azure dev ops and it's a it's a get based repository then yes you can have a manual training and then that once that that manual training that team completions model will be attached to that repository and shared with the rest of your team however there was a part that you talked about a nougat package and that's something that we have on our backlog and we've been thinking actually very recently about but we have not enabled attaching team completions models to NuGet packages yet or those are those libraries so we do have that in our mind that we as a top scenario the nailing library owners to be able to train a team completions model and then distribute that with to the rest of their you know library users it also vice versa we also have the idea that we love for a library user to be able to train for a nougat package and then you know with the consent of the nougat package owner of course be able to distribute so we are actually planning on lining that up but right now team completions is just scope to get repositories and I don't know I think that mark might actually have something to add here yeah so I mean Katie's really put it pretty well there the the game is a little bit different so because at the moment Mads you could come to my office or someone could send me an email right or send Katie an email and say hey I really really want my package to be included or my set of packages to be included those can get included today in the in our base model so we have a way to do that for for things that we think are important but obviously that's kind of not gonna scale to the sheer number and variety of packages that are out there and so as a package author as you were saying you know you can't really like we can't have every package author be banging on our door and saying hey can you include me in the base model also that kind of doesn't scale out well in in terms of having the the base model getting bigger and bigger so what we really want to do is to make sure that you know if you're consuming a base model sorry of a no NuGet package rather you get the right map of the right model for that package but that requires all the things that Katie was talking about to be solved in order to solve for that we need your consent as a package owner to go train we actually need something that you may or may not have which is usage right we need sample usage of your code and that's that the model really only learns I spidering across usage not so much looking at the API itself but looking at how people use that API and in all the different contexts that it's used and it's most useful when all of the contexts are expressed in that learning data so it's it's not as easy as it sounds and it's a problem we really desperately want to crack as Katie says it's on our backlog but we haven't got there yet and I'm super interested to hear back you know if there's anybody who's got packages right now what what I'm Katie and I would be loved to be in touch with you about about what that feels like in terms of what would you your ideal workflow be how would that fit in with you would it be just like that you when you publish your new get package the work of doing a training gets done automatically for you and somehow gets pushed up and how do you see that playing out for you would that work well would there be something else that you would want please you know all of this stuff's only gonna work if we can get all of the ecosystem people who are actually playing the game in on how we're doing it yeah so I guess the whole scaling thing makes good sense of course it wouldn't scale if everybody's packages were was in the base model that makes total sense so and scaling is a hard problem to solve I don't envy come up with a good design for that one yeah fortunately Mads the sorry fortunately match the there's an existing piece of scaling called new get write which basically lets us scale packages right so we're keen to follow the patterns that package managers give but we just want to layer ourselves up and on top of that as much as we can that's how our minds are on this at the moment and but if people want to kind of tweak our minds on it we're more than happy to have discussions about that so if you watch this live please give us a comment in the Q&A panel on your right side or if you're watching this on demand on YouTube comments are below please please help us get some insights here for mark and Katie so just to change gears a little bit you are doing Intelli code which is the originally was the augmentation of intellisense and you know but it's become more like and as I said in the beginning every time I asked what are you working on there's always something new and different than what I thought it was going to be so beyond completions or that's what we internally call Intel sense completion what else do you have going on in your team right now what else are you tinkering with mark Wow so I mean there's there's so much so so much and we're you know that when I look at the horizon of what we're looking to do with right we're really trying to help developers to you know I say beyond completion some of these things are actually just extending completions like so for instance you know we're doing some work to make completions even better in places where they're not to extend their scope but we're also doing stuff and Katie was kind of alluding to how did developers learn how do they understand there are lots of steps so there's a time for instance when you don't even know what API or even what library it is that you want to use and typically right now you're going to be out on github it's not get up on the Stack Overflow or being or name your search engine of choice here you're going to be out there searching for the solutions to different problems however but if your goal is a code snippet why wouldn't that be inside vs another one that we're looking at is looking at repeated patterns and you know how we can help you with with that so when you're editing I don't know if you've ever come across this scenario you know Mads where you'll you introduce something new into your into your code you're doing some refactoring somewhere and you know you then have that really tedious task maybe you've introduced to help a function of going ahead and in introducing that in all the places that it applies in your project or maybe even in other projects and particularly if that helper function contains you know functionality that fixes a bug you might even if you forget to introduce that helper function somewhere you might be having hidden bugs parked in your codes that you haven't fixed or maybe your team's developed a new pattern for doing something that helps avoid some trouble you know maybe you've got a particular way of dealing with certain threading constructs or you know you've got a way of catching if blocks and the convention for the way you throw exceptions and blah blah blah blah blah you know teams have these things and they have them for a reason they'd learn these things by grazing their knees and by by actually doing stuff and having trouble hit them and then the team gets together and they figure out some solutions but the real trouble comes when they want when you want when you want to make it basically codify that and make sure that you don't miss it missed opportunities for it in other places and that's where the power of the Machine comes in to help you out to help you figure out where those locations might be so if I can I'd like to share a teeny tiny demo how that might work so cueing your screen and I'll get it up just bear with me for a moment and I will share my visual studio let me know when you're seeing my screen yep there you oh I'm just in the middle of Visual Studio right now this is just a preview release and this is a feature that we call in Telugu suggestions and so what's actually going to happen here is I've got this crufty code here which does a Fahrenheit to Celsius conversion and I'm just going to go ahead and replace it because I've got myself a helper function that actually does that for me and now I've got to go through my whole program and find all the places where that might apply and that's you know not necessarily an easy task because you know the variable names I use might be different there's some slight changes of formatting so a straight-up Find and Replace might not do this but what I find is you might have noticed as soon as I finished that second instance there something has happened okay and over here I've got a new thing okay it says showing Teleco suggestions based on repeated edits it's been watching me as I go okay and we'll talk a little bit more about how that works in a moment but then watching me as I go and when I click on that thing there I see that it's saying okay there's another one of those at line 124 I double-click on it and here's another light bulb and it suggests the exact fix that I need based on the pattern that I was typing ok so if I take that sure enough it's fixed it for me ok so you can see what's going on here I'll just stop sharing my screen now and we can talk a little bit about how that works say the magic there underneath the hood was a thing called pros now pros is a little bit different from your standard machine learning and AI based things so what Katie was talking about with the base completions and the team completions that we've gotten into those things are all based on a machine learning algorithm or an algorithm that works across the relatively large corpus of code and learns the bunch of patterns based on it sort of after the fact in frozen code if you like that code is actually you know learns across at one moment in time what you saw there was it was dynamically learning ok and what prose was doing was it was tracking my ast my abstract syntax tree deltas ok so it looks at my code and it says ok when Mark was typing that thing this kind of change occurred and it was like it was a tree that looked like this and then it turned into a tree that looked like that ok so it was able to deal with the fact that the variable for instance the variable names were different and some of the constructs might be different because of that ok it looks at those deltas and once it finds some common ones it tries to synthesize up a transform program that lets the user get that fix that I was showing to you so the thing that takes you from before to after that's like a transformation program or a synthesized suggestion that is made by example by clustering ok those deltas in the ast S as I go and having learnt that rule ok then it can apply it anywhere in my code that I open up so that's pretty natty I like it I like it a lot because it actually is learning we've talked about how it learns from the you know kind of wisdom of the broad community in terms the work that we have incompletions and then about how we can learn from the wisdom of the narrower community on your team when we're talking about team completions but now we're talking about learning from what you type what individuals type and then you know eventually we're thinking maybe we get that that knowledge out to the team as well wouldn't that be cool if those rules that we found was something that we're actually a transferable asset wouldn't that be any idea anywho this this is something that's just it's a different kind of learning so we're we're not hung up on the idea that everything we do has to be a I in the conventional sense of that word that it has to be learning across a large corpus is that it has to be using big fat models and or even slimline models we will do anything to have the Machine find a pattern for you and help you apply it at the right point of need that's the that's the real key and so that second piece that you saw there is an example of how we're doing that with pros with with Intel occurred suggestions and folks can if they want to try this out they can try this out in any of our recent previews so go download the 16-6 preview bits right now and you can you can try this out just go to the IntelliJ preview box and turn it on it's it's really easy to to try out and we'd love to hear the feedback on that but that's one of the things that we're playing with as a team is to to try and expand the kinds of learning that we are willing to take on alright so you bring up a good point the latest Visual Studio preview which is 16 6 preview something and but Intelli code also works for Visual Studio code right so how do so okay how does people go get the business to do code 1 and is there a benefit one over the other are they or are they the same it sure so the benefits of Visual Studio versus Visual Studio code honestly I think it's a matter of preference so I think that there are a number of developers who are accustomed to using Visual Studio and in Visual Studio right now the feature that I mentioned previously team completions right now we've only actually enabled that for a c-sharp in C++ within Visual Studio so if you're trying to if you're deciding whether or not you want to try to completions right now if you are on vision of the studio code we haven't actually expanded there yet it is on our roadmap and in our backlog but right now if you're a c-sharp or C++ developer and you'd like to have custom completions tailored to your code base you would have to be on Visual Studio however we do have base completions so getting those starred completion suggestions for JavaScript typescript like right now we have C++ and we also have I'm probably blinking on Python and probably blinking on a couple equals equals amel yeah so I think that's about it Samos equal Python JavaScript typescript C++ we have that available in Visual Studio code and the way to get that is you would actually have to go to the visual studio marketplace so like the visual studio code marketplace and you'd have to install that Intel extension and you can also do that directly in Visual Studio code so the other thing I would say is that we also our preview feature that you can actually try out in Visual Studio preview as like Marc suggested previously and as Matt sort of alluded to you can try out all of our latest features which we tend to not always focus on visual studio but a lot of a lot of our PDS have sort of started in the digital studio but you can go to visual studio and you can access a number of our our preview features there so yeah so I don't know know if there's a which one is better I think it is a matter of developer friends and what you are accustomed to working in I do think that visual studio does offer like a very more comprehensive experience and if you are familiar with setting up your developer toolkit their toolset there we just sort of augment that experience all right very cool so when I see mark what you just showed and other things that I've seen until the code do it's like you know it's close to magic and you know and I realized I also don't understand sort of a mental and AI concepts very deeply and so there's a saying by someone that if you don't understand it it's indistinguishable from magic but what is what kind of reactions do you get out there for for people using it or seeing it for the first time what what what do you hear mark well I mean it's it's interesting you know it varies from shock and the magic response to how on earth is it doing that to suspicion sometimes like I'm not sure how it could do that or why it would do that but you know one of the things I think we're always trying to be in the interrogate team is kind of humble about the the technology that we are using and you know it's not always perfect because these things are you know based on algorithms that you do not always produce perfect results with a hundred percent certainty we always want to say that the things that we're producing are either a suggestion or something of that sort and the reason why is because we don't want to want people to think that this is like it's not like static analysis so if you think about the and even that can get it wrong of course as we've as if you've been around static analysis long enough you can know there are false positives there but if you think about the suggestions code that I just showed you there the amazing sort of ability to spot patterns does it get that right a hundred percent all of the time no it does not but what it does is when it does get it right when those suggestions are good they essentially end up being something that can be almost like the analyzer you didn't - right okay it's it's basically because no not many people have taken the time to go and write a linter or an analyzer or something of that sort but when we can actually do this right for you we can really add value and so we're on a delicate balance between trying to make sure that you know we surface the suggestions that are useful to you so for instance in that suggestions code one of the things under the hood that's going on there that we learnt quite early on is we really want to make sure that even AST suggestion Delta suggestions that we get that might be true in terms of the transforms you know they may actually be a correct observation but that which which increase the number of errors in your code those things we don't currently suggest it may be that they're valid and it may be that in future we actually have so a bit more control over that and say actually I'm perfectly happy to have my code to be in a broken state in an intermediate and you know that when you're editing sometimes that happens right that you're you have to go through broken to get to good um but initially in terms of making this useful to people we've beefed up the sweet spot was that we need to make sure we don't cause suggestions that would make the code break now you know that's gonna change over time but you know in terms of reactions from people people generally don't react well to suggestions that make their code break unless they know it's going to do that unless they know what the nature of the thing they're applying is so you know that's one of the things we've heard but and that's part of what's gone into you know the suggestions set up as it stands right now may be the year but also that that notion of humility in terms of the suggestions that we make I think you'll always find that so for instance if you think back to the intellisense example intellisense will show you everything that's type valid for the location that you're you're typing okay when you do a method or a property or an argument those things if they're valid code then intellisense will show them to you this is it the pre Intelli code into other sense right it will show them to you all we're doing is kind of sprinkling some some recommendation sugar some suggestion sugar on top of that right and making it say Oh but we think given your context you might want to do that and notice I'm using think and might they're we're not saying you'll definitely want to do that we're saying you might want to do that so it's very important with these a I assisted tool so that we we make sure we understand that and that we express that in the kind of experiences that we surface so I would say that's that's been true across everything that we've done so far and I anticipate it probably stays that way yeah so it's not like a moment in time like the AI technology has just not evolved enough to be more that we can be more prescriptive saying this is what you want to do so right now we're just saying oh maybe this is what you want to do and we suggest something but it's that just because technology hasn't caught up or I don't know I don't know that that's actually ever gonna completely go away it's because there's such a broad spectrum of things that are possible to express you know we get more precise and more confident and we spend a lot of time obsessing about precision and coverage which are two key metrics that we we measure all the time and really precision is about how often we get it right and coverage is about how many places we can get it right and so the those things are things we bothered we are deeply bothered about we want to drive that number higher so that we get we cover more stuff and we cover it a higher precision that's always goodness but getting to a hundred percent is not necessarily our goal being useful is our goal right being useful to the developer and helping them to you know move forward faster that those those are the goals that we care most about right that reminds me of like it's sort of a mantra that we have here in my family is like never let perfect get in the way of good yeah so much good to be had and it doesn't have to be perfect to add a tremendous amount of value yeah so I've heard like some people be a little bit concerned about AI right like is he gonna take my job like where are we in you know with the AI and machine learning inside Visual Studio like are we getting closer to being able to automate the as a whole as a discipline maybe what are the sort of concerns that you hear from people and and what are your answers to them Katie so I'd love to talk with Mark about this too because I know mark and I talk about this a lot but from my perspective you're so far away from that as a discipline and I think that as Mark was highlighting in his biggest comment I think that like we're really the goal of what we're trying to do and embedding or integrating AI and machine learning techniques into visual studio vision studio code our main goal is to promote common usage and sort of promote those those common practices best practices and we're at the point I think in the in the juncture and the grand scheme of things I think we're very very nascent and we're at the point where what we're doing is providing just helpful contextual examples so that's what the completions Dunne's that's what suggestions as you saw mark demo previously that is what that is doing is providing suggestions that really just sort of like help you remain in the dev environment and and help you sort of like keep in that flow that developer flow and not get distracted by going to you know the web and like searching this and then seeing those shoes that you've been wanting to purchase or seeing that you know $10 USB speaker that you're like I want to get that it helps you keep focused on the task at hand and I think we're just we're we're really far away from automating people's like deb jobs away and i don't even think that that is a goal that we ever actually intended to to reach our goal it has been mainly just like how do we enable developers who already are sort of like a very valuable resource how do we keep them to just keep them focused on on whatever their task is how do we enable them to be as productive as they possibly can and not productive or you know you know the the man or like the business but being productive for their own selves like how do we actually provide them with the tools that as they're learning development and onboarding to coding that they're actually able to see this as like this is actually a fun task there's some sort of like ludic engagement aspect to like just actually just development so I think from our perspective that's sort of our spin but I'd love to like have this conversation with mark as well so I know mark has you know is you know very much like on the edge of the sea to answer all right bargain let's hear it yeah I would this is this is the heart of where my head's been for the last couple years you know that this is not at all about taking away people's jobs and and and as Casey says I mean even technologically we are far from that but it's just not what we're about we are about enhancing the experience of development about making development yeah I mean I dare to say fun right to actually make it less painful and less difficult to stay in the zone to stay in there I love the word ludica one of my great heroes was Bill Hill by the way who sadly passed away and that that notion of ludecke engagement encoding that notion of being you know I'm locked into this space I'm thinking about so if I don't have to be distracted away to some other place in order to go and figure out what I'm doing I can stay in the zone and the tool just helpfully augments me right helpfully augments me in there at the right moment with the knowledge that I couldn't otherwise get it's giving me superpowers basically it's giving giving me superpowers by saying I can now as a developer know for instance all the patterns that I have out there that my team has has developed so I don't have to worry about tripping over that banana skin whilst I'm in the process of figuring out how to it how to implement this great piece of technology that I'm actually implementing my head's about the technology it's not worrying about those other things that I might be missing or you know let's imagine and and I know you know maybe I'm just getting old a little bit but here's the thing we know a lot of api's but we sure as heck forget all of api's as well so I don't want to have to be going back to the documentation to reboot myself into the zone when I hit that piece of code that I haven't touched in three years right I want to be able to know what the common usage is right now so that I'm not you know losing my context losing my vibe really we want to make development more pleasurable we want to give developers superpowers we want to give them that capacity to get more done not just because it's kind of good for business but because it's good for the soul anyway Katie Katie I'm sure you want to come back on that egg sure Mike yeah mark yeah I really wanted to actually like sort of segue this into something that aunt Ella code provides so an example of how we're actually trying to make development more more helpful and also more pleasurable as Mark was mentioning is that they're trying to like reduce the arguments that are had over very like you know sometimes you'd think like trivial things like for example your code Styles that happens all the time or formatting so do we have the tab or do we have like two spaces or like three spaces are four spaces and and things like that are often just like fights or venomously place but conversations that go on for way too long that actually distract from your ability or door detract from your ability to actually just code so how do we actually solve that so I'm actually going to share my screen and show you an example of how we're actually trying to pay developers and development teams from having these sort of back-and-forth arguments about code styles and and code formatting you okay so as you can see my screen I've loaded a solution and and the feature that I'm actually going to demo is a feature called and bird editor config so if you're familiar with editor config files an editor config file is a cross-platform file and there is a common syntax defined syntax that sort of defines sort of the code styles and code formatting conventions that exist within a solution our project so typically what developers would do is they would write an editor config file what happens if you're in a team and you don't actually know like you you just sort of you have this project you don't actually know what the styles are actually already exist there but you have sort of like some people have opinions how about you start from instead of having opinions why not start from and analyzed like an analytic and analysis of your current code base and the current code conventions and the current code styles that exist there and then from there like determine what it should be and have those very meaningful like bring the data to the to the conversation or the debate so so what you can do is you can actually add a new editor config file that Intel code but it's all code will do in the background is it's actually analyzing that solution and it has now generated an editor config file so instead of having to go and define all of these rules and intelecom is actually just defining this for you so if you if you see this is what aunt Ella code has produced in the editor config file so I've already opened up a file it's called paint object constructor and something that you'll notice is that you'll notice here that it's suggesting me I've already sort of like loaded up the line I'm sorry but it's suggesting that I actually take an action and actually make a fix and that is based off of the define coding conventions and that have been defined in the editor config file that Intel code has already generated for me on my B on my behalf and so because this lives in the solution so you'll see the editor config file here once I commit this this will automatically be shared with the rest of my team and so as you can tell I could actually introduce this but I can actually take action on this suggestion but I also wanted to show you that what is the actual rule that is providing me with this suggestion and if you'll notice if you can if I can go down there there is a rule that says that you prefer methods that we practice with this and and so I guess what I'm trying to say is that the scenario that is this would be very very impactful for and useful for is a scenario when I'm in a team and we just have had a lot of conversations back and forth about what should be the common style or the common coding practices for my team and often they just people are bringing their opinions to the conversation and based off of their own history but why don't we take the code as the main artifact and we say here's how here is how after I've analyzed our code base these are the styles that are already exist within my codebase or within the solution within this project and from there then bring this to the conversation and say Intel code has generated this editor config file that is based off of what exists the styles that exist in my my code base in our code base let's actually see if like do we actually want our code base to our code to look this way or do we want to have do we want to change it in a different way so this it actually not only promotes just sort of common or the best or the comment or the historical Colston Co styles but also gives you sort of like that starter for that conversation and it also reduces that time that you're going back and forth about debates you did just say this is what the codes this is what sort of exists commonly in our in our code do we want to exist differently do we want it to be different and the cool part about it is once you've actually have this as a find editor config it fits is c-sharp in this case the Rosalind analyzer will start providing you with warnings and pushing suggestions for you to change that is pretty cool okay so in Teleco does editor config formatting as well so it's really a broad set of features that your team is doing so is it fair to say that Intel ecoute is is not a feature it is more like a team that work on certain type of problems market yeah that's absolutely right Matt we we work on the the set of problems where we believe we can bring this kind of pattern understanding to bear to give you good useful productivity features that augment your developer workflow right so we're all about that so we're in a sense where a set of a I assisted development tools that we're trying to apply across a broad spectrum whether that's envious or envious code whether it's to do with things that are happening at edit time whether it's to do with things that are happening even as Katie was just showing you know that editor config artifact can play out at CI build time as well so you know we don't really mind where we add the value as long as it's helpful to developers and helping them to accelerate but our cool thing is to distill down the pattern wisdom and bring it to you to you at the point of need right so that's that's our motto if you like to to try and get things done that way yeah so we're not just one thing we're not just about intellisense we're about anytime we can provide you with helpful insights based based on patterns that's that's the deal okay so so you're mentioning this but you said that the like you're basically doing a lot of work up front and then you present it to the visual studio user as they need it does that mean that the overhead of running the machine learning and AI engine doesn't happen in real time on the developer machine CPU and takeaway performance that is an awesome question and in fact the answer is complicated so in some cases the answer to your question is yes we offload for instance in creating those machine learning models and one really exciting development that we should talk about actually is that we've been doing some enhancement of the completions model with with with deep learning those things are high horsepower activities right that we want to we want to make sure that we keep those things on the on our service so it doesn't gum up your machine right we were we don't want you to be having to run learning locally if you don't know if you have to but sometimes we we do a little bit of work on your local machine it really were trying to optimize that as much as possible and the training where it's necessary to do training happens on on remote machines where the big horse their lives or we keep the training process or the the algorithm to a point where it can learn very very efficiently so you saw when I was doing the suggestions work that yeah when I was typing away there there was analysis going on you know as I was typing as it turns out that that algorithm is running locally on the user's box and and we've done a lot of work to make sure that that actually remains highly efficient in terms of memory usage and CPU usage so that we don't swamp you and don't take away from your your editing smoothness right we don't want to be doing that we don't want to be flattening your battery we don't want to be doing any of that kind of thing particularly in these days when we're working remotely more you know you've got to be laptop friendly right and that the reality is that you know it's horses for courses as we say in England right we you basically you pick the right the right tool for the right job and so when we are doing things that are extremely complex and when we need to do things like do deep learning models and so forth chances are you're gonna find us doing that on a server somewhere on your behalf so we don't eat your machine CPU and battery where it's appropriate we will sometimes do local work as well but we will always work hard to make sure that the it's not something that's gonna impact you too badly so kind of not a simple answer but you know hopefully it makes sense yes thank you so much it totally does and it's wonderful that we can get great AI capabilities without users using our battery on our laptops so okay we are almost at the end and I want to just end this with a quick question to both of you so let's start with Katie Katie what is it that excites you the most for the future of Intel the code that you're going to work on in the foreseeable future with luster she's muted there's such a great question that's yeah that's such a large question um what most excites me so I have mainly been focused on the completion space and so for me there's a number of goodies that are uh parsley use that I will wait to present on those or talk about them too in depth but I will say that I'm very excited about working really closely with some some early customers who are just interested in dog booting and figures and just like learning from them about these upcoming experiences that were working on so I'm being very coy and not being very forthright about what we're working on but I will tell you that it's really really exciting and in the completion space and I'm looking forward to just learning and hearing from our customers about these new experiences because I think that they will really sort of take what we're yeah so I think that it will be great yeah awesome and Mark same question for you yeah absolutely I mean customer customer input is supervisor to us and and I'm really interested to hear other places where people have tedious tasks that they would like us to take out of their way but I'm personally you know very excited about the ways we're going to be able to spread out the knowledge that that's in your team and get that out to everyone in your team so they can take advantage of it I think that's that's going to make a huge difference to people as they go forward and we've definitely got some good things you know coming in that domain and and also new ways for developers to express their intent in a more compact way so you know whether that's by you know typing something once and getting us to do something again or or whether there are just other ways to say what they want the machine to do for them I think there's lots to be done in that space and watch this space we have lots to say it build so come watch out talk better as well awesome well thank you so much both Katie and Mark for for joining me year's a day I hope the viewers out there had a good time and learned something new I assured it so so thank you so much we're at the other line it is it's been an hour and I hope I'll see you again next week Thursday morning at 9:00 a.m. Pacific time where we will talk about the UX lab that we have here in Microsoft that we use in Visual Studio to interview customers and see how they do eye tracking and and learn a bunch of cool things and how we apply that and what are some of the learnings we have from that when does it work and when doesn't work really well and I think there's something in that that you can apply as well at home so make sure to tune in next week thank you so much

Monday, 21 October 2024

Adam Day Promoting Creativity with Physical Environments

Good morning, everyone. I'll be leading the last session with Chris Congdon from Steelcase, and we'll be focusing on the built environment. I think this is a very crowded field. We're all in various ways trying to get our teams to set the stage. I like the theater analogies earlier today, because really it's about stage setting to figure out how we can prime our teams to be more creative. Let's see if we can get our slides up here. This is very much sort of going from macro to micro, looking at the passive environment and understanding what can work. There's been a lot of, I think, simple applications of a lot of the creativity research that's led to a lot of silver bullets. I think you read about them in the blogs everyday about we need to add plants, we need a baristo, we need to lighten the colors, we need to put everyone in the same room, they need to be in different rooms, on and on and on. I think we're realizing of course that we've talked about today, that the creative process is obviously much more complex than that, and it's also very paradoxical. There's a lot of creative tensions that we need to solve. We felt that in looking at this, the best way to frame it is more in the analogy of a recipe. We're all cooks at some level, and a lot of our energy has been focused on the main ingredients, things like comfort, control, inspiration. It's definitely been part of, I think, the positive psychology and things that make us feel great and prime us to sort of be at our best. The problem comes is that when we design experiences or environments that create these emotional sensations, it ends up being a little bit more like a cruise ship atmosphere. High levels of satisfaction, probably low output in terms of original ideas but everyone feels great. We have to balance the main ingredients with some spices. Actually, it's counterintuitive but we need things like stress, surprise, constraint, things that are uncomfortable, sometimes they're unwelcome. The challenge is if of course we have an environment that is only spice, it's kind of more like an interrogation room than a cruise ship. That doesn't work either, and so we have to figure out a way to resolve these tensions. All of these things need to be true in the space, and the question we're going to explore is that balance process. There's an additional layer that is a challenge for the environmental design, which is all of us need a different mix at a different time. You think about the design process and architecture and trying to design things for 5 years, 10 years, 20 years, knowing that you have people coming in and out, each of whom have a unique need that changes over the course of the day. How do we create environments that actually can help us achieve greater creativity? Our teams will be looking at this idea of tension, and finding, and discussing what are the best solutions that we know of now to create these emotional responses within a space, both on our main ingredient list ... This is not exhaustive either. There's other things here. Boredom, arguably, is a very good creative input here ... But also on the spice side. Then look at not just what creates these responses, but importantly what are solutions that can move us between these tensions or across them to make our environments more tunable, more dynamic, more responsive so it's not an astatic experience. We'll be trying to energize and change how we think about the built environment to drive the creative process. Looking forward to discussion. Thanks, everybody.

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...