S06E10 1h 09mSeason 6

Episode Summary
In this episode of The Modern .NET Show podcast, host Jamie Taylor engaged in an insightful conversation with software developer Mark Price, who shares valuable insights into the advancements and changes brought by .NET 8. With over 20 years of experience in the field, Mark is not only well-versed in .NET development but also an expert in providing effective educational resources for developers. The episode covers a range of topics, including the improvements in the .NET 8 compiler, the introduction of Blazor full stack, and Mark’s upcoming trilogy of .NET 8 books.
One of the key highlights of .NET 8 discussed in the podcast is the significant improvements made to the JIT compiler and native ahead-of-time (AOT) compilation. These enhancements enhance overall performance and reduce memory usage, creating a more efficient development environment. Additionally, the integration of Blazor full stack brings exciting changes by allowing asynchronous components to run in the background, resulting in a visually enhanced user experience.
Throughout the conversation, Mark emphasizes the importance of providing accurate and up-to-date educational resources for developers. He acknowledges the challenges developers face when learning new technologies, particularly when introductory tutorials and documentation may not be sufficient or up to date. Mark’s dedication to education is evident in the trilogy of .NET 8 books he has written. The first book focuses on fundamentals, the second book delves into building apps and services, and the upcoming third book caters specifically to professionals, covering topics such as testing, software architecture, and design patterns.
Mark Price’s commitment to providing quality content is further evident in his approach to reader feedback. He actively engages with his readers through GitHub repositories associated with each book, where he addresses reported errors, typos, and provides solutions to queries. By actively involving his readers and maintaining a responsive relationship, Mark ensures that his educational resources remain valuable and relevant to the ever-evolving .NET development landscape.
Episode Transcription
Welcome to The Modern .NET Show! Formerly known as The .NET Core Podcast, we are the go-to podcast for all .NET developers worldwide and I am your host Jamie “GaProgMan” Taylor.
In this episode, I spoke with Mark J Price, a software developer and educator with over 20 years of experience. We talked about .NET 8, Blazor, server-side rendering, and more. We also explore the compiler changes in .NET 8 and how they can improve performance and efficiency.
Mark also discusses his upcoming trilogy of .NET 8 books, which cater to developers of all levels, from beginners to professionals.
What I find when I’m learning something new is even if something has some documentation and it might have a kind of introductory tutorial, they are not always kept up to date and they’re not always easy to follow because what tends to happen is the experts who build the platform are then told, oh, just write a tutorial for it. Now they’re the experts, but they’re not experts at education and so they’re not always that great at actually explaining how to get started with something. So that’s where my books come in, I feel.
I’m an expert at education and I’m an expert because I’m actually not a quick learner. I’m not the quickest, I’m not the brightest, but I do notice the things that trip people up. And so when I first learnt GRPC, I had some misconceptions, I struggled with certain areas, but I notice all of that and I can write it down and so I can write a chapter that I think really helps people get started.
With a focus on providing accurate and up-to-date educational resources, Mark’s dedication to the community and continuous improvement shines through in this engaging and informative conversation.
With a focus on providing accurate and up-to-date educational resources, Mark’s dedication to the community and continuous improvement shines through in this engaging and informative conversation.
So let’s sit back, open up a terminal, type in dotnet new podcast and we’ll dive into the core of Modern .NET.
Jamie
Mark
Jamie
Yeah, it will be. This is the fourth episode you’ve been on. So hey, if you’re listening in, folks, and you don’t know much about Mark, we’ll talk about Mark in a moment. But you should definitely go back. I’ll put a link in the show notes to the other three episodes that Mark has been on. We’re calling this one the .NET trilogy, but this is the fourth one, so maybe this should be the .NET quadrilogy. No, that’s not right. That’s five, isn’t it? Or is that four?
Mark
Jamie
Mark
Jamie
Mark
Yeah, so my name is Mark. Mark Price. I’m over 50 now. I can’t believe I’m that old. But yes, I started my career after graduating university working with Microsoft Visual Basic back in the very early 90s. I taught, trained a whole lot of developers in the UK to use visual Basic and Microsoft access. And then that kind of shifted to C
System.Xml namespace. So that was a fantastic experience. I then moved to Spain and then I moved to Canada and took a sabbatical to do a film studies course learning screenwriting and the back to the UK.And around 2015, I was approached by Packt Publishing to write a book on more modern. NET, because at the time, .NET Core was just about to come out and this was the fundamental rewrite of .NET for modern platforms and cross platform. And so since then, I’ve written multiple editions of the main book that covers C# and the .NET libraries and ASP .NET Core, kind of the fundamentals that all .NET developers ought to know, and I’ve now slowly expanded. So last year for .NET 7.0, I added a companion book called Apps and Services with .NET 7, and that went more detail into building services using technologies like OData, Minimal APIs, GraphQL, gRPC. All of these optimized for different scenarios as well as the app side of things using Blazor and .NET MAUI. And so I’ve now updated both of those books for .NET 8. And early in 2004, or at least in the first half, I plan to release a third book, which will be the final member of my long term plan for a trilogy of .NET books. Internally, I call them “the blue trilogy” because their covers are all nice bright blue, so you’ll notice them when you’re scrolling through Amazon listings.
But yes, I kind of now consider this my magnum opus because it’s kind of the culmination of 20 years of working with C# and .NET and ending up with these three books that I think will form a great foundation for anyone who wants a solid foundation on C# and .Net.
Jamie
So just real quick, you had said, “in the early part of 2004,” I think you mean 2024, is that right?
Mark
Jamie
Mark
Jamie
Mark
Jamie
.NET 8 release candidate two released very recently, and there should be almost no visible changes between the latest release candidate at the time of recording and .NET 8 when it gets released. Which means that if something changes, it’s not our fault is what we’re saying. Neither Mark nor I are Microsoft employees. Neither Mark nor I are on the .NET team. So if things change and we end up talking about something that doesn’t get released or gets pushed back or changes slightly, we apologise in advance because we’re recording this ahead of time.
Cool. We are hoping that nothing will change, but I mean, who knows, right?
Mark
I’m sure all of your listeners have heard that probably the biggest change in .NET 8 is to do with Blazor and what’s sometimes referred to as Blazor Full Stack. And so some of the APIs, some of the method names, for example, some of the attributes that you use to enable some of those newer features in Blazor Full stack, the have already been, we’ve already been told what those changes will be, so I can reassure my readers, potential readers, that those changes have already been incorporated into the final proofs that have been uploaded yesterday to Amazon. So midnight, when the Kindle releases automatically get sent to everyone who’s done a pre-order, it will include completely up to date for the GA release of .NET 8.
Jamie
Mark
I am very transparent. You can chat with me on the Discord channels, you can raise issues in my GitHub repositories, and if you want to go back in time and have a look, you’ll see that I’m very responsive, very willing to admit to mistakes and get them fixed straight away. I really want my readers to succeed with my work. So please do engage with me. Let me know what you think. Let me know other things that you want to see added in future editions. But yeah, particularly even if you see the smallest mistake, let me know. I will put the effort into fixing it immediately.
Jamie
Because I know that it is very easy. I’m not going to name names. I’m not going to say that you do this because obviously you don’t. You just said that you don’t. It is very easy, I suppose, with the amount of effort that goes into writing a book on a technical matter, especially when the goalposts are changing slightly as you’re coming up to release, I have a question about this later, but we’ll talk about it now. It is very easy to go, “well, I’ve released it and it was correct when I released it,” and it’s very easy to go, “bleh.” But I guess for the reader’s perspective, there’s added value in being able to go, “oh, actually, this has changed. I’ll check the erata list online to see if the author has addressed this. Oh, they have. So they say that, for instance, code example number seven, you need to change this call to this call and it will now work.” Fantastic.
Mark
That’s one of the reasons why I’m now doing three books. Of course. Try and spread the income.
Jamie
Mark
Jamie
.NET 8, like we say, by the time you’re listening to this, everyone, .NET 8’s release was in the past, but for us it is in the future. Or is it? I don’t know, it depends. I mean, the editor will be listening to this as it’s being released, as .NET 8 is being released. So. Hey, Mark-the-editor, hello. You’re listening to this and editing it when .NET 8 is being released. But for everyone else listening other than Mark the guest and I, it’s all in the past, right?
Mark
Jamie
Mark
Jamie
Excellent. Okay, so with .NET 8 we’re not going to spend an hour discussing exactly what is brand new with .NET 8. But what’s new with .NET 8?
Mark
So let’s start with the C# language. C# is now up to version 12. As that number suggests, it’s pretty mature. The C# compiler team and the language design team have been spending the last six or so editions adding features like pattern matching. Every year there’ll be a few more pattern matching capabilities added in. They’ve pretty much covered everything at this point. The compiler team has also been looking at things like how to improve performance with things like dynamic PGO, which is a way to improve the JIT compiler at runtime. I can talk more about that maybe a bit later. And another compiler feature, the native ahead of time compilation publishing process.
So a lot has been going on, but from the language design point of view it’s pretty mature. And there are a few nice new features like the ability to alias literally any type now, including things like tuples, things like being able to set default values for lambda expressions. But to be honest, those are fairly small, kind of filling in a few of the remaining gaps. I feel that C# with version 12 is pretty mature. It would be hard to see anything of great significance added to it in this version or in the future. More of the work or more of the benefits I see with C# 12 is in the compiler side, as I say.
So both the JIT compiler and the native AOT compiler have both had major improvements in the ability to support more of, say, the .NET framework, things like minimal APIs. If you’re using that technology to build web services, those can now fully support AOT. gRPC type services can also support AOT, whereas in the past it’s only been limited to console applications. So you can really start to embrace it. Blazor has improved support for AOT as well.
And what ahead of time compilation is all about is compiling on a particular chip architecture and a particular operating system like Windows or Linux, you actually compile it on that operating system and it gets compiled into native code that will execute as fast as possible on that particular combination of chip architecture and OS. And one of the main benefits of native ahead of time compilation, particularly building web services with minimal APIs, is that it can reduce the size memory size of the application, because what it’s doing is scanning through all of the libraries and classes, even down to individual methods or members, and if they’re not being used, it can strip those out. So it really reduces the size of your application in memory and the startup time is greatly increased. Sorry, not increased, it decreased, greatly improved. Which is fantastic, particularly when you’re doing deployments into containers, for example, because you’re often spinning up and down these virtual machines, these containers which are hosting your web services. So the ability to be able to start up quickly and use minimal memory is really important.
So those are a lot of the improvements in AOT and the even the JIT compiler has been improved a lot in .NET 8.
PGO is a process well, let’s take a step back. The JIT compiler has been around in .NET for its full 20 plus year lifespan, and the way the JIT compiler works is it’s just in time. So you write your source code in a language like C# or Visual Basic .NET or F#. That source code gets turned into what’s known as intermediate language code or IL code, and that gets stored in the assemblies, the DLLs and exes. Then at runtime, when the .NET runtime loads your assembly into memory and it’s about to actually execute some of your code, it will then look at that IL code and convert it at runtime into native code for the particular CPU architecture and operating system that you’re running on. And so that does take a bit of time, but once it’s then compiled that method that it’s calling for the first time, the next time it calls it, it’s already compiled.
Now, when it’s doing that compilation step, there are a couple of approaches that it can normally take. It could take a lot longer to do the compilation, but end up with faster running, more optimized code, or it could do a quicker compilation, but then the ultimate native code can be maybe a bit slower to run. So what would be best is if it could actually be really smart and maybe start by using a quicker compilation process that runs slightly slower code, but then monitor the running of the application by using instrumentation code. So it’s literally tracking how many method calls are being made, what parts of your code are most frequently executed, and decide, “well, actually I used a quick mechanism the first time, but now I can see that that method is being called a lot. Let’s optimize it even further and go through a secondary kind of compilation process.” And so that’s known as PGO [profile-guided optimisation]. And with .NET 6 and .NET 7, that capability was added to .NET, but it was disabled by default. What the major change in .NET 8 is, is that that process is now activated by default. So anyone who just upgrades to .NET [and] retargets their projects will immediately gain that benefit, and that can really significantly improve the performance of your applications. So a lot of changes in the compiler with .NET 8.
Now probably the biggest visual change, as it were, in .NET 8, and the biggest thing that most people are probably already aware of is Blazor full stack. So in the past with .NET Core 3, back in 2019, when the first versions of Blazor were being released, we had something called Blazor Server, and that meant that most of your code was actually executing on the server-side. You had full access, easy access to all your databases and web services, you had full control of the code, it was running on your own servers, so you didn’t have to worry about stealing of your intellectual property or anything like that. And it just used SignalR, a kind of live communication technology, to update the actual web page. So the end user was interacting with the website through a user interface inside their web browser - they’re clicking and dragging and doing some interactivity within the web page - and then those were just being sent to the server in order to actually execute the code that was Blazor Server.
And then about six months later they released Blazor WebAssembly as an extension to .NET Core 3 and Blazor WebAssembly, then used the WebAssembly capabilities of modern browsers to be able to take your .NET applications, compile it into WebAssembly, and therefore execute within the browser itself. Now you had a fundamental kind of slight shift in how you develop the application because your application is running inside the browser, it’s running inside a sandbox, and therefore limited to really only interacting with the web page and the browser itself, unless it can then make network calls back to web services on your server. So it’s a bit closer to actually developing, say, a mobile app where you’re running on the phone or the tablet, and then you’re making Web service calls to the back end in order to get the latest updates.
But both of those were called Blazor. Unfortunately, you had to pick. So when you’re creating a new project, you had to decide, “is this going to be a Blazor server hosted project or is it going to be a Blazor Web assembly project?”
The big innovation with .NET 8 is that now you can just create a single Blazor web app project - a new template has been added in - and you can create components, and individually those components can be set to run either on the server. If you need the same kind of server-side interactivity as the old Blazor server, you can do that for an individual component, or you could have a component that’s using the more WebAssembly technique or way of doing it so that can run within the browser. You can even set an auto option so that initially it might use server-side while it’s doing the initial rendering, and then in the background it can be downloading the WebAssembly version of it and then switch to that once it’s all fully downloaded into the browser. And so it can really improve the experience for the end users.
But not only have you now got the mixture of both the classic server-side and client side ways of doing Blazor, it can also now replace technologies like Razor Pages or even in some ways MVC. Because Razor Pages and MVC, both of those execute code on the server and the output a web page HTML and the style sheets and the JavaScript that then get rendered in the browser. Well, you don’t need to now use Razor Pages if that’s the kind of functionality that you need. Blazor now supports that as well. So server-side rendering, or SSR, is a new feature of Blazor which can replace, for example Razor Pages.
And there’s even a fifth kind of new feature in Blazor, and that’s streaming rendering. So that allows you to render part of the page rather like a razor page. And so something appears to the user, they can see most of the page, but maybe in the middle of the page there’s a table of information that hasn’t been calculated yet or hasn’t been retrieved yet, so it can just show the message loading. Meanwhile, asynchronously, any of your asynchronous components which are executing can be running in the background. And then once they’ve generated their HTML, that then gets sent across the same connection to the browser and updates the page. So visually it can improve the experience of how long it takes to actually see a page.
So yeah, Blazor, Blazor full stack incorporates all of that, and that’s probably the biggest change in .NET 8 that I think most people are going to get excited about. But for me I think actually the compiler changes because that affects everything. That really does improve everything.
Jamie
And now obviously there is a gray area on emulators. I’m not saying anyone should go and pirate video games and play whatever, I’m .NET saying that at all. I do not condone that.
But the exercise of building an application which emulates a system as close to 100% compatibility is, I feel like a very non-trivial task and a very interesting task for people who are developers, but are also very interested in video games.
What the chap had said when I was interviewing them was that they had, for reasons that are related specifically to efficiency in video gaming, they had requested a number of changes to the way that the JITer works and the compiler works related to when you jump into a method, when you make a method call, if you’re creating variables, as you jump into a method call, the .NET runtime is going to clear those variables out for you. But in video games every cycle counts, and so you can actually disable that with an attribute. What’s great about that is that is now, as of .NET 5 is now in the compiler, in the runtime, in the language, and so that’s a benefit that everyone gets. And I feel like it’s related to, as you said about the changes to the compiler and the runtime. Those are benefits we all get, regardless of whether we are interested in them - if I’m really interested in Blazor, I’m still going to get the benefits of the changes to the runtime and the JITer and the compiler, right?
Mark
Jamie
Mark
Jamie
Mark
Jamie
TargetFrameworks area - the
target framework moniker (TFM) to either include or just be net- whatever version is. So the new one is net-8.0, next year’s will be net-9.0, the year after net-10.0 presumably. You just change it to that recompile, and as long as you have the SDK in the runtime, you’ve got those benefits, no effort required.Mark
So I wanted to make sure that they would know, “well, does that mean that I can only use C# 12?” Now, of course no. Once .NET 9 comes out in a year’s time or in November 2024, they can install the .NET 9 SDK with its C# 13 compiler and in their project file, the target framework, as you mentioned, stays as
net-8.0, but they can add a
LangVersion element and type in 13. And so they could therefore benefit from the C# 13 compiler while still getting the support for .NET 8.And I’ve explicitly added instructions into this edition to not just say that this is available, but give them detailed, step by step, “in a year’s time. Once .NET 9 is officially out, here’s how you can actually start using that and whatever its new features might be.” And I even give a link to the .NET 9 download and the .NET 10 download. Now of course, if you try and go to those links right now, it’ll give a 404, but in November 2024 and November 2025 those will then become live links, or in fact earlier than that, because you’ll be able to download the previews.
So yeah, throughout the whole of the 8th edition, I’ve been keeping my mind ahead - talking about time travel - ahead a year or even 18 months to, “what if someone’s reading it then, and they want to use a preview of .NET 10?” Well, my book tells you how you can target .NET 8, get the long term support, but also you can start exploring or getting the benefits of future C# compilers.
Sponsor Message
HTTP timeouts. Database deadlocks. In software, it’s not a matter of if things fail, it’s a matter of when. One mishap like this and some valuable data is lost forever. And these failures occur - all - the - time. But it doesn’t have to be this way.
Introducing NServiceBus, the ultimate tool to build robust and reliable systems that can handle failures gracefully, maintain high availability, and scale to meet growing demand. For more than 15 years, NServiceBus has been trusted to run mission-critical systems that must not go down or lose any data, EVER.
And now, you can try it for yourself. NServiceBus integrates seamlessly with your .NET applications and can be hosted on-premises or in the cloud. Say goodbye to lost data and system failures, and say hello to a better, more reliable way of building distributed systems. Try NServiceBus today by heading over to https://go.particular.net/themoderndotnetshow and start building better systems with asynchronous messaging using NServiceBus.
Jamie
Mark
The second book is Apps and Services with .NET 8. So that continues the journey as it were. It goes into a lot more of the services type technology. gRPC, Odata, GraphQL, SignalR - that I mentioned is part of Blazor Server - minimal APIs and how to compile those using the native AoT compiler ahead of Time compiler so you get really fast startup and minimal memory footprint. So those are the services. And then building apps both web UIs with MVC and doing prototyping with Bootstrap using Blazor, the full stack Blazor. So you can target client or server or automatically switch between the both. And .NET MAUI. So if you do want to create mobile apps for iOS, iPhone or Android, or you want to target Windows Desktop, or Mac desktop with Catalyst, then .NET MAUI allows you to do that and to do it by using the native controls, so it looks as good as possible and fits in with the native operating system UIs.
So apps and services. That book also does cover data as well. So I do cover SQL Server using both Dapper for really fast kind of ORM as well as EF core in more detail, and cloud native data storage using Cosmos DB. So data services apps, that’s the second volume in the trilogy.
Now the third member of this trilogy, the title of that one is Tools and Skills for .NET 8 Pros. That one will be out hopefully in around about May, maybe June 2024. So about six months after the other two.
Oh yes. And so when do they come out? So the fundamentals book, the C# 12 and .NET 8 comes out in November, November the 14th hopefully should come out on the day that .NET 8 comes out. One month later on the 12th of December is when the Apps and Services book comes out. And so then probably May or June in 2024 is when the third book comes out. And yeah that’s tools and skills.
So it’s tools like making the most of your IDE or code editor. So I go into more detail on things like using analysers with Visual Studio 2022, using the various extensions for Visual Studio code,and even I’m now encouraging use of JetBrains Rider as a kind of third alternative to the Microsoft Ones as a great IDE. And JetBrains Rider is cross platform, just like Visual Studio Code is.
And what I’ve found is that particularly when you’re talking to professional .NET developers, they’re the ones most likely to use or pay for a license for something like JetBrains Rider because JetBrains Rider and similar third party editors often do have benefits. And so as a professional, once you’re comfortable with using the free tools that come from Microsoft or that might be licensed by your organization; once you really get into the more advanced stuff, you start to appreciate the benefits of maybe having a third party tool
I cover more of those kind of tools also things like deployment, doing testing from unit testing to performance testing, integration testing, all the different types of testing and related to that, using things like inversion of control and dependency injection because those can be more easily mocked in your unit tests, and deployment with things like Azure pipelines; and then ending with more topics that might come up in interviews like understanding design patterns and software architecture.And yes, some specific kind of preparation questions for interviews so that you can get the career that you want.
So a lot of stuff that fill in the gaps in that third member of the trilogy. But because it will be the first edition, I’m no doubt I have a very active community of readers who are usually not shy about sharing their opinions and giving me some guidance about what to include or what to expand on. So I’m really hoping that once that third member of the trilogy gets into the hands of my readers, they will consume it and give me some good feedback about what’s good, what’s bad, and what I can improve so that maybe in, say, roughly two years time, the trilogy might all come out at the same time for .NET 10. That’s the plan anyway.
We shall see. That’s going to be a lot of work over that summer though. So no promises.
Jamie
Mark
But I’m also aware that there are also lots of existing .NET developers. They probably already know the fundamentals. Now I’m always surprised at how many of those types of experienced developers actually contact me and say, “wow, there was so much that I learned from your fundamentals book that filled in gaps.” Because a lot of developers are self taught, and so even an experienced developer I think would benefit from the fundamentals book. But I absolutely don’t expect everyone to buy it, of course. So if you’ve already got the fundamentals, if you’re comfortable with that, then yeah, you could skip that book and then you’ve got the choice of, “well, do I want to just learn about lots of different ways of building services for different scenarios? All the different technologies have different pros and cons,” then the apps and services book will allow me to very quickly get my feet wet as it were, get introduced to these different technologies, what their pros and cons are, so that I can then pick one of them and maybe go a bit deeper, either by buying a book or just by reading the documentation.
What I find when I’m learning something new is even if something has some documentation and it might have a kind of introductory tutorial, they are not always kept up to date and they’re not always easy to follow. Because what tends to happen is the experts who build the platform are then told, “oh, just write a tutorial for it.” Now they’re the experts, but they’re not experts at education and so they’re not always that great at actually explaining how to get started with something. So that’s where my books come in, I feel.
I’m an expert at education, and I’m an expert because I’m actually .NET a quick learner. I’m not the quickest, I’m not the brightest, but I do notice the things that trip people up. And so when I first learnt gRPC, I had some misconceptions, I struggled with certain areas, but I notice all of that and I can write it down and so I can write a chapter that I think really helps people get started. And then once you’ve got that confidence, once you know how it should work, how the basics should actually run and what you will see on the screen, as it were, then you can switch back to the official documentation and maybe even complete some more of their tutorials, knowing that you’ve now learned enough to get over the rough spots or just to literally just read the raw documentation. So that’s where my goal is in my books, is to get to that point with all of these technologies where you feel confident enough to be able to just read the raw documentation.
And then the third book, yes, is more about, okay, so you might have someone who just wants to learn the technology for themselves. They’re just going to build their own applications. They’re not going to work on a team, maybe they’re retired, they just want to learn something cool. Then they could just buy the first two books: learn the fundamentals, learn how to build actual apps and services, but they’re not actually going to be working on a team of developers.
The third book is more for professionals. So that’s where the name comes from. The “Tools and Skills for .NET 8 Professionals,” pros. And so if you’re a professional, you’re much more likely to need to do proper testing, proper deployment pipelines, work in a team, understand software architecture, understand common design patterns, and in order to get onto that team, you need to interview well. So that’s the book that you want if either you are a professional but want to update your skills or you want to be a professional. If you want to be a professional, if you want to work on a team of .NET developers, the that’s where that third book comes in.
Does that make sense? I hope so.
Jamie
So like the fundamentals behind inversion of control work in all languages that support inversion of control; CI/CD is not a thing specific to .NET right; design patterns. Totally not a thing specific to .NET. I remember trying to and giving up on reading the Gang of Four book to learn some design patterns, and I gave up on it because it’s entirely written in Smalltalk, but I got the fundamental of what they were doing. Right?
Mark
Jamie
Mark
A lot of the things that some, not just academic, but some professional developers will insist, “you have to know this before you know that.” And it’s all, well, that’s not how real humans don’t learn that way. You slowly build up knowledge in pieces that connect together. But the overly formalizing things over engineering education can really kill the interest.
Jamie
Mark
So you don’t need as much hand-holding with my books. I’m kind of there with you, even just the way I write, the language that I use, the style. I’m just a friendly developer sitting next to you saying, “hey, look at this, look at that. That’s cool. Remember to do that,” et cetera, et cetera.
Jamie
But there is also an argument for, just like you said, sitting with someone who is more senior than you and going, “do you know what? I know it’s a silly question, but what’s this?” And getting that answer. And if your books are providing that, then fantastic, right? There’s nothing better.
Mark
And so some of your listeners might be thinking, “oh, but it’s still just a book. I mean, you’re saying I’m sitting next to you and I can ask you questions, and that’s the kind of style of the writing in the book,” but also you literally can go to the Discord channels, ask me a question. If you scroll back in time, you’ll see lots of my readers, maybe they were trying to complete a particular exercise in the book, or maybe they successfully completed that and now they’re trying to take it further. They’re trying to do their own thing, but they’re getting a bit stuck. And usually I can reply, I’ll reply within 24 hours because I’m based in the UK.
Sometimes I’ll find my US/United States readers, they’re often doing their kind of learning in the evenings, which of course is kind of in the middle of my night. So luckily for me, they might ask a question in the Discord channels and then some of my other readers will actually help out the reader and give them the answer or help them find a solution and it will all be sorted out by the time I get my coffee and it’s 07:00 a.m. And I’m looking at Discord and, “oh, this person, this reader had a problem, but the other readers helped them out. I don’t need to get involved. Apart from just maybe doing a thumbs up. Yes, you got that right. Well done.” But if they haven’t, then I can help them out and point them in the right direction.
So yeah, we’re all very active. It’s a great community in the C# channels. Have a look in all of it because there’s one for the “C# 10 and .NET 6”, “the C# 11 and .NET 7”, and now the “C# 12 and .NET 8”. So there’s three different C# channels for my specific books. There’s also just a kind of general channel for C# and net. So you can ask a question there. If you’re typing in a question, regardless of what channel you’re in, try doing an at, literally at me. You’ll see my username come up and that will make sure that I get a notification on my phone. And so at least I’ll be aware that someone is asking a question and I can, even in the middle of the night, maybe if I can’t sleep, if I got insomnia, maybe I’ll go down to my laptop and actually type in a full answer to that.
Jamie
Because that’s something that I feel like, again, some technical books, some technical authors, they don’t have the ability to do that. But also there’s a community there, not just you. You were saying there’s the other readers. So if I’m coming to the book new and I’m struggling on, I don’t know, I’m picking a number out of the air. I’m on chapter three and I’m struggling with something. I don’t quite understand it. Or maybe the way that I learn isn’t gelling well with the way that it is written. Or maybe the question is not as clear to me as it might be to other people. I can actually jump in and say, “hey, I don’t get this, can someone talk me through it?” And there will likely be someone there who can go, “right, yes, let’s have a chat. Let’s see if we can figure it out.”
And then, I suppose that works out well for feedback too, because then I’m not saying you do, but if you want to, you could then go, “all right, okay, I can see that maybe a percentage of people are getting stuck on this part. Maybe I can reword it for the second edition or something.”
Mark
So I now have multiple channels through which I get feedback from the book. I’ve had the GitHub repositories where people can raise issues since the very first edition back in 2016, actually. So I’ve been getting feedback via that mechanism. But now with the Discord channels, yes, it can be a bit more interactive. So I can understand better what was tripping up the reader or where their misconception was, maybe the source of their misconception. And yeah, I would actually say particularly towards, say, the language, the C
So for example, in chapters five and six, I cover object-oriented programming, things like the difference between the abstract keyword in C#, which has multiple meanings and multiple context, and the concept of abstraction in object-oriented programming. Because, for example, abstraction, the concept can be implemented using an interface, doesn’t need the abstract keyword at all, and the keyword abstract applied to a class, all it really means is you can’t instantiate that class, so you can’t use new and the, whatever the class name is, it’s not necessarily anything particularly to do with abstraction.
And so I was able to by understanding the deeper misunderstandings that my readers had from previous editions, I was able to rewrite those sections, add extra materials. At the end of chapter six, for example, I’ve got quite a big kind of summary of object-oriented programming where I can really highlight the difference between the different types, not just between a class and a struct, but then between abstract and interface and the new record types, and really highlight what those differences are and when you would choose to use one rather than the other. So I really think that those two chapters have been greatly improved thanks to my readers and them giving me feedback.
Every time I kind of see a question in the Discord Channel, part of me is like, “oh no, I feel that I’ve let them down, that they struggled,” but then I feel so good that I can then improve the next edition of the book.
Jamie
Yeah, because it’s providing a little bit of that theory background and hopefully helping the readers to realize that just using your example of
abstract and abstraction, they sound the same, but are not the same. Right. I remember at university we were doing C# and .NET and it was .NET [Framework] two. So it was very early on, and our C# lecturer gave us like a pop quiz one week, and just, “what does this keyword mean? What does this keyword mean?” And I don’t know what the percentages were, but the percentages were high enough that in the next lecture he’d said, “the next time that anyone says that static means it can’t be changed, I’ll stand on your toe,” or something like that, something silly.And that’s because static in English language means it doesn’t move. So therefore you can make the assumption that it doesn’t change. But that’s not what it means, and I fully appreciate that. And that comes from a history of other languages doing things in a specific way. And so if you don’t know that history, you’re not necessarily going to know why that keyword works the way it does. Like
virtual, right. Unless you understand why the virtual keyword exists, you’re not really going to understand what it does and what it provides.So what about getting in touch with you then, Mark? Let’s say someone’s listening in and they’re, “you know, this Mark, I want to pick his brain.” Is the best way to join that discord that you were talking about, the packed discord? Or are you still on X slash Twitter slash whatever-they’re-calling-it? Is it LinkedIn? What’s the way to get in touch?
Mark
If there’s a technical issue, an erata, a problem with the book or the code that’s part of the book, then raise an issue in the appropriate GitHub repository and just tell me as much information as you can and then I can add that to the official list of erata and how to fix that particular issue. And then I will always then feed those into the next edition. So the 9th edition for .NET 9 will come out next November. And so you’ve got up till about September, mid-September next year, and all of those erata will be incorporated.
Jamie
Well, I always enjoy our conversations, Mark, because I come away with a handful of new stuff to look at. You know, I’ve said in the past that I’ve recommended your books to people who are maybe Junior to me or starting their journey simply because of the way that you write them. So genuine from me to the listeners: I would recommend getting Mark’s books if you’re interested in learning a little bit more about .NET and what’s going on. If you want a book resource or an ebook resource, something that has a planned out journey through the .NET stuff. Because like I said, I’ve recommended your books to juniors and apprentices in the past and they’ve come away with, “wow, that was really good.” You know, that’s a genuine recommendation for me. That’s not me saying that just because you’re on the show or whatever. I’m definitely not being paid by packt to interview you or anything like that. That is just genuinely a thing.
Mark
Jamie
Mark
Jamie
Well, like I said, Mark, it’s been wonderful chatting you again today and thank you very much for being on the show.
Mark
Jamie
Wrapping Up
Thank you for listening to this episode of The Modern .NET Show with me, Jamie Taylor. I’d like to thank this episode’s guest, Mark J Price, for graciously sharing his time, expertise, and knowledge.
Be sure to check out the show notes for a bunch of links to some of the stuff that we covered, and full transcription of the interview. The show notes, as always, can be found at the podcast's website, and there will be a link directly to them in your podcatcher.
And don’t forget to spread the word, leave a rating or review on your podcatcher of choice - head over to dotnetcore.show/review for ways to do that - reach out via our contact page, or join our discord server at dotnetcore.show/discord - all of which are linked in the show notes.
But above all, I hope you have a fantastic rest of your day, and I hope that I’ll see you again, next time for more .NET goodness.
I will see you again real soon. See you later folks.
Useful Links
- Mark’s previous appearances on the show:
- Mark’s .NET Trilogy books:
- C# 12 and .NET 8 – Modern Cross-Platform Development Fundamentals
- Apps and Services with .NET 8
- Tools and Skills for .NET 8 Pros (there is no link for this, at the time of creating the show notes)
- Announcing .NET 8 Release Candidate 2
- Tools and Skills for .NET 8 Pros GitHub Repo
- Conversation about PGO
- Episode 72 - Emulating a Video Game System in .NET with Ryujinx
- Performance Improvements in .NET 8
- target framework moniker (TFM)
- The LangVersion element
- Dapper
- Cosmos DB
- JetBrains Rider
- Visual Studio Code
- Design Patterns: Elements of Reusable Object-Oriented Software
- Packt Publishing discord server
- Supporting the show:
- Getting in touch:
- Music created by Mono Memory Music, licensed to RJJ Software for use in The Modern .NET Show