Speaker 1: M hm hm.
Speaker 2: Hello and welcome to another episode of Against and Donnett.
Speaker 2: I'm Jean Clavery, your host, and with me today is
Speaker 2: our special guest step On Shrines. Welcome, step On, Hey,
Speaker 2: thanks for having me. Hey, thanks for coming. So I
Speaker 2: think we're going to talk about source code generators today,
Speaker 2: but before we get to that, why don't you tell
Speaker 2: us a little bit about yourself, how you got into developed,
Speaker 2: into development, and what kind of thing do you work on.
Speaker 1: Now As of now, I'm a software developer at Team Sure.
Speaker 1: Basically full stack developer working on dot net in the
Speaker 1: back end and also the regular react type stript stack
Speaker 1: in the front end. Basically I got into development kind
Speaker 1: of the stayd ut rod so through university, and I
Speaker 1: also had a tech background in my family. So my
Speaker 1: dad is to be a system administrator at a local bank,
Speaker 1: and also my mom is a project manager at the
Speaker 1: at the same bank, so kind of already a pretty
Speaker 1: fine puth and so I got into it basically the
Speaker 1: classic crowd.
Speaker 2: I would say, So some people have doctors in the family,
Speaker 2: and you're just a family of developers.
Speaker 1: I guess yeah. Basically, Basically I can remember my dad
Speaker 1: trying to teach me C plus plus and pointers at
Speaker 1: thirteen didn't quite work out, but I still managed my
Speaker 1: way somehow.
Speaker 2: Nice. So how'd you get into dot net?
Speaker 1: Yeah, it was basically a bit of a wide ride
Speaker 1: until I got there. So through university. I went to
Speaker 1: university in a program which is common in Germany, where
Speaker 1: you spent three months in university and three months at
Speaker 1: a company, just trying to get some practical experience. And
Speaker 1: basically I went through the whole cycle of C plus
Speaker 1: plus phyphon, then your front and developer and some show.
Speaker 1: But in the end, when I finally picked up my
Speaker 1: full position, then I got into a net aspn net
Speaker 1: team and that's kind of where I spent my time
Speaker 1: so far. Really really like it all.
Speaker 2: Right, cool, So let's talk about source code generators. Kind
Speaker 2: of have to go back to the beginning of them,
Speaker 2: just kind of give an introduction of what they are
Speaker 2: and kind of what they're used for is because you know,
Speaker 2: I've I've listened to other people talk about it, but
Speaker 2: they're still very confusing to me.
Speaker 1: Basically, source generators in different I just it's basically a
Speaker 1: new API which came in with Dotnet five and c
Speaker 1: sharp nine. So you're probably familiar with a lot of
Speaker 1: approaches which we'll use ahead of this technology in order
Speaker 1: to generate source code. So there was a T four
Speaker 1: so text templating, and then maybe even even earlier we
Speaker 1: had to set up of having post built and rebuilt
Speaker 1: steps just trying to generate some some sauce which you
Speaker 1: can then use within your code. And basically with this
Speaker 1: new API, it's now possible to actually hook into the
Speaker 1: compilation cycle of your of your project and kind of
Speaker 1: also get everything set up without leaving any artifacts, so
Speaker 1: without fluttering your directory with new files. And actually you
Speaker 1: can also take advantage of a new thing with these
Speaker 1: sauce generators, so you can basically hook into the compilation
Speaker 1: and you actually get the entire past syntax three of
Speaker 1: your compilation, and you're able to inspect everything in there
Speaker 1: and generate code accordingly.
Speaker 2: So is it kind of like the T four templates
Speaker 2: it's something that you use during your development that you're
Speaker 2: going to spit out some final code for you to
Speaker 2: put into your project, or is it something that actually
Speaker 2: can go at runtime.
Speaker 1: It's somewhere in between. So T four, as you already mentioned,
Speaker 1: it would actually split out code, but you would usually
Speaker 1: get it in actual cs files depending on what you generate.
Speaker 1: It's also not quite at one time, it's in between,
Speaker 1: so it's actually happening in the compilation step. So when
Speaker 1: you would go ahead and start up your compilation cycle,
Speaker 1: you would basically start passing your entire code and then
Speaker 1: at this point the source generator will kick in. You
Speaker 1: will basically push your code at that point in time
Speaker 1: so that the past artifact, you would push it to
Speaker 1: the source generator. The source generator can then analyze it,
Speaker 1: generate new source code, and this new source code you
Speaker 1: generate will then go straight back into the compilation and
Speaker 1: then the compilation will resume and at the end you
Speaker 1: will obviously get your IL. So you're actually within the
Speaker 1: compilation cycle, so it's not during other events before or
Speaker 1: after compilation, but straight within.
Speaker 2: So it's not going to kick out a CS file
Speaker 2: for you. It's something that kicks out for the run
Speaker 2: time to pick up and then go from there when
Speaker 2: you actually run it.
Speaker 1: It's possible to also emit it at a CSFI, but
Speaker 1: basically it will just be there at run time. The
Speaker 1: tooling is i would say a bit somewhere in between
Speaker 1: right now. So if you run this generator once you
Speaker 1: would usually also get intellicent support within visual Studio for
Speaker 1: this because at that point and a visual studio can
Speaker 1: also pick up the generated generated code and you can
Speaker 1: also use it within your regular development cycle get intelligence
Speaker 1: and support and whatnot. But you will not have it
Speaker 1: on disc by default, so it has some varying pooling support.
Speaker 1: And then it tends to feel like it's actually a
Speaker 1: source file within your project, but it's not.
Speaker 2: So what kind of be a basic use for it?
Speaker 2: You know, with with like T four templates and things
Speaker 2: like that, you're going to you build it and you
Speaker 2: run it, and then quite often you have to go
Speaker 2: into the generated code and make some changes to be
Speaker 2: you know exactly what you want. You know, if this
Speaker 2: is going to run a compile time, and I guess
Speaker 2: you really have to get things exactly how you want
Speaker 2: it before you run that compilation.
Speaker 1: Very varying increase of how you can use this. So
Speaker 1: for me personally, when I experimented with it, I kind
Speaker 1: of set up a code based in which I had
Speaker 1: for example, a specific interface which is inherited by some
Speaker 1: example classes, and then for example, during compilation, I could
Speaker 1: use the source generator and create a decorator for all
Speaker 1: of these classes implementing this interface, which would then maybe
Speaker 1: maybe log out something or to some additional things which
Speaker 1: might be common for all of these implementers. So that's
Speaker 1: maybe one use case. You can generate decorators and other
Speaker 1: things like that, basically boring stuff you don't want to
Speaker 1: write everywhere. Some people also use this to generate validation
Speaker 1: code on the fly based on some metadata, so for example,
Speaker 1: you put some attributes on your classes or on your
Speaker 1: methods and you can generate a validation on the fly.
Speaker 1: I think it's also really used a lot already within
Speaker 1: aspn net, and some dependency injection frameworks already picked us
Speaker 1: up because being able to inspect the compilation three on
Speaker 1: the fly, you can, for example, as a dependency injection framework,
Speaker 1: instead of relying on reflection at runtime, you can also
Speaker 1: take a look at the code during the compilation and
Speaker 1: basically see which losses need which dependency, and instead of
Speaker 1: generating your dependencies at runtime, you can then already make
Speaker 1: use of it and have a look at this and
Speaker 1: during the compilation cycle.
Speaker 2: Okay, so what's the first thing to know to get started?
Speaker 2: You know, writing your first source code generator but there.
Speaker 1: Are basically some constraints right now. The biggest one is
Speaker 1: probably that the project containing the Sauce generator needs to
Speaker 1: be Donut Standard two dot zero, so it's not yet
Speaker 1: on a Net five. That's basically a constraint of how
Speaker 1: the Rosslyn compiler, which the source generators originally come from,
Speaker 1: is allowed to run. And then basically you need a
Speaker 1: set up containing of one project which hosts the generator,
Speaker 1: and then you will probably want to consume it from
Speaker 1: another project. So within a project containing the generator, you
Speaker 1: basically need to import two packages, which is the Microsoft
Speaker 1: COUTE Analysis c Shop and Microsoft COUDE Analysis Analyzer. And
Speaker 1: then within the project you want to reference it, you
Speaker 1: would have the Microsoft dot net dot Compilers dot tool set,
Speaker 1: a package that will also bring in some intelligence magic.
Speaker 1: And then basically within the reference to this source generator,
Speaker 1: you would also have to put some specific text like
Speaker 1: output item type analyzer, and it's basically a bit of
Speaker 1: a setup, but that's really much standard. And then once
Speaker 1: you do that, you can basically just create a glass,
Speaker 1: put a generator attribute on top of it and make
Speaker 1: it inherit Thesaurce Generator interface and that's basically it it
Speaker 1: sounds a bit more complicated than it actually is in
Speaker 1: the end, so it's actually really easy just taking a
Speaker 1: look at the dogs and then getting everything set up
Speaker 1: and then actually it works quite well out of the box.
Speaker 2: So does it take writing a lot a lot of
Speaker 2: code to get something that's going to generate code for you?
Speaker 2: And you know sometimes you know you might be spending
Speaker 2: more time writing the generator than what you spent writing
Speaker 2: the code itself.
Speaker 1: It depends on the usage, I would say. So basically
Speaker 1: a source generator it always works in two steps. So
Speaker 1: there's an initialized method, and within this method you can,
Speaker 1: for example, register your code to respond to syntax node notifications.
Speaker 1: So whenever the compiler picks up something new, you would
Speaker 1: have this event pushed to your sauce generator and you
Speaker 1: can maybe already analyze all the notes whether they fulfill
Speaker 1: some constraint. But if you don't need this, and you
Speaker 1: only decide okay, I just want to generate code, that
Speaker 1: usually happens in the execute step of the generator, and
Speaker 1: within there, basically all you have to do is, just
Speaker 1: as with regular code generation, create a string builder and
Speaker 1: there you can write your C sharp code and that's
Speaker 1: it already. So if you don't need any super a
Speaker 1: special setup, you can just have your string builder create
Speaker 1: a c shop class and you're good to go already.
Speaker 2: Okay, so is it kind of like using a string builder.
Speaker 2: You pass in some tokens and things like that you
Speaker 2: want to be replaced in that string as it compiles,
Speaker 2: and then that'll kick out the code for.
Speaker 1: You, essentially usually a very clorified string interpulation, and that's
Speaker 1: basically all there. So that's what you would mostly also
Speaker 1: end up with.
Speaker 2: Okay, Yeah, that makes a lot more sense to me
Speaker 2: now that I think about it that way. It's just
Speaker 2: something that's going to basically take a snippet or templative
Speaker 2: code that you have, and then I guess somewhere in
Speaker 2: your main code you put you know, like you said,
Speaker 2: you're use an attribute or something like that to set it,
Speaker 2: and then in that attribute you pass in the things
Speaker 2: that are going to replace get replaced in that string builder.
Speaker 1: That's actually the beauty of it. You can basically put
Speaker 1: anything anywhere, and since you get the complete syntax tree
Speaker 1: of your program, you can analyze every thing, so it
Speaker 1: doesn't even have to be an attribute. You can also
Speaker 1: inspect interfaces, check whether interfaces fulfill a specific name or
Speaker 1: whether they also implement other interfaces on top. Usually an
Speaker 1: attribute is a good idea, I would say, because that's
Speaker 1: especially designed to represent some metadata. So that's a good
Speaker 1: approach in my opinion. But you're definitely not constrained to attributes.
Speaker 1: You can mix and match as you want. So basically
Speaker 1: you have.
Speaker 2: It build a class. That class doesn't exist at the
Speaker 2: time that you're actually doing your development. So how does
Speaker 2: the other part of your code know that that's going
Speaker 2: to be there when you compile.
Speaker 1: That's actually a bit difficult now, So I think I
Speaker 1: already mentioned that the tooling support can feel a bit
Speaker 1: off here and there. Usually it might take one cycle
Speaker 1: of building the source generator, for example visual studio to
Speaker 1: pick up the generated files at least, and then at
Speaker 1: least visual Studio can give you a bit of a
Speaker 1: hand with the generated code and also give you some
Speaker 1: intelligence on top. But sometimes, for example, if you create
Speaker 1: a new generator and you never had it run before,
Speaker 1: then it can feel like you basically want to use
Speaker 1: that glass, but intelligence just acts as if this would
Speaker 1: not exist, which it actually doesn't at disappoint So yes,
Speaker 1: tooling is a bit off, but I hope the visional
Speaker 1: studio experience, and I personally don't know how it behaves
Speaker 1: in writer, but I guess they would also have picked
Speaker 1: it up by now. So that part is usually entirely
Speaker 1: on the ide and depending on the support, it can
Speaker 1: feel good or mediocre, but usually you can get by
Speaker 1: really pretty fine.
Speaker 2: I would say so in that in that string builder,
Speaker 2: you know, as as you're building that telling it what
Speaker 2: the code you want to output, can it see into
Speaker 2: that code that you're building so you can get intelligence
Speaker 2: and code validation and things like that.
Speaker 1: Not entirely sure, to be honest, I think there's also
Speaker 1: some tooling in that direction.
Speaker 2: I mean, can you do something like like a razor file,
Speaker 2: but be be the template of the code that you
Speaker 2: want to use?
Speaker 1: I think I read up a bit. There are some
Speaker 1: extensions which also look into solving that problem, but I
Speaker 1: think out of the boxes is sadly not possible. Not
Speaker 1: so you would kind of have to know where your
Speaker 1: classes are because in the end, when you create a
Speaker 1: string which should then contain like a complete class, you
Speaker 1: would also have to take care of using namespaces and
Speaker 1: everything around that. So that's definitely something which feels a
Speaker 1: bit difficult sometimes because you'll have to remember all of
Speaker 1: these things, all of these boiler plate things you would
Speaker 1: also have to add on top.
Speaker 2: Yeah, because if it did something like in a razor
Speaker 2: file or something like that, where you could just do
Speaker 2: all your loops right within the little template to build
Speaker 2: it all up as the final string that you're trying
Speaker 2: to replace into your code, that would make it pretty
Speaker 2: easy to work with. I think.
Speaker 1: In on that end, you can basically also just push
Speaker 1: a part of your class to the string builder, and
Speaker 1: then you can fall back to the regularly shop code
Speaker 1: and just for example, inside a loop which would then
Speaker 1: continuously append lines to the to the string builder, you're
Speaker 1: also not constrained to the string builder at all. You
Speaker 1: can also just use a very big interpolatest string with
Speaker 1: with the ad at the beginning to make it work
Speaker 1: across lines, and you're really free to model that however
Speaker 1: you want.
Speaker 2: Do you find yourself creating these source code generators a
Speaker 2: lot for different projects? You know, I'm trying to I'm
Speaker 2: trying to take up a case where you know, I
Speaker 2: really needed that that much other than like generating entities
Speaker 2: and things like that, where you know, Visus code Visus
Speaker 2: Studio is already going to help you out building those,
Speaker 2: just like a T four templeate does. So when would
Speaker 2: you use a source code generator and when would you
Speaker 2: use something right like a T four template.
Speaker 1: I think there's a very big distinction. With T four templates,
Speaker 1: you're usually constrained to Visual Studio because I think they're
Speaker 1: much tied to that I d e. And with the
Speaker 1: software generators, you're actually running within Rosslyn, so within a compiler,
Speaker 1: so you can also have it running on Linux or
Speaker 1: wherever you want, So that's a big difference. I would
Speaker 1: say you're very much free to use it wherever you want.
Speaker 1: When it comes to actual examples where I used this,
Speaker 1: So actually I had a use case for this a
Speaker 1: while ago. So at work, we have an older project.
Speaker 1: It's C plus plus cli. Maybe that rings a bell.
Speaker 1: It's it's a bit engined, and basically we have some
Speaker 1: definitions in there which we wanted to translate to completely
Speaker 1: manage the code models. And basically I also got started
Speaker 1: with this by using it as as a post built step,
Speaker 1: you know, the old wave generating code. But I mean
Speaker 1: in my case, it was pretty simple colleagues started complaining
Speaker 1: at some point that I was just generating way too
Speaker 1: many files with that, because I created a file for
Speaker 1: definitions and there are quite a lot of them in
Speaker 1: that project. And then I thought, okay, this might be
Speaker 1: a good use is for a source generator, and then
Speaker 1: I did that, and it even worked flawlessly, even if
Speaker 1: in a dot Net framework code base, so not even
Speaker 1: if dont five. That's probably more of a convenience thing
Speaker 1: because there's like no technical reason to have a source
Speaker 1: generator there. But I think I think I already talked
Speaker 1: about it a bit. There are some use cases, especially
Speaker 1: within dot net frameworks, which are very much focused on performance,
Speaker 1: so ASPNAT is a prime use case for this. They
Speaker 1: already tried to move a lot of the code which
Speaker 1: they would usually use reflection for at run time and
Speaker 1: try to convert it to a source generator, especially if
Speaker 1: the information they would try to process through reflection is
Speaker 1: already available at compilation time, just to shape of that
Speaker 1: extra bit of performance during one time. I think that's
Speaker 1: a pretty big use case where this is already used
Speaker 1: a lot.
Speaker 2: So I think people like me, being kind of being
Speaker 2: old school, the first thing I would go to is
Speaker 2: just make make a copy of something that I want
Speaker 2: and then I just copy and paste to make all
Speaker 2: the little changes and things like that, rather than going
Speaker 2: to lassole writing a source code generator. Do you really
Speaker 2: have to get something that really has to be used
Speaker 2: over and over again? And can you can you write
Speaker 2: this generator and then share it between different projects.
Speaker 1: That's actually possible. So it's a bit difficult because I
Speaker 1: think I already mentioned that source code generators are kind
Speaker 1: of constrained to dot Net standard to zero right now.
Speaker 1: So that was definitely a bit of a surprise when
Speaker 1: I started getting into that technology, because, as with any
Speaker 1: good citizen, I already upgraded my projects to dot Net
Speaker 1: five at disappoint and I basically wanted to have the
Speaker 1: generator use some some specific names of some types, and
Speaker 1: then I noticed you can't reference it from a dot
Speaker 1: net standard project. You can't add a reference to dot
Speaker 1: net five. So that was a bit of a shocker.
Speaker 1: So that's a constraint do you have to keep in
Speaker 1: mind when you try to share these source generators, But
Speaker 1: otherwise it's it's definitely possible, and if you already use
Speaker 1: the new cspproach format. So the one coming in with
Speaker 1: dot net standard, you would also get this source generator
Speaker 1: output as a transitive dependency. So, for example, if you
Speaker 1: have a source generator project which is referenced by another project,
Speaker 1: and then you would transitively add a reference to that
Speaker 1: project from somewhere else, you would get these generated definitions everywhere.
Speaker 1: And that's already a nice way to share it. But
Speaker 1: besides that, you're also very much free to reference it
Speaker 1: from somewhere else. That's just one thing to keep in
Speaker 1: mind because if you reference it from multiple positions in
Speaker 1: your code, and you reference it in a way which
Speaker 1: triggers the source generator to actually generate them some source,
Speaker 1: then it's also pretty easy to end up with double
Speaker 1: generations and you basically then have two conflicting types because
Speaker 1: the generator run twice, and that's what you have a
Speaker 1: new project in the end.
Speaker 2: Oh wow, yeah, that's kind of a good gotcha there?
Speaker 2: So all right, so don't there are two point zero
Speaker 2: So it's not in net six either.
Speaker 1: Not yet, sadly. Actually, I also reached out to the
Speaker 1: to the Rossland team on the c sharp discord channel,
Speaker 1: and as much as I would, they would like to
Speaker 1: do it. As of now, it seems like they are
Speaker 1: constrained by the support. So dot net framework projects also
Speaker 1: support these source generators. So basically, as of now, the
Speaker 1: best way they can do this is with dot net standard,
Speaker 1: because you can consume dot net standard from dot net
Speaker 1: framework projects and dot Net five or dot Net six
Speaker 1: projects alike. I am sadly not aware of whether there
Speaker 1: are any plans to also make it possible to reference
Speaker 1: dot net six projects because that's currently a bit of
Speaker 1: a paint point. Definitely, if you want to just even
Speaker 1: if you just want to get a name of the
Speaker 1: type you would want to check against this compilation three,
Speaker 1: then it's a of a hassle.
Speaker 2: Yeah, so I'm being done in stented two point zero only.
Speaker 2: You know, I think that could be kind of a
Speaker 2: discouragement for getting people to start using them. It's a
Speaker 2: new feature, but if they're not bringing it forward that much,
Speaker 2: then people go, well, it's probably going to get abandoned
Speaker 2: and deprecated at some point in time, so why should
Speaker 2: I use it.
Speaker 1: It's definitely a good point, but basically it's also not
Speaker 1: as bad as it might sound. So this whole generation step,
Speaker 1: I think you already talked about how the generation would
Speaker 1: create a syntax three for you, and you can then
Speaker 1: analyze the syntax three. It's a bit difference. It's a
Speaker 1: bit of a difference than with reflection because, for example,
Speaker 1: with reflection, you would also just go ahead and try
Speaker 1: to compare types or assemblies, and the syntax tree is
Speaker 1: basically one layer above, so you're not dealing with types
Speaker 1: at all, and you would usually just do it with
Speaker 1: either strings or you actually try to model your sauce
Speaker 1: generator in a way which can easily work with all
Speaker 1: of these syntax notes. So it's not as bad as
Speaker 1: it sounds, to be honest, and usually the benefits kind
Speaker 1: of outweigh the drawbacks. So I'm also hoping and I'm
Speaker 1: rooting for some improvements in that regard, especially when it
Speaker 1: comes to support for neo dot net versions. But as
Speaker 1: of now, it is also not really big deal to
Speaker 1: me at least.
Speaker 2: Okay, okay, so what are the limitations of what you
Speaker 2: can do what you can't do? So talk about some
Speaker 2: things that you've learned using them that you would have
Speaker 2: liked to have known when you first got started.
Speaker 1: There's a really big thing which I was definitely caught
Speaker 1: a bit of guard with. So as a person which
Speaker 1: did not yet use any Rosslyn APIs before. So Rosslyn
Speaker 1: being the c shop compiler which also provides these source generators.
Speaker 1: They also power a lot of the suggestions within for example,
Speaker 1: visuous studio for syntax improvements. So just this thing of
Speaker 1: source analyzing is not a new topic coming to Rossland,
Speaker 1: and they already seem to have a very established way
Speaker 1: of how you can inspect the syntax tree, which is
Speaker 1: very hard to get into as a as a beginner.
Speaker 1: And there's a very useful addition extension for a visual
Speaker 1: studio which is called Syntax Visualizer, and it basically allows
Speaker 1: you to step into your class and on the side
Speaker 1: you have a very nice window which generates your class
Speaker 1: as a syntax tree, and that way you can easily
Speaker 1: trace how you would also receive the syntax tree within
Speaker 1: your source generator and that makes it way easier to
Speaker 1: figure out which nodes do I need to check, which
Speaker 1: note will represent my interface, which note will represent my
Speaker 1: allocation in this case, So this is something which is
Speaker 1: very useful to know ahead. Also this features available on
Speaker 1: sharp lab io. You can also change the result on
Speaker 1: sharp lab io from for example, the shop to a
Speaker 1: syntax tree, and this is definitely something to keep in
Speaker 1: mind because that will be probably the topic which people
Speaker 1: will have the most trouble getting into. It's definitely a
Speaker 1: different domain than reflection with types.
Speaker 2: What other things should we talk about about source code
Speaker 2: generators that we haven't covered.
Speaker 1: I think we've already got through most of what I
Speaker 1: think is important, So I think the most important thing
Speaker 1: to keep in mind that is how all you can
Speaker 1: set it up, which constraint it still has, which SDK
Speaker 1: version it can run on, And I think I mentioned
Speaker 1: it right right away, the syntax three. The syntax three
Speaker 1: details which are definitely a bit harder to get into.
Speaker 1: I think. Besides that, something which is also something new
Speaker 1: you have to wrap your head around, is coming to
Speaker 1: grips with how these source generators actually work, getting away
Speaker 1: from the THOUGHD model of having code generation ahead of
Speaker 1: the compilation or at run time, but rather right within
Speaker 1: the compilation. That's also something to keep in mind here
Speaker 1: and decides that. Honestly, I think that the technology is
Speaker 1: really nice and it's it's definitely something which kind of
Speaker 1: becomes what you make out of it, so there are
Speaker 1: not a lot of constraints as to what this thing
Speaker 1: can do for you, and that's probably more of a
Speaker 1: stretch of imagination.
Speaker 2: Than Okay, so have they been making enhancements to source
Speaker 2: code generators over time or they kind of just kind
Speaker 2: of have everything there they think they need and it's
Speaker 2: it's going to be going to be there. Are they
Speaker 2: going to you know, make have things changed in the future.
Speaker 1: Have been changes already. I think when source generators started out,
Speaker 1: they were also similar to T four Visual Studio only think,
Speaker 1: which already was improved on with dot Net five. I'm
Speaker 1: not entirely sure what changed with dot net six. To me,
Speaker 1: it still feels as if the technology is it's great,
Speaker 1: it's very useful, but it's also at the same time
Speaker 1: something which feels like was mostly developed for internal uses,
Speaker 1: and I think as of now it's also the main target,
Speaker 1: the target audience for this technology, So I'm not sure.
Speaker 1: I hope there will be more changes to make it
Speaker 1: more friendly for the consumer, especially with tooling. Sometimes Visio
Speaker 1: Studio also doesn't feel like picking up the generation at all,
Speaker 1: and that's also very hard to deal with, so I
Speaker 1: hope there will be more changes in that direction. Sadly,
Speaker 1: I'm not entirely sure where the project stands right now
Speaker 1: whether there are already some some enhancements in that area,
Speaker 1: but I'm very much routing for it.
Speaker 2: Okay, where's the best place for people to go to
Speaker 2: kind of learn and get started with source code generators?
Speaker 1: MSDN documentation on source code generators is already pretty good,
Speaker 1: and it should definitely give a give an introduction to
Speaker 1: how it works and how to set it up, and
Speaker 1: then afterwards I would recommend just exploring the compilation unit
Speaker 1: a bit. I think I already mentioned may it beyond
Speaker 1: sharp lit bio or for example, the syntax Visualizer extension
Speaker 1: for visual Studio, because that gives a lot of insights
Speaker 1: into what is possible how can you get around your
Speaker 1: own past coode within the generator? So these would be
Speaker 1: my go to steps and how to get into the technology.
Speaker 2: Okay, cool, any last things that you want to let
Speaker 2: people know about before we move on to picks.
Speaker 1: I think everything has been said already, so I can
Speaker 1: definitely encourage people to just take a shot at it.
Speaker 1: I think just getting into new technology is always very nice,
Speaker 1: and this is one of those things things which feels
Speaker 1: like fills a necessary gap which has just not been
Speaker 1: there yet. So I think source generation has always been
Speaker 1: a concern of develop us, because you know, develop us,
Speaker 1: we are lazy people. We like to automate blowing stuff,
Speaker 1: and so I can definitely encourage people to check it
Speaker 1: out because it's it's a very nice and very convenient
Speaker 1: and clean way to generate code without producing a lot
Speaker 1: of garbage in your in your repository.
Speaker 2: Okay, well, I definitely have a better understanding of source
Speaker 2: code generators now that I've talked with you for half
Speaker 2: an hour or so. So great job at explaining source
Speaker 2: code generators to somebody like me. That's kind of like
Speaker 2: been doing things one way forever and it's like that's
Speaker 2: worked for me, so why should I do something different?
Speaker 2: So good job, so now we should I'll move on
Speaker 2: to picks, and I guess I'll go first with my
Speaker 2: pick for for this week, and my pick is season
Speaker 2: two of a show on Netflix. It's season two of
Speaker 2: The Witcher. So I don't know if you have Netflix
Speaker 2: or if you watch season one or familiar with the
Speaker 2: things where it came from. So season two just came
Speaker 2: out today. I watched it, but based upon my watching
Speaker 2: of season one, I expect it to be another good season.
Speaker 2: So I'll be watching that this weekend. So I'm going
Speaker 2: to check out season two of The Witcher or rewatch
Speaker 2: season one if you have watched it.
Speaker 1: I didn't watch it yet. I actually took the hands
Speaker 1: on way and play The Witch instead.
Speaker 2: Did you watch season one?
Speaker 1: No? Actually I did not yet. Sadly I didn't yet
Speaker 1: find time to watch it, but I think now with
Speaker 1: holiday break coming up, maybe I can. I can shave
Speaker 1: in a few a few hours of watching The Witcher.
Speaker 2: Yeah, give it a shot. Give it a shot, all right?
Speaker 2: So if there's is there something that you want to
Speaker 2: let our listeners know about that you're interested in and
Speaker 2: want them to know about.
Speaker 1: Actually, I also have a very very nice Netflix recommendation
Speaker 1: I could. Yes, So I'm more of a documentation documentary watcher,
Speaker 1: so I'm not very much into the movies or other
Speaker 1: things like that. And I recently discovered that Explained on
Speaker 1: Netflix now has some new some new episodes on Explained
Speaker 1: Our Mind, and that's something I can very much recommend.
Speaker 1: So I'm interested in human psychology and just how our
Speaker 1: brain sometimes tends to play some tricks on us, and
Speaker 1: just getting some insights into that is very cool. And
Speaker 1: it's also presented in a very very nice and bite
Speaker 1: sized way.
Speaker 2: Okay, okay, yeah it looks good. There's three seasons of
Speaker 2: Explained on Netflix. I've I think I've watched one or
Speaker 2: two of them and found them interesting, but I've never
Speaker 2: had much time to go back and check them out.
Speaker 2: So I will see all the different things they've they've
Speaker 2: came out with since last time I watch it. Great,
Speaker 2: all right, Stefan. Is there some way that people can
Speaker 2: reach out and ask questions of you if they need
Speaker 2: the more or get in touch with you?
Speaker 1: Sure? So, usually always available on get up, so get
Speaker 1: up a susten diner. It's a bit hard because it's
Speaker 1: a German word and there's no good pronunciation, so it's
Speaker 1: O S S E N B I N d E
Speaker 1: R on GitHub. And besides that, I'm also on Twitter,
Speaker 1: so Twitter handle would be at dot stunts, so that's
Speaker 1: at dot D O T S C h R A
Speaker 1: and set. That would be probably my main channels, all.
Speaker 2: Right, and that's that's Z not Z for the English speakers.
Speaker 1: So yeah, exactly.
Speaker 2: Yeah, I got it, got it, got it all right? Great?
Speaker 2: Thanks the fon for coming on the show. Glad got
Speaker 2: to have you here today. Thanks if our listeners. Do
Speaker 2: you want to reach out and get in touch with
Speaker 2: the show. We'd love to hear from you. We would
Speaker 2: like to know what we're doing wrong, what we could
Speaker 2: do better, and what kind of topics you would like
Speaker 2: to hear about, So you get touch with me. I
Speaker 2: am on Twitter, I am at dot net superhero, and
Speaker 2: nobody else is here to go, So I'll do it
Speaker 2: all right, thanks to fun again, and we'll catch everybody
Speaker 2: else on the next episode of Adventures in dot Net.