Speaker 1: 00:09 [inaudible] Speaker 2: 00:10 Frank, how you feeling buddy? Speaker 3: 00:12 I'm still sick, James. I got the plague. I'm, I'm withering away. I'm, I'm, I'm wonderful. How are you? Speaker 2: 00:21 Hi. I'm okay. I'm back from ignite. I somehow was able to surround myself with 25,000 people and not get sick at all in Orlando. Which you only go out to big chain restaurants where you surround yourself with even more. Speaker 3: 00:37 Yeah. I, I think, uh, one of my trips, I didn't make it to ignite, so I hope you're gonna tell me all about it. But I went on a couple trips and you know, just as I was starting to feel better, everything's good, getting good. I get on an airplane and kind of like restart the whole thing over again. I'm like, Oh God, Oh, I'm just holding out on not having to see the doctor. Speaker 2: 01:01 That's always my fear. Especially for extremely long flights. I mean, any flight, honestly, but when you're flying international for long, long periods of time, you never knew who you're going to sit by. I've gotten on some planes where people are just hacking and go into town. I'm like, Oh I am going to get sick. But somehow had been resilience. I'm sorry that you're not feeling as good. Well we'll keep it nice and short to about 75 minutes. Speaker 3: 01:23 I'll hold you to that. I don't, every time we say it we have a 50 minute long episode but you know that's cool. That's cool. We can do that. Speaker 2: 01:31 I do. Well I have a topic so I told you to pick the topic but I actually have a topic. Speaker 3: 01:35 I prefer that because um, I didn't pick a topic. James, it's this great coincidence. Speaker 2: 01:42 Well I do want to say that at Microsoft ignite 2019 um, you, we all meet and you were invited to record podcasts there and unfortunately you weren't able to go next year. Really want to make it happen. I was able to just record one anyways with our good friend Mads Torgerson you know, Mads. Speaker 3: 02:01 Ah, little private interview is, that's what's going on here. Did you dig deep? Did you make him explain himself and every decision on that? A C sharp list by the way, we got nice feedback from our a C sharp episode. Thanks for the feedback everyone. [inaudible] Speaker 2: 02:16 yeah, that was really delightful. I mean, one yes, that feedback as I was reading it on Twitter, not only the merge conflict Twitter, but also people in person were telling me at ignite that they really enjoyed it. Uh, and which was delightful. Yeah. Now, um, I, I didn't want to just drill Mads on C sharp. This is a, an excellent, it may be my eye now. No shade on you, Frank. But it may be my favorite, my favorite episode of merge conflict ever. Oh my God. Well, Speaker 3: 02:45 jeepers, I'm totally not taking that personally at all. And that's not going to count everything I say for the next 15 minutes. Speaker 2: 02:54 But Frank, but I also want to say it's also my least favorite because you weren't there, me, so a mixed emotions here cause it could've been so much better if you're there with me and, and like, I don't know. So we gotta do it again with more people next year. Maybe at bill, maybe at night. It's very good. It's different. I don't, you're, you're gonna even listen to it because I think you're gonna really like it. And I think that I brought some Frank to the conversation. I think I did the right by you. Did I prep you enough? See, I think I might have actually just been a little star struck if I had done that. So it's good that you get the first one out of the way. I'll give it a listen and I'll take notes on everything. I wish you had asked so we'll see how well you channeled me. Speaker 2: 03:33 That'd be fun. We can do a, Frank reacts a good good audio to it. Yeah. And that one will come out in a, in a few weeks, uh, probably around Thanksgiving. So I want to do some editing. There's like background noise and stuff, so it's continuing some time to clean up. But it had me thinking, because last week we talked about C sharp eight, I talked to Mads about C sharp eight. I was at the dotnet a booth talking all about C sharp eight and after the podcast at the end of the podcast last week, you challenged me to go try nullable reference types. You did this. This is great. I'm so excited. Is this what we're talking about today? Because I still just dear fans. I have no idea what we're talking about today. Yes. This is what we're talking about because Frank, you said you would be there by my side through my stream and you are not there. Speaker 2: 04:24 Oh well you didn't really tell me you didn't gave me any notice sir. Uh, okay. So in our, in our, okay. Okay. In our conversation that I had on this street, I'm a stream at two but open to pod after that, like literally and then last week I said during my stream. Okay. I didn't say I was going to, but yes, I'm you have like 20 streams a week and I wasn't sure which one it was for anyone interested? I have one stream a week, Fridays, 2:00 PM Pacific. I stream code twitch.tv/ Jane's mouth tomato. Now here's what happened. Frank. Building up the 20. Hi, sorry. What's that? What's that? You're building up the 20 streams a week. Okay. Tell me, tell me what happened. I, cause I totally missed out. I'm really, I actually am sad that I missed out here. So tell me what happened. Speaker 2: 05:18 So I decided to take a smaller library MVVM helpers and integrate null reference types per fill-able reference types. Right. Be easy for this one, but as a heads up, you have a collection class in there and collection classes can be a little bit funky. So wow, it's a small library. You are doing something that I don't think a lot of people implement their own collections. I hope you don't like, it's just not healthy for us to be doing, but a, you have one in there. So I'm curious, uh, if that's going to be the hard part and all this, but I'm getting ahead of myself. Keep going, James. Yeah. So I, you know, I flip the bits. So I went into my CS proj I flip the bits, the C sharp eight and I flipped the bits over to nullable enable, right. Just enable it. Speaker 3: 06:07 Yeah. So you did all files. Uh, you know, I, I keep talking on this podcast how I prefer to just all in and do the whole library, but the truth is for my apps, um, I've been doing it file by file, but for libraries, I agreed, uh, do it all at once, but for apps, little bit by bit is helpful. Speaker 2: 06:28 And that's where I was going to go with that too because, so the thing is I came into the stream and I said, okay, let's just learn some knowable reference types. And honestly, I'm still kind of puzzled. Like even by the end of me integrating it into my library and into my application, I was still confused. Like, is this helping me? Is it helping people that consume it? Like, dude, can I remove my Knoll checks if I say that this thing can never be known in my library? Um, in general, like that was kind of confusing to me, um, inside of my app now that it was pretty easy to implement because luckily my list, my observable range collection is just an observable range, collection based type. So I don't have crazy no Knowles inside of it. Most of the stuff that I had to do was around, um, parameters that I was passing in and I would set them to knowledge as the default. Speaker 2: 07:29 But when you turn this on, they're not allowed to be null. So you would say, Hey, no, this could actually be null. But then I found, I figured there was some of my code, I was like, well, do I actually want this to ever be novel? And then I decided, no, I don't ever want this to be no. Why am I making this Nall that seems silly. So I would change it to an empty string or something like that. So surprisingly, I flipping on this feature did make me change code and implementation inside of my library. Now I don't know if it actually made me catch null argument exceptions, but hopefully it would help my consumers do it as well. But getting ahead of myself too because I went in and immediately flipped on the flag and then I got, you know, 40 warnings and I just kind of went one by one and I didn't really know what I was supposed to do. I was reading the documentation and I am so confused. I just, can you honestly just go through why I want to do this? Why do I, why did I do this again and what are the question marks? What are the exclamation points? I don't, I don't even know if I did it right Frank. Like I would just getting rid of warnings, you know what I mean? And, and I stopped and I thought and I was like, I don't know what I'm doing anymore. Speaker 3: 08:47 Wow. Okay. There was a lot said and all that. Um, there, we start with the why part. I'm a little to answer this because there's been a lot of push back a little bit, or at least a vocal minority pushed back against like a, is this really helping me? Is this really finding bugs? That's it. Usually the first question I get when I say I converted a library, they're like, well, did you find any bugs? And um, I personally have, but did you, maybe not because your library is pretty high level and it's pretty thoroughly tested. So chances are there aren't any bugs in it. So why did you do this? Well, number one, I think that we are using a statically typed language for a reason. We want certain guarantees. And me personally, I love the concept that some things just shouldn't never be empty. They should never be. No, I think that that is a guarantee that I want to state throughout my code. This will never be empty, this, uh, or it can be empty. I think those are two different things. And I like being able to state that in the code and have the compiler yell at me when I don't do the right thing. Uh, any comment on that? I have one more for Y, but any thoughts there? Speaker 2: 10:04 I liked that so far. So it is a contract more, more or less of of saying this is when things are allowed to be no. And this is when things are not allowed to be no. Speaker 3: 10:16 Yes. Now here's a more practical why, and this probably doesn't apply to your library, but the stuff only applies to apps. Anytime I get an all reference exception, now I enable novel reference checking at the top of a file. That's just my way number one of tracking down the bug because if you got an all reference exception, that's a bug. So it's just a matter of tracking it down and you can do that using the debugger, which can be tricky with like a lot of print statements or guess what, turn on this feature and start putting question marks everywhere and if checks until the code is correct and you find your mistake and all of that stuff. So I think that that's the more practical why a, that's just the rule I'm following. Whenever I see that exception come up, I immediately turn this feature on. Speaker 2: 11:08 Got it. This, this makes a lot of sense. And, um, you know, the, the biggest place in which I found myself questioning my API or understanding if my API was correct is I have command. So I have like an async command, which I recently added. And there's two sort of functions that you can pass into it. So an action and a function now funk, you know, into it and the action is not allowed to be null because if you pass it in all, then it throws an exception and says, Hey, this can't be normal. Right? But the can execute. That's a lot to be null because I don't care. Right. And then the, in fact the default is just that it's allowed to be. No, and this is why I found it very helpful because in a world in which nullable reference types and non knowable reference types don't exist, somebody could in their code create an async command in which they pass it. Speaker 2: 12:08 No. And if they do that, my code is going to throw an exception. Now I could document it and say, Hey, if you pass this thing Nall, then this thing is going to throw an exception. Right. But that also is tedious because like from a developer, I should be able to consume this library. And when I call a function, I should know if I'm allowed to pass in all or not. And I think that's really that contract, that usage. And that if I was getting Nall, I could then turn on this feature and get a little green underscore. Dot. Dot. Dot to say, Hey, you're passing this thing. No on the developer of this library is at, eh, eh, you're not allowed to do that. Speaker 3: 12:51 Yeah. You know, you just made me a, I got a little sidetracked there when you said the green dot. Dot. Dot. Uh, first thing I do is turn mornings on as errors. And I've gotten sloppy in my old age, James and I always allow a few warnings to get into my code cause I just don't feel like dealing with them. But, um, turning on the Snell reference exception thought, whatever, no, you know what I'm saying? Novel science. We'll get these words down. Um, I need them to be errors because I need it to actually break the build or I think I'll just start ignoring them because they can be, they can multiply, you know, you forget one question Mark somewhere and all of a sudden you have 20 errors and if they're very annoying for that, but at the same time, once you've gotten used to working with them, uh, I think they come pretty naturally. I, I, Speaker 2: 13:41 yeah, yeah, yeah. No, I would say I agree with you 100%. In fact, for any library creator. All right. Library creator. That's me. That's you. That's my MVVM helpers for instance. Um, I did that maybe, Oh my goodness. Uh, six months ago I tweeted about it. I think Microsoft docs was like always right. And I turned it on and I was really surprised cause it's so easy to ignore warnings in your code. And there was a bunch of places where it was, it was naughty. Like I should not have been doing something and just ignoring stuff. So really helping that helped me when I turn this on because in my library I wasn't getting 40 warnings. I was getting 40 errors. Speaker 3: 14:23 Yeah. Am I good? Yeah. Yep, yep. Definitely prefer it. Um, yeah, again, we're using a compiler for a reason. I saw, I do a machine learning stuff in Python and I'm always tracking down errors that a type checker would have caught pretty much immediately. But you know, they don't have a type checker. So I'm so grateful when I go back to C sharp and I'm able to utilize a good language like this. But let's start with, um, all those errors you got. So I think the first thing that gets flagged when you turn all this stuff on is wherever you use the literal novel keyword and U L L that's where it's going to start flagging things as you need to declare these types as knowable. And that usually ends up being parameters because that's where we all throw in some default ARDS and things like that and variable initializers. And that's why you get a lot of errors because it just shows up on all those default ARG, uh, parameters and all those, yeah. Uh, local variable initializers yep. Just a bunch of stuff. And it's knowing because basically that's wrote, that's, you just have to go through every one of those types and just put a question Mark at the end. That's a little bit the frustrating part there. Speaker 2: 15:40 Yeah. And that's what I did to be honest with you. Um, every single like on change on like all the ovens, these random funks that I have, definitely. Um, I did enable that. I said, yeah, yeah. You know, if, if I'm letting it be no, then then let's put it in there. But at the same time, it makes you think right at that point it makes you sort of stop and say, all right, well I was obviously just jamming this property in here. Did I actually want it to be? No. Like that's sort of the question at that point is do you want it to be NOL or not? And for some parts I did and for others I didn't. So a good example of one is I have my week event manager and you need a pass it like a handler, an event name and the default, I think I just stole this cold from, from Brandon, so I'm going to blame Brandon on, on his, on his code. Speaker 2: 16:37 Um, he was very excited that I named dropped him a few times. So now I'm going to be like, mm, I don't know man. Right. Did it. Um, but uh, what was cool, what was, was in his coat as he said, well, event name, just default that to novel instead of string dot. Empty or actually just double quote, double double 'em quotes because you can't do string down empty in the constructor and the parameter. Um, but then I thought, I said, well, right now at this point in time I could put a question Mark on it and just make the thing go away. Right? It's so easy to do. Just be like, I'll just put a question Mark on and whatever. Right? But then I said, yeah, but how, like if you actually give it like below, like below what I was doing as I was saying like if it's no or white space or something and then throw an exception. So I'm like, well like it, it's not a lot to be normal in general, so why would I allow it to be normal? You know what I mean? So then I actually change the signature of the, um, the, the, the, the function, the, the method itself to it. And so it made me stop and I actually changed source code because of it. Speaker 3: 17:47 Yeah. So this is where you have make, and I like how you said it, you're like, do I put the question Mark or not? It's a real decision. If I put the question Mark, the error kind of goes away. I'm allowed to put in all there. The question is, the problem is it's never just a single question Mark. Once you put that question Mark there and say that this field or parameter or local variable can be novel, then that basically means you're going to start having to put some, if statements somewhere, somewhere, some if statements are going to have to show up. Worst case scenario, every time you touch that variable, you're going to have to appoint an F statement. If you don't want to get in all reference exceptions. So it may seem like the best choice is to just put a question Mark and just, you know, let the thing be normal. Speaker 3: 18:31 But I like what you did and you took a second look and said, well, actually probably should never be no, and therefore I just have to fix the default parameter. Maybe you have to create an override for that method or something like that, just so that it never has that default value of no a, it's a tricky choice. Uh, and I think that that's, you know, even when I'm not fixing bugs as an NOL reference exception or something like that, I feel like this is making my code better because it's making me think about this problem logically and not just defensively. I'm not like everything can be normal. Oh my God, I need a statements everywhere. Therefore I'm going to put them nowhere. No. Now it's actually a battle that you can fight and make logical choices about. Speaker 2: 19:19 Yeah, no, I will say that it did catch one bug in my code, Frank. Speaker 3: 19:26 Ooh, I can't wait. Are you going to tell them? Speaker 2: 19:29 Yes. So this one was really, really tricky. Um, so what ended up happening is I have this, this command, this async command, and it has this cascading. So it has this really crazy, let me see if I can find it in my code because it is really intriguing because it has this cascading constructor where there's four constructors and they all build on top of the base constructor. This might be pretty similar into what you've done previously. It's like, Hey, well, you know, this thing is going to call this thing and I call this thing. And really we're just going to do satyrs all the way down the pipe. And what I found, I'm going to go ahead and link you this code really quick here, is that the most complex one that took in the most arguments took in an action and it took a funk of bull. Speaker 2: 20:25 Now remember if I said earlier can execute, can be Nall. So I added a question Mark on it and previously what this code would look like. Let me go ahead and again and crab this code. I need to grab all these files for you. So many code files for Frank. So previously what this would is have public command action funk. So that's what it did. So I'm going to kind of build this up in people's mind. Previously it would do public command, action funk, and then it would call this and the base constructor would take in in action of type object and a funk of type object with a bullion. So what you would do is you would just pass little sort of inline functions to the base constructor. Now the problem here, Frank, is that I am saying that can execute, could be novel, but in the this to call the base constructor, I literally execute, can execute, which means that it could possibly be novel. Speaker 2: 21:38 So in this theory I was, I had to Mark my function of bull nullable because it could be novel, but I couldn't, I couldn't pass it a function down later on. So what I ended up doing is I just in that constructor said, well if can execute is not Nall then set the base type. Right. Because in this instance, I don't want to set it unless, um, unless it's [inaudible]. So I actually had to change my code. That was one place that I actually found, I'm pretty sure a bug in my code because if someone was a past non to that, I would not be checking and snarling it with their own exception at some point. Speaker 3: 22:27 Yep. Yep. And um, that was a lot to follow. I don't know if everyone was able to keep up, but I, I can. Um, there's one lesson to be learned from this once you've gone through that first round of marking your types as knowable because he decided, yes, I do want to allow no here, you're going to learn that it's somewhat viral. And I think that's what you ran into when you were doing that change constructor one of the constructors down the line you found out would also have to now declare that parameter to be knowledgeable. And that's kind of where this part gets a little exhausting. So you'll get one set of errors from the compiler, I think you said something like 40, but then as you fix one of those, it's going to have a chain reaction and effect. Another function and another function, and I think this is where people start to get a little intimidated by it. But again, you're, you're doing it the right way. You're thinking it through. You're like, yes, I do want to allow no here. Yes. Therefore I have to put these checks later in my code and change this and that. It's kind of interesting. I, I'm enjoying this story so far. Speaker 2: 23:34 All right, cool. Well, let's take a quick break here, Frank and thank our good sponsor this week. Reagan. Listen, are you getting a bunch of no reference exceptions? Probably. So what you should do is install Reagan anterior applications because if you're struggling to replicate bugs or even performance issues, listen, you plug in Reagan into your web or mobile applications and boom, you're good to go. It's going to help you diagnose problems in minutes rather than hours. That way you can then go back to your boss and justify introducing knowable reference types into all of your applications. You can kiss goodbye, having to dig through log files or getting those super frustrated user reports or read those ones, our app reviews. You don't need to do that. Reagan's gonna handle, get all that air, all that crash reporting and all that performance monitoring that you need for your apps. Where do you go? reagan.com you can get a free trial and get started right now today by going to reagan.com I have it in my applications. I love it. I love the update systems of tracking things. I love the in depth analysis that they give me of all my web and mobile applications. reg.com check them out. And thanks to Reagan for sponsoring this week's pod. Speaker 3: 24:49 Thanks Reagan. Oh, you know, you know the tricky one for me is fields. That's where I can never decide whether to make unknowable because you know that's going to have a big chain reaction. Talk about if statements, you know, anytime you touch that field you're going to have to guard it now and think it through. And so what that usually boils down for me, speaking of constructors is constructors. Turns out a lot of times I'm sloppy and I just create these, um, we've Steph a name for these like plain, plain old data pod types, POC types, something like that where it was a class technically, but it was all public fields and usually on cause look at me, look how lazy I am. And it was that kind of lazy code where I really felt the pain because I'd say no, that should never be no. Speaker 3: 25:39 Therefore it's if it can't be have and I better put a constructor on this thing to guarantee that it can't be no. Did you, I guess this library wouldn't have anything like that, but can you see where I'm coming from a bat? Do you ever write that kind of lazy code? So Frank, um, so there is a base view model that had all of that and I did decide that everything should be nullable and you should have set the title, you can do everything and all blah. However, um, I went to go turn this on in my app into Hanselman forms. I said I'm going to go update this library and see how this works. Test it out, dog food, this puppy dog food it. And this is where I found the usage a little bit tricky because if I just installed like I turned on C sharp eight, Speaker 2: 26:21 but if I install a library that has nullable reference types enabled, even if I use it, I don't actually get the warnings or errors until I turn on knowable reference checking for the project or for the files. So you have to turn it on in both things. Right. So you know, it's kind of annoying actually. I thought that I would just get it if I was using a library, but I can see why mostly because people might have warnings at EHRs and I did. I turned it on for everything. And yes you are correct Frank. I had tons of, not only, I think they call them poco PA. yeah, Plano Polk class objects. I don't know. I used to know those words somebody can write in. So I had tons of view models and tons of classes and the view models were the worst because I would have a default constructor, like a default, a default blank, empty, you know, constructor for my view model. Speaker 2: 27:22 And then I have another one that would take in like a podcast or an episode and fill in everything. And then, and then this thing is like up, up, up. Like there's a constructor that's not doing anything and you're like, ah, you know, and then he has side effect. Okay, we got to get a recording of you saying, Oh fuck pop up. Oh, bad programmer. You're such a bad programmer. That's exactly how it feels. Good job. Yep. So I turned it on, lit it up, and I had another 75 warnings come in to handsome, informed warnings this time because I didn't have Arizona on. But I will say I found my new favorite usage for it. And it comes to properties, it comes to properties Frank, because what's behind every good public property, Frank in uninitialized field, I know that there is and what and and and what is the default for an uninitialized field, Frank, why that would be not called James unknown and therefore you are going to be putting out a lot of question marks and if statements in your code or you're going to have to take the deep dive and put really, really good constructors on it. Speaker 2: 28:32 Yes. Now this is where things got fun because I have commands everywhere in my code and I did upgrade to C sharp and I sent you my, this little diff here of my commands and I have a private lowercase like load command and then I create a new command. So if it's no, then I use the new coalescing thingy now that whatever it's called is amazing. My lowered people, he has switched over to question Mark. Question Mark equals it's there, it's live. Not going to call it production code yet, but getting close, it's happening. And uh, so this was fun because this is something in real life could happen all the time. You have a string or a class or a command and what happens if you accidentally call the backing field, right? And what if that thing is Nall instead of you calling the public thing. Speaker 2: 29:30 So here I have a lower case load command and an upper case load command. And in my code, when I call the upper case load command, it creates a new one. If it's Nall. However, if I accidentally called the lower case load command, I have to, it's no by default. So I have add the question Mark. And then in my code, whenever I try to call load command dot with the lowercase owl, it will give me the squiggly and it's like perfectly. I'm like, yes, this is exactly what I want, right? It's like, yeah, it's working. And then like the that that was the light bulb moment moment Frank, where I was like, yes, I get it now. Like this makes sense. Speaker 3: 30:08 That's funny. Can I completely rephrase what you just said? You are using knowledgeability and the question Mark to implement a lazy system, a lazy computation system and it is kind of cool because that question Mark, you can not interpret as novel. You interpret as this is the lazy one, this is the backing field for the lazy, therefore I shouldn't touch this. I should go find the public one and be all good about it in my code. There's lots of these little tricks and I'm, I love that you discovered this one. Um, it's in F sharp. We have the optional type, which is, this is a very reflective one and you can use it for all these little tricks like this for making just guarantees in your code that you're doing the right thing and not touching the uh, wrong, uh, backing field. I was just thinking for like, uh, UI views, views can go in and out of existence on iOS, technically semi randomly and this would be a great use for that. Also. Um, if you want like, you know, in this case I think I would actually make the um, public properties [inaudible] just to flag the fact that these views disappear all the time, but it's nice to have that reflected in the code and that's why I'm also turning this on in my app. Speaker 2: 31:26 And in fact, you know, there is that real world use case. I'll send you another little file here and I'll link to my handsome informs pull requests for all this here. Um, this is, I have um, my page and I want to get access to my view model. So I do that same lazy loading. However, in this case I am basically casting the binding contacts or the data context of the page to the view model. Now that actually could be no, like it's possible that binding context could be normal. So I have to not only map the backing field, but also the public field to nullable because they could be novel, which had a trickle cascade of all of the possible no references down my coats or like honestly I didn't know if I was gonna feel anything putting it in my app, uh, from the library, I didn't find too much. There was no issues with MVVM helpers cause I write flawless code naturally. However, by flipping on this flag, I did it on the entire project. These laser Lee loaded things are these lazy CAS have tons of implications. What if something actually gets garbage collected? What happens if it's in and out of you? What happens if, yeah, right. That view goes in and out. There's all of these null checks that I wasn't even doing before. Like it kind of blew my mind. Speaker 3: 32:45 Yeah. And you know, if you manually test your app on every release and you get 100% code coverage through your manual tests, then there's no need to do this. But if you're a human and you can't do that, then this is helping so much because it's going to catch those edge cases, those random little things. So you know, in this case you could say on one hand, yes, I absolutely fixed the bug because I wasn't checking for no here when I definitely can be. Now, on the other hand, it never manifested itself. So does the bug exist anyway? I should stop debating this. Um, is to, to be fixed. Bugs are not, it's just a question that plagues me. Uh, there's one thing I wanted to talk about that you mentioned way, way, way back. And that was a question about whether you remove null checks in your code. Now, uh, I'm sorry. I'm sorry. Argument check. So you know, uh, if argument equals now all throw argument and all acception that one specifically, uh, did you come to any conclusions? Do you want to hear my opinion? Speaker 2: 33:49 Why have you fat? Okay. So the, the reason, so I was, I was in my library and, and here was my rationale first as I was like, okay, well I'm adding this feature and um, I'm now saying that this thing you can never pass me and all like I'm saying that, Hey, you developer, you can, you can never pass me. Nall so I don't need to do knowledge checks anymore. That was my, that was my logic in my brain and I don't believe that. So Frank, Speaker 3: 34:19 yeah, this is a tricky one. So the general rule that I want to follow is all public methods regardless of their signature. Do that in all check. But the fact is in my own code, no way. Um, the, the whole reason I love this feature is because I don't have to do that. But the fact is if you're doing a library that other people are going to use, they may not upgrade to C sharp a immediately. They may not enable this feature. Maybe they hate it, but like a, you still want to give them a decent error message. You know, now that I talk about this, nevermind. No, don't do any of the checks. But maybe during a small transitional period, uh, I'm keeping, um, the public methods, um, with those small checks in my big public libraries. But gosh, it would be nice to ditch them at some point. Speaker 2: 35:18 Yeah. So I came to that same conclusion, which is, and the chat helped me and I said, should I remove this? I removed them and then they said, no, you can't remove them yet. And I said, Oh, why? And then they literally said that, they said, well, what if someone is using visual studio 2017, what if they have an upgrade and to C sharp eight, what if they've upgraded to C sharp eight but haven't turned on knowable checks? And I was like, Oh crap. And they said, what if they've upgraded? Turned it on, but it's just a warning. So they ignore it. And I was like, Oh boy. Right. And I was like, yeah, I guess we should pick a date chain Speaker 3: 35:54 right now on the record of when we're gonna stop doing argument. And all checks for public methods will be a year, two years, three years, one will be acceptable practice. Speaker 2: 36:07 I think it's going to be a long time. If never, I mean, I don't know. And here's, here's the reason is it also makes a lot of sense, right? I mean, now I understand like talking to Mads a little bit last and like at the conference and like reading all of the controversy of this feature of why it is implemented in this way because the repercussions of, of having it always beyond are endless, right? Because now the library might not be checking against Nall and your code might give you errors, but you might be using it like it's this cascading trickle effect that yeah, they couldn't turn this on by default. There's no possible way that they could turn it on by default. Um, without breaking everybody's code. You know, to be honest, we now, I think there's, there could be an easier way to flip it on maybe like a checkbox or a right click or I don't know, something. Um, it's not super visible, I would say. And that's what sort of scares me about the feature a little bit. It's not super visible and also not visible. Like, like why you would do this. I think that's the concern I have, Speaker 3: 37:18 you know, now that we've talked about it. Um, so file new project templates don't have this feature turned on as far as I know and, but I was thinking even though I w I said I prefer this and the error mode where warnings are errors, I'm starting to think file new projects should have this feature turned on, but in warnings mode sodas, just that little annoyance in the background saying, Hey, maybe you should put a question Mark here but only for new code bases because it's like he said it's a lot of work in old code basis. But I think, I think it's valuable warnings honestly. And uh, I don't know his file new project for people new to the platform or is it for professionals? It's a weird, funny thing. That new project template has to be, Speaker 2: 38:10 well, I'm going to say this, Frank, right now as we speak, I have a plugin for Xamarin template and I, James Monta Magno am going to flip on that template, right? When you create a new plugin that will automatically turn on C sharp eight and it will also turn on all the references because I believe in my heart that file new on every application could benefit from these warnings 100% I agree with you a hundred Speaker 3: 38:46 he is a convert everyone, because I think when we were recording that C sharp aid episode, you are, you're nagging me a little bit about this feature. You're like, I still don't, I still don't agree. So that's a big deal coming from you saying that you think it's, it's that big and you're actually gonna do that. Huh? Uh, what kind of attraction do you have on those plugin templates? I'm just curious. Speaker 2: 39:09 So the plugin templates, now I don't ship them with visual studio anymore. What I do is I have them as a get hub template. Do you know about these things Speaker 3: 39:21 new? Tell me. Oh wait, yes, you can Mark your get hub repo as a template. And what does that change? Speaker 2: 39:30 So what that changes is when instead of like cloning your library when they fork it or they [inaudible], they can still fork it, right? But what they're also able to do is they can say use template and you can use the template yourself. And what that does is it will create a copy of the repo with all the commits you raced and an initial commit by you Speaker 3: 39:57 Neato that should be built into get, I should be able to say get a template, blah, blah blah. Instead of get clone. Yeah. Speaker 2: 40:06 So that's what it does. So now you can come into my plugin template. I literally just make this, make this change. So you can go check it out yourself. And what I do is I say, okay, use this template. Now what I think would be cool is if I could have some variables that if you give it a name, I could swap out some files, but in this one I just say use template. You give it your repository name and then you would just change the names of the files manually. It's very easy to do. That's what the file new project used to do. But I do want to put this into a.net new plugin template or whatever. I just need to figure out how to do that and then it would pull from this repo 100%. So that be kind of my, my idea there, but Oh yeah. Speaker 3: 40:44 I just want to tell everyone, um, I, I hadn't seen this before. Uh, but what you've done here is you've broken out the multi target file project system to do platform specific, uh, code for all your different features. That's cause the plugins run on multiple platforms. But I was just thinking this is also a good thing to copy if you're just want to do a multi-platform library that's not necessarily a plug in, you know, capital P plugin met for different places is just a good starting point. So nice. Very good. Speaker 2: 41:17 Yeah. And this one's good because it also gives you, um, it gives you built in now nullable checks, but it also sets you up for all of your new get packaging and additionally sets you up for my new favorite feature of all time source, um, were built right into this. So boom, you'd be good to go handles it all for you automagically. That's cool. I wonder if we could do a whole episode about that. Just talking about uh, how fun that is. I've been updating food with that ability, but I see here, uh, just to be clear, you hard coded language to 8.0 because I think that's the easiest way to make sure you get all these features. So everyone go to your project files and put Lange version 8.0 that's great. Yeah, there's like default latest but 8.0 is a fan. Like I'm in control. Speaker 2: 42:05 I don't know what latest or default is because it does matter based on your project types. I'm like 8.0 it's 8.0 you can use it everywhere. And you know, some people don't think they can use it everywhere, but if it compiles, it works. That's what I say. So using it. Yeah, and we all use CII now and it's so easy to upgrade.net core and Xamarin, there's no reason not to have the latest stuff before when you had to get a very expensive visual studio. Plenty of excuses not to upgrade your stuff, but it's like a 13 megabyte download. It's not a big deal anymore. Super easy. All right. Anything else you want to say about Nobel reference types? Frank? Oh boy. I, I'm just so relieved that uh, a you got through it. B, you did it the right way all without me. So you really don't need me. Speaker 2: 42:52 You recorded a podcast with me without me. You wrote your own code without me. Oh my Lord. I'm just not needed anymore. But thanks for having me on your show. Whatever Ragnar now everyone loves you. I mean, you're the reason why I did it, so, okay, I'll you none of it would've been possible. Yeah. I think really just go give it a try. Like, that's my new recommendation is like, Hey, just go give this a try in your apps. Or if you're a library creator, like I was doing it and then Alan Richie was upgrading shiny and 145 warnings. I said, just go through it. It's going to take you one day. Once you do it once you're good. You know, I think it's worth it. I think it's worth it just to go flip it on. And you do get faster at it. Like you've learned how to use, find and replace. Speaker 2: 43:39 I got pretty fast that at least, you know, once we get past there, number 200 you have to get fast at it. Yeah. I'm very excited to go update a monkey cash because a monkey cash by the way, has a dependency on um, light DB. But there's also another one for SQL I dash net. So I'm very curious if you've updated SQL I dash net yet to handle it. And then if it's a cascading effect, right, because as more libraries update, it all happens. Like it, all your apps get better, things get better. So that's like my encouragement I think is, is to get people on it. So now I feel rotten cause I haven't updated sequel like okay, I'm going to do it James. I'm going to do it. All right. We'll see next step. Batara hold me to it. All right, well if you are starting to use nullable and non nullable reference, I used to let us know I'd be super interested cause I didn't even touch the question or the exclamation point. Speaker 2: 44:32 Dot. Maybe we'll talk about that at all in the other pod. No, that scares me. Yeah, title of this episode is avoid the exclamation point because yeah, don't know bad. Don't do it bad. All right. All right Frank. Well thank you for podcasting with me. Thanks everyone for listening. Thank you for being my cohost on this beautiful podcast. We are partner, we are a team. Frank, we're a team. I concur. All right, thanks James. Alright, go get some sleep, have a fantastical weekend, feel better and I will talk to you next week and that's going to do it for this week's merge conflicts. So until next time, I'm James Monta Magnum. Speaker 1: 45:10 I braked her hair state.