Coding Benchmarks For YouTube - Live Coding in C#
June 5, 2024
• 177 views
I have some YouTube tutorials to make on several topics - so I'm going to livestream the creation process and explain more things in depth!
View Transcript
my chat and stuff set up so I can see what's going on that's the last chat showing on my stream cool just double checking where we got the stream going right now should be going to LinkedIn Facebook not Instagram the format's not going to work well for coding um YouTube Twitter all the good places and this is going to be live coding and I did ask especially on LinkedIn I wanted to see if people wanted to see this kind of stuff because I don't really live stream code to LinkedIn so we'll see I think my chat is currently not doing what I want so let me refresh it cool I think that's working now okay awesome so um sometimes I live stream when I'm coding stuff and if I'm not working on I'm not ready to live stream some of my personal projects yet cuz
I'd like to have those a little further along before I demonstrate some code from any of that but uh a lot of the YouTube content I create that shows code does actually refer to uh projects I'm working on so whether you can tell or not uh I'm generally putting out videos that are helping me solve problems so that's what's going on with that um but other times I am trying to live stream a little bit more because I have to put code together for YouTube and to make the videos that I'm putting on YouTube and that kind of stuff so um the thing is I have to do that work I figured I might as well show people what's going on then you can ask questions it takes me a little bit longer because I'm doing stuff like this and I'm talking but I feel
like whatever I got to do the work anyway and it's extra content so why not right so you guys can ask questions as I'm going along I'm going to be building on the series that I've been putting out recently about downloading files in C and in particular this all stem from being able to download large files so some of the background there is that when we are downloading files in C you don't get the luxury of having a stream that comes back so again if you're not familiar with this kind of stuff I I'll break it down a little bit but when you're asking for a file you want to download it it's literally just btes right but instead of giving you like if you're downloading a video like a gigabyte of just bytes and you want to like put that all into memory like
we don't want that to happen uh usually so the idea is that you're able to stream it so that you get sequentially just requesting more and more data and we can actually minimize how much memory we're using for that so the video series soar has been talking about that we looked at refactoring some of the code to make it more reusable put it into a format that we can play around with and it feels nicer to call because the first video just said here's a bunch of code here's what it does have fun so this way is a little bit better and uh the goal in this now is do uh based on some requests that were coming in people were saying hey like what would this look like you know what are the results of this so I don't want to talk about performance
benchmarks with respect to runtime because I'm going to be downloading files this is already going to be a super weird Benchmark to go right I'm going to be downloading files from the internet I don't control my internet speed uh I don't control the server on the other side so these aren't going be good benchmarks for doing performance right there's too many variables it's not going to be consistent and it's a good reminder that's why I'm mentioning it to Folks at the start of this video with this this ramble is that it's not a good approach in the first place so the runtime stuff totally not going to care about it but I am interested in doing some benchmarking around the memory usage and again I don't control all the variables going on here but I would suspect that even if the download speeds and stuff
were different what we should be able to see if we compare these two methods is that the memory usage does look different and the idea and or I guess the reason behind that is because if we ask to download a video and let's say it's 20 megabytes if we use the normal way and we just say hey give me this 20 megabyte video you would put this all into memory at once so you use 20 megabytes of ram at least to do that and the alternative way that I was showing in the other videos was that we can stream it as it's coming in and this should mean um this should mean that we don't use as much memory that's the goal and I want to be able to demonstrate that with benchmarks because how much memory are we saving I have no idea but
it should be less so we should be able to measure that question from Twitter here says uh oh I guess the chat is working in the in the Stream as well it's just that it has the old messages which is weird um hi Nick just want to ask how to tackle live coding interviews so yeah um you can do practice just like this no um in all seriousness I think uh this is my personal opinion when I'm interviewing people um I've said this publicly before and I am fine to repeat it I don't care as much if you get the right Solution that's not why I'm interviewing you because if I just wanted the right solution I would expect that you would go on the internet and just research the exact right solution because it's been answered I don't care about the right solution as
much as much um the reason I'm saying as much is because I want you to be able to navigate the problem ask clarifying questions I want to see how you're thinking about going through the steps and that way I get a feel for how you're approaching your problem solving there's there's some really interesting things from my interviewing experience and it might surprise you um when I'm asking technical questions in interviews like the the actual programming ones this is the the phase where people are like oh get ready because you're going to have to do lead code questions that kind of stuff I don't ask tricky questions and the surprising part you might say well why like don't you want to ask hard questions that way you can get good candidates because only the best ones are going to explain it I ask very simple questions
and you would be amazed and how many people just difficulty navigating very simple questions so the reason I do this is because the questions I ask if someone happens to just totally Ace it and they're like this is ridiculous why did you ask me something so simple the questions I ask I can keep building on if I need to but the reality is I very rarely get to positions where I need to build on these things so something as simple as make a linked list for me right it's there's no tricks it's not oh like and by the way as you start coding I like throw a curveball at you and you're like I've never heard of this like I don't my goal is not to trick you in an interview so I want to see if you've said that you've programmed before like I
should be able to see that you can follow some type of logic like I don't care what language you pick right like so set up what your data structure is going to look like I'm usually giving you like an API for it so I like people will say hey can I change the API so sometimes they'll say no like let's keep it like that's a constraint so I want you to work within some constraints and then I want to see you rationalize like okay well how would this work if I only have these inputs you know the the syntax and stuff I don't care as much about but I have seen people say I've been using this language for X years and then they go to program and it's not on a whiteboard it's like virtual and they can type but they go to program
in this language that they've done for years and I'm not I'm not exaggerating when I say this they're not able to declare variables or do simple assignments or make a function and I'm not saying this to pick on people I'm saying that I personally feel like I set the bar very low because I can always lift that bar as we're interviewing so I do expect that people explain what they're doing they're asking clarifying questions because um when you start making assumptions about things I will generally try to test you on that and I do that because if you're just doing it from memory like you know I'm the link list one is maybe less obvious but if there's something that's a little bit more advanced if you're just kind of it seems like you're just reciting it like you're not explaining things to me you're
just kind of doing it I need to be able to make sure that you understand what you're doing so you know as you're walking through what you're writing and uh how you're approaching your problem please speak out loud explain your thought process because because if you get stuck another thing that can help is that the interviewer can say I know what like you told me what you were thinking and let's back up uh you made an assumption here let's go correct that and then you can carry on right so um I hope that kind of helps but the biggest tip I have is like explain um yourself as you're going I think that's the most beneficial thing and uh I I do recommend practicing lead code problems it's not not my doesn't make me feel good to say that because I don't think lead code
problems are representative of a lot of software engineering just to be honest but they are helpful for interviews so for Twitter I don't know how to pronounce your name so I apologize but uh I hope that helps answer your question let me know if you'd like any more details there's a dog trying to break into my room right now I can hear her at the door and she weighs 130 plus pounds so there might be a wolf in here in a moment but I think she went to the other bedroom we're safe okay yeah let me know if you want to have me explain that in any other way for the uh the coding interviews okay I'm going to jump over to visual studio now and I'm going to bring up some code that I had from before and we're going to add a new
project we're going to get on this was kind of fun I made a huge mistake and it was great because people in the chat were able to help uh but I was looking for headers and I was looking for headers on the wrong type I needed content headers not the the other object that has headers and I was like no file that I'm downloading has these headers so it was very embarrassing but it was a reminder for folks like this is basically like par programming it's a little bit more one-sided because I have a microphone and a camera on me but it was like par programming so people were giving me ideas and like I said it's a reminder that you can do some awesome stuff together but let me go ahead and share my screen um my camera is probably going to disappear because
I still haven't figured this out yet you can probably see my screen I'm going to put the chat back up make it a little bigger so people can see what's going on because I don't really use that part of my screen and we'll put my face back in here there I am cool let me also double check I don't know if I can see LinkedIn chat here by the way makes me a little nervous the event didn't seem to get created on LinkedIn so I can't even see if I'm actually streaming on LinkedIn right now if you are watching this on LinkedIn please let me know because I'm very curious cuz like I said I don't think I can see it okay so so we got some code up here what I'm going to do is go ahead and we're going to make a new
project that's going to be for running Benchmark so pretty simple stuff new project we need a console app for this sort of thing and we called it streaming data this will be the benchmarks okay right nothing too exciting now we need benchmarked this up last time I'm going to switch my startup project right at the beginning so I don't press F5 later to go run it and get confused why it's not working so we got that we'll go to the nougat packages here and we need benchmark.us that have not done benchmarking in C this is the go-to tool it's absolutely amazing um it takes care of so many things that you probably uh wouldn't think about like doing warmup all the how many iterations you need like all this kind of stuff that if you were just like I want to put a timer the
beginning of my code and calculate you know call the the stop method and then print out the time after like this is truly incredible very standardized setup and stuff so um it's really awesome okay so we have our Benchmark code um I think to start I guess I should put a using in front of that we'll use there we go I'm going to ask for the executing assembly that's the assembly that we're currently in I do this like right now to start we're probably only going to have one Benchmark in here not a big deal so the other overload that I could use is when we make our Benchmark class I could pass in in the type parameters which are your uh less than and greater than signs right I could pass in the type that is my Benchmark class but this is basically going
to go look for any benchmarks in our current assembly and our current assembly is called streaming data. benchmarks it's basically a onetoone mapping with the project file so we don't have any benchmarks though we got to fix that um I always seal my classes you cannot do that in benchmark.com yet um I'm putting this attribute on the top called a short run job and short run job is going to allow us to do fewer iterations because the thing I want to remind you is that I'm about to run benchmarks that download files from the internet friendly reminder this is not a good idea it's not at all but I'm trying to see if there's a cool way that I can go measure the memory usage not the runtime performance so we will see and I'm going to put this another attribute on here called memory
diagnoser thank you co-pilot um I don't know if it's listening to me or just reading my mind but we want memory diagnos on here that's the thing that I'm after because it's going to show us the the memory usage um the other thing like I have Enterprise Edition of Visual Studio I could probably go run the profiler and check it out and take snapshots and compare them but I figured benchmarking uh using I don't know like I said I'm kind of just winging this to see but this is the video or the core of the video that I want to be able to put out um probably on Thursday this week so you're getting a behind the scenes of what I'm doing to put this together so we have this benchmarks class um before we set anything up what I need to do and there's
other ways that I could do this I could go copy the code that we had in the other video I'm just going to reference it so uh the top left project oops close that we don't need to see that I'm going to right click on here add project reference and then I'm going to reference I think it was download API was the second one I made yes yes it was okay um so now I have access to this and I don't think I made stuff public so I'm going to make things public we have that need to make these things public so the reason I'm doing this is that if I could spell that would be even better I'm going to make things um visible to the other assembly because when they don't have an access modifier on them which I recommend you always put
an access modifier I was just taking some shortcuts um when you don't have an access modifier by default it's private um and I get I don't know with no top level statements if you know in the chat feel free to add your comments but we're not using top level statements in this one so there was no like overall program.cs with a like a class defined it's all uh using like the shorthand syntax so I don't know uh I assume private or internal but the point is that you can't see it outside of the assembly so that's why I'm making it public what else here so stream with length is less accessible okay so where is that defined I missed one oops cool so is that all of them it is so we should be able to and I see the questions in the chat just
give me one sec here um we should be able to do this yay and then we can do a global setup I don't know if we're going to need to with this I'm just trying to think about this let me let me do it the way that I think we should and we'll come back to it in a second um and actually this was already set up in such a good way to be able to do this um but where did I do it in this one oh that's right the um I'm already in here what's going on sorry I'm in the wrong file this one had the service collection stuff so I want to use that and I might have to go add some other um nougat packages to be able to get this guy here this is so that we can get an
HTTP client Factory which if you're building server applications probably in general you want to be using this not just neing up HTTP clients if you're doing something super simple not a big deal but um if you're constantly opening and like disposing of uh of new uh HTTP clients you can run into some issues with your socket usage so I'm going to go ahead and take this because it's super handy and actually let me just copy that whole thing and we should be able to do oh thank you co-pilot is honestly awesome and you can see what it's doing already right this is why co-pilot's so sweet this isn't an ad for co-pilot by the way because no one's paying me to do this um YouTube gives me about $1 per day to make videos so I'm not quitting my job um but if if I
press tab like it's done right how cool is that uh that does not need to be readon service collection we get that awesome it's beautiful now we do need to well we don't have to but we should do that because this is not a Constructor just adds up we could make a Constructor we could do that um but if I'm going to parameterize this at all and I don't think I'm going to but generally when I'm writing benchmarks I will put this stuff into a setup function instead of a Constructor because if I need to parameterize then I can so when I say parameterize if we wanted to pick different URLs to go download actually we might need to do that we might need to to go pick different size files so you do this Global setup because it will go handle the parameterization for
you which we may get to okay questions in the chat hi Nick thanks for this awesome live session I'm from Bangladesh that's not a question but awesome uh great that you could make it I think it's so cool that um you know completely opposite side of the world that we can have this connection so that's one of the really fun things about doing content so thank you for being here um okay thanks Nick for the answer another question for me I'm trying to become a senior developer but I'm not really sure do I need to learn all the best practices design patterns and what do you expect from a senior developer compared to a mid-level developer so definitely I would not say to go out of your way trying to like just learn design patterns and stuff um that's not the focus that I would
say now got to preface all this kind of advice with like it's hard like I'm I'm not your manager unfortunately right so um this is just going to be my perspective and I need to offer this to you in a way that you can kind of take it interpret it how you'd like see how it's applicable to you and that goes for anyone else that's listening right it's challenging for me to give general advice especially as a manager and saying oh just do this because that's what your manager wants I don't know your manager um I have my beliefs and philosophies about managing and Engineering teams so I'll share with you that and try to offer General guidance here but I have to kind of offer that disclaimer so when I'm thinking about people going from even just in general the spectrum of going from
uh very Junior developers all the way through like you know senior principal sort of Beyond kind of thing it's all about um like uh circle of influence and area of impact and I guess that goes with the amount of impact so I don't think that it requires that you have to go out of your way to go like okay there's a list of like 20 design patterns go memorize all them because even like take design patterns right like design patterns are a good spot to start but a lot of the time in real life like it's not going to be a cookie cutter drop the design pattern and it just happens to work the way you need it to because code just doesn't work like that almost all the time if you're building stuff that's brand new maybe but odds are like even then it's
not going to be totally line up like that so now does it help like I put out content about design patterns and things like that so do I think that it helps sure I think that's nice I think you can go learn about those things if you're not familiar because they give you some different perspective so when I'm looking for people going from mid-level to senior there's a a handful of things that are going on at this point and it's still continues on those two spectrums that I was talking about so I do expect that senior Engineers so if you're going from mid-level to senior I want to see that you are mentoring other people that can look very different so I don't mean that you've set up a formal mentoring relationship and you're getting students and stuff like that like no um I want
to see that you're helping level up the people people on the team around you potentially on other teams like but you're trying to be what I would call a multiplier right you have people around you that need help to be more effective engineers and this is your opportunity where you can be doing that for them so sometimes that means that you're going to have a little bit um you're going to feel a little bit slowed down right you're going to have your own work you want to do but being able to balance your work your deliverables and helping level up those around you I think is a very good um indicator for working towards senior doesn't mean you're managing people right but you're helping basically coach others to become better Engineers as well so I like to start seeing that in seniors and like Beyond
senior by the way the the labeling this looks different everywhere so it's really tricky to you know I can tell you the Microsoft levels but meta I have no idea um so for us you would be going from like let's say you're at a uh software engineer 2 to a senior and then principal is beyond that so even at principal level I do expect that the principal Engineers are helping coach the more Junior people on the team and that looks different depending on your level right so coaching a junior person might be or shouldn't even be might be is probably is probably very different than a principal person coaching a senior right because they know the senior knows these other things but they're also trying to help the senior get to the next level too so that's a big part but on the technical side
because I think most people want to hear the technical pieces I'm trying to give you the parts that I don't think people are paying as much attention to on the technical side though this starts to speak to like the not it's not just the size of the projects but generally there's a correlation so you're working on larger projects and you might go well I don't have those we don't have those on the team I keep getting these smaller things and I'm like doing pretty good like chipping away at the work that's given to me I would say you need to be proactive speak up about this kind of stuff have a conversation with your manager if you're like hey I'm trying to do more impactful work but I don't see these opportunities coming up have that conversation with them right you want to be proactive
and try to see if you can get approval or get you know schedule to work on a project that is bigger and it's a good sa have with your manager because they can give you some insight you can get a feel for like how confident they are in that they might say hey I'd like you just to do some of these other things first and then I think you'll be ready to take on something bigger like that but the point is that you're using that as a a reference point to see like am I ready to take on something bigger and then you basically are in this position hopefully where your manager is kind of stretching you a little bit out of your comfort zone so you might work on a bigger project that you get to to do a lot of the design on
on it might be across teams um your manager might say hey like there's a couple other people on the team that are going to be working with you on this but you are the driver for it um something else that you'll want to demonstrate this is not a technical thing but it's very important is like uh call it I don't I don't like the word ownership because sometimes I think people hear ownership and they think that means like it's just me that's not what I mean when I say ownership accountability responsibility and ownership so if things are going a little bit off like you want to have accountability for that it's not oh like the Project's going a little bit off course I guess I better keep quiet and like just hope it's okay it's like no you're being proactive like okay well what's what's
up with the project like what parts are going off course start diving into it looking at it try to raise awareness to say hey like looks like we're about a week behind now like what should we do to adjust this so I'm kind of just blasting a lot of stuff in your direction let me know if any of that resonates but the whole pattern is that I just I would expect to see that kind of stuff and just scale it up more and more as the levels are going higher it's those types of things that I like to see but that's that's for me um yeah I'm going to keep going on but feel free to keep updating me in the chat if you have more questions or if you want me to clarify that some more okay so the code we have on the
screen back to the code um is the dependency injection container that's what the service collections for the HTTP client part is going to give us the HTTP client Factory we need that for our stream downloader if you're not familiar with dep pendency injection just to quickly show you if I wanted to go make this stream downloader you can see that I would have to pass in one of these IH HTTP client factories I go back to here you'll notice that when I go to get a stream downloader I never say this right I don't type this anywhere because if I did need to do that I would need to do this and if I needed to do that oops I can't spell come on co-pilot Save Me Right you'd have to do that but instead of getting the service there is no HTTP client Factory
we can't even new one up but that's the idea instead of doing this kind of thing and sometimes with dependency injection it's saving you from like many levels of this where you're doing more and more composition of objects we just get rid of it because this will automatically because they're registered above on line 21 and 22 this will automatically say I need to go make one of these I need to get that I should say and it's registered as a Singleton so the first time someone asks that the first time that someone asks for this there we go it's the second time a charm then we can have the dependency container go say oh well I don't have one yet let me go make that what do I need to make this and then it goes oh I need an ihtp client Factory and it's
going through its registrations and realizes ah like someone called this I know how to give you one of those so it kind of works backwards to figure out what you need to go make those things and then it starts to feel kind of like magic when you ask for things so dependency injection super awesome if you're not familiar with it I do have plenty of videos on using something called autofac which is my favorite dependency injection framework but it's very similar to what you're seeing that I have highlighted just a heads up okay now we got one of these we're at the point where we can almost Benchmark something because we don't need too much so what do we want to Benchmark I think I need to have this Benchmark attribute it's been a while we'll find out I'm going to do public async typing
is so difficult co-pilot do your thing look at that how cool is that I I don't even I'm done stream's over right not quite though so this is just getting us the stream and uh what we should be able to do from here like technically this is going to be kind of weird because the way this API looks it's trying to get a stream and Technic techically it could fail but based on the implementation we know it's not going to so I could try to cut out some of this so instead I'm just going to do this you probably wouldn't want this in your real code you would want to check if this comes back uh as one thing or the other right I'm going to end up pulling this guy out this URL we're going to parameterize it and just to kind of walk
through though we have a URL for something we want to download we're going to this is the part that we built before so we're going to ask the stream downloader to get us a stream that has the URL in it this is going to then give us a stream result and we should be able to check if there is a length spoiler alert based on the last video there's going to be a length on this one which is good news um and then from there what we can do is try to stream it now there's a couple of things and I was trying to think about this ahead of time but when we're trying to Benchmark this for usage what do we want to do because we need to actually stream it because if this works how I'm hoping it works is that when you
do any of this right here it's not going to read in the whole stream into memory so how do we start reading this in and the answer I don't think is going to be readed into memory we don't want to put it into a memory stream hello on Twitch good to see you and instead we have a couple things we could try to copy it to a null stream so basically it's like a noop and we should just be able to write there and it does nothing but at least we're trying to pull in from the network so that could be very interesting but the other variation I was thinking about is like a file stream but I'm not sure um I'm not sure because it should be okay it should be okay but I think the file stream could be very representative of what
you might expect to see for memory usage because it's not going to affect well there's a couple things here we're going to have I and it's a bit of a spoiler we have to go build more code to show the example here that is not using our stream downloader you want to compare it to the Baseline so that is going to pull it into memory um now that I'm thinking about this I definitely don't want to download this one that's 10 gigs because when I go to show it the other way uh I think it's going to try to make a 10 gig memory stream we're not doing that um I haven't tried it though maybe it won't the point is I want to be able to show you if you were to really use something like this what the memory usage might look like
and I feel like writing it to a file will give you some of that input that comparison isn't going to matter it's going to be like a common piece that we could factor out when we're looking at the benchmarks but um we'll see what am I working on so this is building on previous live streams that I've done in some YouTube videos we're going to do some file downloading in C but we've built some pieces for this already what we're going to do is Benchmark the comparison between the traditional way which by default is going to pull things into a memory stream we don't want to do that with bigger files and the alternative which is the thing we built together uh which should allow us to just kind of stream it on the Fly and do something with it without the whole file in
memory fingers crossed so I am going to have to go find another file not a big deal and I do think for this one I'm going to do stream with how do I want to do this um it's a network stream under the hood I'm going to call it on the Fly I need a better name for it but basically we're not putting it all into memory we're going to be streaming it on the Fly and so on the Fly and to to n stream that's going to be the first one we do so we should be able to do um we have stream with length that's passed out here stream null there we go um oh did I not copy that ah this is funny um I want to show you guys this because it's interesting we put this not null and true thing
on here but if we go back here it's like hey like this could be null and in my head I'm like that can't possibly be null we know that we're getting a stream with mik but we don't know that because we didn't put an if statement I deleted it right but maybe just to maybe just for safety whatever um the if statement itself should not add much overhead but why is this still oh because I missed an exclamation mark so yeah if we try to get a stream with a length back from this and we don't have one then we should not be able to continue so kind of gross that we're putting a check in the Benchmark but I'm just trying to satisfy some of the warnings here uh not a big deal okay so by the way if you're watching this and you're
like Nick that is a big deal that technically changes performance characteristics you're absolutely right that it does but I'm just trying to do memory profiling here so that's the that's the important part okay so we got that um do I want to do let's do the null stream to start with but I think to do the comparison properly we are going to need to do the variation of this which is not using this stream with length so what does that look like uh technically maybe I I want to think about how I do this so it'll be a memory stream to null stream you can see already that I don't want to copy that URL out sorry I don't want to copy the URL I want to extract it out this is the thing I'm probably going to PR arize co-pilot so good and actually
that's so cool it changed the URL right this was the other one that's on my clipboard but you can see that it took this one this is actually the file I want to go download because it's 20 megabytes it new it's so smart okay um that's the URL and I have it pulled out now but we don't want to use in this case we don't want to use the stream downloader we don't want to do that because it's going to have um the network stream so we have to do it the manual way so we can basically go look at what that's doing and I was thinking about this I'm probably going to have to pull out the HTTP client Factory okay um sure let's let's do this okay so in here under the hood this one sorry I'm jumping around here under the hood
this one is going to go make a new HTTP client so we need to make it Apples to Apples for comparison so I do want to do this here which means I do need to go also do a private I HTTP client Factory I don't want all of that co-pilot um close here we go most of my coding now is just pressing tab which is really cool and I don't have a cancellation token so we'll put default into here and response header is R so actually the default is to not have that it's it's content readed so this should in theory force a memory stream for us it's going to try to read everything in tab code is the fure for many absolutely I would love maybe I don't want this I don't know so I haven't really thought this through yet but hear me
out the fact that I'm saying all this stuff into a microphone and and talking to you folks and then I would love if it was like oh that's what Nick wants and like it knows what I'm saying as then I can keep pressing tab um I don't love yeah uh I don't know I think it would be helpful I Don't Love tab uh hello also on Twitch good to see you here thanks for joining so we don't have a stream with length though it's just a stream and in theory we have a benchmark we have two benchmarks I'm nervous I'm nervous because this is a really not good idea to go Benchmark downloading files from the internet but I think we should try it I'm also streaming so weird bandwidth considerations I guess but I don't know should be okay let's try it right uh
what's going on with this oh I can put one of these guys on there by the way if you saw what I just did I'm just getting rid of the warnings I'm just being a little bit pedantic uh the question mark suggests that this can be nullable because uh of how I'm not using a Constructor with read only and then if I go back down here technically this is is saying like hey if you didn't go run that method because it doesn't know that benchmark.us about the the download part on Benchmark me too the you know I I have to say it again because there's going to be people leaving and joining the stream downloading and benchmarks is a terrible idea because nothing is going to be consistent I'm just saying it again in case you're joining here not okay don't do this I am
trying to look at the memory characteristics yes I could use the profiler yes I could cut out the middleman and simulate all of this but I just want to show like with all the real pieces like what do we got going on kind of like doing a functional test and I'm truly going out and hitting the internet this just not a not a great idea uh but yeah the stream shouldn't be an issue because I'm uploading you're right so hopefully that's no one and not like this stream drops or something ridiculous but I think we're good to go here this one I believe it's the 32nd one from the sample lib one is uh 20.1 megabytes or something but I think we're good to go so what we're going to do is switch this over to release that's step one and then we run this
not in debug mode because it's going to complain if we do the way to go run this then seems completely counterintuitive we want to run this with the debugger because that's different than running in debug mode might sound confusing we are we are basically compiling it in release that's what I did up at the top switch from debug to release but we want to run it without the debugger because you can take a release build and attach a debugger to it it's just weird because if it's optimized things might not line up in the code so from there the reason I said this seems ridiculous is because we're GNA run it without the debugger what menu item do you think we would go to for that you wouldn't think the debug menu but that's exactly where we go and then we say start without debugging
this menu should probably just be called start dot dot dot or something run dot dot dot it's not it's called debug so here we go and now we cross our fingers I actually don't know how many times the short run job executes too but my internet down is pretty good uh actually it's Comcast so who am I kidding um it's supposed to be pretty good it's supposed to be a gigabit down but I bet you if I went and ran a speed test it would be like embarrassingly slow so we'll see I'm very curious I have a terrible feeling [Laughter] already maybe we don't want the 20 megabyte file oh this is going to be bad Comcast the one that now owns VMware is that true I did not know that did not know that yeah I got a bad feeling about this yeah if
the uh warmup is something that we're talking through probably not a good not going to be good but it's a short run job we should should be okay hey look at that oh is it just about to start the Benchmark or what where'd it [Laughter] go okay we we'll we'll wait here I I'm not losing hope yet this is the part when I'm making YouTube videos I usually would go cook food or something and then come back and then I I edit it out or my editor will edit it out but look at this oh is this worked this worked and it's super cool because it's kind of telling us what's going on okay are you guys ready for this guys and gals okay so again the time usually we would be looking at time please do not look at the time because there's just
too many variables it's super silly don't look at it what we're looking at is here oh I can't highlight a single column that that was ridiculous we're looking at the allocated column so when we go to do it on the Fly which is using the class that we made the allocation when we're going to stream a 20 meg file was 214 kilobytes now the the number is obviously lower than the other one we're going to look at so we'll talk about that the overall memory use I can't comment on because I don't know all the other things going on behind the scenes uh the code that we wrote specifically like I don't know maybe we could have used a struct as the return like it I don't know there's probably a couple other things we could have done to try to squeeze a little bit
more memory out but the reality is all the heavy lifting is completely done behind the scenes in the Stream class for us and the downloading pardon me I had a sip a pop and now I'm like I shouldn't have done that I'm going to burp um not on stream you can't edit it out uh but the other one right the memory stream this one is truly that's the 21 Megs I was talking about right 21 and then another three digits here so we went from 21 megabytes in memory and the other one was you know less than a quarter of a megabyte in memory so this is very cool it also happened to be faster but like I said we don't want to trust that not reliable don't look at it don't get too attached to it I would totally anticipate that the amount of
time is very comparable but if you wanted to prove that to yourself you could go set up a simulation that you can control where you're trying to copy from a source right you have a a memory stream as a source and then you try to do um you know stream in chunks versus stream the entire thing and copy it uh interestingly if you had I don't know how optimized memory streams and stuff are but technically if it could just do a whole single array copy it's probably lightning fast but who knows um we're not doing that today this is what we were looking at so this is one thing the time could depend on server latencies well absolutely yeah there's there's so many variables I don't want you to go look at the time here allocated was the goal of this um I'm curious though
if we wanted to go write this out to a file with that going to look like um another variable that we could play with and I'm not too inclined to go do it because just the time it takes we could try doing smaller files right so the the idea might be that if we went below we saw that the total allocation sorry I closed it but the total allocation was 25 or something kilobytes for the on the-fly one well what would happen if we picked something that was smaller than 215 k right so let's imagine a different scenario and I'm not going to go do this but say we wanted to download 100 files that were 100 kilobytes right so many files that are under that threshold what then is the memory stream one more effective because you're like hey look I'm willing to go
pull um and let's say it's sequentially too right so I'm able to have a memory stream pulling 100 kilobytes I'm cool with that and you want to do do that 100 times sure like we can recycle the memory hopefully even if we can't maybe it's just fast enough and overall it's not a ton of memory usage I don't know you might have some really interesting results but these are the types of things and I like talking about this stuff because um remember if you were on the stream earlier I was saying I don't think Elite code is a lot of the time very representative of like real software engineering this is one of those reasons why because I gave you a scenario where maybe we want to download many smaller files versus one big file and you might go change your entire design approach for
that and sometimes when you're doing lead code stuff it's very much like a here's a hyperfocus problem and like it's got an optimization trick and I would much rather people think like holistically about the different types of scenarios you have to work through so I think that there's a lot more this is my opinion I think there's a lot more useful patterns that you can uh you know extract from that and reapply in a general engineering sense you can do different analysis that way um I use leco for the problem solving path more yeah and honestly like if you this is why like I I give you my opinion but I'm not telling you it's a rule right my opinion is that I don't think it translates well however if you find that you go do lead code problems and you feel like when you
go to go build things practically you're like hey like thankfully going through those lead code problems helps me think through this then by all means like you have to do what works for you um I hope that when I'm talking to my audience in general when I'm giving advice I don't want to every time I open my mouth say this is just my opinion but but I hope you guys understand that like I don't want to tell you there's one right way to do stuff because I would be lying to you aside from saying C is the best language right we all know that just kidding um but there there isn't just one right way to do stuff so I I never want that to be the message that you take away um and if you ever feel like I'm producing content and you're like
hey Nick it sounds like you're saying this is the only way to do it feel free to call me out on it because I would rather correct that content for you and explain myself then have you left like uh walk away from reading that or watching it going like okay well I guess that's the way it has to be done and like that feels kind of weird there is never one right answer for Stuff um you change the constraints around a little bit or you're aware of more constraints and suddenly your answer can change so uh I I actually gave a shout out to Derek Co Martin last night on my live stream and I will do it again if you want to see someone who is extremely good at explaining things in different contexts and not saying like this is always the best thing
because unfortunately a lot of people will do that Derek Co Martin of code opinion.com he's also a YouTuber he's got tons of subscribers on YouTube absolutely brilliant but he does such a good job explaining something explaining the context that it's valuable in and not like hyper fixating to it because if you gave him different context he would say yeah that won't work as well as maybe this other thing here's why so okay didn't code as much as you to be honest another leak code I did help me really on my projects I see it as a brain trainer at least for now yeah like you know different different tools right um and again I'm not crapping on lead code I for my principal engineering manager position at Microsoft by the way I don't code at work I still had to do a coding interview and
I did go practice lead code after at the time I've been programming for 17 years I still practice lead code because I said I don't know how to do lead code effectively that's not what I do at work okay let's go move on and try I want to I'm going to copy these CU like I said I want to use these for YouTube this is this is the code that's going to be going on YouTube so if you do watch my channel and you see this video you're going to say hey I watched Nick put this together like you'll understand my thought processes I'm going through stuff so it's not going to be to null stream it's going to be to file stream we'll do that again um we should be able to how do I want want to do this so using I don't
just want to do that though um let's start with that but I want to do a new file stream because we have some nice options in here where I can say we scroll through these I was just double checking it's not getting cut off on the stream file mode file access and file share so file mode I want to do open or create file access we're just writing file share we don't need any and I will space this out a little bit better so folks can read by the way I don't talk about this a lot but you'll see probably in a lot of code I write it's very vertical um the more you may not believe me but the more horizontal your code is especially if you're using a scroll bar to go read it you can you can dramatically improve your reading experience
when you make things more vertical I'm not telling you it's the one right way but I would say give it a shot for a little bit if you don't believe me because the more time that you spend doing this when you're reading code the more time you're spending in general you just want to read and not have to move your eyes so much it honestly does help a lot that's been my experience a lot of people will say this but it takes a bit of a leap of faith because you might be like that makes me so uncomfortable just jam it all on one line but try it I promise um actually I shouldn't promise because I'm not saying it's the best but I strongly recommend it if I can say that um I mostly use Le code to better to be better at optimizing
and stuff not forgetting stuff that I don't do as much yeah I think that's totally fair yep so that's totally cool right like again it's another tool that you have but I would say again personal opinion your best tool at getting better is to build things that's what you're going to be doing at work build stuff right doesn't have to be something you're going to go sell off but you want to be building things it's such good practice okay so we have this file stream here um we're going to copy that to here and we're going to do the same thing I'm going to give it a different name just that part we sample two and it's just Stream So This should work the numbers that we had before were like 200 I think it was 215 I don't know if you guys took a
mental screenshot I don't want to go run all these other ones again um to make my Youtube video just for the record I will go run them all so I can have either screenshots or something to refer to with accurate numbers but I think it was like 25 kiloby and basically 21 Megs now we're going to go make these files and hopefully it should be okay but we'll find out right remember we have to go right click debug start without debugging it's still in release mode and let's see what happens now I'm going to respond to some chat stuff as this is going so agree on build stuff this how I learn by doing I have two jobs one is more backend the other one's more front end and my private time I'm building a dashboard for VPS and Game servers awesome to start hosting
businesses in the future and basically full stack that's super cool it's great that you're doing that some people will say they don't have time for doing that kind of stuff or they don't want to make um you know software development their entire life and personality and I totally get that right I get that it's difficult if you are not giving yourself extra time and you are trying to also get ahead because then I would say like ultimately something has to take priority and again I'm not saying you have to go do that with your personal life but you're making a conscious decision to prioritize other things over some type of advancement in your skill set and I'm not saying that's right or wrong for the record I'm just saying that we only have so much time and if you want to get better at things
I would say you either need more time for it or you need to make other things you're doing more effective so you can get more time back so just a different way way to think about it I I don't have friends oh come on don't say that and I work fully remotely so I have enough time okay don't say that though you got friends we're here if there's no other friends that's cool don't worry but I I mean I spent um you know once I graduated University and I was working at a startup I spent eight years just working almost non-stop just how I lived right I I had friends but I ended up I've talked about this before like I got I had a lot of burnout problems but it looked different like I didn't realize I was burning out because I love work
but I was like I had social anxiety like pretty bad hey this this got better by the way results are in um but the writing to a file actually was was better than going to the null stream that seems suspicious the times look at the Times interesting right what's going on with that you're supposed to say Nick we can't trust the times Nick we can't trust the times you're downloading stuff from the internet don't do that um yeah so we can't trust the times I find it fascinating that they're very close right what's I it's it seems a little odd doesn't it they're very close suspiciously close for downloading stuff from the internet but yeah the allocation is interesting I do think that this was 215 before so um just it freeze me faster when right um I don't know I don't know uh it
was going to a null stream though so it shouldn't have even been doing a copy like there should have been no extra allocations at all that's the I just would have thought that this number would have been higher so the idea is if we forget the the comparison between the two streams right we have a stream and then in one scenario we're taking stuff from that stream and copying it to nothing which actually results like the null stream copying maybe not null stream copying it's still the the copy let's okay let's let's check this out because I'm I'm interested now so okay let's take a mental snapshot of this because I want to stop this actually it is stopped cool um copy to where are you so we're going to go through this code a little bit aha okay so we're reading from the source
and writing too so the right async method is on the destination on a null stream I would expect that WR a sync is just literally a complete noop so that's interesting this is using memory pointing to a buffer so this should not have allocations it's all very interesting so I'm not sure if you're watching this especially if this is already recorded and you're watching it and you're like Nick you're stupid here's why it's happening uh I'm very interested to understand more about why a stream of any kind writing to a null stream took more memory than theoretically that exact same stream writing to a file I would just have expected that the implementation this is the destination part that of a file stream would have some extra type of allocation certainly not just less than a stream that literally does nothing so pretty cool I
don't know the answer but it's not really that important it's just a curiosity and that's why like going through some of this stuff for me like the whole goal of why I put this original series Together full transparency I needed to download files needed to download files but I needed to know the length the operation I'm trying to do requires the length otherwise I just can't do the operation and it's fine if I can't do it no worries but I can only continue if I have the length and unfortunately when you do the one variation where it's not using the memory stream we were never getting the length so I was like I I got to figure this out there's this is a solved problem right so here's the here's the answer um so digging into the details beyond that not super important I just
needed a working solution but it's cool to go through this because I get to learn totally random stuff and now I have more questions so um just catching up on chat here since I have a house and a cat knocking all my bad feelings and burn it just disappeared that's awesome I'm really happy to hear that happy life never before working is fun but I don't work too much good this is good I recently got iPads so I don't have to be on my PC to do work all the time good that like separation right is super important now I go out side Center a tree and do the notes and sketches there on the p man that's so cool to hear I'm really glad to hear that um just in general like there's a lot of good things there right not working too much
um you mentioned having a cat right like when I tell my burnout story I I always bring up the fact that and it always makes me emotional so I'm not not going to try to I'm going to try not to get choked up but my I ended up getting a dog it was about four or five years into working and the only solution I had for myself was getting my dog I said I need something that will physically take me out of work because there was no there was no excuse for like I would basically do anything and be like I could be working and literally like helping a business grow and having an impact on the world because we were making forensic software to a lot of the time it was used to help catch pedophiles and like it felt good to be helping
with that and I needed something that would take me out of work and I said I'm getting a dog and uh her name is lla and I will always say that lla saved my life because without that I wouldn't have had that separation something to pull me out of work I finally at that point because I I wasn't in a relationship or anything right and I was getting social anxiety so I wasn't even around my friends a lot but I finally had something at that point where I said this is this is a life it's more important that I go home and do this than trying to spend you know you know jump into the next problem and like just stay at work it was like you have to go home you have to be with your dog so really cool to hear that you
have some of that separation going on it's awesome um yeah and then so on the on the code right so maybe when we run several tests it's more accurate that's the idea with benchmark.com I don't know in Seattle like maybe it's actually relatively consistent but still it's going out to the Internet so I I do think that when we're running several tests uh and we're not doing the internet like we have full control over stuff that I would expect this would be a lot more consistent but yeah cool that's pretty awesome um that's mostly what I wanted to look at for the performance part um that's going to be my video spoiler alert so now we can see but I do want to see if we can maybe change the API because I wanted to do this in the other live stream but I didn't
do it I think I got distracted and I was probably chatty and just missed it so um something I wanted to look at and I don't know if I'll implement it but I wanted to talk through it because I think it's an interesting idea we have this get stream method on our stream downloader and I guess I was hoping that the benchmarks would show some different results or maybe if we were to go I talked about this different scenario that I didn't Benchmark right but let's say going back to the other idea if we need a ton of small files is it just more effective to use the memory stream I don't know we didn't Benchmark that I don't know the answer to that but if we assume that there was a situation where you're like look we should pull it into memory all at
once because it's quicker I don't know maybe there's some sort of like resource contention on the other side that you're talking to to stream the data literally I don't know but if there was a reason you wanted to do that I was thinking that on get stream a sync we could give it another parameter that says like a threshold and the idea would be that if we could get the side so when we do get try to get content with length if we try to get the size and it was within the threshold say you're like I'm willing to anything that's uh a megabyte and under like just pull it in memory I'm I'm cool with that just making this up right if you were cool with that then we could have a parameter that you could pass in we could do a check and
we could say hey like if that's the case let me just give you a memory stream back but now I'm kind like again I haven't thought through this this was a thought that I was interested in trying to to walk through but it's funny like as I started saying it I was like rubber ducking it with you guys and I think that it's kind of a moot point the moot point part is that to get the memory stream we do that here like this part here at the very beginning after making the HTTP client this is the part that we would change to get a memory streamer on but where do we know the length after so we've already made a decision about how to download it um one could argue like okay just you know stream the whole thing and a memory stream rate
away and pass it back but that's defeating the point the goal was I thought maybe we could add a parameter onto this and we could intelligently say hey look we will call the other way which is this right we could call this instead give you back the memory stream not check for the headers and stuff but we actually can't do that because we only know the length if we have one at this point so that idea is not going to work unfortunately but I thought it might be kind of cool to give you the option to decide when to put it into memory and when not to so I think that will be it for the coding part I will uh wait and see if there's folks that have anything they want to ask in the chat uh it can be about this stuff it
could be about literally anything I'm happy to chat through it that's the whole point of live streaming I have a a late meeting I have a meeting in 30 minutes so it's almost it'll be almost 11 o'clock by the time I get on that meeting um which I'm excited for but I figured I would stream before that so I got some time if you guys got questions I'm happy to answer them for you whether it's uh early in career stuff if you're going through interviews you're cons you're not even in software industry yet but you want to break into it uh I don't I don't promise you solutions for all this stuff but I'm happy to try and talk to you about it and see if I can help but effectively the coding portion of this is done so unless you have other code you
want me to try and quickly jump into but I'm going to go ahead and put I'm going to put my full camera back on it's probably gonna do the thing where I disappear don't worry I'm still here I promise and to prove it oh no maybe I am gone forever no psych here I am um don't worry but yeah let me know if you have any questions and I'm happy to chat through that I'm doing ooth for my hosting site right now and thinking about what services should be able to log in I think about Google GitHub Apple Microsoft uh and I don't know how to pronounce that one I know it's a Russian site I don't know how to pronounce I don't even want to try saying it on the stream because I'll be so embarrassed to get it wrong um curious though have
you looked at o zero for this stuff because I'm going to be totally transparent with you I've built many things that use ooth and every single time I go why is this so complicated like how did someone or a group of people go we're going to make this standard for authentication we're going to call it ooth and it's just so ridiculous every time I go to implement it and we were building some things and this this isn't work rated by the way so I'm not telling you we use Au zero Microsoft we got our own stuff um but we were using o zero for this project someone recommended it and it was so helpful that I couldn't understand how it worked because they were saying like it'll do the authentication then we just have to add this little snippet into our asp.net core application in
the middleware to basically say can you validate this this token and I was like well how do we track the users how do we how do we have like how do we know who they are but you don't have to do any of it in your code it's so cool um once I have seen this I probably will never go back to doing like manually writing uh ooth stuff ever again so I'm hoping that in the future I might do some videos on it but it's it's still new to me so I don't feel like I'm in a good spot to talk to people about it because that feels um disingenuine I think is the word like I don't want to teach you about it and I'm like I have no idea what I'm talking about it's just shiny so um I don't know if
uh I would just go to uh off zero.com and check it out and see if they list um the different providers that you're interested in um seems pretty cool I know it's got to have all the popular ones at least for like a a North American perspective um sis and man here trying to go on the software part uh but the layoffs kind of scare me yeah layoffs are pretty scary um yeah it's uh it's a reality right now unfortunately and it's been a reality for a few years so um I don't know I don't like the idea of layoffs I think it I think I don't want to go too much into my like perspective on this because it's a bit of a rat hole but I just I don't think it's a I don't think it's a great strategy it just doesn't feel
right and I've seen situations where like basically okay I I'll expl my biggest concern with it is that there's so much time and effort that goes into hiring good people and time and effort for a business translates to money so there is tons of money spent on hiring good people you keep good people you're helping them level up and then when it comes to layoffs it truly is not personal right there's a decision made at some at some high up organizational level that basically says this unit of the business is not going to be applicable or it's going to be for we're going to save money by aing it right and then that happens but there's so many good people in there right because that's why you had them there's going to be like a spectrum of people as well right so there might be
some people that are underperformers and that kind of stuff you're going to have the whole range but the point is that you're going to have so many good people in there and it's really funny at Big in my opinion I shouldn't use the word funny because I don't think it's a good thing but ironic I think it's ironic that even at big companies you will still see like there's job openings and in my head I'm like why would you like do a mass layoff and not try to hold as many good people as you can I understand the layoff part in the first place is not good but it just seems so silly to me that it wouldn't be like if we if we deemed that we had to do this for the business why would you not try to keep as many of the
good people that you can um because like I said from a a cost perspective if that's all you're thinking about you spend so much on good people so keep them but I yeah I I recog the layoff situation is very challenging awesome so you did check out ozero might be a good option very cool um I hope it works out for you and yeah it's like it's it's unfortunate because like to say we're just numbers like I like that kind of hurts for me to here because I I'm like I genuinely mean this like I love being able to be a manager work with the people on my team Everyone's an individual that has a unique journey and stuff going on so like I don't think about people like numbers right and I'm sure my manager doesn't think about his reports as just numbers and
I don't think that his manager thinks about people as just numbers right I don't think that people as individuals have that but unfortunately when you go high enough up in an organization and you're talking about units of business lit Lally when you start referring to things as like organizational units of business and it starts to be yeah like those are numbers and it feels very inhuman and I don't like that but that's where that's at um try to stick to mine and get try some part somewhere sweet uh yeah yeah I think uh part-time if you can do like it takes time right so I would say if this is an interest for you like spend the time build bu things scaling up and then testing the waters right like if you never start applying what's the what's the quote like you miss 100% of
the shots you don't take um there you go right you got to be applying to things at some point but yeah like uh don't don't rush into it take your time and build up those skills as well I guess if there's a deer list what company think of their employees numbers Cloud flare would be one yeah uh um I won't comment uh I've seen some things online yeah keep current job for money and second for passion yeah like so this is a good a good point right the at the end of the day like it sounds kind of grim I guess but like we only have so much time depending on your religious beliefs and stuff right we only have so much time to be alive here and we spend a lot of that time working so I I do think that ideally you find
something that you're passionate about in your day job and that's the thing that pays your bills you're passionate about it and like you can go to work feeling like I'm not just passing Life by because you enjoy it that's ideal right but there's going to be situations too where some people might say look like work I have it very time boxed that's just a just a thing I got to do but you found passion in other things and you can go spend your time doing that like I think at the end of the day you need to find something you're passionate about and you can spend your time doing and that's another reason why I I tried to show this on a stream and I don't know how to turn my form around to get the the right angle but um oh and it's behind
the chat now give me I think I finally got it give me one sec um how do I do this let me turn off the chat okay so hard to turn my for for him but uh so there you go so that's an hourglass and I got this tattoo I have a an opposite one on the other side so hard with this thing being mirrored I have two hourglasses on my forearms and the one on my left side is to remind me that like you don't want to be going through life just trying to make money and Chase a number because anyone can keep spending more and more time working and spend more and more time trying to make money and then at the end of the day you or I shouldn't say end of end of the day end of the road right like
what do you got you got money and you didn't live your life so it's not worth it after some point and that's what my tattoo on my forearm is supposed to remind me of so do make sure that you are finding time for your passions uh I understand that um you know there's a minimum amount of income and stuff that you need to be able to support your family and that kind of thing so I'm not I'm not saying like hey you never have to think about money but like Beyond a certain point like you don't want to be sacrificing your whole life for it yeah exactly so money helps but it's not everything so that's that's my framing uh because I've gone through different periods where it's like what what do I do just for like any any waking moment like how do like
can I be helping make more money right that's kind of what it was like when I was at that startup not because they forced me because that's just how I felt about doing it it felt I've described it this way before it felt like it was my company not that I got to make all the decisions or something but I had a lot of trust with my leadership and then with me and a lot of autonomy so that was a situation that just made it feel like working was really fun okay um I think that's it folks but this is really cool thank you for joining I hope the coding part was helpful um Young Blood yep exactly but that's uh yeah that's kind of some of the journey there so uh thank you for joining um you know that while I'm kind of signing
off here if you want to see particular things coded up let me know uh I try to let people know on live streams right like obviously I'll answer your questions while the stream is going but I do try to make content outside of work on a regular basis so you guys are my audience if there's stuff you want to see let me know because I would rather make the stuff you want to see then Focus all of my time on like oh here's an interesting problem I ran into um project review maybe yes so this is something I've thought of uh and I should mention this I don't know I'm G to I am going to be doing a live stream let me pull up my calendar super quick on my phone um thank you for reminding me about this even though you didn't know
about this um I have I think it's next week next Tuesday so this is going to be at uh June 11th this is in Pacific Time by the way so June 11th from uh 7 in the morning and it will probably take more than an hour but I am going to be doing a live refactoring with someone so they reached out to me and said hey could you give me some advice on refactoring this um and we had an exchange and basically I got to the point where I said look I can't like I cannot do this for you but I said there is uh there is an exchange we could make here and I said you're aware that I create content that's how you you found me and I said would you be open to basically either doing a recorded session or doing a
live stream where we can walk through this together and he was like yeah that would be awesome so um collab streams I am going to be trying to figure that out uh I do have some interviews coming up I'll Tell You Folks cuz you're on the stream um and for people that will see the recorded version of this um spoiler alert but I have reached out to if you're in the net space uh David Fowler and Scott Hanselman have both agreed to do interviews on the channel and I'm super excited about that um there there's only a handful of super big names in the net space especially like directly from Microsoft so there's two of them that have agreed to come on uh separately as guests so I will be interviewing them um and I I suggested like code show and code Show and Tell
would be really cool if you if you don't mind so uh we're going to try to set that up um but I want to try getting some other creators and doing some more collaborative stuff especially with code I think that would be cool um but yeah project reviews I'm trying to do that but the challenge is well biggest challenge is time so uh I need to make sure that I can try structuring that in even this stream like totally ad hoc I was like I don't really know if I can get into too much between uh you know what I was doing before this and before the meeting I have coming up so actually let me double check I hope it's not at 10:30 cuz I'm going to feel very embarrassed no 10:45 oh my heart stopped um so yeah I think for me it
was like I have some time I have to prepare some YouTube content this will be helpful but I do uh want to find a way that's a little bit more organized to have people propose projects send me over repos I can check them out and say okay cool we can talk through this um I think that would be kind of fun uh because the tutorials and stuff I I hope folks find those helpful based on the fact that I have a YouTube audience I think people do uh but I think seeing real code like in real project and navigating like just like real things would be very helpful so I will try to do more of that so stay tuned Channel's only what this is the 18th month of me doing it you know consistently the Channel's been around for a very long time I
just wasn't consistent and didn't post stuff so it's still very young and I'm hoping to keep evolving the content so you're I try to listen to your recommendations because you folks are the audience and I want to make the content for you but I think that's all so thank you so much for watching uh I do live stream consistently 9:30 p.m. PDT on Mondays this is generally a general software engineering topic and the other ones so far like this one are kind of ad hoc so you kind of kind of got to see when they're coming up the best way for now this is the Shameless plug if you follow me on social media um ideally on YouTube so you can see this stuff coming up that's my primary platform for video you'll know when I'm live streaming right I'm trying to get people on
Twitch as well so thank you for joining on Twitch um but yeah follow me on those places you'll know when I'm streaming and I'll have try to have a better more consistent schedule for the coding stuff and Rees you're welcome thank you for your comment um happy to help okay folks thank you and hopefully I will see see you Monday on the live stream so take care enjoy the rest of your week have an awesome day if you're starting your day and have a have a great sleep if you're heading to bed soon
Frequently Asked Questions
What is the purpose of the live coding session?
In this live coding session, I'm demonstrating how to download files in C# and benchmarking memory usage versus runtime performance. I want to show how streaming data can minimize memory usage when downloading large files.
How should I prepare for live coding interviews?
When preparing for live coding interviews, I recommend practicing coding problems and focusing on explaining your thought process as you work through the problem. It's more important to show how you approach problem-solving than just getting the right answer.
What should I focus on to transition from a mid-level to a senior developer?
These FAQs were generated by AI from the video transcript.To transition from mid-level to senior developer, focus on mentoring others, taking on larger projects, and demonstrating accountability and ownership in your work. It's about having a broader impact and helping those around you grow.
