ASP NET Core Plugins - Live Coding in C#
I have some YouTube tutorials to make on several topics - so I'm going to live stream the creation process and explain more things in depth!
View Transcript
just checking if the stream's coming through okay going to be looking at doing some coding live so that's going to be fun because coding live is always fun my camera a little more centered here be good um let's see just want to make sure YouTube is working out here yeah so I did a live stream the other day this will be kind of similar different topic but same kind of style the idea is like I'm going to show you how I'm preparing some of my tutorials and stuff for YouTube so um last time I was hoping to get to this one but I guess I take a little bit more time explaining things as I'm trying to code them and stream at the same time so last time we looked at what do we look at doing I can't even remember now it'll come to
me in a moment um but today we're going to be doing uh autofac plug-in loading in asp.net core uh I remember now the other video was on uh exception handling in particular kind of looking at like whether or not you should be defensive versus you know letting exceptions bubble up and stuff so just a yeah I think there's a lot to cover in that other one just because there's a lot of different opinions and I think a lot of it's situational the context really matters um today though we'll look at like I said plug-in loading I am going to be using autofac the concepts I don't uh if people are curious because I know not everyone uses autofac that's okay um we'll kind of go through and you can you know if you if you're like hey like how does this work with uh you
know I service collection and that kind of stuff we can I can try to pause to touch on it I don't personally use the built-in dependency injection stuff in asp.net core um so when I started using autofac and dependency injections that kind of stuff the time it was like autofact just felt like it was light years ahead um I mean it's the standard built-in stuff is absolutely caught up since then so I'm not I'm not trying to say like oh it's terrible it's just like I'm not I'm not comfortable with it and I've always used autofac and I don't know like it's you know if it's not broke don't fix it kind of thing so we'll use autofac and we'll kind of go through but I'm gonna start us off in another uh like an example project that's from another video and that one was
showing how we could get to setting up our dependencies so that our plugins could have the opportunity uh to take advantage of a lot of the different dependencies where they can they can attach themselves to the different routes that they want to register and stuff like that so I'm going to end up using that sample to go through and um I'm going to talk a little bit about how you might consider trying to build like the API for your plugins and it's going to be you know pretty light here but I'll try to touch on a couple of different things so maybe that's enough of me blabbing let me get over to visual studio we'll get that up there I'll put my face back on I might keep the chat off so it's not taking up too much of the screen I think if I
put the chat on let's see maybe that's not so bad keep the code over left here um okay so uh this is the project expand this again so in the left hand side here in the solution Explorer I had three examples in total the bottom one and the second one here that say problematic minimal API and service provider web API both of these work it's just they have some limitations and the limitations aren't total deal breakers it's just something that like if I'm building stuff I'd like to be able to kind of do it my own way and have access to as much as I can and that meant that I had this third approach here where our entry point to our program is just one line which is in my opinion very nice to have and then you know we did some stuff where
we had our container builder for our dependencies to be able to get those registered but like everything you see see in this project here at the top that's called Full resolve web API basically everything in here is just like a very light skeleton project I've just split stuff up across files and that way from there what we're able to do is you can see like I have this plugins folder just this was an example application right and I had one plug-in module that I can open up and basically we can start go going to build plugins for loading into asp.net core because we have like these files set up as our skeleton application so now what's interesting about how I did this plugin here like this this plug-in module like it's kind of weird because you know it's directly inside of the main project hey
on the kickpad I see the the gigachad GI thank you um yeah so this kind of setup doesn't make a ton of sense but I should pause because it's like it's not necessarily wrong if you wanted to go build a single project and kind of separate things out into folders like this you know plugin and have a plugin module you can absolutely do that there's nothing that says absolutely must pull things into different projects and I would actually say that like based on my experience I am I overdo it when I pull stuff out into projects like I will do that almost prematurely and kind of aggressively and it's it's not really beneficial but it's because I don't trust myself when I'm coding on my own projects it's like hey if I have access to it I'll use it so I like pulling stuff into
different projects to kind of have a forcing weight for me that I won't just go use it it makes me feel like maybe I shouldn't be touching that hey in chat how's it going fellow software Engineers going good it's a Friday night my my wife is at her sister's wedding for the weekend so I am left alone to basically stream and do coding things in typical software engineering fashion so I have my weekends are generally pretty filled with trying to get some content creation stuff together for the upcoming week uh which includes putting YouTube videos and stuff together and I started realizing as I've been doing live streams I do them on Monday night in Pacific time at 9:30 p.m. those ones are a lot more like an AM ma style I have a topic I like to go over um fcy sent me pictures
from the wedding I can see her at the wedding 5 AM Saturday night she got tired of being married to a geek like you yeah I'm sure she did um cool so yeah I basically try to get my YouTube videos uh like content for them down on the weekend them filmed and stuff uh ideally on Saturdays you know if it's spills into Sunday that's okay Dave can we bang tonight no I'm busy coding hey man like I don't know I might have to like I close the chat so it's not on the screen um yeah you can say whatever you want to me I don't really care so the idea for these streams though is that I figured I'm not spending a lot of time coding on stream and that's probably beneficial so as a result when I'm going to put some of these projects
together for YouTube videos I figured I might as well walk through them so there we go um yeah so what I got going on though is from the last video like I said we're kind of getting set up with being able to create plugins but the weird part about this like I said is it's it's within the application and generally when we think about plug-in systems the plugins you create are something outside of your application and then you can dynamically load them at runtime but just to kind of repeat there's nothing that says You must do that right so if you wanted to you could totally go and create more plugins and what I'm going to show I'm trying to figure out a good way to walk through this um what I might do what I might do is kind of bring this one down
to something pretty basic because we don't need to have like all of this was really just to kind of prove a point doesn't actually help the application at all so I'm going to reduce this plugin to be something very simple we'll have a h AP and then um what I'll probably do from there is we'll make another plugin again inside of the project just so we can see it and then from there what I'll do is I'll start trying to pull the mode into separate project so you can see how you can consider dynamically loading stuff um why sorry you have two questions in the chat so the first one uh I don't understand the string question so if you want to ask that with more context I'll try to answer um but the first question was how can I get into software architecture what
would you recommend um yeah so software architecture has a lot of system design and kind of depends on like your your definition of software architecture right so if you're Building Services and distributed systems so for example like architect roles at Microsoft are a principal level role that's kind of focused on basically designing services and things across team so you're thinking about a lot of technology that might span different teams kind of getting um perspective and Alignment about the vision that you're trying to head in with like um direction of software again spanning teams generally right so it would be instead of having these teams kind of in isolation building up what they need just to focus on their own use cases you might say hey like we have 10 teams that I'm just making this up right like you have 10 teams that need you
know uh C certificate management and authentication like it would be good if we start establishing these is the standards here's why and you kind of need to work on on getting some Buy in so I've actually I was talking with someone today and it was either yesterday the day before basically about as a more Junior software engineer because I don't I don't know your your level and experience right but as a if you are a more Junior software engineer how do you start heading in that direction and um I I would say Oh So currently working at Riot as a software engineer thinking about software architecture yeah so again like scope of the architecture depends because you could talk about software architecture literally within an application right um it's it's really going to be about the scope but the advice that I was giving to
this other individual again I don't know how early in your career you are um this was really coming down to like what are the types of activities that sare Architects do and like are your interests align with that so one example I was giving was like Hey when design documents are put up for discussion and stuff like as much as you can try to jump into them right because you might find like I don't really know about this space and like I don't really care because it's not affecting my work I get it because like you know you got your own tasks and stuff to do that's kind of a little bit outside of your comfort zone but you know if you are more interested in software art architecture you have this opportunity where as things come up if you are able to kind of
be proactive and participate in them then I think it's helpful so the example that I gave was like let's imagine that it's uh you know to kind of get from Principal level to from like a junior level that might take you know many years and that's okay nothing wrong with that across those many years you're going to be having design documents you put together you know working on different designs you have you'll be participating in others that's great and this will come up naturally in your work but if you're trying to be proactive you can have more of these opportunities right so as they're becoming available for you to participate in you can look for those opportunities try to participate you know even if it's outside of your direct comfort zone trying to ask questions about the design see if you have suggestions just really
participating and trying to build up that skill right so instead of over I'm just going to make up a time period just for simple math say it's a 5-year period you could be waiting for 5 years for these opportunities to come to you or you could be doing that plus looking for additional opportunities to jump into design discussions and stuff like that so I think that's one way to try and accelerate it a little bit um but generally it's not just about coding I would say like one of the the things I mentioned kind of early on here was that you want to think about how you're going to influence other teams how are you going to understand the challenges and the different use cases that they have to be able to say hey look this is a good direction for the architecture so um
a lot of it will be you know uh working with other teams and in understanding their technical requirements so I hope that helps um I still don't know the string question but we'll we can come back to that okay so we have this one plugin like I said I'm going to modify it problem if you like I said if you guys have questions as I'm going through stuff interrupt me ask questions in the chat I'm happy to to respond to it the whole goal here is like like I'm available for you to ask questions and I'm just trying to fill the time with what I would be doing for for making YouTube content so I'm going to go ahead and start stripping some of this stuff out because like I said it's not really needed kind of ditch the comments too uh because we don't
need them as well these parameters that we were passing in on the Min minimal API were literally not needed just to kind of show what's going on and that we could resolve those dependencies and you'll see I can just pull all of these out well suddenly it's getting pretty lightweight right and then this might return oh what is it um results. okay and then we could do we can just return a string I need to make this even more simple right we can just keep cutting some code out the semicolon there right suddenly you know truly a minimal API that's great um yeah and really this is like say this is one plugin okay so it's pretty boring plugin and maybe I'll say this is called let's do a little rename here hello plugin module want did rename the file already okay so we have
one plugin like I said I got rid of all the crap that was there just because it was Pro point in one of the other YouTube videos what I'm going to do from here is still kind of boring but just to prove a point we can go make another plugin right and it just looks like this we'll call it goodbye plugin and if you're curious about like I don't know how many people watching are into C or not maybe this is your first time seeing this kind of stuff I'm just making um this is a web service and we're able to access the hello route so you'd go to whatever your your host name is right so it might be like Local Host in this case it's not running anywhere except my computer you go SL hello on that and then you get hey there
as a response right so we're just making a little uh web application and then I made another one that says goodbye the the reason that I'm calling this a plugin approach is that I can basically add or modify functionality strictly by adding new code and you might say sure there's lots of ways you can do that you're totally right but we're going to get to a point where I can basically just add new projects basically compiled code I can just drop that in the bin directory restart the application so I don't have to recompile code and we'll just have these new routes available to us and I think that's the power of plugins which I'll touch on a little bit more as we go through this so we have this goodbye route I'll put see you later is the response okay and then I'll just
move it into another file there we go nice and easy so now you can see in the plugins folder we have two plugins right just the two things we were looking at let me close off some of these other things here we got the hello one and the goodbye one two routes and hopefully what you notice is that to extend the application this functionality I didn't have to touch any of these other classes or files that we have right I basically just made a new file and kind of reduced the existing one that was just to clean it up in the first place so far so good so I will go ahead and run this compile pretty quick I hope I'm using visual studio pre oh no I have a break point Visual Studio preview because I updated my normal Visual Studio install and it
had um had some issues so great points are gone moly that's way too big okay so we have hello right that's the one plugin goodbye pretty easy right nothing too fancy it's not really doing anything that that miraculous but that's okay so now we have that I wanted to show you it working so that when we go to move it we have a baseline of like what kind of functionality we expect so when it comes to making plugins as their own projects and own dlls there's I mean a bunch of different ways you could do this right I mean the easy obvious way is like we're we're going to move the code that we're we're looking at on screen right now we're going to pull that into a new project but the part that's not so obvious and this will really depend on you know
on your situation how if you have like a continuous uh you know build system however that stuff is getting put together you might have different opinions about how you want to do this and perhaps you don't even have anything like that right if you don't have a build system at all there's a super easy way to make this work because essentially Visual Studio is your build system right if you don't have a server you're pushing to and then it's going to run some continuous integration stuff and then go deploy stuff automatically for you like truly if you're like a lot of the projects I'm doing where I'm just running them on my computer and you know I'm not hosting websites on my own there's only a couple things like that I do then I'll show you what that looks like inside a visual studio because
one of the awesome benefits of visual studio is that when you have projects and stuff added as dependencies which is how we'll do it all of the stuff for building and cleaning and all of that just works so flawlessly you don't have to think about it and that makes it nice because otherwise what happens is you need a manual step or a couple of manual steps because you are going to have this core application right I call it like the skeleton application so again forget the plugins folder for now the other files that we have here this is really just a super lightweight skeleton application and most of what the code is here is starting up a web service that has no routes and then it does a bunch of dependency resolution to try and make sure that plugins can do all of the rest
of the work so you need to have this thing built on its own then you will need to build the plugins that you're interested in so that's the other manual part and then the third manual part is that you need to copy the plug-in content into your running directory it's all super easy it's just that you have to do it so if your setup is super simple and you just want to have some plugins and always have them available and you're just working in Visual Studio let Visual Studio manage it for you you never have to think oh crap did I rebuild that project oh crap I rebuilt it but did I copy the files over it'll just do it if you don't have that which we will look at right after I'm not going to go build a continuous integration system but describe it
to you because you can just build these things separately and then in your continuous integration system you can have some type of you know manifest or configuration for plugins you want to have you might say hey pull all the plugins from this source so all the plugins get built and dropped into a directory and you just pull them all in in your build and that way you just have dynamically uh accessible features that are getting added into your app I think it's super powerful and again I'll touch on that a little bit later uh as I go through the stream so first thing we're going to do is make a new project and give it a super boring name terrible at naming stuff and naming stuff while it's live is even worse so we'll call it um one okay we'll get rid of that class
now we're going to start to see a problem because as soon as I got to move this code the hello plugin into plugin one we got some compile errors right so no big deal we should be able to install the autofact package by the way I want to make I haven't done it yet I want to make a tutorial on how you can do this kind of thing without your plugins also requiring autoa so to pause and kind of explain this for moment when I build um plugin systems I use autofac which is the dependency framework the dependency injection framework and the side effect is that the plugins themselves need to have knowledge about autoa what would be really cool is if the plugins themselves did not need to have Auto fact as a dependency they could have it if they want it but they
don't need it right now the way this is designed they need it because that's the only way stuff gets loaded into the skeleton application right it needs to go look for different modules so if you're not using autofact you can't make a module therefore it can't ever be discovered what we could do and I'm not going to do it in this video I want to make some follow-up content on this later is instead of having like forcing your plugin implementations to have a module right so instead of forcing them to depend on autofact what we could do is basically just use reflection and say look you need to have this type and we're about to see right as I go into this that we're going to run into a little problem with sharing pipes so web application is not available um it's not from Microsoft
graph man where does this come from I don't know what n package it is but I think I think if I check here it's not going to include it what's a good way to check this I know okay this is probably a bit of a cheat but one sec I don't know why it's in here but I can basically guarantee that if I add this package it's going to work so let's actually before I do I bet you it's got to be in one of the dependencies of this package somewhere but I don't know what it is I just know if I add this it's going to work I think no oh not that one sorry this one it didn't do it man I got to pull up a file browser here give me one sec obviously this was going to happen on stream I'm
not so I could use like a personal project but the the current personal project I'm working on I don't want to share quite yet I will uh when it's made more public I just am not ready for that yet so uh what is a good one see I'm not showing it on the the screen by the way so sorry for that but what I need to do is I need to find which um nougat package gives us uh it's like hosting abstractions I think I'm going to guess it's this one and if it's still not I'm still looking for this uh this project I can reference here no it's not okay not a problem we'll have it in just a moment I'm just looking for a good project file JWT Bearer we said that's not the one oh I wonder this one I I did
use JWT Bearer so it's kind of interesting that it didn't like it but I just realized um preview version doesn't have it I wonder oh what the heck did I add it to the wrong I added it to the wrong one what's going on here did I miss that up completely maybe I oh it's not installing it something's wrong okay it's because this this pre-released uh okay this whole time okay okay let's go back I don't need uh this year now there we go just as predicted but I picked so sorry that was kind of a bit of fumbling here but what was happening was that I was picking a higher version of the nougat package and that meant that it wasn't going to be compatible therefore it couldn't see it okay so I don't know if it matters on this one think it does
matter that's the one now okay so these are you know built into to Microsoft tech for asp.net core simple but we have this thing here pre-application configured marker what the heck is that where does that come from well that's something I made which I explained in the other YouTube videos but it's basically a marker we can use when registering dependencies to say hey you need to have certain type of work done before this point in time or from the other perspective let me go do this work before you continue on so in this case we're saying hey I'm this plugin I need to be able to register my routes onto the core application before continuing so we I made this basically this class to to serve as a marker for that problem is that it's uh defined inside of the core skeleton application and that's
a problem because we have like a circular dependency that way so we have the core application which doesn't know about the plugins it can't depend on them directly right they should be able to be dynamically loaded so we can't pull preapplication configured marker into the plugin and that would be especially problematic because if we have multiple plugins that can't just have their own definition okay and then we can't put we can't keep it in the core application because then the plugin knows about the core application and that's a mess so the solution or one of the solutions if we want to use these markers is basically to build a mini SDK or Plugin so a little software developer kit if you're a plug-in Creator here are the different tools that you have access to when building plug our SDK is going to be extremely simple
nothing too creative it's just going to have a couple of these markers in them what you could do if you wanted to continue building out an SDK in this approach you could say hey if you want to implement certain types of functionality into my core application you need to go Implement certain interfaces so to give you an example you might say instead of having your routes registered like this you might say hey look if you're a plugin and you want to enable creating routes that are available to callers you need to go implement the IR route registar interface right and the definition of that interface would go into the SDK that way the core application I'm talking with my hands and I realize you probably can't see me one sec oh then I disappear there we you go there I am so the core application
right that will be able to see the SDK and then the uh the individual plugins can also see the SDK so the SDK is going to be something that both can see it will have the common pieces for building plugins I have to talk with my hands sometimes so let's go back to the code here I really got to figure out what's up with this camera though because it's uh it's turning off every time I switch scenes anyway let's go ahead we need another project by the way you'll start to notice that when you're building stuff with plugins it can get pretty it can doesn't have to can get pretty project heavy because you want to be able to share your dependencies in different ways but like I said you know depending on your needs it might be and I would say most of the
time building plug-in systems it's probably completely Overkill it's just in my opinion a very nice way to separate dependency out so um you know you start to have a bunch of projects like I some of my Solutions have like 200 plus projects in them and it's just because I've split stuff out to separate them like it's I totally admit that it's like Overkill to do it but um plugin plugin SDK We'll add it as a new project here and then I'm going to go where did I put them they're in here so you can see I have these two markers these are inside of the skeleton application like our core app and I'm going to take them out you can see I'm already getting compilation errors it's not happy with that that's okay I'm going to go put them into here and you can see
like these are just records that don't have anything defined on them right they're truly just markers they don't do anything except serve as a marker rename the file okay so now we have our two markers pulled in into this SDK and again the way that I want you to think about the SDK is literally it's a software developer kit right it's the tool kit and if you wanted to make plugins here's everything you need to go make a plugin for you could even say the way that I have this defined is like you'll notice I I kind of mentioned earlier depending on when you join the stream if you wanted to make plugins the way that I'm doing it they need a dependency on autofact if that were the case you could basically make the SDK also have autofac is like kind of like a
a base set of functionality there so then people are forced to use autofac I kind of said earlier too I don't like the idea of forcing autofac but everything I build is with autofac anyway not a big deal okay so now we have these two markers in our SDK I'm going to go ahead and make our plugin like I said the plugin will depend on the SDK and this the name spaces here they're both plugin SDK okay that's great which means I can go don't do this to me oh they're internal yeah okay I forgot so these are internal when you're building sdks and you want to have stuff obviously that's exposed to other people these need to be public so we'll go make those public now there we and I added an S by accident so now our plugin should compile on its own
right so if I right click and build build succeeded awesome not that exciting the core application's probably busted and it's busted because it doesn't have the s K is a dependency so we'll go add that as well okay so now if I go build the core one forgot the name space changed there we go build out oh my goodness a lot of files that need the SDK I got too excited there 28 errors oh my goodness some of them are already resolved though kind of annoying there's a little like slight differences in Visual Studio preview so like for example right now I don't know this is kind of like a what I would call a bit of a bug here right I'm going to build it and it's saying build succeeded but like why is it all busted doesn't really make sense I'm going to
double check the output cuz sometimes when you build things still succeeded okay so I was going to say sometimes you build things and it will say like I don't know whatever it wants about the errors and if you check the output you'll see something different I I have observed that but this is kind of clunky sometimes if you unload the project still see this is really bizarre like this is definitely a bug to me because I don't even have the project loaded and it's like hey you got issues but okay build succeeded I'm GNA I'll keep moving along it seems like it's obviously working um okay so now the problem is that we moved that plugin out right and we move the hello route out so if I go to run this now and actually I just realized I got to set this back as
the startup project I go run this we'll wait for the browser to kick in you can see that it's not working I moved I moved that route out and now it's a plugin but nothing is loading that plugin this the core application doesn't know about this plugin if you recall what I was saying earlier once you start to take these steps you need to be able to take the built binaries and put them into the running directory so I'm going to do that actually so this doesn't work I'm going to go back to visual studio I will open up where this is I'm just double cheing to make sure I can share my screen here should be fine um okay so I'm going to go into the bin directory here here and is a d I'm going to take it I'm going go back to
here the full resolve web API is the one we're working with I'm going to go to the bin directory debug and I'm going to take that plugin and drop it in I have not changed any code see my screen not changed any code if I I go to run this and because it's a live demo I mean probably going to break still doesn't work okay Nick what have you done um oh you know what I think I know what it is I uh let me redo this part because I want to prove it to you I think it's important that you see this functional I'm gonna get rid of the dll you can see it's gone right took the plugin away um I forgot that when I was making the original YouTube video you can see I left I remember this now I left a
comment that says if you want to start going at like further with this you need to do what's called assembly scanning it's a good opportunity to explain it so assembly scanning is going to mean that we're trying to get type information like plugins from other files now if you'll notice here on line 12 I was just taking the current EX assembly we're only ever looking at one dll to go get plugin information and clearly what I'm trying to do right now is get that plugin information from other dlls so it's just not going to work but there is something we can do we can build our own assembly scanning which is very easy for us to do and maybe we can get co-pilot to do it for us uh right assembly scanning go to load what I want to say um let's see if it'll
do it okay sort of let just work cool I wonder if there's a newer version of autofact that I haven't used that done this that does this I thought that they didn't take a list of assemblies so that's cool um so this is a a bit of like a call it like a naive way to do it but it's totally functional or should be so again if I go run this there's no plug in there right now okay so it's it's going to have the same behavior just want to prove it doesn't crash but yeah so same behavior right it doesn't have the hello route now I'm going to go back so I'm going to go back and I'm going to take that plugin dll right I didn't rebuild the plugin DL either I just taking it so on my clipboard now I go all
the way ahead drop it in now we have assembly scanning and we have this dll in there if I go run it drum roll there's a hello right so the point and one of the nice things about plugins is that when you have your skeleton application set up to go discover the plugins and the functionality you want you almost never have to go touch your skeleton application again this is a very I don't know extreme version of a skeleton application because it doesn't do like anything except have a web service but depending on your needs like if you're building a user interface application you very well might want to Define some like Poe parts of your application so the main part of your application becomes pretty big and that's fine and then you're like but I want um you know I want to have different
features available in the menu system so I need to go build plugins specifically for that right uh in the chat no when does WS does wsg mean what's good um thought I don't know what that means sorry guess I'm getting old uh thoughts on chat gbg4 O's release and zero latency response time and authentic vocal creation um I haven't tried it myself I think it's pretty interesting um I'm trying to remember is are they called 11 Labs or something like that I honest I can't remember there's a company that's spin around for a little bit now they can basically do and I haven't tried it myself just kind of watch some videos on it but they can do some really good like voice cloning it's like scary how cool it is and they don't need much data at all it's pretty fascinating um but I
have not seen a whole lot on the new chat GPT relase uh release sorry so um it seems cool uh I love like I'm I love AI technology I think it's really fascinating kind of see how it's changing and stuff I don't know basically at all about the underlying you know technology and how it works so part of me is like that's why it seems like magical and fascinating it's because it's it seems like it's so impossible yet they're able to do it so um yeah I think I think it's cool I think on the on the voice stuff um and the zero latency part what's cool about this kind of thing is just like better interfacing experiences right so if you think about when chat GPT first launched everyone was like Blown Away by it's it's super cool because now you can basically like
type in English to a computer and it seems like it understands everything you're saying like we've never had that before right and and you have a sit situation okay like there's a bit of a delay for it whatever it's like still ridiculously impressive but I'm kind of like where my head's going with this is like can you imagine 5 10 years from now being like remember when we had to type messages to a computer so it could understand us like that's so ridiculous but like for us right now it's so fascinating and we're already seeing now you don't have to type things you could just like press a button speak like I'm doing now and then you'd have a response very quickly from a computer and not even just written and not even in one of those silly robot voices but in like a good
voice like that's that's pretty remarkable and not long at all um when I say not long at all I mean like I know obviously a lot of this technology has been being built for for a long time it's not like overnight a bunch of Engineers just built it but it's truly it seems like it's evolving so fast in front of us so that's what's really cool about it um yeah so those are my thoughts um the next plugin is basically going to be done the same way right so I'm going to go do plugin two literally exact same way we did plug in one new project I'm going to talk about how you can do some of this inv Visual Studio instead of copying stuff around again it's a pretty specific use case let me move this it's got a copy isn't it okay so
I'm getting rid of the plugins folder from the core application no more plugins there plugin 2 is now down here uh quicker way to do this is just to copy the dependencies over here uh because I need two Nate packages one is so that I can get the asp.net corop and the other is because I need to well sorry I need Auto back as well and then the other dependency I need is that plugin SDK if I just copy all of this and use that as the project for over here easy easy one more there we go oh sorry two more so right I I always picked the wrong one here we go okay so now we have these two plugins but remember we're not done right cuz if I go to run this we're going to have the hello one because I copied the
DL over sec let me move it over right we're going to have the hello one because I copied the DL over but if I try to go to goodbye that code has been removed now it's p out into a plugin doesn't exist there's nothing that's loading it even though we have assembly scanning and that's because we never put the dll into the bin directory so we would go back here all the way back or I go here and then I can just change this you plug into oh I never built it in the first place that's the other thing I said this earlier you have to manually build these things because nothing depends on it it's like okay you're building and running this other application no worries you don't got to build this other stuff you don't care about it doesn't know right so here's
plugin two we'll go back into here this is you'll see like this is tedious this sucks um if you have a build system doing it it doesn't matter but when you have to do it yourself it really sucks right so again I didn't change any code I just moved the DL over I go press play screen goes over here and I got to bring it over now I can go to goodbye right so this all works nice and easy well nice and easy except for the fact that you're copying files around so if you're this is it's going to look like it's breaking some rules I understand that but when I'm about to show you you're going to say well Nick what the heck was the point of that this is really just helpful if you are always building like locally and you don't have
a build system because otherwise I would recommend you go build some automation for this kind of thing right the idea with having plugins is that you're creating extensibility you're allowing your system to be extendable in different ways that's great you start to isolate stuff right so if you're building a new plugin you'll notice to go add the goodbye route I'm not touching any other part of the code that means that I'm not affecting it or at least not directly so the likelihood of other stuff breaking is very much reduced versus hey I have to go add a new feature let me go touch 50 files in the other features to make this one work like we're very much compartmentalizing the tradeoff is complexity right I I had to add three more projects right one for each plugin and then one for the SDK three one
sec losing my voice and then so three projects and then not only that it's like Nick you were copying and pasting files around like this is ridiculous like who would want to do this okay so the cheat is you just add them as dependencies into here okay if you do this visual studio now knows I have to go build your plugins and it will go copy the plugins into the the running directory you never have to worry so if I go back into here all the code's gone right sorry not the code the built files are gone if I just go run this now sorry it's taking a second because it's going to build everything you'll see it works right away I didn't have to copy any files right hello is there if I go to goodbye it's there right it all works and you
can see the files are here right plugin one and plugin two they're both there so it is a bit of a cheap to go add them as dependencies but again the way that Visual Studio builds things is so convenient for this kind of thing if you are working either as a solo or if you're working with a you know a couple of other people and you're not at the point where you need a build system like honestly this is a super good to give you an idea um I I had a failed sort of side project it was a nutrition platform called cerate and every single feature that was built into it uh like in terms of it was like a modular monolith if you're familiar with that concept so anything that could have been a micr service was still just the module like a
vertical slice within the modular monolith you're getting a lot of buzzword thrown at you right now um but I I made each one of those as plugins and this is an example of a solution that had over 200 projects in it because like literally the exact pattern I just showed you was exactly what I was doing but because I didn't need to deploy things separately we didn't have to go dynamically configure which plugins we needed it was just built in an extensive way I just added everything as dependencies into the core project it made it super easy to work with but I still was able to isolate my code so what it means is that now like and why this is kind of gross is that I said the core project should never know about the plugins directly but you'll notice if I go into
here see the plugin SDK that's fine oh you know what I made these internal maybe not so bad in this case if you had other public types and stuff then your core project would be able to see them because it's depending on them now but because we're never going back into the core project and changing things it's extremely unlikely you're going to be like oh let me just go use something directly from this plugin so it's like it's kind of gross but you kind of avoid it at the same time but again this is just a way that if you're working in a smaller team or you don't have a full build system yet or whatever it happens to be you can get away with it um cerate was being worked on for about 3 years and it this pattern worked the entire time I
could go spin up new features and the cerate extremely fast because it was just like add a new project as a dependency to the core one and it was very isolated but Visual Studio would copy everything over hey just talked on the stream what are you working on uh so this is an asp.net core application and I was sharing that I'm basically uh this is content that will be going up for YouTube videos uh coming up this week so I'm trying to do a little bit better of not just live streaming like General software engineering advice which I'm very happy to answer questions on but a lot of my YouTube content is in C development asp.net cor and I wanted to basically walk people through here's how I'm building stuff here's what goes into like me putting YouTube videos together so you're not going to
see me record the YouTube video but getting the project ready to be able to walk through so what we were doing was modifying the previous example that had basically the precursor to a plugin system we pulled the plugins out into two different projects plugin one and plugin 2 and then from there and kind of if you just kind of showed up the last part I was talking about is well now that you have them as separate plugins what the heck do you do with them how does your your application know what to do and it just comes down to making sure that one they get built two they get copied and three their core application has code to go load them which is generally referred to as assembly scanning that's where we got to um all the errors and stuff you see at the bottom
of my screen they're never going away apparently but they don't exist so that's nice but that's that's mostly the gist of it so I said a couple of things along the way that I want to touch on and by the way as kind of working through some of these meta points and a bit of a summary here if you are just tuning in or you've been here for a little bit if you have questions either about what we're looking at so as.net cor C stuff happy to answer that if you want to know more like if you just have General software engineering questions like I've been programming for over 20 years I'm a principal engineering manager at Microsoft been doing that for four years but I've been managing teams of Engineers for 12 years um so I've seen some stuff big Tech and I had
a lot of time at startups before that building digital forensic software so um yeah I I basically you know I enjoy being able to help kind of share some experiences and help others so please feel free to ask questions as I do a little bit of a summary here on plugins so I mentioned earlier and like one of the things I wanted to talk about briefly was that the plugins all depend on autoa I don't really like that um I would really like to make it such that plugins you know the dependencies that they need to have are very very limited even having an SDK kind of project kind of like the max that I would want to do but you need to have some way to basically interface between a plugin and your core application right that's what it comes down to and you
need to think about how much should each of them know so for examp example this plugin is required to use autofact that's why it has a module on the end of it coming from autofact but the way that this plugin works is like it needs like literally the way it's set up it needs to be able to access the web application you could absolutely design hooking up routes to your web application in the exact opposite direction so you don't tell the Plugin or allow it to access the web application instead from the core application you have you say hey if you have routes tell me what they are I will register them for you so I like to think about this in a general terminology is like kind of like trust and responsibility now generally like for the plugin systems I build I'm building plug-in
systems where I have full trust because I'm the plugin developer that's not necessar a good practice in all situations especially if you have third party plugins right especially if that's the case so if you think about who's responsible for what like does it make sense that every plugin should have full access to your web application to be able to do whatever the heck it wants with it probably for a lot of the time no but like I said I have a full trust environment so for me it just makes it easier there's less Hoops to jump through let the plugins register routes however they want how did it take me four months to build a simple portfolio blog template don't don't beat yourself up over that um if you want like feel free if you like I don't want to force you to you know
write a whole bunch of stuff in the chat if you don't want to but like did you I don't know what your experience was before did you have challenges with the programming language or like where you following some type of tutorial or not following anything there's a lot of different reasons right so don't uh don't beat yourself up over that that's there's nothing wrong like if it takes you four months to do something and you saw someone else did it in one month or a week or something like whatever you're not them that's okay you know you might just be learning at a different pace you might be learning in different technology like it's totally fine I learned how options work and how to trade them based stats and for yeah just like different different skill sets it's okay right um if you want to
ask about any challenges that you have that feel free to share um well since you work at Microsoft you might be the most knowledgeable person I could ask this question how low level can you go with C on Windows okay um so spent hours fighting against the 130q API or trying to get Clos to the hardware okay U yeah there's basically when you need to get really really low level into windows uh people go well you can't use C the answer is yes you can um and you're kind of hinting at some of it right so one of the ways that you can do that is with what we call like P invokes and a p invoke allows you to to leverage unmanaged things or basically like uh system level calls right so to some other assemblies that exist on the machine and you can
access those things and they have lower level access there is a lot in C that you could probably do that I have never even tried especially with unsa code that would let you go do a bunch of stuff so I don't I actually don't have a lot of experience doing like a lot of different like low-level sorcery in C but I'll share this part with you because I think it's pretty relevant without like I'm not going to pretend to talk about things I don't know right so I want to share what I do know when I was building digital forensic software way that you want to think about this is like we were primarily I guess I shouldn't say primarily one of the things that makes digital forensic software very challenging and unique is a lot of the time thinking deleted data which means we
want to be able to go through hard drives kind of at the bite L right we want to go through literally every piece of information we can get not just asking the file system for the files that it has what happens if the files are deleted right what happens if uh you repartitioned a hard drive but you didn't zero parts of it out so we were able do all of that in C I've built hard disk imaging software in C um you know like you can you can build a whole lot of stuff that's pretty low level in C but at some point what ends up happening and even a lot in C itself there's going to be Parts where it's like it's calling into other like win32 things that behind the scenes right so um I don't have enough experience in C itself doing
very lowle things aside from what I was just explaining but I didn't have to use any weird tricks to do it um so now I know simply not trying to really low or get as close to Hardware on Windows but my C is making you C and windows and nothing lower level out of spite for abstraction FR C and win and kind of find a work rounds yeah um do you like more specifically um you have like specific things you're trying to do with C that like seem like they're low that you need help with because maybe I can answer that a little bit more directly with I sometimes I feel kind of bad if I'm giving you a very generic answer um was watching maybe I'll put the chat back up because people are being respectful now um go ahead and make this a
little bigger whoa that was too big um I was just watching a bunch of freelance design tutorial videos that's not as useful as ux stuff I guess you know about all the programming roles at Tech uh would you say they're non-pr PS becoming oh yeah for sure um this is uh so if you you're on Twitch okay I'm not trying to like you know totally just tell people oh go to YouTube but go to YouTube I have a bunch of videos on uh interviews with software engineers and I actually have a podcast that's called Dude where's my code because your questions specifically about principal software engineering manager um on my other channel which is called where's my code that's a podcast specifically around Engineering Management and a lot of the guests that we've had come on there including my co-host literally have non-traditional paths my
path is like extremely traditional was like in high school like yep I like programming I'm going to go to university for computer engineering I'm going to be a software engineer like blah blah blah I was very traditional uh my co-host on that podcast uh he changed his mind about what he wanted to do in school and stuff he wanted to software testing uh he was actually someone that I managed at the the digital forensic company he's a director at a software company now so like you know he and he did Engineering Management as well so like you know it's there's tons of non-traditional paths uh I wanted to draw something anything to the screen without ever using 132 apis or libraries yeah this is the thing like when you need to start messing with that kind of stuff like you're basically touching like Graphics drivers
right so now I'm way over my head see if I can make driver there you go yeah using wind driver us the load Jal modules okay so on this is the requirement that you have to draw directly to the screen or can you have a like a desktop application and use a surface in the desktop application to draw because if you're allowed to use WPF or Wind forms and basically have a canvas and you can paint to that then it's very easy um have to learn rust for building an eight F rust for build I don't know what an hft bot is can you elaborate on that um could you point me in the direction for learning about what kinds of rols and Fang I can get with this skill um I actually okay so let me let me back up so if we're hyperfocusing
on build oh high frequency trading okay interesting um okay uh couple things going on here high frequency trading like that's not going to be a thing at Big Tech so take the domain part out of it right so you can take the domain part of high frequency trading out of the conversation and then you look at okay I'm using rust and what types like what are the concepts and the four things that you're doing in high frequency trading right like you need to be able to think about performance it's performance critical right I don't know a lot about what the bot is doing but performance is going to be like number one I don't know if you're building something that's distributed that might be another thing but basically you're going to be thinking about latency a whole bunch and there's a lot of design optimizations
that go into that so for this kind of thing and in general I would say if you're building project there's going to be situations where you're building something and the domain is very much aligned to like where you want to get a job so for example like hey I've been building I'm just going to make this up right like I've been building CMS software and I'm I'm flying to a company that also builds CMS software like cool like there you go like it's it's relevant to the domain as well but like I got my job in digital forensics and I've never worked in digital forensics in my life I happen to be a c sh programmer and I could explain things well so that worked um so yeah you could you could say like you know even so I have a team at Microsoft um
you know people people get kind of nervous about this as C developers but I have a team at Microsoft and they're they're rust programmers they are C developers but they're learning rust for a project and it's not because we're replacing everything in Rust it's just because rust is better suited for what they're building so there's going to be situations and like more and more situations coming up where there's teams of people using rust right and they're looking for basically very high performance there's other characteristics about rust that they're interested in and being able to say that you have rust skills is probably going to be very helpful so if you can demonstrate on your resume that kind of thing that you have rust you've been building you know highly performance systems and tools and stuff like that I think that can be very helpful um
but when we say what kinds of roles software that's the role um so yeah yeah like I don't know when you say roles if you mean like which types of teams and stuff but that's going to be very there's like even in the area that I'm in there's hundreds of teams in Office 365 at Microsoft I don't even talking about Azure or Xbox or whatever else millions of other things we have at Microsoft just an Office 365 there's hundreds um simply directly interact with so visual buffer of the display yeah yeah it gets kind of weird right but I think that makes sense like the the display buffer right he finally managed to draw a square out to the screen would be really happy once you draw one square then you're it's game over right but um there is the thing is basically it's GDI
or you have like direct de and GDI I'm trying to trying to remember this because even when I was doing wind form this is going back too many years now um when when I was first developing in C it was all desktop applications and when you find yourself building windform applications like over and over and over you start to need to customize things and you can get um I'm almost positive that you could if you're using if you look for tutorials on GDI pretty sure you should be able to see if there's an opportunity that you can leverage C calling into some of those things but the way like it gets kind of weird because at least from my experience the only experience I have doing like that low level of drawing would be asking for a a window handle so everything that we have
and this has maybe changed since I've been doing uh desktop development but at least when I was everything that you see in Windows as the name might suggest there's like a window handle for all the different Windows you can move around and you would basically ask for one of those handles and it gives you a pointer to you know that window and then you're able to start doing Special things like that like you can uh intercept or control the drawing or like the paint routines for it so you could say like I have a handle to this window I'm going to be the one that paints to it and kind of gives you a canvas to work with so that's why I was asking like and maybe that is okay like just again to give you an example you're talking about directly going to the
screen buffer if you were allowed to make a and then again I don't know the requirements but if you could make a full screen borderless form and use that as a canvas it would look like you basically are writing directly to the screen you're just writing to a a window that's maximized and that would be full screen so I think GDI might be what you are interested in but um that's probably my guidance I feel like it's to do it in C as possible but you need the piece in between that lets you interface with it because I don't think the C libraries that that we get access to by default have that kind of thing so sorry that was a lot of rambling but I hope that helps a little bit I think that might be all the ending questions let me kind of
go back to summarizing some of the plugin stuff um keep going if you guys have questions I'll happy to to go over that um okay so on the plugin front where I had left off was talking talking about this idea about like who gets to know what about who which sounds kind of confusing but like does the plugin get the choice it's the skeleton application get the choice um and I was talking about like like crust right so making decisions about that if you have third party plugins you want to consider them like very low trust right extremely low so you would need to say like you give me things I'm interested in you as in the application you give me what I'm interested in otherwise like I'm not giving you anything that's one thing the other part it's whole autofact dependency thing I want
to build a tutorial and I'm going to do it in the coming weeks um I want to build a a tutorial that shows instead of having a module you would go to find some classes and stuff and we could even make it so that you don't have to have specific interfaces in the SDK uh we might still need markers actually we might not the markers are needed because of autoa for the record so oh sorry there's more questions coming in the chat here um yeah GDA 32 is the thing I'm basically trying to replicate manag to make it display pictures using actual pixels awesome local r r CMD so now I'm trying to do a step further not even use a d yeah that's that's a tricky situation but yeah like the DDI 32 thing like that's kind of where I would to so how
about like Edge team is there a sub team for working on performance so yeah like there's an edge is probably more than one team uh I I'm not familiar with what team works on like that's not even it's not even us there's a there's a Windows team that's not even in the same area as me and I'm sure there's more than one Windows team specifically so for us um even so Office 365 is the area that I'm in and we have a sort of foundational part of what we build that's called substrate and substrate is sort of the infrastructure that supports all of Office 365 Now teams individually are responsible for performance because you have your own app you know all the details about it your own service whatever right like you have you're going to be responsible for performance but with that said there
is also like a crosscutting performance team and there's a few like awesome experts and like it's mindboggling they'll you know I'll see them on emails pinging teams saying like hey like performance issue like go fix this and it's like they happen to be observing friends and they they could tell you just from looking at the trends like they're it's so amazing how how quick they're able to react to stuff and and be like it's probably this like you have a regression here like go check this or um we had something recently where there was like garbage collection settings change and they were able to say like right away like boom you know this is what happened go check it out so yeah I don't know if Edge has um like there I would imagine Edge team or teams are responsible for performance themselves but they
might also have a dedicated performance team I don't know the answer to that unfortunately um the best way to find out best ways first is like if there's a job available the Microsoft careers page is the place to go um I always feel bad about this but um like I advertise I am a principal soft engineering manager at Microsoft I do that for credibility so that you know that I have some experience but the the tradeoff with with that is that people will message me and they'll say hey like can I get a job I'm like well the way to do that and it's the same way that it works internally at Microsoft it's the Microsoft careers page feels bad saying that because I think people kind of want more because they're reaching out to me personally and I'm like I just I don't have
that like you have to go to the careers page the other thing that you could do is you could try to see on LinkedIn if you have um connections where you can find people that are working on Ed how you do that I'm not exactly sure but if you spend some time on social media you might find some people working on edge you can even ask on Twitter or LinkedIn like hey does anyone know um like for example if I were reading this on LinkedIn like if I came across it if I if I happen to know someone working on the edge team I would TR in I don't though so you might be able to try that and see if you can get some connections and then ask those individuals and say Hey you know you if you reach out to people and you
are not making demands or anything but if you're like hey I'm genuinely curious I have an interest in this area would you mind like would you mind sharing like is there a performance team because I think that's the kind of thing that I would be interested in and if you're you know kind to people and not demanding I think they're happy to answer so that might be an approach to the pry cool I will keep going here um the last part I was saying was basically just about being able to load plugins via reflection I was kind of getting it the fact that this marker type of idea comes from me trying to load stuff through autofact it forces the order that I'm trying to load things in because if I didn't have this then cor application might say well I don't need to request
anything from here therefore autofac will not force this to be resolved there's other tricks you can do this is one of them um if we move away from having Auto dependency then the core itself would need to say okay let me go look inside of these other assemblies and look for things specifically so it kind of changes who's responsible and it could say go ask this uh assembly does it have a type and you could maybe do something like with names so any plugin needs to be called like Dev leader plugin right and you would look for types that have a prefix with it you can come up with your own rules for loading plugins use reflection to go find those pieces and then you could say cool anyone that has a de leader plugin they must have a public method on it it's called
initialize that takes no parameters and I'm going to invoke that manually again through reflection so you could move away from having like concrete interfaces you depend on you could totally do that there's lots of different things we could do here so um I want to try making some tutorials on that just to show people that you're you know the way that I'm showing if you're like I hate that I wouldn't want to use that I might be able to show you another way where you're like oh that's more flexibility so there's some ideas I really hope I can build a Blog much quicker next time don't yeah don't be yourself up with it man it's okay um you know um maybe you don't mind sharing what was uh what did you find was the most challenging about building your blog because maybe there's maybe there's
an underlying theme there that we could talk about and see if there's a way to help no pressure of course right um by the way if I ask questions take too long answers even if you want to stop asking questions yeah no don't worry I'm I'm basically about to wrap up the stream right now so um like I said I'm happy to just answer stuff like right so I'll I'll put this back to full camera I think it's probably G to do the stupid thing where it hides my face for a sec uh here we go um and let's Maybe move over and we'll make this chat a little bigger yeah we can spend time just going through questions I got to be on this side there we go um spending two weeks browsing other people's portfolios another two weeks reading through the material design
Okay and like I know you're you're probably still typing but even when I hear that this over man this is confusing um it's mirrored so it feels really weird um yeah but I mean like so when I see like brow spend two weeks browsing and two weeks reading like to me that's I don't want this to sound harsh I'm uh it's just going to be the word choice so I apologize but that's four weeks that's a full month of not doing anything and I say not doing anything as in like you're not making anything in that time right another two weeks learning G Fe the week browsing okay so you're when you start to say learning like I guess what I'm wondering is like how far along did you start to to make things like to start to code right so I'm not I'm not
you know the the wording Choice I'm not trying to to pick on you or anything like that that's not my intention at all but um the sometimes from conversations I've had sometimes it can feel like again I'm looking at the first four weeks you've described um sometimes it feels like I'm I'm making progress because I'm spending time reading and stuff like that but the reality is like reading material watching material can be helpful but it shouldn't be the core of what you're doing right so if you can as soon as possible start writing the code like you need to be spending the time messing up and you know figuring things out like kind of feeling like you're in the deep end and trying to get out of it like it helps so much so I would say like the next time you're going to build
something if you see other people's code like proba floing it and building it and then modifying it right try to break it try to say okay I see this works I want to delete all these Pages I'm going to start from scratch with just a core part of it like try to find that core part of it but you want to be in the code using it trying some stuff out because if you go a full month and you haven't been writing code much or at all through that time period someone I don't I'm not like a I don't have stats on this stuff but someone shared a stat that was like after X amount of days like your brain will forget like x% of what you were reading and I don't know if that's true or not but to me it feels like it's
a true thing like you got to be practicing this stuff um but yeah I think like honestly I think that's what it comes down to is like it takes time to to practice and um to learn right and I see and and sorry I I'm not trying to pick on you when I say this so please don't take it that way it's more of just like a an observation right I see a lot of the time when people are getting started or they're trying something new it's like I'm going to spend more time reading and watching and trying to collect all the information before I get going and some amount is okay because if you're like I don't know what language I want to pick you do a bit of research or something like I think that's totally fine but you you got to kind
of jump into it sooner I would say I think that would be my biggest takeaway from what I see you describing there because the sooner you're getting into it the sooner you're like what things do I have to focus on because sometimes when you're reading and collecting information most of it or a lot of it doesn't really matter and that's why you're spending the time and kind of just like throwing it out after you think career-wise should focus on the more applicable practical stuff using popular leads or Frameworks or could I still gety focus on those kind of Niche technically fun but useless coding projects um so I have my opinions about this and maybe they don't align with other people based on the market and stuff for jobs and stuff um okay my I I want to be able to like kind of r
this and try to put mys before I start things out but I am a believer that if you're building stuff that you think is fun that like that is one of the best ways that you can learn and build experience one of the best ways and I say that because like to be getting better at being a software developer you have to be coding stuff right you can you can read things you can watch like you're watching a stream right now right like not is extra that's nice um but like I'll give you an example if you were like Co I'm I'm watch I came across this guy's stream I'm G to watch Dev leader do some some coding and stuff and like that's my coding practice for the day like no it's not you know if you weren't coding alongside with me trying to
build a plugin application like you didn't practice it so I think if you were able to find things we like getting excited about building them there's almost nothing better than that because you're going to get stuck and then you're going to be motivated to solve the problem and you're going to get stuck again and you're going to be like man I just want this to work it's so cool like that's why when people talk about building video games that's how I like like try to get started right I think a lot of people are like man I'm gonna build a video I'm gonna build an MMO I'm gonna build the next World of Warcraft and like no you're not but you should cry because it's super fun so I think that focusing on like maybe some Niche stuff that's fun for you like I think
that can be great because things you want to be doing is learning general principles and practices and getting the experience building stuff the specific technology you pick the specific language specific Tex stack it's not going to be a make or break thing now the difference in the caveat that I want to add here is especially with the tech Market having some applicable skills like for example if you know react in JavaScript there are probably lots of jobs where you can be you know suitable for them there's also going to be a like a bajillion candidates that are also suitable for them so you know it kind of goes both ways but when it comes to learning and improving honestly I think focusing on stuff that interests you and just making sure you're coding making sure you're finding situations where you're getting stuck and going okay
how do I get out of this like that's really The Sweet Spot so build stuff and then try to stretch yourself a little bit right like hey I built it that's cool how do I how do I add more functionality how do I build another thing that's more challenging and just keep doing it find interesting things I think it's a great way to do it I guess it took a while to refresh my rack stuff I have to build Traders trades monit dasb to if I want to okay yeah going through my Google activity history color theory was new to me at the time yeah so it's okay right like if it's going to take you some extra time like another good skill to build is like is reflection okay so I think this is a good opportunity to try this um what and maybe
I'll I'll do a bit of a tangent here to kind of talk about this like you'll hear about like you know agile software development waterfall methodology blah blah blah um I I generally try to look at like agile software development but in terms of like labeling things I actually don't care anymore because people get too hung up on like oh that's not the exact rules like I don't care um I focus on just like strictly continuous Improvement because I think that that's a philosophy that I really believe in for teams for products and for individuals so in this case if you're you know you're reflecting on something you're going man that took me four months and I'm not happy with that right and I'm I'm trying to tell you like I think that's okay like don't worry but at the same time like truly if
you're unhappy with something it's a great opportunity to practice this right what was your expectation what was not meant about your expectation and then try to work and think through like what are some things that work well and what are some things that didn't work well and from there what you can try to do is come up with some ideas about what you might change next time twak a couple of variables the next time you go to learn something and work on a project see if you do things differently if it improves for you right but you have to go through this reflection process and trying to be critical about what can I try to change and we do this a lot in software engineering on teams maybe not all teams but I think it's very beneficial to do and it's usually called like a
retrospective right some people hate this because they go it's just another meeting and I would say that retrospectives where you're not having like good conversations about what's going on they feel like just another meeting like it's like why are we here why are we doing this but what can be really cool is when you're really close with your teammates and you're getting kind of passionate about like things that bothered you or you're really excited about things that work well those are good retrospectives because you're going to drive some type of action that comes out of that like man it was really good when you know you were pinging Us in the chat and we were following up on the the poll request like it actually felt like we were getting momentum with getting our stuff done like we should try making uh you know for
the next Sprint or two we should try practicing like doing that let's tag each other in the chat when the poll requests go up because we seem to be missing the email notifications and we'll see how that goes and see if we feel like just as good next time or the other way you pick things you hate right I hated that you were tagging me in the poll requests it was distracting um you know let's try not doing that and see if it gets better so I think that those are like just an example of like what you could be doing to try and do some critical reflection hello there on Kick we're getting close to wrapping up the stream if you have questions about you got I need help sir let's hear it nothing vulgar I'm gonna mute this chat but happy to try
and answer we'll see uh says you can help me but I think that might need to be a question I don't I have no idea if I can help you yet um can I put web design on my resume if I basically copy some designer portfolio design so I would say like like should you like probably not like I I think um I okay if you the way that I would frame this is kind of like a from a moral standpoint because it's I can't answer this for you do you feel like if someone said I need you to do graphic design work or sorry um web design work do you feel like if someone said this is your job you're responsible for this and I need you to deliver on this project that's doing web design if you feel like oh man like I
don't think I could do that then you might want to think about how you frame it in your resume because that's what's going to be happening if you feel like I think I can do it it's going to be challenging but I'm very like I'm I'm confident I can make it work then like I would say yeah like now the next part is that okay if someone's trying to validate whether or not you can think about what examples you're going to give because if the only example you have is I just copied I might say well might not feel so great so just be ready to to kind of think through that and sry not on the typography and color theory I've never studied anything like that um a lot of my frontend development was about using the Microsoft Technology so Wind forms and WPF
but then I'd work with a a graphic designer and a ux designer to kind of make sure that all of the pieces could come together the way they want so they had to do all that work uh um yeah for modifying your DNS uh probably a little bit outside of the realm of this conversation to be honest um you best thing I would recommend is search on The Good Old Faithful Google or Bing if you're a a Microsoft supporter um and and check it out but yeah I'm not going to be familiar with your host for modifying the DNS sorry about that yeah color theory and that kind of stuff I'm not totally familiar with like I said it's uh a lot of I'm I notice a lot developers up and coming now where there's a lot of front end development and as a result
you have ux you have you know graphic design and stuff like that it's a lot of stuff I just never had to to do right so I understand Concepts behind what can make a good user experience uh especially like flows of things like like kind of like a developing a wizard where you click through and you have to make sure you have like what information do you want to collect when and how do you make that not feel terrible but when it comes to how it looks and feels like no not not a skill I have unfortunately I'm not uh I'm not really I don't know it's not something not a skill that I've developed even though I was doing it for many years it's like not it's not intuitive for how my brain works to think about what would look good and then make
it reality so if someone else puts that together I I'm like sure you tell me how you want it to look I could go do that that's no problem so sorry I don't have any more advice on that part okay this is a big question let's read it um this question might be specific to people still learning uh but how do you even figure out prerequisites to a project for example I tried to make a compiler while I was still doing my first semester of Cs degree fail miserably starting fing classes so how do you kind of know that you should attempt a project at your current level engage when you could this is it's an interesting question I need to sip some water because I'm dying talking too much um okay there's a very general answer to this question and got to hear me
out because you might be like oh man this gu just just saying stuff to fill the air but like the idea with most things in software engineering is that we can decompose the problems and this is like a a very beneficial skill to have because you have to use it all the time all the time so in this case for example I tried to make a compiler when I was still doing my first semester first of all I hope that this was a I hope this was an assignment and or something that you were curious about trying to do and not something that you were forced into because it's yeah making a compiler is not easy I I don't know how to make a compiler right I've been programming for 21 years I I can't make a compiler um what would it compile into like
x86 instruction set or something I don't know right so um bit of a tangent sorry but the idea is like your question like what prerequisites go into it if your if your goal and I like to kind of add this for context for people uh because you did say for people still learning right if your goal is to be learning what I like to remind people is that having a fully functional finished product that you could go ship and sell on the Internet or get people to use it like to me that's not the goal it sounds maybe kind of silly because you're like well why wouldn't you want that sure like you could want that but I don't think it's the goal the goal is to learn and I think it's an important reframing so no as a personal project okay well I'm sorry
I'm sorry that you decided to go build a compiler that's the first that's the first mistake no I'm just teasing but going back to what I was saying you are going to find that you need to think about the goal of what you're trying to build right if the goal is just to learn then s and this is going to sound maybe fous or silly but if the goal is to learn if you are getting stuck and then making incremental progress you are learning you are accomplishing your goal doesn't feel good doesn't feel good if you think that your goal is to have a finished fully working compiler that has optimized code because that's not what the goal was right like it's it's the wrong goal if you went into it saying this is the goal I want to have a a fully functional optimized
compiler then I would say well your best bet is to go find someone else to build that for you go find an expert that can do it but the goal here was to learn it right so when the goal is to learn what we can start to do and we do this in general and software engineering but in particular you can think about just the pieces right so what pieces make up bigger part that we're trying to build a compiler man I don't even know where to start with this one it's it's a it's a complicated thing you're going to need something to be able to parse you need like a grammar I don't even know what you were trying to compile so like were you making your own programming language and like what was the output of that supposed to be there's a lot
going on with that it's that's a very complicated thing to go build but you could build like and I don't know how much you were trying to include into the compiler but you could go make a parser that goes and looks at the Sy pcts and then tries to figure out like you know with a really simple grammar can I go understand this programming language and sorry on the the host on the website thing man I can't help you with that I'm sorry um I would need way more context and I don't think I'm going to be able to debug it live on a call here unfortunately I'm not tech support uh I wish I could help with that but I don't think I can do that so the talk about um okay but so yeah simple simple compiler simple programming language abstracts uh syntax
right like this is actually a this is a really complicated thing to build um so in general when we try to do this right you're kind of saying it right here um simple language so you need something to be able to parse right but there's different parts in the compiler are like this kind of organization of pieces we're talking about you need to be able to parse the information you're going to need something that can do the translation into I I don't know if it was more than just the syntax Tre after but you want to break problems down into smaller solvable problems that's kind of what I'm trying to get at here so it's two parts right one is like if your goal is learning that's the goal don't worry right don't worry if it's not finished don't worry if it's not optimal if
your goal is learning if you are learning while you're doing it which means getting stuck then you're getting somewhere with learning but you do want to think about your systems that you're trying to build or applications and break them into smaller pieces so pick if you pick another example like how do we you your question was like how do we know if we have the prerequisites to go build that pick a pick a website right you want to make your own you want to make your own Facebook Okay Facebook's a website okay there's going to be some type of web technology in there so probably some type of web client and some type of server to start okay you might say don't even know how to build any type of web front end stuff okay Park that for now or maybe that's what you do
know how to build you're like I played with HTML and CSS okay maybe go build some build some of the front end right start to do that okay you get a little bit you know move along with it well what are the other parts you need well we did say we need a server okay well if we wanted to go build what goes into building your own Facebook we need like user accounts we're going to have to have some type of Authentication oh that sounds complicated okay what if I just try making it so like one user who's mean can go post something hey what does that mean well you know we're going to need the ability to type in some information somewhere save it somewhere like what I'm getting at with this is you need to think about the different parts and keep breaking
it down into smaller and smaller parts when you can practice doing that then you can try to work on the different pieces and honestly like I said at the goal if the goal was truly just for learning you might start building some of those pieces and go wow this is really cool I want to learn more about this and you kind of forget the building your own Facebook thing you're like this is cool I'm just gonna I'm G to work on playing around with you know SQL databases because this is fun or maybe you hate doing that and you're like I tried out you know building an asp.net for website and like that was really fun like I'm just going to keep doing that like you might pivot and it's okay when you're learning right so that might not have been the answer you want
but my point is like decompose problems and if your goal is learning keep getting stuck and trying to make incremental progress [Music] um I yeah sorry some of the stuff you're saying for the the web tech there I'm not totally familiar hover your mouse over something a little animation oh is that word for that it has a funny name I'm pretty sure uh because it's like a small subtle animation that just kind of indicates that something's happening but anyway that's some stuff outside of my wheelhouse so on the um on the compiler thing sorry if that wasn't a the answer you wanted but that's kind of my recommendation is like um plan to get stuck and people like you know for resumes and stuff people are like oh well how do I make sure I have a good project my resume my opinion my opinion
is like if you're telling me about stuff on your resume that you tried to build like I don't care if it didn't go make you a million dollars and whatever like you're selling it to people I don't care someone reading a resume what I care about is like you know what did what did you try to build tell me what you were trying to learn where did you get stuck how did you get unstuck you know why were you building it in the first place like what what were you trying to learn about I care about that stuff like is it impressive if you were like oh sure like the very first website I built I had a million users like sure that's that's impressive that's cool but like I don't know like that's not why I'm trying to hire you we have our own
products and services right so it's about different skill sets I'm trying to personally I'm trying to see like are you putting effort into learning are you able to learn are you like are you you know interested in that because a lot of the time like if people are very coachable and they're interested then I think that that's like you know a great skill set to have uh yeah I'm probably just for reference I might not be clicking links in the chat uh I'm relatively new to streaming I'm just not like not keen on that right now but um I mean if you're like I want to be able to kind of support you here right if you're trying to work more on your web design and stuff I I encourage you um oh was a question would Fang hire me this is not like a
I think this is maybe the wrong type of question to be asking and again this is probably something you don't want to hear but I just think it's the wrong type of question to be asking um if you are set on working in a big tech company if you're set working in a big tech company uh what I would highly recommend you think about is like how I have um I see you're on Twitch I have if you go to my YouTube channel I have three live streams each one's about an hour long and I talk about what I recommend people do including three phases one is how you try to stand out so that you can basically get interviews the next part is how you go through interviews and then the third part is what you should be doing when you're working and to
some of the questions and the comments that you're putting in the chat here one of my recommendations is like how do you stand out right so if you're saying if I if I go build a website like this will I stand out I don't know do you think that there are other people building the similar things like you need to be able to elaborate about what makes you unique and stand out or else what's happening is that there's going to be so many other people with a resume that looks just like yours that it's very difficult to even get the interview in the first place this is one of the side effects of working or trying to apply for big tech jobs is just the volume of people applying especially right now with the way that the the job market is it's very challenging because
there's so much volume I don't think that it makes sense for everyone to have the end goal to be in big Tech and that's not because it's gatekeeping or anything like that I think that people see it as like potentially this is an end State like this must be the best place to work that's not necessarily true some people if they were working in big Tech they might hate it right I but even from being at Microsoft for years in terms of like startup culture and things like that the work culture at startups is something that I'm very much aligned to like personally as an individual but as as an adult that now has a wife right and I'm trying to be more responsible I need to balance my time more accordingly so because I align with startups I love pouring my time into projects
but like realistically I need to have more balanced my life now so um that can look different I know at a startup I would feel guilty if I were trying to like leave on time kind of thing I'd be like know the company needs me at Microsoft I don't feel that guilt so it looks different for different people yeah like this is the thing right there's when you have a lot of competition when you have a lot of competition people are going to be setting the bar higher and higher um there are absolutely places still hiring for entry level with no work experience um and I can say that with confidence because it makes absolutely no sense to staff teams uh across the board for entire companies uh and across different companies with no entry level people and I mean entry level with no experience
the reason why that's the case is because you need to be able to have a different range of skills and experiences across your teams I say this as an engineering manager like I said with with confidence I've been doing this for 12 years if you think about it right so we put our our team building hats on and we say I want to build the best team that I can do you just go hire like the most top level developers in the world that are all you know 40 years of experience and you're like I'm going to build this super St a team like it it doesn't work that way and it doesn't work that way because people have different goals and career aspirations that require different things across levels so if you were to have like at Microsoft if we had all princip like
partner level Engineers so above my level on a team they wouldn't have the types of opportunities all on the same team that would keep them engaged same thing with all principal level even all senior level but then when you start to say okay well we're going to have all Junior then you might be in a position where you're like okay well there's not enough skill or competencies on the team but if you have a distribution of this then it works really well and you might skew the distribution right like so it's like not you know a team of 10 people and nine of them are fresh out of college or boot camps and one of them is like super you know principal level or higher it's like you have to have it balanced out so there are going to be companies that hire you know
with with no prior work experience but the way that you stand out there is that you're able to demonstrate that you've been building things because you don't have work experience how do you stand out and it doesn't have to be building things either but you need to be able to find ways to stand out that's the challenging part I'm not trying to minimize it it's definitely challenging and I guess like reading what you're saying too if you're getting into the interviews that's one thing right because a lot of people don't even get that far so if you're getting into the interviews then at least you're getting noticed what I would try doing is asking for feedback in your interviews right if you're not getting the jobs after interviewing ask if you said you did 200 interviews and you got feedback from 1% of them which
would be ridiculously low but if you did you'd have two people that told you things to improve right and I think that you would have a higher than 1% success rate on getting feedback so I think if you're truly getting that many interviews which seems pretty staggering that's like a lot of interviews um yeah I would I would work on getting the feedback you're you're getting past the part where you're not getting interviews so that's good the next part is now that you're getting them how do you refine that okay folks I'm G to log off here I hope this was helpful uh I got to get to WR my newsletter that goes out in a few hours so good thing I know what the topic is but thank you very much for for timing in with the questions if you like this kind of
thing um you know if you're on Twitch like or if you're you know watching it on YouTube just uh you know follow along I'm going to try to do this a little bit more often the regular streaming schedule so far because I'm trying to build up to more the regular schedule is Monday nights 9:30 p.m. PST Pacific time um I try to make that my guaranteed stream for the week that is generally a software engineering topic very general so not focused on C and stuff like I was doing and then over time I'm going to try to introduce more streams kind of like this one throughout the week and try to get another day where I can have a regular schedule um it might be like in the morning my time and that way I can kind of get audiences across the world so thank
you again for watching um I do appreciate it like I said if you like this kind of thing um definitely Subs subcribe and you'll see more of it and I I do appreciate the chat so thanks
Frequently Asked Questions
What is the main topic of the live coding session?
In this live coding session, I'm focusing on demonstrating how to implement plugin loading in ASP.NET Core using Autofac. I'll be showing how to set up dependencies for plugins and how they can register routes within the application.
Why do you prefer using Autofac over the built-in dependency injection in ASP.NET Core?
I prefer using Autofac because I find it to be more advanced and feature-rich compared to the built-in dependency injection system. While the built-in system has improved significantly, I have always been comfortable with Autofac and feel that it meets my needs better.
How can I get started with software architecture if I'm a junior developer?
As a junior developer, I recommend getting involved in design discussions and understanding the types of activities that software architects engage in. Participate proactively in design documents and discussions, and try to learn about the broader architectural decisions that affect multiple teams.
These FAQs were generated by AI from the video transcript.