The Modern .NET Show

Episode 117 - Our Perspectives on the Future of .NET with Mark J Price

Sponsors

Support for this episode of The Modern .NET Show comes from the following sponsors. Please take a moment to learn more about their products and services:

Please also see the full sponsor message(s) in the episode transcription for more details of their products and services, and offers exclusive to listeners of The Modern .NET Show.

Thank you to the sponsors for supporting the show.

Embedded Player

Episode 117 - Our Perspectives on the Future of .NET with Mark J Price
The .NET Core Podcast

Episode 117 - Our Perspectives on the Future of .NET with Mark J Price

Supporting The Show

If this episode was interesting or useful to you, please consider supporting the show with one of the above options.

I have discovered a great .NET tool, Entity Services, that significantly saves development time, especially if your app collects data from various sources and shares it via web-api. It will create for you enterprise level, cloud ready source code based on a simple configuration.

What I like about this approach is that we can focus on writing code that really matters.

Learn more on their website at Entity.Services.


Episode Transcription

Hello everyone and welcome to THE .NET Core Podcast. An award-winning podcast where we reach into the core of the .NET technology stack and, with the help of the .NET community, present you with the information that you need in order to grok the many moving parts of one of the biggest cross-platform, multi-application frameworks on the planet.

I am your host, Jamie “GaProgMan” Taylor. In this episode, Mark J Price returns for the third time. We talked about his new books “C# 11 and .NET 7 - Modern Cross-Platform Development Fundamentals” and “Apps and Services with .NET 7”. For most people, writing one technical book in a year would be a monumental task, but Mark wanted to write two: one for people who want to grok the fundamentals of C# 11 .NET 7, and one for people who wanted to get their hands dirty and learn about the many different types of apps that you can write with .NET 7.

Along the way, Mark and I swapped into teacher mode and discussed a little about how .NET is becoming more accessible to students and new developers. We also chatted about ChatGPT (which was brand new at the time of recording) and how other machine-learning based content generators will likely change the worlds of art, prose, and development.

So let’s sit back, open up a terminal, type in dotnet new podcast and let the show begin.

Jamie

So, Mark, my goodness, it’s been forever since you were last on the show. Welcome back to the show. It’s great to have you with us. Thank you for spending some time with us.

Mark

Thank you very much, Jamie. It’s always a pleasure to talk with you, too. So I’ve been looking forward to this for a couple of weeks now.

Jamie

Excellent. Thank you very much.

We do need to preface this entire conversation with we are recording this on December 7th, I believe. Yeah, December 7th. I just have to double check because I can’t remember numbers, but that’s fine. Everybody has their own thing, but that’s fine. So, yeah, we’re recording this ahead of time on December 7th and we’re going to talk about some books that you’ve just released. And the reason that we’re saying we’ve recorded this ahead of time because obviously there’s a little bit of time cast Pod Machine wibbly Wobbliness before this comes out. So that’s why everyone, we’re just setting that expectation that we were in the past. So if things change, then we are sorry.

Mark

That’s always a challenge with trying to keep up to date with things like .NET, which come out every year now, regularly.

Jamie

I agree. I agree. I used to joke that, “oh, there’s been 14 new NPM packages released in the last 4 seconds.” Well, guess what? There’s probably been about eight new different .NET versions now.

Mark

Definitely.

Jamie

Cool. Yeah. So I was wondering, Mark, before we actually get started and talk about the topics we’re going to talk about today, would you mind giving the listeners a quick brief of like an elevator pitch of who Mark is and what he does? Because obviously it’s been a while since you were last on and we may have new listeners now who may not have heard your elevator pitch from last time.

Mark

Absolutely. Thank you. Jamie? Yes. Who am I as a very existential question.

So my name is Mark, Mark Price, and I’ve been, I’m 50 years old this year, so I’ve been around for a while now and throughout most of my career I’ve been working in IT and particularly focused on Microsoft developer tools and technologies. In fact, I even 20 years ago, just over 20 years ago, I was working for Microsoft and living in Redmond near Seattle and on the, on the Microsoft campus. And that was a fantastic experience. And so I’ve actually been working with .NET before it was released to the public, working in the training and certification team within Microsoft, helping write official Microsoft curriculum training courses. So my team at the time was writing the first courses on things like ADO .NET, Windows Forms, Web Forms, all of that wonderful new .NET Framework type technology. And I’ve continued to work with all the different flavors of .NET for the past 20 plus years.

And more recently, starting in 2015, I was approached by Packt Publishing, who focuses on IT books, and they asked if I would be interested in writing a C#, learning C# book. And I was, I was teaching C#, I was getting people, developers prepared to pass the Microsoft exam at the time for C# and the various different .NET technologies. And so the opportunity to actually write my own book based on my experience of helping developers get educated about C# and .NET was a really exciting new challenge for me. So I jumped at that.

And over the past seven years, I’ve now written seven editions of that book. And so the most recent title is “C# Eleven and .NET 7. Modern Cross Platform Development Fundamentals.” And this is the first year that I actually wrote a second companion book to go with that because modern .NET, there’s just so much to learn, I couldn’t fit it all into one book and I therefore took the opportunity to kind of take a year off. I’ve actually quit my full time employed job so that I can write two books and I will be continuing to do that for at least another year. So yes, for those readers who need to wait for a long term support edition and therefore maybe skipping .NET 7 and waiting for .NET 8 next November, yes, I will be writing updated editions next November for C# 12 and .NET 8 and Apps and Services with. .NET Eight, but I should really encourage you to buy them now. The second companion book, the title of that is “Apps and Services with .NET 7”. That’s the second book the companion book. And it really literally does just continue on where the first book ends off. So if you wanted to kind of think about, well, what is going to get covered in those two different books? The first book is literally the language and the libraries. So the C# Eleven language, including all of its cool new features, .NET 7 and its libraries. Things like accessing the file system, working with data with EF Core version seven, but also the fundamentals of web development using ASP .NET Core version seven. So that book language, libraries, web development.

And then the second book, this companion book, Apps and Services. As the name suggests. It then goes into more detail on connecting to your data building data models, using SQL Server, but also cloud based data with Cosmos DB and then building services with all the different modern technologies from GraphQL to gRPC to SignalR and things like Nano functions, nano services with Azure functions, all those kind of service technologies and the pros and cons and where they should be best used. And then into building apps, graphical apps with Blazor and with the new .NET Maui.

So, as I say, massive amount to cover. That’s why it’s two books. And that gives my potential readers the choice if they’re already fairly up to speed, maybe they up to speed on .NET 6 already, rather than having to buy the new edition of the C#en .NET book. They don’t have to now, they could just get the Apps and Services book. And I’ve explicitly put in the first chapter, I cover what’s new in modern .NET and C#. So it’s not two books because I’m trying to make double the money. That’s not going to happen. I’ve made it as possible as given more choices. It’s choices for the customer.

Jamie

Feels quite pragmatic the way you’re describing it. Right. If I’m new to the newer versions of .NET 7 and C#, I may want to start with the first book, the modern cross platform fundamentals. Maybe I’m coming from .NET Framework, or maybe I’m coming from Node or Java or some other technology that seems like a good place to start. Whereas, like you say, if you’re already up to speed with what’s going on, well, hey, why don’t you get the Apps and Services book and then you can learn how to build, maintain and ship for those ones. That’s what I’m getting from you there.

Mark

Absolutely. And I love that word, pragmatic. Yes, I think you’re absolutely right there.

Jamie

Excellent. Okay, so, yeah, I mean, that covered my first question, which is why two books? Because it makes sense, right? Absolutely. But I can imagine that taking the time out to write one book is a monumental task in itself.

Mark

Yes, it is.

Jamie

So two?

Mark

It was definitely a big challenge and I would not have been - in the past - because Microsoft has released a new major version of .NET every November. That’s the pattern that they’re following at the moment. In the past I did have an employer, but even a few years ago, I had requested to change to a four day week officially, and 80% salary. And that was so that I could dedicate two days per week. Fridays and Saturdays: I’d work on the book and Sundays: friends and family.

So this year, because I knew that I wanted to do two books back in the summer, that’s when I gave my notice. And I’ve literally had to spend four and a half months full time just to be able to deliver these two books because they’re, they’re both 750 pages of pure content, 820 ish pages when you include the preface and the index and appendices and things like that. Yeah, and that, and that’s a, that’s a massive amount. Even if it’s just - and I’m doing bunny quotes there - even if it’s “just” a new edition, it’s amazing how much you can actually end up rewriting something on every page. So it is a lot more effort than I think people realize. Not that I’m complaining. I love writing books. I love hearing from my readers and knowing that I am helping people educate themselves in a very cost effective way, rather than spending thousands of pounds on a couple of day training course. If you can spend the time yourself to sit down and read and go through the hands on exercises, getting that hands on practice experience, seeing the code run rather than just learning it in theory, I think is a really valuable way of learning a new technology or refreshing your skills.

And I’m always pleased to hear that even experienced developers pick up as much as a new person because you notice more and you can fill in more of the gaps and it’s lovely to interact. Well hear from my readers either through email or through maybe raising an issue on the GitHub repository. I’m very active there. But in the last year, one of the biggest changes that my publisher has implemented is setting up Discord servers and a channel for each of the major books. So I would encourage anyone who’s bought any recent Packt book join us on the Discord servers and you can chat with the author, you can interact, you can interact with other readers. And it’s been really positive experience getting that immediate feedback and feeling this community starting to be built. I’m new to discord myself in the last year because of this, but it’s been a really nice way of interacting with readers and hearing feedback and it’s just going to make my work better and better for everybody.

Jamie

I really like almost all of what you said there was wonderful. I’m not saying that there was something that wasn’t, but what I’m saying is there’s a couple of things there that you said that were that really sort of kicked my brain into gear. I’ll come back to the community a bit because that is I think one of the most wonderful parts of it.

But I agree with you about the, shall we say, more experienced readers reading any kind of technical book and picking things up in the last few years I’ve been reading a whole bunch of like I read your previous entry into the modern cross platform development fundamentals.

Mark

Yeah

Jamie

The previous edition. And I keep pointing that out to new people. I’m like, “go get this book because it will set you up. And I picked up a whole bunch of stuff.” And I think that’s the really important thing. Someone from a previous stage of my life had said to me that she would read any book that was put in front of her because there’ll be some nugget of information that she didn’t know or some lesson to learn in that book, even if it was unrelated to her studies, her work, or her interests or anything like that. I challenge the listeners to go grab a book and not learn a lesson, is what I’ll say.

Mark

Yeah.

Jamie

Because I’m not a Java developer. But I think it was last year, in 2021, I read a book called I think it was Securing APIs or “API Security in Action” or something like that, and it was entirely in Java. But there were loads of lessons that I learnt along the way. I already knew about OWASP, I already knew about CSURF and SSURF and XSS protection and things like that.

But there were wonderful lessons along the way about things like don’t do equality of strings. If you’re comparing an input string to a secret, don’t just do double equals and don’t do the equivalent of string that equals because they are time-based comparisons. And so if the first three characters are correct and the last ones aren’t, then immediately the equality stops and comes back. Therefore, a malicious person, a malicious actor, could fire a bunch of characters at it and effectively work their way through the string until they get to the correct answer, because they know that the previous request took four milliseconds, the next request took five. So there must be more correct characters in the correct order in the second request. So all I need to do is change the next character along. That one takes longer. So now that must be a more correct - you’re optimizing for the time of things there. But that’s a wonderful thing I wouldn’t have picked up on if I hadn’t have read that book.

So what I’m saying is, I challenge anyone to read any book, technical, fiction, non-fiction, whatever, and not learn something, because there was always one lesson to learn at the very least, in every single book. And one of those lessons might be, ““I didn’t like this book.” Hopefully no one’s learning that lesson with yours.

Mark

Well, I had a friend when I was working for Microsoft and living in the States, and he was expert at languages, a real natural, but then he put a lot of effort into it as well. And he could speak about 30 different languages. And I think as most people, even if you’re just in high school and you’re learning French or German - in the UK school system. By learning another language like French, it really helps you with the grammar of English as well, because you’re seeing how another language does it. Even if you’re not going to be really speaking French that much, it can give you a deeper appreciation of your own language that you’re more happy with or more familiar with.

And that was actually one of the reasons why in my new Apps and Services book, I actually do cover so many different services, whether it’s OData or traditional REST type APIs or GraphQL, et cetera. Some developers might think, “oh well, I’m never going to use gRPC or I’m never going to use Azure functions,” but each chapter is doable in a few hours. So by having a look at all of the different service technologies and what they emphasize and the way that they do things like method signatures and what’s allowed and what’s encouraged and what’s kind of a part of the pattern. It really then helps you give a deeper understanding about the pros and cons of the ones, the technologies that you will use every day. And my hope is that I’ve managed to get the balance of giving the concept behind a technology: the basic, the key pros and cons of each technology. So to help you make a choice, a practical here’s, let’s code a real example, get it running, see how it works, so that by the end of that chapter on, say, Azure functions or SignalR, you’ll feel comfortable, “okay, I get what that technology is. I get what its pros and cons are. I’ve seen it work.” And so when you’re in a meeting with the boss and you’re discussing different technologies, you can say you can at least make a good contribution and feel more confident. “Yes, okay, yeah, I do think that is going to be the best way to go.” And when you’re then going to perhaps the official documentation, whether it’s the Microsoft Docs site or gRPC, because it’s cross platform, you might have to read examples in Java or in Python, but because you’ve seen it work with .NET through the chapter of my book, you can understand a lot more and you can start it’s.

That getting started is what I always struggle with and that’s what in some ways, like a lot of people say, they write books for themselves. It’s like, “this was the book I wanted when I was starting,” and it can really help you accelerate that getting started. And that’s my hope. And really looking forward to hearing feedback from readers, particularly of this new book, so that I can then incorporate that into the next edition. Ready for for 2023 absolutely.

Jamie

We’ll come back to the community thing in a moment. I’ve got a pinned in the back of my head, but I feel like there’s something to be said for just-in-time learning and for optimizing your learning, for solving the problem that you’re facing right now. But I always feel like it leaves you in a less - and I don’t think I’m going to use the right words here, so I’m unintentionally ignorant on the correct word to use - but it feels slightly less holistic, I guess, or wholesome or humanistic to just focus on, “I will learn,” for instance, if you’re picking up Jquery, there’s a lot of people who do web development never use Jquery, and that’s perfectly fine, you know, because it’s it’s usually seen as a technology which you don’t need if you’re using an SPA framework like React or View or Angular or things like that.

But let’s say you don’t have that. You’re picking up Jquery, you’ve never used it. If all you need to know to solve the problem is this tiny piece of information, then you solve the problem, fantastic. But then perhaps when you have five minutes, ten minutes, circle back and learn the theory and the understanding as to why that happens.

Mark

Yeah.

Jamie

Because if you can’t understand the context of why you have to do it that way, then when you come to the problem ten minutes later, you know, two days later, a week later, a year later, you’ll have forgotten it because it was just-in-time learning to help you solve that problem and then you’re done. Right. So then actually, I feel like just-in-time learning and not focusing on the context makes it so that it will take longer to actually solve the problem next time, because you’ve got to be able to pull that memory back and be able to understand, “well, what was it that I did? All right, I typed these things. Oh, that doesn’t work. Why doesn’t it work? I don’t know, because I never actually learned the reasoning as to why it works.”

And I think your point there about human spoken languages is a perfect analogy. I’d said earlier that I had read this book that was in Java. Effectively, I didn’t know it was a Java programming book when I bought it, but I still read it all the way through because C# and Java are quite similar. And putting the argument of writing a program in a C# style to one side, there’s only so many ways you can write an if statement or a for loop or whatever. Right. And so it all sort of fits together. They’re all kind of variations on a theme. Now, when you take the writing it in a C# or .NET style back in, things get a bit wobbly. Things change a lot because my friend Zac talks about writing Python in a Pythonistic way, because an if block is still an if block. But it’s not the if block that you need to focus on, it’s the structure of the program, it’s the supporting libraries, it’s the testing libraries, all that kind of thing you pull in that define how you will write the language in the framework. Because you’re writing a language into a framework, you have to adhere to the standards. Probably a really bad way of describing that.

But again, similar to human spoken languages, like you said, that you can appreciate why, say, C# does things this way and Java does it that way, or JavaScript does it that way, or maybe Go does it that way. But Go is an incredibly stripped down language because it doesn’t need all of the features that C# or Java or any of the other similar aged languages need. And so that allows it to run faster and produce these tiny binaries. I think Hello World comes out like 2 KB. It’s ridiculous.

Mark

Wow.

Jamie

Yeah, but I think you’re right. As with learning human languages, I took Japanese at university and I always explained to people that, “Japanese is like it’s like English, but backwards.” And I don’t mean that in a negative way, but I mean the formulation of the sentences. The canonical example I give is when I say, “I watched the TV,” because you’re saying subject verb object. I am. The subject to watch is the verb and the object of my verb, the action that I’m doing is the TV in Japanese, you take the second half of the sentence and swap it. So you say, “I the TV watched.” Which still makes sense in English, but it’s not vernacular popular, like relevant modern English. It feels very 100, 200, 300 years ago English, “I the TV watched,” or brother poetic. Right? I the TV watch-ed”

Mark

It almost Yoda-esque.

Jamie

Oh yeah, that’s it.

Yeah. But I see your point about learning the bits of the language, “how to build the services and features,” that you not necessarily need right now, but you may need in the future. It’s that argument that we all have when we’re in the classroom: “but teacher, why do I need to learn this?” “Well, I’m not teaching you to fill any kind of jollies that I have. It’s not a particular pecadillo I have. It’s something that you will need. You just don’t know that you need it yet. Trust me and you’ll learn it.”

Mark

Yes. And I think it really helps to identify areas which were a design choice. So whether it’s a choice in the grammar or whether it’s something that is always required. So a sentence always needs to have - or a typical sentence would always need to have - a subject and a noun and a verb, but the order isn’t necessarily always fixed. That is a choice. And so to highlight that, yes, it really does deepen your understanding of any language to realize. It can help with programming in general, because your programs are always trying to solve a problem. There is a problem and you’re trying to solve it. And by being able to, if you only learn one language, then it’s the old example of, “if you’ve only ever used a hammer, everything looks like a nail.” And by seeing alternatives, it does open your mind. So even if the hammer is the right choice, at least you know it’s the right choice. And you’re not just assuming that that’s the only choice. Fascinating. Just in life in general, absolutely.

Jamie

There’s a reason why multiple ways to solve the same problem exist, right?

Mark

Yes.

Jamie

As we were recording this, I went to a talk at the weekend prior where a chap was talking about “the universal problem solver.” It was a fascinating talk. It went through philosophy, it went through mathematics, it went through sciences, it went through business studies, it went through management science, a whole bunch of things. And then right at the end he’s like, “but the only thing that could make a universal problem solver is the context in which it exists. Because you can’t create one problem solving machine, one problem solving algorithm to solve every single problem,”

Mark

Right.

Jamie

“It’s only a universal problem solver for the exact context in which you are solving that problem.” And I think that’s a really important thing to point out, right, that there is no one tool that fixes every problem. Like you said, “if all you have is a hammer, everything is a nail.” “If all you have is C# and net, then everything looks like an enterprisey .NET style solution.” Whereas actually you may be faster if all you’re doing let’s say you’re building something, in my opinion, let’s say you’re building something in your own time that is just an MVP - minimum viable product. You just want to see whether it’s actively doable I know this is the .NET Core podcast, but you might be faster starting in JavaScript just because the tools are there; or indeed Python, right? Because you just splat. And I think that’s the direction that Microsoft are going in with minimal APIs and global using statements. Just get rid of all of that cruft.

Because I remember we were talking in our previous conversation about just like the minimal APIs, like Hello World becomes a single line instead of eleven lines of several using statements, a namespace, a class, loads of parentheses and brackets and all that kind of stuff. And so by removing all of that cruft and maybe putting it into the background makes it easier to get started. But then it’s really important, I think, to understand what is actually happening when you hit build, like to understand that the C# tooling is stepping in and putting all of that back. It’s not that it doesn’t ever exist ever again, it’s just it goes back in because that’s cruft, that’s toil, that’s the stuff that the language designers, the tooling designers have decided actually you’re always writing this. If we take that out, perhaps you could be more productive.

Mark

Definitely. For many different projects. You don’t need all that or you don’t need to see that complexity.

Jamie

Absolutely, absolutely. Yes. You can if you want. There’s actually, I found this out the other day because I was like, can I wonder if I can enforce the old style? Old style, right. The more traditional C# with the using statements at the top and the namespace and the curly braces and all that kind of stuff. And you can when it first started, when Microsoft first brought it out, I saw loads of negative feedback. “I don’t want to have to do it this way!” You don’t have to. You can actually put a flag into your csproj, or indeed, if you’re using the command line, you can do dotnet new whatever, there’s a flag you can put on there to say, give me the old style, the more traditional style, all of the code, please. Because at the end of the day, it’s just being created by the compiler. When you hit build, that’s all that is. It’s not that it’s hidden from I guess it is hidden from you, but it’s making it easier for you to get because we’re not hired to type. Right? Like you said, we’re hired to solve the problem, and getting rid of all of the ceremony and the cruft allows us to solve that problem faster.

But then you need to perhaps understand what’s happening between you typing your commands and you’re hitting build. And the actual code that runs here, not necessarily at the IL level, but like the hidden magic, the templates that are happening to put that stuff back, so then the compiler can step in and do its thing. Right?

Mark

Yes. I was - very much a bit of a segue, so we might want to cut this out. But I was reading yesterday about the ChatGPT, the AI generated stuff, and one of the newspapers in the UK tested it on GCSE history questions from this year’s exams. And so basically a kind of one sentence essay question about the Second World War or the League of Nations or whatever the topic happened to be, and every answer that it gave at a superficial level, if you’re just reading it, yeah, it’s basically a grade C, or what they call level three in modern GCSEs in the UK. And so it’s above average. Above average student already today. And so what I was then thinking about is the AI tools that can then help you write code as well.

And you can really see even today that a human developer’s skills now need to be less about necessarily writing the raw code yourself, but being able to maybe use a tool like that, but be able to recognize when it gets it wrong. Yes, like in an essay where it’s kind of got a few of the facts correct, but you need to be able to critically evaluate Ai generated essays, code, that type of thing. And that’s actually a very high level, very important skill. And whether it’s the examination boards or whether it’s coders or their managers, you can’t stop this AI stuff. But the skills that a well paid human developer will need, I think, is going to rapidly change over the next five years. And yeah critical analysis of code that something else has written is going to be the number one skill. And so a deeper and as you mentioned, it’s the deeper understanding which is so important.

I mean, that the last 15 years, lots and lots of developers solve half their problems by quick look on stack overflow and copy and paste. The AI tool now does that for you, but you still need to have that same skill of, well, is that the right answer? Is that the best way of doing it? Have I just introduced some bug that I’m not going to notice for months or years and someone else has the problem solving it? So, yeah, critical.

Jamie

Have I updated the license?

Mark

Oh, gosh. Yeah

Jamie

A lot of people do this all the time. But code that is copy pasted off of stack Overflow has a particular software license, and that can affect the license of the code you’ve just written.

Mark

You have to be a lawyer. You have to understand code well enough to identify potential issues. Yeah, analysis skills, critically evaluating code or text.

I imagine lots of marketers… journalism you can generate, even ones written by humans. These celebrity articles, they’re all the same. You’ve just got to take one minor fact and expand it into 500 words. Well, AI is going to be able to do that really quickly and that the cheaper publications won’t even bother having a human look at it. And 90% of the humans who read the article, it’s junk food kind of thing. And so the quality really doesn’t matter.

I hope that like artists with the drawings that you can do with AI now, hopefully the high quality artists will still be able to create original works. But yeah, if you’re just a publication and you need a quick graphic to just go with the text, then that’s what it’ll be used for. Sure. As usual with all technology, if you’re in the top 10% of your industry, it’ll just make you more productive. But my worry is everyone else.

Jamie

Yep. I feel like just real quick on the artist thing, I feel like most people won’t look at a - now I may be extrapolating and confusing things and getting things wrong because I’m not an artist, right. So I don’t see that side of the world. But I feel like if I’m going to consume some art by a particular artist, I’m not going to consume that art because it looks like a specific thing. I’m consuming it because I like the way that the artist has interpreted that thing and produced the thing. Right. So for me and again, I’m not in the art world, so I can’t comment on it. But for me, it’s almost like a non argument. AI generated art will never be the same as human art. Because you look at a Monet or a Mondrian or any of these, any painter or artist of any kind of vintage, of any kind of era, they have their own particular spin on the way that they have interpreted the scenery, the object, the subject of their art. They have their own little twist on it. Now, obviously, some kind of AI or system can learn to mimic that because humans have learned to mimic that. Right. “But I’m going to paint this in a,” I’ve run out of artists, “painted this in a Van Gogh way or painted this in a DaVinci way.” Right.

But it won’t be to those that really connect with the art piece, it won’t be a DaVinci, it won’t be a vanguard. It won’t be that original artist. Like you said, if all you want is some piece of art to throw into an article or throw on a wall, just like this is some, “I’ll have one art, please.” Right. Then AI generated art will probably be fantastic for your use. But if you want that original human take with the human feeling and the flair and that interpretation, then again, it’s way out of my comfort zone, but I feel like that will probably be the way that it goes.

Listeners won’t be able to see, but I have a number of pieces of art behind me, and I got a poster from a video game that I used to play as a child, and I’ve got a cross stitch that my brother has made completely by himself. And those two things are two completely different things. One is a print that has been commercially mass produced, and the other one is something that he’s produced himself using his own effort and put his own flair into. And so they’re both very important to me, but for very completely different reasons.

Mark

Yes.

Jamie

And I think that it will be the importance that we all put onto the pieces that we’re looking at in the future for AI generated stuff. And I would hope that if an artist wants to use an AI generated thing, it might be a great way to in the same way that most developers can use it as a baseline to get started. So that you may be able to AI generate a beautiful, wonderful, serene scenery. And then an artist can come in and actually say, “right, that will be instead of me looking out the window, I can look at my computer screen and I can make my interpretation of that.” Right. Maybe that’s it.

I think to your point about AI generated code, and it requiring - I hate to put it this way - but higher level thinking. Yeah, higher level thinking is probably the right way to put it that critical analysis. I feel like it makes it more accessible as well, because I was describing to someone at the weekend about how computers are actually terribly designed. They are designed for people with hands. Well, what if you haven’t got hands because of some horrible thing that’s happened or because your hands are busy doing something else? Maybe you’re holding a baby. Maybe you’re doing something right. And so you need to have voice activation. Well, voice activation is really good, but it’s also really terrible at the moment. It’s still not good at picking up certain accents. And if there’s lots of noise in the room and things like that, so then that makes it harder to do.

And so if you can have a computer or an AI system, just automatically generate some code, and then you can actually look through it in your own time, in your own way, and pick it apart and say, “right, now, this needs to change. That needs to change. We’ll do this and,” like you say, make it more fit for purpose, definitely. Then to me, that’s immediately more accessible to people who can’t type. Like, what if what okay, what if I develop arthritis in my fingers? My ability to actually because I’m not hired to write the code. I’m hired to solve the problem. My ability to write the code goes out the window, but I can still solve the problem. And we currently solve that by going to pair programming. But what if there’s no one for me to pair program with? Then I’ve got the solution in my head, but I can’t get out. So I could use an AI tool to generate some code. I can maybe sit in a quiet space and say, “hey, ChatGPT, generate some code in C# which uses these libraries, blah, blah, blah, blah.” And it will get there eventually, I think.

My friend Paul showed me some code this morning. He was having a dialogue with it, and he said, “generate some code which leverages ImagesSharp to load an image. Now wrap that in an API. Now wrap that in a class.” And it was working, but it wasn’t. Right. And so he was able to actually go back and make it work. It still took him a few hours to get it to the point where it was working. It didn’t save him any time, just saved him typing loads of stuff. And as Scott Hanselman says, we only have so many keystrokes in our fingers. Right?

Mark

Yeah.

Jamie

So, yeah, I feel like all of that you said it was a bit of a bit of a tangent bit of it, but I feel like we’re still in that same area. We’re still in that same subject area.

Mark

Yeah, we are.

Jamie

I feel like it’s all related. I just feel like it makes it more accessible. What do I know, right?

Mark

I agree with you. I agree with you. And the more diverse viewpoints. And as you mentioned, someone could have actually an elegant solution to the problem, but they just don’t have the experience with writing the code. So to have that kind of tool that can generate the code and then they can kind of run it, see the result. Even if you don’t understand the code itself, perhaps. Because with these automatic AI generated art, you might not understand, well, how did that paint effect was created? Well, but you can evaluate it. You can look at it and say, “no, that’s not quite right.” And if you’re having that conversation with the AI to say, well, “naturally you’ve misunderstood what I wanted,” and have that conversation, maybe code can be the same way. And people can either be writing, creating applications, using these tools that solve a specific problem for them, like all of these automation tools that people often no code or low code, if you had an AI that you could talk to that does something similar, then that could open up all sorts of possibilities. Yeah, it’s an exciting time.

Jamie

Absolutely.

And I feel that it would help with academia as well. There’s a bunch of people that I know who are software developers in academia. They are PhDs, they are people of great influence and education in certain industries that are not development, but they do development, if that makes sense. A friend of mine writes .NET and Python code as part of his work in academia, but he doesn’t describe himself as a .NET developer or a Python developer. If this person can say, right, okay, to chatGPT or whatever, “suppose I have a data set that looks like this, and I want to evaluate it using Python and get X, Y and Z out, write me some code, which does that go?” Because that is like you said, it’s a single use. All I need to do is cleanse this data or get one particular data point out of it. And it’s faster for me to sit in GPT and type it out over a number of hours, just to get to the point where it’s reduced the problem down to the smallest bit. And then it’s figured out how to write that code, then have a human look at it, and they say, yeah, okay, you could probably do that with a friend who is a python developer or a .NET developer who’s willing to do that for ten minutes in their spare time. I’m not volunteering anyone, but I feel like that’s an easier task than saying, “how much will it cost me to have you write a program which does this?” Because then they have to go away and it’s going to take them a couple of days, and maybe they’ll do it in an enterprisey way and rapid tests around it and all that kind of stuff. And it’s not a waste of code, but it’s slowing the solution down, or rather slowing down the progress to the solution. I don’t know. What do I know?

So we talked about community earlier on, and I think that’s the most important part with any kind of learning. And I love this idea that you have with Packt, you have a discord server where people can join and talk to authors, talk to similar learners, talk to learners who are more advanced than them, or learners who are catching up to them, or I don’t know - about, again, unintentional ignorance. I feel like that’s probably the worst way to say it, but the learners of all sorts of different abilities and backgrounds and experiences. And I feel like that is something that has only really happened in the last maybe two, three, maybe even five years where I can buy a book and then I can join a community, still learn from the book, in my own time, in my own space, where maybe I feel safer in my own space or maybe I feel more comfortable in my own space. I can learn from that because the problem with the book, I’ve always found, is you can’t ask why if the way it’s written isn’t put across to me in a way that I don’t fully understand. And I have to go to Google or I have to go find someone to ask. I can’t ask why, but with the community, I can actually turn to people and say, “hey, there’s this bit on page seven that says blah blah, blah, blah. And I think I understand it is my understanding correct?” And you can ask them, and because they’ve got the same book, they can jump to that section, refresh themselves and go, “yes, you’ve got it. Absolutely right. But also, here’s some supplementary things.” And then I suppose as an author, you can jump into that conversation and go, “right, okay, I understand that perhaps some words maybe need to be tweaked or maybe I need to add some extra stuff.” And I feel like it’s this wonderful feedback loop for everybody. Right?

It’s a continuous integration but for authors.

Mark

Yes, definitely. And what I’ve noticed, a common kind of scenario that tends to happen on the discord channels for my books is that because I have a lot of readers in the United States, and I’m guessing that a lot of professional developers have got their day job, and then it’s in the evenings that they then might put aside a couple of hours to maybe go through a chapter of my book. They tend to therefore want to ask questions in the discord channels in the evening for Americans, which is the middle of my night. So I’m asleep. And so I will often wake up in the morning and see this discussion happening where my readers, maybe a complete newbie: just bought the book, just getting started, and they’ll ask a question. They’re a little bit stuck. And my other readers wonderfully helping them out and answering their questions or saying, “well, I think Mark did it that way because of X.” And often they’re correct, yes, that was why I suggested doing it that way. Sometimes they’re not sure and I even go back, “and now why did I do it that way?” And often there is a good reason. Sometimes it’s just personal preference, but at least I can then say, and so the readers then get, “right, okay, so I was right that I could have done it this other way, and there wasn’t a really particular reason why the code got you to do it that this particular way.” And that’s really valuable because that gives you that deeper understanding. If you understand why you’re being told to do something in a certain way, it helps you understand it.

Because we started doing the discord channels for the 6th edition, the previous edition, over a year ago, I was able to get some really valuable feedback, things that I had maybe just not even thought about, because you just make these when you’re trying to write code and writing examples, you maybe do make a few assumptions. And so you haven’t fully explained exactly why you’re going to get them to do all these different things in the book.

And so I was able to just change a sentence slightly in the 7th edition that makes it so much easier for the reader to understand; yeah, why they’re doing this certain thing. Even with the 7th edition, after seven years, the fundamentals, particularly with a beginner’s book, it’s not like an if statement or a switch expression or even ASP .NET Core changes that fundamentally, but every addition can be that 1% improvement, which actually has a 10-20% impact. It’s fascinating. Every time I think, “oh, well, there’s nothing that I can change next year,” and I end up changing so much, and I think definitely improved. I mean, just, just I’ve been so pleased with the reviews, the Amazon reviews for the current editions. I’m very happy. Everyone really seems to be very pleased with all of those improvements. And honestly, it really is thanks to my readers and thanks to that feedback and that interaction, particularly through discord. So, yes, I absolutely encourage all readers, please join us. And I think you’ll find a very happy, helpful, friendly community.


A Request To You All

If you’re enjoying this show, would you mind sharing it with a colleague? Check your podcatcher for a link to show notes, which has an embedded player within it and a transcription and all that stuff, and share that link with them. I’d really appreciate it if you could indeed share the show.

But if you’d like other ways to support it, you could:

I would love it if you would share the show with a friend or colleague or leave a rating or review. The other options are completely up to you, and are not required at all to continue enjoying the show.

Anyway, let’s get back to it.


Jamie

Like I said, my thing is all about if you’re learning something, there are certain ways and certain types of people, some people like to learn by themselves. “I’m going to be by myself. I’m going to use the resources I have. I’m going to come up with my own supplementary resources. Brilliant. I can do that.” Fantastic.

But there are other people who maybe a classroom setting would make sense of, like a virtual classroom, or just having that community to be able to turn to someone and say, “hey, I don’t quite get this, it’s my misunderstanding, but how do I understand this?S” Or heaven for Fend. You’re doing it right. You understand it completely and the tooling breaks.

Mark

Yes.

Jamie

What do you do then? Right. Being able to turn to someone and say, “look, I’ve got this weird error and it says segmentationful. What happens? What have I done?” And then someone in a community that is open and accepting and things, somebody will jump in and say, “right, I think this is what’s happened. Let’s do some googling together and figure out how to fix it. This is a really bad way for you not to learn. So let’s get you back to the point where you can continue learning on that journey. Let’s let you achieve that. Let’s see you grow and then if you have time, we can maybe come back and talk about what happened.” Right?

Mark

Yeah. It can be frustrating occasionally for my readers when just the names of things can change. The classic example that just caught me out with the current edition was with the 7th edition was the renaming of the .NET Interactive Notebooks. So they were called .NET Interactive Notebooks and that was the extension that you install into Vs code, Visual Studio code. But Microsoft then changed the name to Polyglot Notebooks. And so in my book I say, “search for .NET Interactive,” and of course they’re not finding it. And I think it was like late October, October the 28th or something. So just too late a week later and I could have updated the final proofs of the of the book. So that was the very first errata that went into the GitHub repository.

Oh, and that’s the other thing I’d recommend to to anyone who’s listening to this, who’s maybe thinking about buying one of my books, do also please go to the GitHub repository. I do have a list of corrections and I’m very active on there. As soon as someone raises an issue, I like to get it in there. So there are a few luckily minor things, like the name of the extension, for example. But yeah, hopefully it’ll save you a little bit of confusion if you have a look at the errata first.

Jamie

That’s a great idea, because I think I didn’t get very far into it, but I remember reading in the first volume of The Art of Programming by Donald Knuth and I didn’t get very far because I’m not that smart. But I do remember there’s a part right at the beginning where he says, and if you spot a problem, let me know and I’ll send you a hexadecimal dollar. I don’t think he does it anymore, but rather than it being, errata that gets added to GitHub or whatever, because that kind of thing didn’t exist in the 70s when he wrote the first volume. We have all of this now where, yeah, you can find the supplementary materials. And it’s wonderful because I can imagine that when something changes like that, something that’s not a fundamental change, but your readers are then sitting there bashing their head against a wall. “I can’t find the thing you’ve told me to use. You told me to use it’s a very specific thing and I can’t find it.” My goodness, that must be rather difficult to manage.

Mark

It can be tricky. I mean, luckily we do have these tools like GitHub and other ways of communicating with our colleagues and readers these days, which does make the experience of using a book better, even though we still kill some dead trees and flatten them into paper and all that. The combination, I think, of a paperback and having somewhere that you can go online, either to have a live chat with the author or to see an online list of things which maybe have changed since the publication date, that does really, really improve the experience. But there’s also there’s still that being able to literally flip through pages of a paper book, paperback, there’s nothing quite like that either. And being able to just make notes in the margins. As much as I enjoy my e ink note, notebook things, paperback, I always buy paperbacks of any of my favourite books.

Jamie

I agree completely. That’s why I tend to try and recycle mine where I can; either pass them on to someone and what I tend to do, and the readers, the listeners won’t be able to see. But I could show you, if you’d like, after this. And I’ll take some photographs when I’m reading through a book, I use the little sticky tabs with colours on them. And even when I gift the books on, I leave the tabs there and I’m like, “see if you can figure out why I left that tab there to remind myself about it.”

Mark

I quite like it when you go into a second hand bookstore and you see something, things like that, the little luminous tabs. Or when you’re flipping through a book and you can see the notes that a student has maybe made in pencil. It makes you feel connected to other people. And these books are really loved and used. It gives me a little warm feeling. Maybe I’m just being silly, but.

Jamie

I get it. I feel a similar way. And that’s why I leave the tabs in when I give these books away to people, either to mentees or to students that I know at colleges in the area or anything like that. “See if you can figure out why I put this tab there and why you think it’s important that I remembered it.” I may just be being big headed, I don’t know.

Mark

Well, you’re not allowed to say one of my books, but what was your favourite technology book that you bought yourself this year?

Jamie

See, that’s a real difficult one because I haven’t actually bought any technology related books in the last two or three months. They’ve all been completely different because I’ve been applying that same logic that I talked about earlier, about this person that I used to spend time with who would say, “read a book and apply that to your work.”

Mark

Right, okay.

Jamie

One of the things that I’ve done in the last few years is looked at books outside of technology and applied those lessons into my development practice. So like the KonMari Method by Marie Kondo, the idea of the life changing advice of tidying up. Well, that’s clean code and refactoring.

Mark

Yes, I can see that. Yeah.

Jamie

Essentialism by Greg McKeown is about saying no to the tasks that don’t get you to the point where you’ve completed the problem that you’re solving. That’s reducing your code down to the bare minimum required to finish the task that’s refactoring. Start with Why by Simon Sinek talks about how he talks about how it’s more people buy why the product exists, not the fact that the product exists. You think about the iPad, the ipod. He said other MP3 players existed, but Apple made it so that there was a why to buy their product. “Hey, you can have 10 million songs in your pocket,” almost any MP3 player on the market could do that, but then you could show people the songs you’ve got in your pocket and you could have your own personal soundtrack. And then it became like a niche sort of chic thing to do: “what’s on your iPod.” Right. They don’t buy what you sell, they buy why you sell it.

Mark

Right.

Jamie

And looking at the why then brings you to, “why does this problem exist? What is the user trying to do? Why is the user trying to do it?” And if you can figure out why the user is trying to do it, that will infer how you design the software to solve the problem. If your user is trying to solve a problem where they’re trying to just check their bank account, then, okay, I’m just going to display the raw text on screen. That’s okay. But what about if the user has some kind of accessibility concerns, then you need to wrap it. You should be anyway, but you need to wrap it in certain accessibility tags and values so that then screen readers can read it out. What about if the user has visibility but doesn’t have the ability? Maybe the example I gave earlier on, maybe they only have one working arm at the moment, perhaps through to a very nasty accident, or perhaps they’re holding a baby. Perhaps if you can figure out the why, you can then make the solution to your problem fit the why rather than just solve the problem. And so I’ve spent a lot of time reading all sorts of stuff around programming, so I can’t really say which technical book was the best because I haven’t really read any.

Mark

The three that you’ve listed all sound very interesting.

Jamie

They really are. And they, along with a bunch of others, have formed a talk that I give occasionally about empathy, sympathy and compassion for the user because it’s really important. Yes, we’re solving the problem. And each problem itself is almost like a self contained nugget of stuff to do: functionality. But they all are added together to build this almost like a house of a problem, a solution to a problem for a specific user.

Mark

Right.

Jamie

If you don’t understand what the user’s point of view is, if you don’t understand the problem the user is trying to solve or why they’re trying to solve it, then you may end up with null references that you’re like, “hey, it’s all right. You just don’t put in minus three.” But what if minus three is an actual valid input for that user and then you’ve just given them some software that doesn’t work?

Mark

Yeah.

Jamie

And it’s it’s not that it doesn’t solve the problem, it’s that it doesn’t solve the problem in the way the user needs it to because you didn’t understand why.

Mark

Yeah. Are you planning to give that talk again next year, in 2023, perhaps?

Jamie

I am happy to give that talk to anyone who will listen. Anyone who will listen. I’m sick and tired of giving that talk to my kids. They get kind of bored. There you go.

Excellent. Okay, so let’s say I’m already of A with C# and .NET modern .MET, and I want to skip over modern cross platform development fundamentals and jump into apps and services. You touched earlier on about some of the apps and services you can build.

Mark

Yes.

Jamie

And you went without wanting to sound bad to you, but it was kind of like it was almost like a vague description of, “yeah, well, you can do this, you can do this, you can do this, you can do this.” Let’s say I’m joining a team that is building some.net applications. Maybe I hate the term because I don’t think it exists, but maybe I’m joining a full stack .NET development team. This book will help me to understand web APIs and Blazor and things like that on it. I’m like the core audience, if that is my situation. I’m kind of like the core audience for this book. Right?

Mark

Yes, you are. Yeah.

So full stack is probably quite a good way of an umbrella term that would cover the contents of the Apps and services book because as a full stack developer you need to know the server side, whether that’s a ASP .NET Core website may be implemented using MVC; or whether it’s a ASP .NET Core hosted service, whether that’s built using minimal APIs or the more traditional controller based REST APIs; or using alternative kind of transport layers. And underlying kind of protocols like gRPC can be much more efficient, particularly if you’re trying to build complex microservices. So rather than having maybe one monolithic web technology REST API, you might break down that into lots of microservices and the added complexity and communication between those microservices in order to provide the complete task that might need to be currently being executed. That means that you’ve got additional communication, you’ve got the message format has an impact, the number of layers between those microservices has an impact and therefore performance of that transmission of documents becomes really, really important. And if you were to just implement that using REST APIs, then the overhead of HTTP is often just too much and you really start to get those bottlenecks occurring.

And that’s one of the reasons why Google invented gRPC with a very efficient binary format and it works cross platform with pretty much everything. And so there are third party libraries that you can use. Microsoft has done some implementations as well. So as a .NET developer you need to know how to build say, a public service which is probably going to be some kind of HTTP based like Rest or just HTTP. But also you’ll need to know how to implement gRPC so that you’ve got that more efficient communication between the microservices. If you’re trying to provide the client. Which could be a web application, a single page application using React or View or something like that. Or maybe it is just a .NET application developed using Razor Pages or MVC.

But if you’re talking to a traditional REST API then it has a very formal interface. You call this address in order to get a list of customers and you call a different address to get a list of shippers. And the format that you’re going to get back is maybe you have the choice of you can add in a request format header to say you want XML rather than JSON or something like that. But the amount of data that you’re getting back is probably pretty fairly pre formalized. Whereas if you therefore want to allow the client to have a lot more control and say well actually I only need the company name of the customer and I need this information from the orders and just give me a subtotal of that, then REST APIs aren’t the best solution. And so there are two alternatives. The older alternative might be using OData, which still can use HTTP, but you’re providing an endpoint where the client can then construct their own kind of query string with a standardized format. So you can define what columns you want, what entities, how to do the joins, filtering, all of that kind of stuff. So it’s an entire query language on top of your HTTP-based service. So you’re getting back efficiently only the data you want, but all of it all merged together in a single request, which can be more efficient.

And the more modern equivalent to that would be something like GraphQL, originally developed by Facebook. But there are implementations of that for .NET now. Now, because there are so many different service based technologies, microsoft, it would just be impractical for Microsoft to provide an official .NET implementation of all of them. Now the more important ones, like REST APIs and gRPC, microsoft does have their own official implementations, but for things like GraphQL. They don’t.

And so there are various third party libraries and in the 6th edition I used what was the most popular GraphQL implementation for .NET at the time. But I’ve now switched in the 7th edition to using Hot Chocolate by Chilesoft. And what I found problematic about the GraphQL net, the previous library that I used is that the impression I get is that the developers looked at the formal specification for GraphQL and did an exact implementation of that. So it’s a true, properly engineered, but implementation of everything of the Graph QL specification and the Raw specification for anything can be overly technical. And so it required so much effort and code and configuration just to even get the most basic implementation of a GraphQL endpoint and be able to start querying it. And so it was quite tricky to then write a simple enough example in the book and it then turned out to be quite brittle because they made changes. I think it was like going from version three to four or four to five, there were some huge breaking changes and it was just not very well documented because only a few people working on this open source project and it’s very difficult to keep it. So I don’t blame the developers at all, but just a combination of their initial approach being, I think, a bit too one to one mapping to the specification in combination with not being able to keep the documentation up to date. I found it very tricky to work with.

Whereas Chilisoft and their platform really, because they’ve got various products to build, clients to GraphQL to implement, the GraphQL server to do kind of testing and automatically generate clients for a GraphQL endpoint. Very, very Microsoft-y for anyone who is a Microsoft developer, you’re familiar with the way that Microsoft have been very good historically at taking maybe a quite complex technology and implementing a way for develop… a platform for developers to then use or implement that technology with minimal effort. And so you can get started very quickly. It works in a kind of more logical way, it fits in well with the rest of the .NET framework and the kind of conventions that a .NET developer are used to. Yeah, very convention-based, so minimal effort to get it working while still giving you the full power and being able to take control. And so I found once I switched to then using hot chocolate, everything flowed so much better.

So that chapter I’m particularly proud of. But there’s so much more that you can do with GraphQL. In particular, in the second edition I already know that I want to add more examples about how to take control over things like data loaders to make it more efficient, so that when you’re building these complex queries, because you can just ask for exactly what you need across multiple data sets, at the moment the basic implementation could therefore be potentially inefficient because it potentially have to join stuff together and just do it in a kind of maybe clumsy, not efficient way. Whereas if you go to the effort of actually implementing custom data loaders within the server, you can really make that much, much better. And I think that’s going to be an area where my readers would really benefit in the second edition.

So, yeah, if that is something so if anyone has bought the book and they’re interested in GraphQL and that sounds good to them, they do want more on GraphQL, please let me know. I’m probably going to do it anyway. But I’m really interested to know, would you rather use OData or would you rather use GraphQL? Are you interested in gRPC? Which areas should I put most of my effort for the second edition? There will probably be a third edition as well, so if I can’t get to it in the next nine months, there’s always a future opportunity as well. But yeah, I’m going to be led by my readers. So please, yes, give me feedback and right.

Sorry, this is a very long answer, but yeah, full stack. So then we’re kind of onto the client side and yeah, the two main, well, I suppose three main client to build GUI, the graphical user interface. So I do review MVC, even though I do cover that in the first book as well. I do go into MVC in a bit more detail and in particular using things like Bootstrap for prototyping. If you’re building a front end website for a client, branding is usually very important to them and using something like Bootstrap, you can end up with a site that just looks like everybody else’s. And so Bootstrap is not always the best choice for a final frontend website, but certainly for prototyping or for internal intranet type applications, very useful. So I do cover a bit more on Bootstrap in the Apps and Services book.

So, yeah, MVC and Blazor and .NET Maui. So Blazor, very good way of there are some really excellent open source free libraries with the Blazor components already created for you. Things that if you want to get a graph in there, for example, or do carousels or all these different standard things. Yeah, I’ve been quite impressed with how quickly third parties have created both paid for and free open source component libraries for Blazor. So there’s a whole chapter just covering those as well as building your own Blazor components. And then for the .NET Maui chapters. so if you do need to try and create a single project that can generate desktop Windows, and macOS Catalyst apps, as well as your Android and iPhone apps, just all from a single project .NET Maui is a great way of doing that. Yeah, I hope .NET Maui still is probably the least mature of all of the technologies in .NET that Microsoft supplies.

But hopefully it will just continue to improve and Microsoft will give it the investment that it deserves. I hope that Microsoft gets feedback that enough of their customers are using .NET Maui and the demand is there so that they can then justify maybe increasing the budget for the team who works on .NET Maui. Because I’m impressed with what they’ve managed to achieve within their constraints. I just hope that Microsoft continues to invest in that, but we’ll see. I hope it’s not going to be another Silverlight. I’ll just drop that in there, please Microsoft, give the team more money.

Jamie

Absolutely.

I feel like the way that Silverlight had to go, not the way that Microsoft chose to make it go, but the way that it had to go just because of the way that browsers were moving at that time. I feel like that has left a lot of worry in certain early adopters, some people are just like, “oh my goodness, this is brilliant technojoy. I’ll use it to build all the things.” And some people are a little bit more reticent, I think might be a good word to use. Reluctant, probably a little bit better. And that’s just because when you build something you need to know that there’s going to be support for it. I’m not trying to defend Microsoft, I know I’m an MVP, but I’m not trying to defend them in this. They’re big enough to defend themselves is what I’m saying. But I feel like it was more the direction that web browsers were going in at the time that caused Silverlight to go in the direction that it did. By installing lots of plugins into your browser, you immediately make it unsafe and browsers want it to be as safe as they need to be, which is it just makes sense that they would do that. But yeah, I agree with you. I hope that [.NET] Maui gets the support it deserves from those who make the decisions because like you said, it’s not as mature as the other things, but that’s because it’s new.

Mark

It is newer. Although it was based on the Xamarin Forms, wasn’t it? And so that’s been around for quite a while. But yeah, certainly trying to create a single project. I think they were very ambitious and they mostly succeeded. It just does have a few rough edges from what I’ve been able to see. But to be fair, I have yet to work on a real world project for a real customer in [.NET] Maui yet. Is that something that you’ve done? How much dot.NET Maui work have you done?

Jamie

So I’ve built alongside an apprentice, we’ve built an actual app with Invoice generation. So I created a Web API and they worked with this apprentice to say, “look, this Web API exists. Here’s how you do web.” Because everybody has different experiences with their background in education. Here’s how you do web. Let’s wire up an HTTP client that we can inject in and you can just do httpclient.Get this address and it will return the thing or post this address that will tell you that it worked. From what I’ve experienced, the very small amount of experience that I’ve had, which is eight weeks of working on an app to get it running on my Android device, their iPhone, their Windows laptop, my Mac laptop.

Mark

O so you really did, genuinely try it on all the platforms then?

Jamie

Absolutely, yeah. And it worked. There were a few things where maybe the pair of us hadn’t implemented things correctly and it caused certain crashes. And the problem is that because your .NET app is running on top of whatever the system runs, when it crashes underneath, you get very little or you get the esoteric this is a Java issue, or this is a Cocoa2DS issue, or this is a WinUI issue. And at that point and this was middle of 2022. Right. So at that point, the tooling that we were playing with wasn’t that mature. Yeah, but I feel like by the time this episode drops, it’d be a lot more mature. And if we do end up in that situation, the error messages will be a little bit more friendly.

Mark

Yes, that’s certainly very useful when you’re trying to target these truly cross platform apps.

I’m curious about the - what do they call it? Blazor hybrid with [.NET] Maui. Because I was getting the feeling that if I had a customer come to me to build a client application and it had to run on mobile devices, but it needed some custom components to be created. I have a feeling that I might try to do components using Blazor. So that if they did have because a lot of businesses, I think, need a website and an app and a mobile app. And so what you really want is a way to implement your graphical components once potentially using Blazor components, and then be able to though host those not just on your MVC site, perhaps ASP .NET Core MVC website, but also hosted embedded inside some kind of native app so that you can get the native integrations, whether that’s notifications or just the kind of look and feel. So I have a feeling that I might go that way. But I was wondering how you feel about that. Even if you haven’t had practical experience yet, how important is it to use the actual..NET Maui native controls compared to, say, Blazor hybrid components?

Jamie

So, for me, the .NET Maui native controls were completely different. Before this project, I had never touched any XAML of any flavour, ever.

Mark

Wow.

Jamie

It was eight weeks of a baptism of fire for both me and my apprentice, figuring out what this all meant. I had done HTML and lots of it kind of crosses over because it is still a declarative user interface language.

Mark

Right.

Jamie

But I feel for me personally, I would be more happy to use reusable HTML components just because I have more experience with it. That’s where I sit.

Mark

Yeah, I think I’m leaning in the same way because you can see the benefits of being able to create a native mobile app and the true integrations with the operating system. I can definitely see the benefits of that because the other question of course, is you could build a PWA - progressive web application. So you could implement perhaps using Blazor, but give it all of the wrapping of the PWA. And so for an iPhone user, they go to the website first and then they can click on the Share button and say, “add it to my home screen.” And then they’ve got a launcher. In fact, I noticed that the new rival to Twitter: Post.News, that’s basically what they’ve got at the moment is their website can just become a PWA app.

And you get some integrations with the native operating system by doing that. Like, yes, being able to add it as a tappable icon on the home screen. But I’m not sure, I haven’t investigated deep enough to know. What extra would you get if it was an actual mobile app? I’m assuming that things like notifications are probably some of that, but yes, I haven’t really gone to that level.

But in summary, I hope that Microsoft does continue to invest in .NET Maui. Do you have any sense about because Microsoft have officially said that they won’t support [.NET] Maui GUI apps on Linux. They won’t be doing the implementation. They’re hoping that it’s open source that third parties might do you have any sense of how that might hold back [.NET] Maui or how important that is?

Jamie

So from my perspective, I’m talking to you using a Linux-based operating system. So it would be great if I could just push a button and have the same app on my machine. But also there isn’t just one Linux. And then on top of that, there isn’t just one desktop environment and there isn’t just one windowing system. With Windows or macOS. You’ve got one operating system, one desktop environment, one windowing system. And you can, if you really want to go deep into the weeds and swap them out, you can. But there’s one that exists. With Android and iOS, there’s one that exists which makes it super easy. So when you say, “draw me a window,” you can talk to the operating system and say, “go draw me a window, I don’t care. There’s an interface for it,” go do it. It will happen.

But the Linux is with a Linux desktop operating system. There’s a ridiculous amount of combinations. But I do happen to know, and it was only about a month ago I spotted something on Twitter someone had said, I think it was a blog on the Microsoft dev blogs. I may be wrong. If I am wrong, I will correct it and put a link in the show notes.

So please do check those out.

editor’s note: this was a GitHub repo created by Microsoft, and it has been silently deleted between Jamie spotting it and recording this episode. The original URL was https://github.com/dotnet-standard-ui/standard-ui

There was something about ratifying all of the different UI frameworks that are used in .NET to create one standard. You’ve got almost like a .NET standard, but for UI. That isn’t what they’re calling it, but that’s just my phrasing for it.

Mark

Right.

Jamie

So then if you say, “draw me a window,” then something between your code and the operating system will figure out how to translate that and then give that to the operating system and say, “draw a window please.” So there’s potential scope for it, I guess. Interesting.

But then how do I put it the problem is I end up being all political and stuff. There is still a large contingency of people in the Linux environment who equate to Microsoft with evil and whether they should be or shouldn’t be, I’m not trying to make that statement, but a lot of them will make that statement. Like with the latest version of the Ubuntu distribution of Linux .NET 7 is now sort of baked into the installer. So then you install Ubuntu and you get .NET 7 out of the box. Lots of people in the Linux community were very upset about that. With certain versions of the Raspberry Pi operating system. Raspian - which is based on Debian - Visual Studio code, is installed by default. Lots of people were upset about that too, because for one reason or another there is this traditional view of Microsoft of the “extended embrace extinguish” and they have this feeling that it is coming with it. I’m not trying to make a point either side of that argument. What I’m saying is that there’s a lot of that. So I feel like if a Microsoft .NET Maui Linuxes UI is to happen, I feel like there might be a great amount of pushback against it.

There’ll be lots of people pushing for it, but I feel like there’ll be an equal or greater amount of people pushing back against it for traditional reasons of the old view of Microsoft being evil, whether they are or not. I’m trying to stay out of that argument. It’s an argument for other people to have. But I feel like there would be a lot of pushback for me. It would be great to be able to pull up my IDE, type in a whole bunch of XAML and hit build and see it appear on my machine. But currently what I’ve got to do is I’ve got to fire up the Android emulator and load it onto that. And then if I want to run it on my Windows machine, what I literally do is throw it up to GitHub. It does a build for me and gives me an exe which I then run on my Windows machine or a .APP that I can run on a Mac OS machine. So currently I have to push it away for it to be built so that I can go to that machine and run it. Which is a bit of a shame. But if they can come up with a way that makes that easier. That also doesn’t upset a lot of people. I’m in. But I’m also all about maybe we can try and be not as upset. I don’t think a UI framework is the end of the world. Right?

Mark

Well, and that kind of leads me into with C# 11 early, like six months ago, like April 2022 I think the preview three or preview four, the .NET team or the C# compiler team then added a language feature to do null checking in your method parameters. A double exclamation mark (!!) you could put after the parameter name I think it was, rather than the data type. So you could say string firstName!!. And so that would then automatically add in the code to basically do a quick if check: “if it’s null, then automatically throw an argument null exception,” type thing.

And when Microsoft introduced the feature they explained, “well, we’ve already been using it internally and the .NET team that’s writing all of the class libraries saved tens of thousands of lines of code. It reduced the code base by and so they really like it.” But there was such a massive amount of negative feedback with making some good points that they then a couple of previews later were removed. And so that features not in .NET 7. Now in .NET 6, the, the framework team in the argument null exception type in that class, it, it has now a method that you can call instead, you know, ThrowIfNull I think is what the method name is static method. So you can almost get, you can certainly reduce the number of lines of code that you have to write. It’s definitely simplified, but it’s not quite as neat. And my personal opinion is if Microsoft wants to add a new language feature like that that can significantly wrote by tens of thousands of lines of code, I personally would vote to have it. And for those who really don’t want to use it, don’t use it. That’s my personal opinion. I understand the argument, “well, even if I don’t use it, it’s complicating the language,” and yes, I do take that as a valid argument that I tend to lean towards, “yeah, give us some new stuff if it’s going to improve the language,” and then give us the choice of using it.

If you work for a particular company and you’re the team leader, you can say, “right, our policy is not to use that feature,” and just add in a code analyzer that will make sure that you don’t use it, that type of thing. But let the rest of us use it please.

But anyway, it has been really interesting to see the transparency that the .NET team has been letting us see how the sausage is made. It can be frustrating, but it’s definitely fascinating. Certainly for me it gives me a deeper appreciation and great gratitude to the team for putting a lot of thought and effort in and really taking it seriously. The feedback from the community, I think it really builds trust. Ultimately, I understand why they then took it out again. Personally, I just think it’s a little bit of a shame.

Jamie

Absolutely. I feel like it’s a discussion for another time, but I feel like there’s a positive and a negative, I think, to being as open as Microsoft are being at the moment with .NET and C# and I think - I’ll leave this as a little tease for hopefully we can come back and talk about this again. But I feel like because they are so open and so open to receiving that feedback from my point of view only. So this is just me talking. Me, Jamie, I am a person, I am a software developer. I am saying these things from my view of the community. There are an awful lot of people, from my perspective who throw their hands up in the air and say, “I don’t want to have to use this.” And it’s the have to part of the sentence. It’s the have to.

Whereas I feel like perhaps we as people in the community and indeed perhaps in other people at Microsoft who are making these announcements, maybe we should be accepting these announcements in the vein of, “well, this is a thing if you want it.” Right? They’re very syntactic sugar. I remember there was a huge amount of pushback for the var, for implicit versus explicit types on your variables. Huge amount of pushback. I know developers to this day who refuse to use var and I’m like, that’s cool because what you’re doing is you’re solving the problem and what’s going to happen is the tooling is going to swap that for a var. Or the tooling when you hit build is going to go from var to your type. So it’s not even a hill to die on. It’s like it’s a sock on the floor to die on. Right

I hate the phrase “to die on”. You know what I mean? In the massive in the grand scheme of things, it’s not a huge argument to get caught up in. And I feel like I empathize and understand from the Microsoft point of view because when you’re announcing these things on stage, you only have an hour, 2 hours for maybe even 40 minutes, maybe even half an hour to show off a new language feature and then you’re off.

Or if you’re in a blog post, if you’re not a professional writer like yourself, then you’ve got a developer or a developer advocate who has written the blog post. And they may not have communicated in the way that the person who was the individual who’s reading it such that they know that it’s not a requirement. You don’t have to use this, but this is a convenience feature. Syntactic sugar. You don’t have to do it, but then, like you say, you got the argument of his polluting the language, all of pollutes the language from that point of view. Hopefully you hear the bunny quotes, “LINQ pollutes the language,” in that same way. So minimal, APIs, global usings all of these things that we’re all in agreement with, are pretty good at doing the same thing, but it’s for way smarter people than me to figure out. But I feel like perhaps we as a community need to approach these announcements with, “that’s interesting and novel,” and perhaps those making the announcements need to say, “this is interesting and novel and you don’t have to do it, it’s just a thing we’re trying out.”

Mark

Yes, the world would be a better place if everyone tried to assume good faith in other people.

Jamie

Absolutely.

Mark

Almost no one is trying to make your life harder. So when the .NET team wants to add something, it’s because they genuinely believe that it’s going to be overall beneficial for most people. But yeah.

Jamie

Absolutely. Excellent.

Well, I’ll tell you what, Mark, we’re both running out of time that we can chat further today, but I always enjoy my conversations with you. You’re one of the few people who’s been on the show the most.

Mark

Also, I’ve been a record when I get five appearances.

Jamie

Yeah, I think currently it’s a Mars bar.

Mark

Well, I definitely head up north, maybe when it’s a bit warmer later in the summer. Particularly if you’re going to do a live speaking engagement, I’ll have to come along and listen and I can give you a signed copy of my books as well.

Jamie

Oh, excellent. That would be very lovely. Thank you very much. We’ll definitely have to do that. And I feel like I owe you a tasty beverage of your choice anyway, so there’s that too.

Mark

Wonderful.

Jamie

So before we sign off, Mark, I was wondering, can you remind everyone about the books and a little bit about yourself? And maybe if there’s a way for folks to get in touch with you, if they’re interested in talking about the books, or maybe they have an idea or just want to check out what you’re up to.

Mark

Absolutely. Thank you very much, Jamie. Yeah, it’s always fun to chat with you as well.

So, my two most recent books that were published in November 2022, the titles are “C# 11 and .NET 7 Modern Cross Platform Development Fundamentals”. Fundamentals literally being that’s the recommended first book if you’re completely new to the language and the libraries. And then the companion kind of follow on book is titled “Apps and Services with .NET 7.” My name is Mark J Price. So that’s my Gmail account: markjpricegmailcom if you want to email me directly, that’s also my GitHub account. So you can go to github.com/markjprice. And in fact, the GitHub repository then has links to all my other places. So you’ll find my kind of profile and links to things like my Mastadon account and my. Twitter account. And yeah, I’m Mark jprice on Twitter as well. I basically try to standardize around Mark jprice - Markjprice for most things, so even Bing, you can probably find me through that, find me on Discord and we can have a live chat.

So I mark j Price on discord as well. I don’t remember what the number is. 7018. So markjprice#7018 on discord. And yes, for those of you who have read my previous editions or have bought the latest, I hope you’re enjoying joining them. Anything you want me to add to the next future editions, let me know. And I hope that you all learn a lot and have fun doing it.

Thank you again, Jamie, for inviting me on your podcast.

Jamie

You’re very welcome, Mark. Thank you for spending some time with us today. I really appreciate it. Thank you.

Wrapping Up

That was my interview with Mark J Price. 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 dotnetcore.show, 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, and to come back next time for more .NET goodness.

I will see you again real soon. See you later folks.

Follow the show

You can find the show on any of these places