Let's continue to build some awesome stuff in the Copilot CLI! As a Visual Studio user for many years, it's important that I practice getting out of my environment... at least a little bit!
As with all livestreams, I'm looking forward to answering YOUR questions! So join me live and ask in the chat, or you can comment now, and I can try to get it answered while I stream.
View Transcript
Can you guys hear this? Yeah, you can because I can see it. It's just not my right microphone. So, why is that not working? Um, I never touch my microphone settings ever. Like, it's been it's been like a year since I've touched my microphone. Um, what happens if I switch it? Okay. Well, is this tolerable? Because I I can't really explain without moving my camera, and that's that's not going to happen. Um, this microphone is literally located under my keyboard so that I can talk to AI. Um, and so the quality is not going to be as good as this microphone, but uh I figured no audio versus that one is probably better. So I don't know what's up with my microphone. Um, very very Oh, I think it somehow got muted. Give me one more sec. I'm so sorry because I know this is
a pain in the butt. We're gonna We're gonna try one more time. Testing. Oh, we're back in business. Yeah. So, um if you mute your microphone, it doesn't work. That's uh that's today's live stream. The end. Sorry about that. Okay. So, what I was saying was we're we're gonna be I was just complaining about the streaming platform, so you didn't really miss anything. Um, you got to watch me be a dummy. That's okay. So, uh, this stream we're going to do like we did last week. We're going to be coding with the C-pilot CLI. Uh, what I was joking and rambling about was why the C-pilot CLI? Why not Claude? Why not something else? Um, no good reason. I've just been playing with the C-pilot CLI for a little bit now. Um, I know the first thing that most people will go to is, "Oh,
it's because you work at Microsoft. if you're trying to push the co-pilot CLI. Uh, no, I'm just uh trying different things out so that I can keep playing with AI tools and learn more about them. So, uh, I used Claude a lot last year. Um, and so like Claude and Visual Studio are two things I I go between a lot. Um, but I wanted to play around with the Copilot CLI a little bit more uh, recently. Let me block this person from chat. And so, um, Copilot CLI is what I'm playing with. I need to carve out time for codeex because I've still never used codecs and I really want to play with it. And so C-Pilot CLI for me recently has been really cool because um what I was saying while my microphone wasn't working, I'm going to say it wasn't working like it
was broken, not because I was silly and had my microphone muted. Um while the mic wasn't working, I was saying that I'm an IDE user, right? I use Visual Studio. I'm a C and .NET developer. I've been using Visual Studio as long as I've been able to walk kind of thing. So, I don't like working at a terminal. I don't like working in a console. And that was the same when I was using Claude, right? Like, it's just not how I like to build. But I've for some reason and when I filmed on Code Commute this morning I was talking about I don't really know the reason why but Copilot CLI's kind of like got me back into using a terminal kind of like I was using Claude before and it's been enjoyable. So um we're going to use it. Um I'm going to walk
through well I don't actually know exactly what we're going to build. We're going to use Needler. And so Neidler is the dependency scanning uh sort of system I've built that I use for like plugins and discovery and stuff like that. So um I didn't like reinvent dependency injection. I keep wanting to describe it as a dependency injection framework, but then I feel kind of silly because I'm not like sitting here trying to claim like I made a new dependency injection system. I didn't. I just made a thing that scans for me that looks for types, registers them in a common way. I like using it. Um, so I want to be very clear. My goal with making, you know, this this live stream and some of the videos I've done on YouTube recently, my goal is not to convince you to go use Needler. I
don't care. Uh, I think many people probably don't want to use it and won't enjoy it, and that's totally fine. But I think it's pretty cool to be able to work through some stuff, and we can see how co-pilot will work for us. So, what I'm going to do because I ramble a lot is try to stop rambling. We're going to switch over. I'm going to put the uh the repository for needler in the chat so you can see it if you're interested. Um, it's just on my GitHub if you go to my GitHubler. Uh, and I spelled it all catchy like there's no it's not er, it's just R because that makes it catchy automatically. And we're going to pull up Copilot. And I'm going to flip my screens over here. So hopefully we can see some stuff. Right, there's the co-pilot window. Um,
but this is just the the GitHub page. It's got this little guy on it, right? Super super cool. And um, yeah, so a lot of what you'll see in this repository is actually uh built by Copilot. Um, and obviously Claude before I was kind of using co-pilot a little bit more and uh before that some co-pilot like GitHub copilot in the cloud. Um, yeah, Ryan, good to see you. And yes, the spelling is unique just like me. That's right. Uh, so a lot of the features and stuff I've been building recently have been um completely driven by like there's so many commits on here now. Um, and I guess it's kind of silly because uh when I was using C-Pilot in in GitHub, like it will put C-pilot, right? Like as the author, but like all of these say they're me and um if you
see like anything in here that's like fix migrate or you know feat fix blah docs like nope that's copilot. Um all of it all of it's co-pilot. So uh it's been really cool. Uh, it's been working really well. And, um, one of the things I I just wanted to kind of say on this stream because I was mentioning that I was talking about this on code commute this morning. Um, let me kind of flip back so I can talk with my hands a bit. But I I asked this on LinkedIn and every other platform as well, but on LinkedIn I get more people responding. But I did a survey and I had asked people when you are having AI generate code for you like like compared to a normal developer or not like how much are you scrutinizing this code right like when you go
to review it what's that look like and it's it seems like it's quite split between like heavily scrutinized and the it's basically tied for like treat it like any other developer which is super interesting cuz I thought there'd be I don't know which way but I thought there'd be like a bigger separation But it seems very much like uh those are pretty close. And so on code commute I was talking about this where I said that you know for you guys if you've watched the live streams before you kind of know the stuff I talk about like I build brand ghost and when I use co-pilot in brand ghost or any AI tools I have to scrutinize it really heavily because I notice that it's easy to get lost in the feature development. like sometimes it like um kind of goes crazy with architectural patterns
or the opposite like it just completely misses things. Um I was doing a feature uh earlier I kicked it off before this stream co-pilot uh I I used GitHub Copilot like in GitHub. It ran and I would say it got the feature I haven't actually run it myself but I think it got the feature what I would consider like 85 to 90% of the way there. My review comments were very minor, like, "Hey, you have a string here and I use a lot of strongly typed IDs. I think this should be a strongly typed ID." Or you used, you know, you're pulling stuff from app settings with this config class and you made it so that this parameter is mandatory to be specified, but we can have a default here. Like, would it have worked? Sure. like it would have been fine, but I'm kind
of being I think rightfully so like a little nitpicky because I don't want to go change it myself later. I just like get it done right now. So, um, in Brand Ghost, I have to be pretty picky and I've been finding in needler like it breaks stuff all the time and then instead of me going like, "Oh crap, how am I going to rewind all these commits?" I'm just kind of pushing through with it and I'm like, "Hey man, we built this feature. I gave you, you know, these guidelines and you actually missed them like in some of these steps." It's my fault, too, because I should be reviewing it better and catching some of these issues. But instead of, like I said, rewinding, I just tell it, explain it, and then we just push forward. And it's been really cool that it is able
to kind of go, okay, like let's get this thing back on track. So, um, let's see. Sorry, I'm just catching up on the chat here. Ryan says, "So, I have a question for you. Aside project mine is horribly designed, not set up in the clean code or other frameworks." Okay. What's your feeling of having a refactor entire solution to be styled in a standard architecture like clean code or whatever else? Um, so, okay, I would say for something like this, especially because you're calling it a side project, right? If this was uh you know something that was being shipped to customers and this was a business I would say my answer would be very different here because when I think about at least businesses I want to make sure that we're doing whatever we can to sustainably deliver value. So what I'm about to tell
you I think is in the face of that like it would not line up. Um, and so my suggestion is like if you have it all committed, right? It's all committed. You got it pushed up to a remote branch. I would say it might be a really fun experiment. I don't know how much code we're talking about here because obviously the more code there is, the more of a pain in the butt, but I would basically sit down with AI, have a conversation with it, you know, go into plan mode. Let me just kind of flip my screen for a sec, but like I would, and you don't have to use co-pilot, use whatever you want, right? But like go into some plan mode. Cursor has plan mode. Copilot CLI has clan uh plan mode. Uh Claude has plan mode. Uh I think Visual Studio
fullon might have plan mode now. It should if it doesn't. I don't know why it wouldn't. And VS Code has it. So get into plan mode and then like I would basically talk to AI about about the state of your codebase. Ask it to analyze it. Pick up on patterns. basically get it to build a like a I don't want to call it a mental model but for lack of better word mental model of your current codebase and then have a conversation with it in plan mode about like where you want it to be right so the whatever types of architectural patterns like for me I love plug-in architecture so I would say hey I want to move this thing to be more modular I want plugins uh here's like what I'm thinking about plugins if you want like clean architecture or hexagon or whatever
you want to do, describe it and then I would spend some time going back and forth in the conversation uh with your your favorite LLM. Uh have it build up sort of a a plan of what that looks like. Um and you could you could say like maybe start with just as an example like walk through what this would look like as a finished product, right? So you can look at that. Uh obviously it's not going to be done, but like walking through an idea of what that looks like could give you some perspective of like is that what you want? Right? Are you describing an ideal state? And I think for me, I like that because I can try to go here's where we are because you understand that. Here's what I'm seeing as an example of where we could be. And if that
feels good, if you're like, yeah, like I think I really like the layout of that. If not, you know, keep having the conversation. But once you land on something, then it gets interesting. Be well, even more interesting because now you can work with your your LLM of choice and try to figure out how do you get there? And there's a lot of options, right? You could say like, I don't know, run it in a Ralph loop or something until it looks like this. Uh you could say, okay, cool. Um I'm going to stay in plan mode now that we have a finished product idea, for lack of better phrasing. and then like how do I take steps to incrementally get there, right? So, I I think it could be an awesome, you know, experiment to try. Um, depending on your familiarity with the tooling you're
using. Um, like I would recommend doing something where you're like incrementally getting there. It might take way more steps. It might take longer to like get through, but uh, personally I would much rather this is like how I do any software development. I would rather see incremental improvements um moving in the right direction because maybe partway through I'm like now that I see this maybe I do want to steer a little bit differently. So um I think you could totally do it. Um yeah, that's kind of what I might recommend as a fun experiment to try. Um Devin says, "I've been having a good success with scaffolding projects, folders, and some highle classes. Seems to be as good as or better than uh instructions files." Interesting. Uh, TBD Gamer, I've got to the point that I only really work with small pieces of code. Um,
and the wider I let the AI tools go, the less I trusted. Okay. Yeah. Yep. Tinkered with building many new projects and working with some existing code bases. Claude and Copilot have been my go-tos. Awesome. And Deon kind of corrected himself as a scaffold by hand. Um, cool. Yeah. Yeah. Okay. Let's uh let's maybe kind of flip over to Oops. That's not what I want to do. I wanted to just move my window. There's too many things to click. So, what I'm thinking we're going to try out couple things. Um, before I got on this stream, one of the things I was trying to do was I have this documentation that gets generated. Yes, it looks basically just like like this. Uh, but there's a little bit more interaction that we can do. Uh, because uh I think last night, yesterday um I was spending
some time getting benchmarks running. So now on like separate from in GitHub, I have this page if you pay attention to the URL. I know the text is small and I'm flipping back and forth, but um GitHub and then this is just uh my domain and so I have this GitHub pages thing set up for needler has the documentation and it will go print out the benchmarks which is pretty cool. Um the goal with the benchmarks is not to try and say like look how fast needler is compared to other things because in some cases it's actually slower, right? Like that's the goal is not for it to be completely the fastest thing. Like if I have the benchmarks, cool, I can chip away at that. Um, but I had, you know, this everything you're seeing on my screen right now is is vibecoded with
Copilot CLI to be able to drop drop my benchmark results into here. Uh, if I don't run the benchmarks on code for a week and there's new changes since the last time, every week, once a week, it will go run the new benchmarks and update here, which is pretty cool. Um, because I don't run the benchmarks on every commit. Not worth it. But anyway, this is all vibe coded. I thought it was pretty cool. Um, could probably do some better navigation and stuff. I don't know anything about HTML though. Um, hyperlinks, JavaScript stuff. Um, and so the last thing I was just working on before this though was getting an actual API reference in place. And this is vibecoded. It's very obviously vibe coded because it's completely busted. So, um, before I got on the stream, this list of packages was like the same two
thing, two or three things like over and over times 100. I don't know how it even decided to get there. Um, and this is still broken. So, it's cool because it's getting there. Let's pick um, you know, Source Gen. We can go into Sorus Gen. We can go into this. And so, like this is pretty neat that there's API docs. Um there's some busted stuff like this, right? So cool. Like maybe one example we can try out is we'll very quickly have um co-pilot go fix something like this. I have to tell it the list of packages is is busted. Um so we can try that out. And we're just going to kind of go back and forth. And what I want to do before the end of the stream is I actually want to spend a little bit of time maybe while we're waiting
for some of the the CI builds and stuff to go, I want to go into plan mode and I want to show you guys how I've been like kind of working with C-Pilot in my codebase to get some ideas and when something clicks I'm like that sounds neat, we go build it. um a bunch of features have been suggested by co-pilot and I'm like we don't need that but it's kind of cool like we should try building it. So um we'll try that out. Um Ryan says I think one of the things that I struggle with AI is the fact of how often you have to update the co-pilot instructions file. This is um I know that know that when I'm saying this some AI, you know, tech guru is going to be like it's skill issue, bro. Um but I agree uh very much
with Ryan. I feel like a lot of the instruction file things that we're doing here feel like what's a good way to say this? Um, we've been living in a world with like, you know, the most advant advanced like Photoshop and now we're like going back to paint tooling to like put some put some instructions in a file that we check in. It just feels kind of ridiculous. Um, I don't know have a better way to explain it, but I I feel excited that we're very early and that all of the tooling around like instructions and like I've been building skills recently, not like my own my own skills, but I mean like uh agent skills to go execute. So, I've been doing that a bunch over the weekend. And like the way that this stuff is done and managed just feels like it's just
feels like it's way behind. It feels so silly. So, um we're going to it'll get better. It must get better. But yeah, uh updating instructions files and stuff like that just feels like uh feels off to me. Okay, let's let's have a look here. Uh I kind of I don't have a lot of screen real estate. So I'm going to keep this right here for just a moment. And what I wanted to do is say get out of plan mode. We have a few fixes to make a needler. Um and then another thing too like I don't like I don't trust shift enter in this window. I know it doesn't work in clawed but me doing this to get a new line is like not not okay by me. That's not natural. Shift enter. Um just like things like that. So um first thing um
one the generated generated docs have uh incorrect escaping and then I'm just going to give it an example. And maybe I should be more specifically generated API docs because it has fixed some of these escape issues in other areas uh previously. So I think there's probably uh different spots and how things are formatted that it's not working and the API doc generation is very new. So, um, that probably came after it made a fix for some other spot and kind of reintroduced the problem. The docks aren't being tested. Like, I don't know. That kind of just cut out because on my side, my stream dropped, but my internet is at full everything from what I can see on my side. So, I'm just curious. It's not showing. You can't see what I'm typing. Sorry. Full list of packages that are part of Needler. And then
what I wanted to do is if I go back over here, um, I'm going to give it some links. If you check here, there are more packages that are being published. If you look in the solution, there are more as well. I'm trying to give it some examples, by the way, because um you didn't see this because it was before the stream, but um I've already gone through this and it did one round of fixes and it's not sufficient. Uh Ryan says, "Do you know of any way to make it so that say anytime you commit code that it would automatically update the copilot instructions file?" Um depending on the tools you're using, you could probably do some stuff like this. So, uh, I don't I'm not a a clawed guru, but I am sure there are tool hooks you could put in. Um, and
how you want to do this could look very different, I think. Um, oh, interesting. The video hangs, but the Okay, thanks Ryan. I appreciate that. I My stream right now in my tool is like there is no video. Um, and it says like, you know, health is excellent, bit rate is very high, blah blah blah. Um, the whole time my internet's been fine. Uh, OBS, which I have on this screen. So, if you ever see me talking this way, I'm looking at myself. Um, or my screen and so that's been fine. So, I don't know what happened. Apologies. Um, Ryan, to your question though, uh, lots of different ways to do this and how you do it could impact things. So, if you use hooks inside of something like Claude, I don't know if C-Pilot has a similar kind of tech, but but probably um
you could do um you could look this up or you could even ask Claude or Copilot, but there's probably tool hooks that you could do. I think they have pre and post hooks. You could also make it so that you in git you have a commit hook. Um and so you could wire up things to Git. I think it will depend on what you want to do, how often. But one of the things that I'm playing with I mentioned is uh skills, right? So, um what you could do is maybe you make a skill and your agent is able to use it. Now, it might not be as consistent as you want, but I don't know your specific use case and that kind of um I think changes how I might make recommendations around it. But you if you had a skill and you were
uh talking to say you're talking to co-pilot or claude and you're saying oh commit the code now and you had a you can basically provide an instruction to use skills on certain keywords. And so if you say commit the code and it was wired up to also know about a skill it could commit the code and then it goes oh wait like I'm seeing this match here. I need to go run this skill. Uh, and that skill could do something like going and updating the instructions file. So, um, I think there's a bunch of different ways to do that. And like I don't know, like give me one sec. How do we do I got another window here? Okay. Um, I don't want to be in this directory, I don't think, but okay. Um, I want to know how I can write a hook or
call back of some sort so that when you commit code or okay, let me say this. when code is committed in the repository also run uh an update to the um instructions file and then I'll say iie so I would just do something like this to be honest and so I wanted to use this as an example because I think this is how I've been approaching a lot of things where I'm like I know that there's a bunch of ways we could do this. I don't know what the the right or best answer is uh for Ryan. I think it's really going to depend on your situation. Um right. So it's it's calling out git hooks. I don't I don't know what husky configuration is. I've never heard of husky. Uh other agent instruction files like clawed. Okay. So now it's this is the cool
part about plan mode. And I I mentioned this in other videos and stuff, but you don't need plan mode to get this kind of behavior, right? You can give it instructions to guide you through something like this, but I think it's cool that plan mode kind of almost forces it, right? So I understand you want to automatically update this when code is committed. Let me clarify a few things. What should trigger the update? Pre-commit runs locally before the commit's made. Post commit runs locally after the commit. A GitHub action a pre push hook or other um and this is where you know just to spice things up I would say are there options to have the LLM tool calls have a call back instead. Um, sometimes, and you I'm I'm not telling you something that you all don't know, but just saying it out loud.
Sometimes when I ask questions like this, uh, the side effect is that it thinks that I'm suggesting we need to go do that. So, um, depending on the scenario, sometimes when I'm talking, let me move this around. Sorry, I know it's kind of at the bottom of the screen. Sometimes when I'm talking and giving responses like this, I try to be explicit where I'm like, "Hey, like, you know, I'm I'm just seeking information." Like to try and remind it. Don't go off the rails and go crazy thinking I'm suggesting this. Yeah, I feel like if there's a way to accomplish this be a huge win for keeping the instruction files updated. Yeah, I think like, you know, I do think it depends on your use case, right? So, um, what you want in the instructions file, um, that kind of stuff. Maybe you run a
hook that's like, um, you know, this might be crazy depending on the size of your codebase, but like do another analysis of the codebase. Look at the common patterns. Make sure that, um, the guidance that we have in the instruction file is accurately representing the patterns that we have. You know, it's like stuff like that. Uh, and now it's saying, interesting. You're asking about an LLM tool called uh, callback. Can you clarify what you mean? You're asking about GitHub copilot agent call backs. Okay. A hook that fires on C-pilot completes a task. MCP server hooks. A call back from Oh, so we have going to do a little shout out in Brand Ghost. We have an MCP server. Um we're still working on it to add more features and stuff, but we tried it the other day and like um from from chat GPT uh
you'll be and whatever else you want to hook it up to. Uh you'll be able to actually make social media posts uh through brand ghost from an MCP server. Right now it's just like letting you query your accounts and stuff like that. But um we already have API calls obviously to be able to post stuff. We'll just wire that up to the MCP server. Uh custom VS Code extensions, LM API callbacks, web hooks from an LLM service. So, like again to Ryan your question, like I think there's a ton of different ways to do this. I don't know what the right answer is, but um yeah, and so on the the planning mode for the se I'm answering Ryan's other question here. So, he says the fact that the CLI allows you to select one of the answers um hasn't seen that before. Yeah. So,
I think Claude does this. Copilot does it. Um, Cursor does something like this. And it's nice, but again, for everyone that's like so gung-ho about CLIs, what you can't tell when I'm doing this is that when it gave me the other options, that forces you to type on one line. You might not know because you're not the one typing at the keyboard. And if you've never seen it, you certainly wouldn't know. But if you try to do the new line thing there, it just submits it like who want like I don't CLI is not the right tool for having this kind of thing. It just I don't know but here we are and that's okay. So yeah anyway I think this is you know a path Ryan if you I would recommend you try this out. Go into plan mode. Um, it doesn't have to
even be in co-pilot like go to chat GPT and have the conversation, right? And I think that you could come up with some pretty cool ideas. Uh, I would definitely recommend it. Um, question in the chat. I want to ask a question. Is programming worth it? Uh, when AI is out there? I'm a student second year. It's absolutely worth it. Um, I'm a student second year. I learned Java and haven't been feeling programming anymore. It became hard and replacing. Yeah. I mean, like the thing is especially getting started, right? I can absolutely understand that it's going to feel um demotivating when you are you're the one kind of getting started and learning about things and you're looking around and you're seeing, you know, all these AI tools kind of just like blasting out code and everyone's building all this stuff and you have people that
have never seen a line of code before and they shipped a million lines of code and you're like, "Well, what the heck, man? Why am I bothering?" Um, absolutely learn to program, learn software engineering. I will keep telling people that. I do not care how many executives are telling people this is, you know, we're five months out from replacing all the developers. Nope. Nope. Um, it's just it's just not reality. Um, all of these tools are enabling us to do so much more. And yeah, are there things that AI can do that like it does it does better than me? Like yes, absolutely. I just, you know, at the beginning of the stream I was showing people that I had AI go build. I vibe coded, you know, automatic documentation and stuff for my CI builds. Could I go figure that out? 100%. I've been
programming for over 20 years. I can figure that out. Do I want to? Absolutely not. I could not care any less about the process of doing that. What's really different, I think, for people getting started is that instead of falling into that trap I just said, we're like, "Hey, man, I'll just get AI to do it. I don't have to learn. I don't have to learn that. I've been doing this for forever. I don't I choose to not want to go learn that because I don't want to spend my time on that. There's a million other things I want to go spend my time learning about. for you. It might be a very good opportunity. Every time you're running into something that you don't know, you stop and you have one of the most powerful tools ever that a lot of us didn't get to
have when we were learning. And that is the same thing spitting out the code that we're using. So, I do recommend to you like don't shy away from AI, but I also wouldn't have it go do everything for you and you never try to learn or ask questions. I think it's absolutely worth it to get into software engineering. I will keep saying this, but when you're using AI tools or you're trying to learn things and you're getting stuck, it is normal to get stuck. It is good that you get stuck. When you're getting stuck and unsticking yourself is when you learn. So, do that. Get stuck. You know, think on problems. Get stuck and be like, I have no idea what the heck to do. Walk away from it. Go play video games for a bit. Go for a walk. Go do something else and
come back to the problem with a fresh mind. You'll often solve problems when you're not at your desk. Okay? And if you're still stuck and you have no way forward, ask AI for some help. Don't say, "Go do this for me." Or if you do, always go back and ask it to explain. And if you don't get it, ask it to explain in different ways. You have such a powerful tool at your fingertips. For many of us, if we didn't know things, we'd have to keyword search it on Google. So, you have to know the right thing to go search. And if you don't even know what you're doing, good luck. So, we'd end up we'd all end up at Stack Overflow. And you're not allowed to ask a question there because you'll get kicked off the internet. So, no asking questions. You got to
know the right keywords. And at the end of the day, you eventually find an answer and you're like, I have no idea why this works, but like, okay, and you see problems like that enough that you learn, but you have such a powerful tool to ask questions to. So, I do encourage you, please don't give up on it. Uh, is it challenging right now? Absolutely. It's absolutely challenging, but not all of this is because AI, right? Um, there was a lot of weird stuff with hiring ramping up when everyone went fully remote for a bit. Um, AI layered on top of that. You have a whole bunch of things going on, but don't give up on it. I think there's uh a lot of opportunity ahead. And if I'm wrong on that, like I don't have a crystal ball. If I'm wrong on that, I
think the the skills that you pick up going through software engineering are ridiculously powerful, right? the analysis skills, the problem solving skills, you don't want to do this. And he said because all of the steps going through that he thinks are incredibly valuable. And he's right. There's a lot of really valuable skills that you learn going through engineering. Doesn't have to be school, but applying those principles, right? So, I do encourage you to to keep going. Um, yeah. Dean says, "Conceptually, I know LLMs don't really care about white space, but I care. I do too, man. Um, DJ Neil, good to see you, man. Uh, DJ says, "I don't use AI in most school and personal projects. I'll use it for freelance work to speed things up, but it's not doing things that I'm uh things up, but it's not doing things that I'm not
familiar with." Yeah, I think that's I think it depends on what your goals are, right? And I think for a lot of people I think for a lot of people goals should be around learning. They should be there's abs like I was kind of joking like joking about being serious. There are absolutely things on like you know CI documentation. I don't want to learn that. I just don't do I think it's cool and do I want it? Yeah. Especially if I can get it for low effort. I don't want to learn it. What I really want to learn is how source generators work. That's something that I've wanted to spend time on innet for a long time and just haven't made time for it. So now that I'm vibe coding a bunch of them now when they're not working or I want to extend them
like I'm forcing myself to get into it and learn. So I'm just kind of refocusing my time and attention. Audio is not working again. Come on. I see it working on my side this time. Or is that a delayed message from before? It's got to be working. Come on. Give me a sign. I'll cry if it's not working again because I don't have a solution this time. Okay, I'm jumping over here again. Um, and what I wanted to show was that not that wrong solution. Let me close that. I don't want to show you all my source code for needler or for uh for brand ghost. Yeah. Okay, it is working. Nice. Love it. Okay. Uh, needler code. Let's get the right solution up here so you guys don't steal all my secrets. Okay. Um, so the other thing I wanted to do was tell
um tell Copilot. That's so weird. I wonder what's going on. Should I try while I'm streaming to do a speed test and just see? Let's do it. I'm going to run it over here so you guys don't see my my top secret IP information, but let's see how crazy this goes. Start her off. It's not It's not where it should be, but it's not bad. I got 130 megabits down. It's supposed to be a gigabit. I'm also I'm on uh Wi-Fi though, so that's going to be limited. And I got 100 megabits up, so I should be okay. I don't know what's up. The video is out of sync with the audio. Come on. What is going on? I should turn subtitles or something on. You guys can be like a be like a movie. Um okay the other question here in the chat is
on my third year I can choose if I want to learn software engineer web apps algorithms game programming or data analytics what do you suggest is better for programming um mind forming uh soft if you want sorry you can choose if you can choose software engineering out of that I absolutely would um I think if you I don't have the details of what all these are going to cover Uh game programming I think seems like it's sexy on paper. I don't know a single person that has gone into into game development and they're like this is it. Um I think it kind of uh I don't want to say tricks people kind of tricks people. Um don't get me wrong if I didn't have to work for money I would be absolutely making games because I think games are awesome. Um, web apps. I think
that if you're doing software engineering, you'll be covering uh web applications most likely. Um, I know there's some people who are going to say data analytics or data engineering or data stuff. They're like that's um that's where it's all at. I don't know. If you want to learn programming, I would say yeah, do software engineering. Uh, algorithms are of course interesting. I think that's going to have a heavy math focus. I don't know. I think for some people that that works really well. I don't like thinking about math when I'm building stuff. So, not for me. Um, so bizarre. Well, I'm so sorry that my stream's all wonky. We'll get through it, though. I I believe it. Um, so I want to go back to my screen share here. Um, and then I need to tell it Oh, I already did. If you look in
the solution, there's more as well. This needs to be corrected. Let's start with that. Um, nice. Okay. So, it's uh it's all of your fault. It's not it's not it's not my fault. Uh, refresh your pages. Um, question in the chat. What do I do? What do I do for work? Uh, I am a software engineering manager at Microsoft. So I manage engineering teams in the um Office 365 side of the world. In particular, my team is the part of the routing plane. So we do the traffic for all of Office 365 and actually beyond that, which is super cool. So we do trillions with a TR uh trillions of requests per day. Um and then one of the things that I get to work on is the firewall, which is super fun. Um, yeah, that's what I do now. I used to work in
digital forensics building software at a company called Magnet Forensics, which was a lot of fun. Really enjoyed that as well. So, yeah, been an engineering manager for about 13 years now. And I still love coding all the time. Cool. So, what's what's C-Pilot doing? I gave it some instructions to go fix some stuff. I just want to point out that like um so it is looking in my code folder but it is also using the URLs. Okay. So um sometimes depending on what I'm building, how I'm building it, sometimes I'm building in brand ghost and instead of saying like oh go look at the docs online for Needler, I'm just like dude Needler is literally here on my computer. It's it's right there. just go look at it. So, because if I don't sometimes it's like I don't know what that is. I have to
go search the internet. Don't be doing that. Just go on the computer. So, um it's found the issue. The heading shows this with escaped backslashes. That's right. We don't want that. Let me investigate how packages are determined for documentation. So, that's the other part. Now, I understand the setup. I love when it says stuff like that and then there's just like a block of red like do do you understand? because something's not right. So now I understand the directory build props automatically marks all projects starting with this as packable unless they end with test. Let me create a plan understand the issue fully. Okay, so there's a bunch of stuff missing. Um and it's cool because I didn't do the the math on it, but I know for example I did notice this one was missing or sure I didn't notice these other signal R
ones were missing. Uh this one is interesting because I agree with this statement from it. So it says that that package or that that project is missing but it says this may be internal or not packable and I think that's true. I think it's a shared project that we embed in two other spots. Um do I ever feel that this isn't for me and ready to quit? Not anymore. Um when I was in university I felt this all the time. So uh a little bit of background I went to the University of Wateroo for computer engineering and so before university I think probably maybe not for everyone but I think for many people um you know if you're you know highly technical that kind of stuff for me I did really well in high school. I didn't even have to try and it just I
got good marks and stuff and I was like this is great like this is going to be like this for the rest of my life. Like it's just things come pretty easy academically. Absolutely not. In university, uh I went from like, you know, uh fast-tracking math classes. Like I was I got to go to high school for math uh a year in advance. So when I started in grade nine, I was doing grade 11 math. I was like that was like my identity was being like I got to be smart and not really have to try. Um doesn't doesn't work that way for forever. Uh, so when I got to university, I went from being like very easily getting good marks to like almost failing everything and that was crazy for me. Um, I had never seen marks close to 50% or 60% ever and
everything was like 50 and 60%. So um, university for me was 5 years long and there were no breaks because it was internships. So every other semester we'd have school and then we'd have an internship for four months and back and forth for five years straight. And so every single school semester, every single one starting from the first one, I would say, "What the heck am I doing here? This is not for me. This is not okay. I like it's not like I'm terrible at this. I don't like what I'm doing." Then I would go on an internship and I was like, "Holy crap." Yes. If this is what I get to do when I graduate, absolutely yes. And then I would go back to school and I would hate it. Right. And this happened for almost five years straight. By the end I'm like
I'm almost done. I'm like the lights at the end of the tunnel. That's okay. Um but definitely during school all the time. Always felt like it. So don't give up. You will feel like that. That's part of it, right? The people that the people that stop are the people that lose. the people that keep going are the ones that eventually make it. Um I know I had people in my class that failed. I had people that were in the um call it the class ahead of me, right? The year ahead of me that failed and came into my class and they kept going. There are people that failed a couple of times and they kept going and they've gone on to do very well in their careers. Okay? So don't give up on things, right? If you don't enjoy what you're doing genuinely, if if
you are doing the work, you don't enjoy programming or software development, don't force yourself to do it, if you don't enjoy it. But I personally found that I loved building stuff, right? I've always described programming as like having an infinite number of Lego bricks of any shape I want. And I love building with Lego. I've always loved building with Lego. So that's been for me like a really cool thing, right? So, I've always enjoyed it outside of work. I realize not everyone wants to program outside of work. That's cool. I do. That's why we're here. So, um I hope that helps. So, Needler found or sorry, Copilot found some stuff in Needler. I love it. The issue is clear now. I understand the issue. Um by the way, I had a really funny loop the other day where it was like, "It's clear." And then
it was like, "But wait." And then right after, "Oh, it's clear now. Now I understand. Uhoh." like and it did this for like pages and I'm like I should stop this before we consume all of the water on the planet. But um issues clear back/escaping is coming from either the markdown generation or something in the documentation pipeline. That doesn't sound clear to me. That sounds like you don't actually know still. Um this mentions markdown sanitization reax. Okay. Um it's looking up some of the package information for how the documentation works. Now it really understands. Right now I understand the issue. Um, however, create a new plan. So, um, did I run this in plan mode? I thought I ran the other one in plan mode and not this one, but we'll see. So, it made a new plan. Issue one, incorrect escaping. Uh, solution is
to modify this reax in this JSON to exclude angle brackets. Seems reasonable. This one too says missing packages. That's the big one. Uh doc show nine packages but there 20. Yes. Um this script which it made only finds XML files in the release path but source generators and other projects may have different output configuration solution. Update the script properly. Discover all packages. Yeah. And so just to show you, I'm not in plan mode because if I press shift tab right now, now I'm in plan mode. So I'm kind of surprised it planned for me. I'm not mad. I think it's cool, but I wasn't in plan mode, but you could see. Let's make a plan. Um, rock on, buddy. Let's go. Uh, I like being nice to it when I'm not raging at it because when I rage at it. I feel like these AI
tools are training me to be the most terrible person because when I'm mad at these things, I'm like, I'm not I'm not having a good conversation with these uh these LLMs. Um, so I try to be nice when I'm in a good mood. Um, Ryan says, "I love how all these LMS are constantly just so positive, always reassuring you that it knows what's happening and all." Yeah, nobody knows what's going on, man. Um, handle line breaks are true still. And then it's adding in markdown sanitization rejects. Um, by the way, I noticed in Copilot CLI, um, one of the things, and this is a reason why I suggest people try using out different tools a bunch, I find in Clawude, it will ask you for like to approve things, right? And it will remember, which is great. But if you look, this is a perfect
timing for this. If you look at the one that's on the screen right now, do you want to run this command? There's a yes and a no. Okay, I will never based on what options are here, I will never be able to say yes and do this like don't make me approve this again. Anytime it tries to do something like this, it's going to ask me and it's a huge pain in the butt. So that's one of my gripes right now is that some of the flows that it gets into like this one the same thing. Approve and like I just want it to go just do it. And yes, it has a mode that you can like do yolo mode and stuff like that, but I don't want to yolo everything. I just I don't want to every single time approve a get child
item. It's just it's not okay. I find Claude does a better job at some of that for um you know the approvals. Uh cursor and I'm I'm just kind of going from memory from some stuff this weekend. Cursor seemed pretty good too. Like it was asking me for a couple of approvals and then it was just off to the races. Um but hey, like I know this stuff's here for a reason so that we don't screw up like crazy. But this is going to get better. It'll get more intuitive. It'll be okay. So, now it's going. These packages clearly have public types. Uhhuh. I know they do. It does. It's been doing this a bunch, too. I just want to see if I can stop it for a sec. I think it might look the file is comparing against what's tracked in Git versus what's
in the CI build environment. And this like has been kind of irking me because ever since I've been doing a little bit more stuff with Copilot to go build out like CI workflows like like we're doing right now with documentation generation. Uh one of the things that's been bothering me is it's almost like gaslighting a bit where it's like not it's probably not my problem. It's probably just how this thing over here is like it's just different and it's like it's not supposed to be different, man. You built it. It's not supposed to be different. Um, but that's okay. Excellent. Looking at the CI logs, I can see the documentation is being generated. So, this is cool, by the way. Um, I know it's kind of just flying by and maybe the text and stuff is small. I I can't really tell because this is
on a quarter of my monitor right now, but um, if you look here, list GitHub actions workflows in a repository. Get get Oh my god. Get GitHub actions workflow job logs. Try saying that. I dare you because it's not easy. And um it's actually querying the the GitHub API. So it's looking at my CI flow that that ran in GitHub. So it's looking and seeing oh like that's what ran there. Got another approval that I can't allow perpetually which is annoying. And again. So yeah. Uh Ryan great question. So, I have to ask, what makes you prefer the CLI over doing it through the the built-in chat inside of VS or VS Code? Um, this is a terrible a terrible terrible example because of these approvals. Um, so this is not a good case uh of of it shining. Um, what I want to do,
we're getting to the top of the hour. I'm going to go a little bit longer because I I didn't think it was going to take this long to get this this far. Um, what I want to do is show you the um, the planning part that I've been doing with it. And that to me is a that's been a really good experience. And the more like in code commute, I've been trying to touch on this a little bit. I can't put my finger on why some of the things I'm doing in the command line actually feel good because I am the first person to tell you I do not like using a terminal. I want to be in Visual Studio. Um I feel like the chat hopefully I'm back. Uh yeah, as Devon's saying, the CLI for Copilot code feels like typing with mittens on.
do agree for most of it, but the planning stuff that I've been doing like one sec. Can I pull this up just to kind of show you cuz like I said, I'm the first person to say that I'm not a huge fan of like working in a in a terminal. I think I showed this in in a video or live stream the other day, but like I'm just going to scroll so you can see how many like what C-Pilot's been doing for me. And I'm again, I'm not showing this to be like, oh, I've shipped a million lines of code. I'm just just showing you because it's been incrementally chipping away at things and like, let me do this. Let me get the main branch here. No, literally not what I wanted. Okay. Um, I'm just going to scroll. Right. All of this. That's all
co-pilot building stuff for me and I don't know why but it has felt good to be in the terminal doing it. Uh otherwise no because as it's building stuff I really like sitting there with uh depending on what the features I like sitting there with co-pilot and seeing what it's doing and as it's doing it I'm in Visual Studio checking on things being like like that's not right. Um, I think there's some features like this here where you can see at the bottom where it says control plus D to Q. Like that's super cool. Um, cursor does a really good job of this. Like it's doing stuff and you type a message cuz you're like stop doing that. That's wrong. And it sends it off and kind of just like changes gears. Like I really like that versus just outright stopping. Um, oh, it appears
when you're doing CLI stuff, it's bogging down your network. Come on. There's no way. It's opening up a a trillion connections. Um, maybe show get diff. Let's go do it. Yeah, I um man, I was on Claude Pro Max or whatever for a while there last year and then I stopped using Claude because I was just back like I was doing so much development through uh GitHub Copilot like agents. So I'm like I don't need Claude Pro Max. But now when I use Claude, I run out of I'm on Claude Pro, not Max, and I run out of credits like in like 20 minutes. I'm like, dude, this is the worst. Um, okay, one sec. So, it says it's done. I'm surprised. Oh, it's a new chat session from before. It's not my other chat session. It was committing stuff and then it was like
approve pushing and I'm like, you don't get to push to my repo, man. Like, there's no way. Uh I see your question in the chat. Any tips on efficiently uh using uh AI? I will talk a little bit about that. Um and so if we're looking at this, only include the XML folder matching its package name. Let me zoom in. Sorry. Um this excludes DLS that are copied other projects. Look directly in the project's own bin folder, not in test project folders that reference them. So we do need to exclude test benchmarks and the example projects. Um it even called out this one, right? That's a shared one. So it has explicit exclusions here. That's why I can't the highlighting is not working. Sorry. Um so it added that one. I don't know. This seems fine. Um, now which one of you is going to
go test this rejax? No one, right? We're going to push this up. It's okay. Um, make the commit. Okay. Um, for the question that's in the chat, uh, any tips on efficiently using AI? Um, I will try to answer your question, but I need to ask you a question back, which is what are you trying to do? What tools are you using? Um, give me a little bit more context, and then I will try to tailor my answer to best suit you because, uh, I think there's a lot of things to be able to say about this and it it might not feel helpful without a little bit more context for what you'd like. Okay? So, if you give me a little bit more detail, I will give you even more detail back. So, we're going to take this. We're going to push it. And
it's probably going to break the build. And that's okay because that's all it's been doing. Good thing it's still an alpha. Um, so I will check that in a moment. Ryan says, "I'm not sure I could truly justify paying for co-pilot as well as Claude each month." Yeah, I just don't do enough coding. That's That's fair. push really broad. Yes. Um I push stuff on Fridays. I'm not scared. Um take care Devon. Good to see you. Um so I will check the build in a bit. I wanted to do this other quick experiment here with plan mode. So um here's what we're going to do. I can I want to speak this out. Is this thing on? Oh yeah, we're good. Okay. Um. Uh oh. Are we not good? Okay. I would like you to analyze the current state of the codebase to look at
the different features and capabilities of Needler. I'm using not sponsored by them. It would be nice to be sponsored by someone so I can pay for my tokens. Uh, but I'm using Whisper Flow, by the way. So, I have a foot pedal under my desk. You can't see my hands. Uh, but I'm not typing on the keyboard when I'm I'm doing this part. So, I use a foot pedal and Whisper Flow, and it uh it's doing the transcription for me. Is this kind of stuff built into Windows and other operating systems? Yes. Whisper seems to do a pretty good job, so I'm pretty happy with it. So, um, what do I want to say next? I wanted to look at the features and capabilities of Neiler. Our primary focus is around building sourcenerated functionality for a better developer experience related to dependency injection. What else
do I want to say? Um, that's I'm interested in exploring new features that we could build into this offering and that means exploring different languages and other text stacks that have dependency injection. One of the interesting opportunities for us is that we can focus on some of these different features that we currently don't support and see if there are opportunities to bring them to Needler using source generation. And then I'm going to say, I would like you to be creative with your options and provide some brief examples to explain how you see these different capabilities fitting into Needler. I've been doing something like this, not the exact same prompt, roughly something like this. Firing it off and just seeing what comes back. And I've built some pretty neat stuff. that I wasn't ever thinking of putting into Needler because I don't need it. Um I
don't needler it. Get it? Um I don't need it, but it just felt like it was cool and if it's going to go build it, like why not? Let's explore. Um Ryan, what kind of foot pedal do I have? I don't actually know. Is it a Oh, is it's the same brand. It's a It's a Stream Deck pedal or something. Uh, what's the brand that makes Stream Deck? I feel stupid right now. Elgato, that's what it's called. It's an Elgato foot pedal. Um, from what I saw online, I think a lot of people were just working using all sorts of super cheap Amazon foot pedals. I have a bunch of like Elgato lights and stuff. So I was like I'll stick to a brand that I know at least. Um okay, we got some more context. I work mainly with backend and infrastructure tools. In
my project I just go for the core services, Postgress, Reddit, Stalker, he's cloud agent mighty but rate limits really fast. Yeah. Okay. So, um I don't have good advice on this part in particular because I have not done it, but um there are apparently lots of options online that people are are doing. If you have decent hardware, um, a lot of people are going to like, um, what is it? Like there's O Lama and there's some other what I can't remember the name like Open, it's not open AI. Uh, man, I can't remember what it's called, but basically people are like self-hosting models, and so then they're using Claude pointing at self-hosted models or using other AI tools pointing at these self-hosted models. Um I to be transparent like I'm obviously I'm in a position where um or maybe it's not obvious, I don't know,
but I'm in a position where like my expenses for doing stuff like I'm doing right now. Um anything that I I make from content creation basically goes back into, you know, paying for things like this. So Claude Pro Max felt like a little bit obscene to pay for because I was also paying for like cursor and for co-pilot and I was like no I don't use claw enough for that. Um I don't know what I'm I think I canled my cursor whatever license. So I don't even know what I pay for cursor. Maybe I'm still paid up front and I'm kind of running through the plan and it's going to die soon. But for me, the budget for for co-pilot, I think I think I spent um I think I spent 150 bucks last month. And so what do I use that for though? Like
I'm building brand ghost with it. I'm building all sorts of stuff. It lets me, you know, do this kind of thing where I'm making content for videos and things like that. So for me, it's it's worth the cost. um my my YouTube and all that kind of stuff like I lose I tell this to people all the time because I'm not I'm pretty transparent about I lose money from making YouTube videos um editing costs and stuff alone just uh eat away at that um even my channel that I don't do editing for which is called code commute I do uh five videos uh a week that are just vlog style no editing record them upload them I lose money on that because I drive in the lane on the code that has a toll. So, I'm all my channels lose me money, but I do
make money off courses. Um, and that's only because it's on, you know, the biggest uh course platform for for C developers. So, um that money just goes back into this kind of stuff and that way I can keep making YouTube videos and it's okay. The ad revenue for YouTube videos is not okay. Uh so, if there is a sponsor out there that wants to sponsor my stuff, please would be cool. I just need to cover my editing costs. Yeah, I'm sorry. I don't have a good answer on like more effective use cases for um for token costs and stuff like that. I I don't know. I think something that could be helpful though, even if you're using either free or or cheap options, is if you're able to go between different tools, say there's a handful of free tools and you can use them effectively,
like you might be able to figure out how to prioritize what you do in each, right? So maybe as an example, u maybe it chews up a lot of token usage to go do planning like I'm showing you right now, right? You're like, dude, like I'm gonna run out of tokens like instantly. Okay? like uh maybe chat GPT is a good tool for that, right? You can have those conversations. It's not so bad. Um and it's able to do, you know, some pretty interesting stuff. Like I still use chat GPT all the time for building. So maybe you use Chat GPT for that. And then you go use you I'm just making this up. You find Cursor is really good at like refactoring some of your code and Claude's really good at writing your tests and C-pilot's really good at something else. And if you
can go between your tools for different tasks and use like the cheaper versions or the free versions, maybe that's a good strategy. Um, so maybe try that. But there are definitely things if you go digging like O Lama, some other stuff where you can get models for uh for free, but I think you got to run them yourself. Let's see what Copilot has to say. Top five high priority features. Okay, this one's come up a bunch. Uh, it's called it different ways before. Gemini gives away tokens on the free tier like Oprah Winfrey. Good to know. I don't use much for for Gemini anything. So, that's really good info. Thanks, DJ Neil. So, this conditional registration one comes up a lot. Um, it's this time mentioning coming from Spring, but um, basically it says configu driven DI with conditional on. So, um, the way and
it's probably in the actual plan file. It's one thing I don't like is that it wrote this to a plan and then it writes some things in the chat, but if I open that plan file, I bet it has more detail. This concept is like if you have a dependency, so you've made your class. Let's just show it. I don't have something like this, but um if I go to examples, we're going to go to source gen. We will go to the console app. Okay, a bunch of stuff in here. Host types has all of these. Oh, it's not what I wanted. Plug-in types. So, these are a bunch of different classes and stuff that are in here. So the conditional thing that it's talking about is if you had some class and you're like cool we have this one is an options type. I
think this this is a cool feature with this options flag on here. It manually or source generates options registrations. It's pretty neat. Um that's a co-pilot ID. I can't even take credit for it. doing the exact same thing but conditional in this case would allow you to put something like this and then you could give it some different things. So, uh some of the examples it's actually like hey maybe you actually want it based on your configuration file. Okay. So, whatever is in your app settings, and I've seen some examples where it's like conditional, it reads better like conditional on and then it'd be like security and then you could do like secret key or like do stuff security be secure and then it would look for like a boolean flag or something in the security um app settings uh section. The other things that
I've seen are conditional on and then it's like you can pick an environment. So if you're if you're familiar with ASP net core um you can have like a dev environment prod environment um I've seen it suggests this doing um compil like conditional comp compilation. So it would be the equivalent to like or like I don't know something like um debug like this. I'll zoom in. Sorry, folks. Um, and what that translates to is source generation that essentially is like this. If debug, actually, it's not right here. It would put it around like where it's registering this. Um, so it's kind of neat. I don't think and that only works by the way if for source generation if you are the person performing the build. So if I built something with that in debug mode and then someone else consumed it and they were building
in release mode, it's not going to regenerate their stuff. So it's a little weird. I haven't really committed to that, but it keeps coming up. So kind of interesting. primarydefault service. I don't um this is kind of interesting. Needler has a way that allows you as the developer to um to order things. Now, if you're not familiar with dependency injection innet, like the built-in stuff when you add stuff to a service collection. So, if you added Let's go back here. Uh, what's a good example in here? Cool. Okay, this is all made up stuff from Copilot anyway, but this one says I console manual service. Okay, if you had 10 different implementations of I console manual service and you register them, if you ask for one back from the service provider, it will give you the last one registered. If you said give me all
of them, which is just give me a list of them or an I innumerable of them. You said give me a collection of them, you'll get all of them back. So there are some things in needler that let us put some order in place. But uh this is basically saying which one do you want to be the primary. The way that I usually enforce that is just giving control over the ordering. So not super in love with that. Um, this one comes up all of the time and the frustrating part about this is that it already exists in Needler. Um, so it's a little confusing that I've I've done this exercise many times. This is probably the 15th time I've kind of done this with Copilot. This one comes up every single time. And I did that before working with Copilot. So, I actually built
that myself by hand. So, I find it confusing that it doesn't seem to recognize that in the codebase. Um, when I told it to analyze the features and stuff, I feel like it's probably that's too general. It's a it's a codebase. It's probably missing a whole bunch of stuff. When I tell it, hey, that's already in the codebase, it looks for it and finds it right away. So, I don't know. Um, constructor param from config Oh, okay. So, this this is kind of neat. So, this says, and again, if you're not familiar with this stuff, because I don't know my the total, you know, audience watching this, um, the way that dependency injection will work sort of by default is that it's going to use constructor parameter passing. Okay. So if we go back here and we look at console report by default, it's going
to pass stuff in here into the constructor um that are dependencies that are also registered on the service collection. So if all this sounds like you have no idea what I'm saying, that's totally cool. Um do a little bit of homework on dependency injection if you're not using it yet. Um, I think it's a huge unlock for building stuff. And uh, I I had been programming for like 10 years before I even heard of dependency injection. And I I feel like it was something once I learned it, I'm like, I literally cannot write software without thinking about this. So, it's a it's a pretty big unlock. that um will pass parameters in automatically from the dependency container into these dependencies in the constructor when we try to get a console report. So what this is saying if I open this back up is that we
can put something like this. Oh my goodness, come on. There we go. We can put something like this here. Um that's a bad example. So okay you can see here it's like taking greeting from the config. So instead of this you could do string greeting and you could actually do this kind of thing. Okay. And then instead of this, you'd be able to say um I don't know some some section cool stuff and you get that out. So when it goes to build a console report, it's actually going to pass in uh a parameter called greeting that it's reading from your config file. And what's cool about this is if for some of you if you're watching this and you're like thinking about how you could do that by writing the code, the way to do it is that you don't um you don't just
add console report into your service collection because if you live, can you hear me? Um so you usually don't put a primitive type on here. It can work but you you don't usually do it. So this would kind of fall apart. But what we'd be able to do is instead of adding this by itself, you can do a what's it? Do I have a spot where I can show this? Maybe um you'd basically use a callback and when it's going to build, you'd say, "Okay, I need to I'm going to go ask the service provider for this, for this, for this, for this, and I know which string I want to go get. So, I'm gonna go ask for the I options, which is what it's saying in here, right? Onrems eliminates options boilerplate. This one says config. Um, same idea, but instead of you
going, I'm going to ask the service provider for the options or the config. I'm going to go resolve this thing from the config, right? By doing this lookup, if we were to have this, it can automatically through source generation go hook that up. You would never have to write the code to do it. You would just define it as we see here. And it means that it's going to every time you need to make a console report look up this value from configuration. I think it's pretty neat. I don't think it's a huge value ad if we already have some of the other capabilities which I talked about very briefly. Let me undo this. But one of the other capabilities we have is if I go back up. Okay, so let me zoom out a little bit. There are many different ways to do this.
But you can see all of these ones that have an options attribute on them. we automatically when you see this it automatically goes and makes a class for you that's a configuration. So this is another example it has validation on it. Here's another one. Right? So this is a really simple one. This is a really good example of it because if you look at this thing this is a DTO. It's a data transfer object. It is immutable. You make your security options. That's all you do with it, right? It has three things on it. You have this object you can send around and you can read these three values. What's really cool is that with this attribute and the source generation that we have, this will go make because it's a partial record. Partial is the magic word here. It will go source generate the
rest of the code needed for this. So that it will go literally look up a security key from a security oh it's going to use this as the section. So it will make a thing for you that does something like this. So this property if I were to write it out would be something like this. public string secret key uh not does it do it once on read? I can't remember if it does it on read. uh once or not. I don't think it does, but it would be something like if you had a config passed in and what's the syntax for it? It's like get section get secret and then it would do get string. I think it needs to do one more. Um anyway, you could do it like this. Get secret and then it would be Sorry, I'm saying this the wrong
way. security. Not doing a good job, Nick. And it's behind my head. Secret key. So, it would build this for you automatically. So, like I said, you don't ever see this code, but you get access to it. And to kind of prove to you that's what's happening, um, let's do this. This is caching options. Okay. So if I go to caching options, right? I just F12 on that. It goes to here. Okay. You can see that it automatically made an I options. If you again some of these things if you're not a .NET developer, you might not know, you're not familiar. But it's okay. Um, and sorry it's behind my head. This is so hard to do when I'm streaming and not paying attention. But, um, this is automatically registered for us. And if I were to go run it because it's automatically registered and
there's source generation behind it when it registered, we get an I options, we get an I options snapshot. There's one more. Um, my options monitor is another one that gets made. Anyway, we get all three variations of them registered and you didn't have to do any wiring up to anything. You literally just put this on here or in this case this one on here and you're able to go resolve these and they're they're mapped properly for you. So, because we have that feature in Needler, this one that it's talking about is neat, but it's not um not that not that valuable. This one's another silly one because we already have this. In fact, we don't need an attribute. So, if you have a hosted service in Needler, it automatically gets discovered and added. And that means when you go start your application, it just works.
Uh this is a good example. Okay. So if we look at this one, you can and it doesn't have to be hosting like this, but if you look at this example, this is the program. You can hopefully clearly see I'm not explicitly registering anything, right? You can see I'm saying use source generation. We're going to do it for host is the to get a host builder. We'll add in some other options. So, command line arguments, an application name, console logger. We build it, we run it. Okay. But what else is in here? Example service. Okay. So, we have an example service. have an example worker which is a background service this thing because it's a hosted service if you're not familiar if I jump into this this is a net thing I hosted service okay so because it's a hosted service what will happen is
it gets automatically added in no attribute nothing fancy because if we go back here this is saying oh let's put this attribute on we don't even need it man you just declare this thing and that's going to get added in automatically for you. If you don't want it to, we can do the opposite. So, needler by default is going to try to register all the things that it can. And the reason that's the case is because of how I build things. I prefer that. Needler is opinionated. That is my opinion. I build stuff that way. It's a lot more rare that I'm like, "Don't register that thing. Don't do it." So, you add the attribute on when you don't want it. Anyway, um that suggestion from Copilot, not a huge fan because we already do it. Um profilebased registration, no. U provider, we have plugins.
This one comes up all the time from its recommendations. Event handler discovery. Um uh yes, I don't want to go build my own mediator. So this is not the library for that. We do have dependency graph visualization which is super cool. Another thing that Copilot built for me. So can I show it? I don't know which tool has it. I have to go find one. But um I could have swore one sec. One sec. I will find it. this one here. If we build it and I open up the output, you can't see it. Give me one sec. Aha. Oh, did I mess this up? I did. What did I do? Let me build it again. But what you can't see is that we got this. Okay. So this actually made this documentation for us source generated by the way. How cool is that? It's
impossible to read. Um but it's a mermaid dog or diagram. And so we have this dependency thing. I think depending on whatever tool you're using for mermaid diagrams to view them can look better or worse, but it outputs all this diagnostic information. So you can see what's registered, right? Interceptors, decorators. So this is a decorator that decorates that. This is an interceptor that will wrap that factories. Um, I used C-Pilot to come up with a pattern to basically build one of my favorite features from uh a dependency injection framework called Autofac that automatically makes factories. Autofac, right? Clever. Um, so we have that source generated, right? Lots of cool stuff. But the point is that, you know, one of the things that it's suggesting, we already do that. So to call out what I would normally do here cuz we're over time and I'm going
to wrap up and sorry we didn't code a whole lot. We got to check the build output still from CI. Oh, where did that go? Here. I don't want to forget about it. Actions. Come on. We got a green light. Let's go. Do you think it worked though? Oh, it did. It did. It added them all. Wow. Thanks, co-pilot. You're my You're my best friend. Um, what which ones? Like, okay, we got these signal our generators. Oh, come on, co-pilot. Oh, you had one job, man. Come on. I'm assuming this one's busted, too. What about this one? Was already here. Okay. So, I wonder if we're thinking about this, right? Sorry for those of you that joined the live stream at different times. We had some stuff that was excluded from this list. We said, "Hey, co-pilot, it's supposed to be there." And so, it
found it and it added like here's two examples. You can't see at the top. It says Nexus Labs, Neler, SignalR generators. And then same thing but analyzers. And so it added them, right? We can clearly see that they're in this list. But I wonder if it didn't add them originally because of how some things were being built. Why do these people do this, man? Like I'm not buying viewers buying viewers to watch my my stream on how to use co-pilot. Um, so it's clearly not doing the right thing. And I wonder Oh, we got a we got a dog that joined. >> Who's there? >> Lyla. No. Okay. Make me look crazy. Um, I wonder if it's not working because how some of this stuff was being built in the first place. like there isn't actually an output and so now it's cheating itself and
it's like okay well I was relying on the output like there is a dog come here you sit sit embarrassing me sit you can't sit can you be 11 years Hold. Say hi. You're a goof. Um, so I do wonder if it was uh kind of working around itself and there's something else that's that's clearly broken. Um, what else? Like this one I think is new, not found. So all the ones that it added, it's now inventorying them properly, but something else is not doing what it needs to do. So that's interesting. Um, I can't remember where we were. Oh, I went into something. I went into Come on, Nick. Remember, I think I went in here and then I picked this one and we had some text that ah, didn't fix it. That was the other thing we asked for, right, Laya? You got
to go. You snuck in to lick my knees. We don't We don't want that. So, this is still a bug. And what it did over here where some of these are missing still a bug. So, was it successful? No. But what I you know what I would do? I'm kind of all over the place. So, I apologize. I really wanted to focus on this part more. So, let me wrap up this thought. Um, what I would do over here is I would just give it the guidance again. I would say, "Hey, look, this is still broken." And I would tell it, "Hey, look, you got all the right listed packages that I expect, but they're missing things." Now, because I've done this part several times, I would likely give it more guidance. I would do a little bit of homework first and I would go
looking through some of the build logs seeing what's being output because so far if it's had to do it multiple times, it's clearly missing something or or else it would have done it the first time and maybe it gets lucky and now it finds it the third or the fourth time. But now that we've gotten this far, I might go do a little bit of work. Um, just as a heads up, that's I'm going to start to jump in a little bit more and and kind of guide it. So, I'll take care of that. This is the kind of thing I was saying that I don't care if it's it got it wrong. It's kind of frustrating, whatever, but like I know that I can give it some guidance and it's going to go fix it because it's a solvable problem. Not concerned. For the
planning stuff, what I would do is I would say, um, we already have a following. So remove them from the um idea list and consider new ones instead. And so the reason that we're in this kind of state right now where I told you like it's already recommended this stuff. I'm in a new session, right? I didn't save that plan or that document and I could and I should because if I build this and I'm like here's a cool list of stuff to do and I chip away at it. What I don't want to do is close the session and then next time I have this conversation it starts completely from scratch. I'd like to be able to say here's a list of stuff we built. Instead of you trying to interpret my codebase, just look at this list of stuff. Don't pick stuff from
there. What else can we do? So, I should save a copy of this, right? So, um, we I don't want to say we don't need the first two. We already have lazy P support. What else? Um, we already have automatic ihosted service support. There's something else here. Oh, um, we don't need module support. We already have I what are they called? I service collection that have ordering and act like autofac modules. What else? Um, we don't have gRPC service stuff. We do have signal R though. We already have this. We already have in our output. Okay. So, what I would do, update the plan to remove the duplicate ideas we already support. come up with new creative ones. And so like obviously when I'm doing this on my own, it's going to be moving a little bit quicker. Uh I'm not trying to explain what
I'm doing to a group of people. So that happens faster. And then I I'll go between using a foot pedal to talk, but if I'm talking about code references sometimes, uh I might type it. So, the fact that I had to type lazy t i service collection plugins, like that kind of stuff, um I might just type it instead. If it were um not in a console and it was just a free form text editor, I probably would speak at all and then anytime there's code I'm mentioning, I'll go touch it up. I don't like editing prompt text in a terminal. Like, no thank you. So, we'll see. Maybe this will come up with more creative ideas. Some of these aren't so bad though, right? Um I don't I'm not upset with it. I don't want to do the mediator stuff. Um the config stuff.
I think this one was the most interesting for me. I like that it's not it's not adding too much value, but I do I do think it's adding some value. And some of these other things I think are good. I'm just not interested. I don't want to go build a mediator library. Uh like there's already a bunch of them. I don't think so. Um maybe gRPC service discovery, but I'm not actively using that. So I might like I feel like I'm not a good representative of that. Um the health check generation maybe for ASP net core apps maybe. But let's see what else it's got. Composite pattern generation autogenerate aggregates that call all implementations. I don't even know what that means. What does that mean? Autogenerate aggregates that call all implementations. And so when it does this kind of thing, like I said, it's probably
got more details than the actual plan. I don't want to go open the plan uh just because I'm being very lazy, but I will ask it what does this mean? Right? caching decorator generation. We already have Oh, we don't have that. We have decorators. We don't have a ca explicit caching decorator. That could be interesting. Uh I really like using fusion cache. Maybe we could have caching decorators and you could have different packages that give you different types of caching support, whether it's fusion cache or something else. I think this one, I've seen this come up before. I do really like it. I'm a little bit I'm a little bit nervous to commit to it. So, I like this because what's really neat is if you have things like decorators or you have interceptors, what we could do, pardon me, we already have the ability
to automatically wrap method calls with other ones or entire classes with decorators. And so, this is the same thing. It's just that it's a specific kind of interceptor and so that could be really neat. Um, this one is autom for testing generate mocks. Again, going down this path in my opinion is just a lot of it's a lot of effort to go build something like that. We already have mocking frameworks. Uh, what's neat about this though is like if it's source generated, like that's pretty cool. I just don't think you can actually do it. I think you need reflection to get kind of crazy on some of that stuff. Um, async initialization. That's okay. I don't know what this means. Service uh service aliasing. Yeah. Yeah. So, like I might ask that. Um, so to wrap up the stream, I'll just show you what I
would do at this point. So, there's a few more things down here, but I would say um take this and I'll be explicit in the chat. Provide examples with some code or the following and explain. I'm gonna say one um the integration path in needler two the uh use case benefit and then I'm going to list them. So there's that one and the other one I was saying that I don't really know what it means is um this one here. And what else? Anything else? No, I think I'm gonna I'll stick with that. Um I am I am really interested in something like this. Feels like a big commitment though. So I would do this and so then I can see in the chat because like I said it's probably in the actual plan but then I can go through and when folks were asking
in our chat earlier like why do I prefer this? It's not that I do but this kind of interaction I've really enjoyed um getting these plans printed out with some examples and then looking at it. So composite pattern generation when you have multiple implementations of an interface you want to call all of them is a single operation. So an I notification sender we have an email one we have an SMS one. Oh it's still thinking. Let's scroll back up now that it's done. So, email, SMS, push notifications, developer requests, composite generation. So, we can say give me composites. And we have a couple of options. Kind of neat. So, I like when it does this so that I can see different ways that we could use it because if you read this one, when you have I think I know what it's going to try
to do. It's going to call all of these. Should it do it sequentially or should it just run them all in parallel? And so what it could do for you is automatically go generate this thing. And I'm assuming, yeah, this is pretty crazy actually. So what it would do is anytime you want to ask for an I notification sender, what Needler would normally do is if you asked for the collection of them, it would give you all three because they'd be registered automatically. If you said give me one, it will give you the last one registered. And instead if we had this functionality, this composite generator, you could flag some interface to be composite generated. And when you ask for that interface instead of getting any of those other implementations, you get this one automatically through source generation. No reflection. And what it will do
is this is what I call like a facade class basically. So, it's a facade around uh whatever interaction you're trying to do. In this case, it's a facade that that will call all of the things that it's wrapping. But the cool part is that in your consumer code, you don't even have to know that this thing exists. You just say, "I need to send a notification." And it's like, "Cool." Like, I'll give you the the notification sender. You don't need to know the details about it. Surprise. is it sends notifications everywhere. Um, I think that's pretty neat actually. I don't know. I have to think about that a little bit because one of the the tricky parts to this kind of thing is that this implementation when you automatically generate something like that, this code works. But I do think that the um the people
that might want to use us are going to be particular about what happens here. What happens if one of these things fails? Do we keep going? Okay, we need to control that now. Okay, we got to come back up here. We have to add another option on here. Now, when it does fail, like what action do we want to take? Okay, do we need to give it a call back method? How does that even work? It's not a constant. Like I think that when you go down this path, there's flexibility you probably want to provide into how this is made. And that could be pretty tricky pretty fast. I think it's super neat though. Service als regardless of which interface is requested. Where do you do this? Oh okay. So the reason this isn't a problem in needler by default just to explain. So it's
saying when a single class implements multiple interfaces and you so um in this case reader writer file service if you ask for any of these it's saying like oh we're going to try to build this feature to guarantee if you ask for any of them it's always the same thing. Um but like we already do that. Um like by default. Yeah. So like right here our source like you you won't know this unless you've looked at my code which is fine because it's online. Um and co-pilot wrote it. I didn't even do it. Uh this is what we source generate to already. So what it's saying is an interesting feature. I agree and we've already done it. That's how it works by default. So now I understand the feature and so I would kind of repeat this process, right? So I would keep doing this
where I'm like, hey, we already do it or I would say, hey, I don't want to do that. So I don't want to go make a mediator pattern, take that one off the list or keep it there, but mark it as like not doing. And I would keep doing this until I have a few ideas. Once I have one, then I say in plan mode like let's start walking through how we design this. So that's my that's been my sort of approach the last little bit. Um feel like would have been nice to write more code here. Sorry I blabbed too much. Uh, but if you are curious, uh, legitimately, right, like if you're curious about how this has been working for me, I'm not sending you here to go use Neler in your stuff, but I'm going to put the link in the chat
again. Have a look. If you go through the commits, why can't I read? Oh, thank you. um if you go through the commits or you clone this and you look at it right like all of this is um is being written by co-pilot right I was talking about writing some benchmarks I had a bunch of stuff for um for doing uh documentation in the CI pipeline this is uh it discovered a bug Right. So, this is all code. Every single one of these commits is basically co-pilot doing something. And so, yeah, if you just if you kind of want some proof that like I've been finding the CLI to be pretty effective for this, there's there's my code. Um, and yeah, so I'll play around with C-Pilot CLI a little bit more. I think that I mentioned at the beginning of the stream, I want
to work with Codeex. I've not used codecs a single time. So, I'll be doing that. And um my goal for this year is to keep playing around with different tools, trying them out. I just not getting too comfortable with any one of them. So, thanks for watching. If you have questions, um you can leave them in this chat. You can go you can find me on social media. Just, you know, send a message to dev leader if you want. Um if you have like general questions, right? Maybe not a specific walkthrough. Um, you have general questions like around AI or other stuff, uh, go to codecommute.com. I'll put the link in the chat as well. Um, you can go to code.com. I will make a video response for you. It goes on my other YouTube channel. And if you do have like a a request
for a walkthrough video, um, let me know as well and I can go make a video on Dev Leader, my my main channel, and um, try some things out. So, thanks for watching. Sorry we didn't code as much as I was hoping, but I hope seeing the tool usage is getting you thinking about how you're using it. I don't think I'm doing anything crazy, but that's been my workflow, and I hope it's helpful to see. So, thanks for watching. I will see you all next Monday. Same time, same place. Take care.