S05E20 1h 06mSeason 5

Episode Summary
This episode features Carl Sargunar, a web developer who has been freelancing for nine years and specializes in the content management system Umbraco.
Sargunar noted that the barrier for entry for trying new technologies has been greatly reduced. It is now as easy as finding the right tutorial, YouTube video, or Sargunar’s own resources. Visual Studio Code is one of the nicest editors available, and developers can right-click on a project to add a container to it. We discuss how Docker can be used to create reproducible builds and have truly cross-platform code.
The .NET technology stack now runs on any operating system and architecture, including Arm, Raspberry Pi’s, and other IoT devices. Developers can dual boot to Linux or use a Mac machine, and can run their apps on a variety of devices and architectures. Umbraco embraced .NET Core and took on a full platform rewrite to migrate the entire code base from Framework to 3.1. .NET developers have the luxury of using any tool they are comfortable with, and they can run their apps on brand new CPU architectures like the M1 and M2 chips.
Docker makes it easy to try out new technologies without needing to buy expensive hardware or install Linux. GitHub Code Spaces and JetBrains Fleet allow developers to spin up an IDE in the cloud so that they do not need a powerful machine to develop applications. Containers can be shared with others so that they can work on the same project without needing to install the same software. Docker files are plain text files that describe the changes made to the environment, making troubleshooting much easier.
Carl recently ran a workshop at the Code Garden Conference, introducing people to containers. He explained how Docker containers can be used to quickly and easily spin up an application with multiple containers, such as a web server, a database server, and a small website running Blazer and an API. Docker Compose can be used to build and run the application with just one command, and containers can be used to abstract away the operating system and dependencies, making it easier to deploy applications.
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, I talked with Carl Sargunar about what a .NET developer actually is. The .NET stack has changed quite a lot in recent years, and it now requires a new set of skills and expertise… or does it?
Carl and I chatted about how with the creation of things like docker, you can abstract away most of the difficulty in getting orchestrated and set up, create reproducible builds, and even have truly cross platform code - something that Carl writes on his 64 bit, Intel-based, Windows machine can be copied over to my M2 based Mac Air and run with almost no changes; all thanks to the wonderful worlds of open source, containers, and orchestration.
But you don’t even need to know what these are. Carl and I talk about how you can get started using containers with almost no effort and without having to use the dreaded command line interface - making you effective and productive from the off.
So let’s sit back, open up a terminal, type in dotnew new podcast and let the show begin.
Jamie
Carl
Jamie
Carl
Jamie
Carl
Jamie
That’s what we do.
Carl
Jamie
Carl
Jamie
Carl
Jamie
Carl
Jamie
Carl
Jamie
Unfortunately, we didn’t come here to talk about a Jurassic Park.
Carl
Jamie
Carl
Jamie
Okay, so one of the things that we talked about when we were discussing this and I just want to set this and level set for people is that before we get onto the topic, I just want to quickly discuss why we came up with this topic and that’s we were saying in the pre-recording session that we did that .NET has sort of exploded over the last few years. And it used to be that a “serious .NET developer” would be Windows only, and they would use Windows on their Windows machines to do Windows stuff. And that’s no longer the case.
So just wanted to sort of level set for the people who are listening in. Because obviously, before we get onto the topic, we’ll properly introduce you in a moment. Carl, there are people doing .NET now who never lived in that world. So for those people, we’re about to go down memory lane, I think, and just explain to you how it used to be to the people absolutely haven’t made that jump yet, or don’t see a need to make that jump yet. We’ll maybe introduce some topics that they can maybe go away and learn a little bit more on the run time using Google, Bing, whatever such engine they want, right?
Carl
Jamie
Carl
I’m carl. Yeah, I’ve been a developer since I graduated from university. Actually, that’s not strictly true. I’ve been a developer since I got given a computer when I was in my kind of early teens by my dad and he brought a computer home from work one day, and I kind of see that as my start of my journey. So I’ve been a developer for a long time, but I’ve been doing it professionally since about 2004. So getting on for 20 years professionally now. I’ve been at this game a while.
These days I am a predominantly a web developer. I do a lot of work with a particular content management system called Umbraco, but I also do kind of straight up web work. But I’ve been freelancing for a few years now, pushing on for nine years actually. Gosh, that’s flown by. And I also do kind of other stuff with clouds and app development and Xamarin and now [.NET] MAUI coming into Things, which is their newest app development framework.
So yeah, just kind of as a freelancer, as a fellow freelancer, I hope I’m sure you appreciate we tend to do what needs to be done and I’ve always really enjoyed that challenge of just jumping into problems and helping people solve problems So that’s who I am. I’m a kind of freelancer for hire who will come and help you solve your problems and have been doing that for many years now.
Jamie
Carl
Jamie
Carl
At the same time yes, the number of projects I’ve been thrown in where I have no idea what the framework they’ve used in and go, okay, fine, let’s just try to go back to basics and let’s try and solve this from early principles and let’s try and kind of understand what the problem is over here. And you draw on your experience, you draw on things that you’ve tried before and things that have worked before and hopefully get to a happy solution. Not always, but that’s the way it rolls.
Jamie
Carl
I’ve spent many years in my career, in my early career especially, sat in a room with 20 other developers, all of us on identical Windows machines, all of us using MSDN licenses to look things up days before Stack Overflow, focusing only on Windows. Web was something that we did and moved slowly into, but even then a lot of the web stuff was done the Microsoft way.
And I think that old legacy of just doing things in Microsoft way, just doing things the .NET Framework way, just doing things the way that was prescribed might color a lot of people’s opinions about what .NET still is, because that’s what .NET was back in the day. But these days it is a very different kettle of fish. It’s a very different landscape. The framework is completely different for anyone who doesn’t know and has been under a rock for the last four or five years. .NET now runs on any operating system. It will run anywhere. It’ll run on Macs, Linux, any architecture. It will run on Arm, it will run on Raspberry Pi’s, it will run on IoT devices. There’s a .NET Framework that will run on ESP 32s microcontrollers and things like that.
.NET really is embracing so much out there, and it’s a very different landscape from what a traditional Windows focused, building Windows apps and deploying them through set up programs that you downloaded and installed, kind of thing. That world is a very different world.
Jamie
Carl
Jamie
Carl
And early Alphas came out when .NET Core was released, back when your show was in fact, what kind of attracted me to start listening to your show, because that was the kind of time that I think you were kind of just kind of getting going. Yeah, being able to run the CMS that I’ve been developing with for the last kind of five years on a Raspberry Pi, kind of just flick the switch in my head going, “wow, this is really, really cool. What else can I do? Where else can I run this?” And being able to run it on a Linux machine and a virtual machine and HyperV on my own host, that was completely mind blowing.
So from there I went, “okay, well, if I can run it on that, there are these things called containers that everyone is talking about, can I run it on there?” And obviously, yes, I could. So, you know, I started experimenting. I started playing. I created my own little kind of mini cluster of Raspberry Pi’s at home and was able to run three different hosts, all running Docker, all running this content management system, all running SQL Server Azure - SQL Azure Edge, which is a version of SQL which runs on Arm, and run this entire system on a Raspbery Pi in the container on Linux. And it was super performant and it was really very different to the entire experience I had before, which was great.
And since then, I’ve kind of just wanted to kind of shout about it. So I’ve done. As I said, the talk at code Garden - which is the conference for Umbraco - I did a talk there, I did a talk at DDD Southwest, which is a Bristol-based .NET talk, which happened last June, and it’s happening again. Actually, by the time this podcast goes out, it might have already happened, but it happens in the summer every time, and I’ve done it at three or four other conferences and meetups, and I just kind of become an evangelist for talking about containers and running .NET code in other places. So very exciting stuff.
Jamie
Carl
Jamie
Carl
dotnet new, and then fire up a web project and then dotnet run, and run it and see it, and open up the port on my network, and connect to it from my desktop computer across my home network, to run an MVC site on a little tiny arm system that cost 35 quid. And I did some load testing and it was blazing fast. So this was a very different, very new and exciting world. And yeah, absolutely.To the extent that a lot of .NET developers now are no longer using Windows as their main machine, I know you’re amongst their number, too. And I still do a lot of legacy development, so I still need to keep my Windows machine. But I also have I also dual boot to Linux. I don’t need to run Windows for my day to day work any more. I can run linux. And I also have a Mac machine myself. So I do, I can pick the tool that I feel like using for that particular day, and I’m not restricted any more. The whole choice is available to us.
Jamie
And to the point that you raised there about a lot of .NET devs don’t actually run windows any more. It may actually surprise some people that listen into this, and it will definitely surprise some .NET people who haven’t been exposed to .NET Core, and then, as it’s been renamed, .NET. Yet a lot of the devs that I’ve spoken to on a personal basis at Microsoft don’t actually run Windows because they don’t need to any more.
Carl
I can remember when I first saw a conference, I can’t remember which conference it was, but there was a Microsoft conference when .NET Core was just being announced, and the speaker came up on stage and he had a MacBook, and that was like, “wow, there’s someone at a Microsoft conference, one of their primary main conference.” It was David Fowler, I think, who did it. David Fowler works on the framework himself, and yeah, he came up on stage with a MacBook, and that was like, wow, such a moment for me.
So, yeah, and I think to kind of come back loop back to kind of your earlier point, a lot of developers may not know that from the .NET side of things, and I think there are a lot of developers out there who know very little about .NET, who still kind of hold on to that slightly older, open opinion that .NET is only Windows and .NET is only one framework that runs and does one job and nothing else. So it’s not just the .NET developers who may not be ever aware that now we are part of this global community that can run anywhere and do anything. But there might be other[s] Go developers and PHP developers and Ruby and rail developers who still kind of hold on to older ideas that .NET doesn’t run in the same way that they can, which is hopefully that will change over time. The way we can help that change is by doing more cross pollination between our various ecosystems.
Jamie
One of the things that I find when I talk to a lot of - there’s sort of three different camps, I feel, of .NET developers, and wherever you sit, and you don’t have to just sit in one camp, wherever you sit in these camps is perfectly fine. I find that there are .NET people who are very excited, I don’t want to say evangelist, but very excited, like you or I. “Oh, cool, I can run it on my raspberry pi, I can run it on a fridge.” Pro tip for people who don’t know if you’re on Samsung hardware that has the Tizen logo on it, .NET is the officially supported programming platform for Tizen. So if you have a Tizen device, you can push your .NET app to that device, a fridge, a TV, whatever.
So there’s that side of things where people are very excited, they’re terribly excited about what’s happening. We want to tell everyone there’s people kind of in the middle who are yeah, “I know about the new .NETs, but I can’t use it yet because the project that I work on doesn’t allow me to.” And there are another third set of developers who are very much a case of I think you used the phrase head under a rock earlier on. And sometimes it is that, sometimes it’s just and we’ve talked about this on Tabs and Spaces, where it’s like: if you are a nine to five developer, you get in, you start developing at nine, you stop at five and you go home and do something else. Fantastic. That is perfectly fine that you are a developer. I’m not a gatekeeper, or rather I’m not trying to be a gatekeeper.
And what I find is traditionally the group of people that are in that third set and some of the people from the second set. So the people who maybe don’t know that .NET has gone across platform and the people who are, “I love it, but I can’t use it,” they don’t tend to know some of these things because they don’t get exposed to it. And I feel like that it’s perfectly.
Carl
And one of the nicest things that I’ve been kind of talking about in my Docker and all my conference talks is that tools like Docker really make it easy to make that leap. You don’t need to install Linux, you don’t need to have an old machine, you don’t need to have a Mac. You don’t need to spend two grand to buy the latest shiny Apple hardware so that you can try this out yourself. You can download Docker for Windows right now on an up to date version of Windows 10 or Windows 11, and you can fire up your own container in Linux running a MongoDB instance, or a SQL instance on Linux, or a PHP server, or just a very basic Apache server and run .NET code on there to try it yourself.
You don’t need to do a lot of set up. You don’t need to spend money to do all this stuff. The barrier to entry, to trying these new things has really reduced it’s just down to finding the right information, finding a tutorial that you can follow, finding a YouTube video. There’s plenty out there. I’ve got a few out there myself. There really is very little reason stopping people to kind of go out there and discover what .NET can do and what it can run.
If you’re in that third camp, if you’ve never been exposed to it and you’re happy with it, or you’ve never had the opportunity professionally to kind of .NET work on other platforms. Some of my day to day work does fall into that. Some of the projects that I support are very legacy platforms and very legacy systems. That is part of my work. But it does mean that I spend some of my own time playing around with Docker and Linux and this kind of thing just to see what else is out there, see what other things that can be done.
Jamie
Carl
Jamie
Carl
Jamie
But on my desktop I’ve got 2.1, 3.1, 5 point something, six point something, seven, and one of the latest version eight; and they’re all installed locally on the entire machine. And I can create a JSON file in the root of my source code or whatever that says. “Okay, .NET I’m supposed to be using version 2. So if you’ve got that, run it in that,” which is wonderfuly right? So you don’t even have to worry about those compatibility issues of running multiple things at the same time.
Carl
Jamie
docker build && docker run command, because everything’s running inside of Dockerland, it doesn’t touch any of the files on my computer. So when it came time to actually delete that, it was just a case of, “I’ll just delete that docker image.”Carl
I can remember in the early days where I have had a virtual machine where I was basically dedicated for my dev work, and I would have a separate machine for my personal and web browsing and things like that. Because I didn’t want to risk anything to my dev machine. Because any downtime there costs money, it costs time, it costs productivity, the resource that you’re there to do a job and you don’t want to have anything that gets in the way of that. Whereas now the tools all just talk to each other so much better. You don’t have to worry about having - I mean, I have the release versions of the IDE Visual Studio as well as preview versions side by side of my machine. No problems at all. They all just kind of work together and talk together really well.
And just kind of on that same point, they’re talking together and working together really well: these containers, these tools, they open up a whole new opportunities out there. You don’t necessarily need to know the product, the language that any project is written in to be able to be helpful and useful on that project. I could go and do something on Ruby on Rails. I know very little Ruby on Rails, but I could still write some .NET code, put it in a container that will call an API and do something and provide some service for a website that’s run of Ruby on Rails. And that is code that will run absolutely fine side by side in its own container, talking to the Ruby on Rails project, we’re no longer restricted to only working on .NET solutions and.NET projects as.net developers.
There is a whole literally the world is our oyster. Or to coin Terry Pratchett, the world is our lobster. You can go out there and work on any project you want to because now our tools will work alongside other tools quite easily, which is really, really exciting.
Jamie
Carl
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:
- Leave a rating or review on your podcatcher of choice
- Head over to dotnetcore.show/review for ways to do that
- Consider buying the show a coffee
- The BuyMeACoffee link is available on each episode’s show notes page
- This is a one-off financial support option
- Become a patron
- This is a monthly subscription-based financial support option
- And a link to that is included on each episode’s show notes page as well
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
Carl
And it’s not just individuals, it’s great for teams as well because you can then now also share those containers with other people. So you don’t need to have that whole, “well, it works on my machine. Therefore, if we can’t get it working on your machine, you can’t work on this project.” I can fire up a container and anyone can jump into that and see it working there and just kind of carry on working with it, clone it and create copies of it and they just they just put files at the end of the day.
Jamie
Carl
It’s been moving that way for a while because you could get virtual machines on cloud hosted platforms for a while, but now with containers it’s just that much easier because the difference between a container and a traditional virtual machine is with a virtual machine, you not only have to - well, what a virtual machine will essentially do is virtualize the hardware for you. You still need an operating system on top of it, you still need something to run your operating system, on top of which you build your platform, on top of which you run your code. So in a Windows sense, you need to install Windows, you might need to install IIS, you might need to install SQL Server.
But with containers, it’s not virtualizing the hardware, it’s actually virtualizing the operating system. So you don’t need to replicate that. I can basically run on a very, very lightweight container, my application, and the entire container might not be bigger than 60-70 megabytes, and that would be all my code and everything it needs to run. And that reduction in resource requirement means that ten people can use the same hardware, whereas previously it might be only one, or two or ten processors can use the same hardware. So it’s really becoming very easy to do this kind of thing now.
Jamie
Carl
Jamie
Carl
Yeah, exactly. It’s so nice to be able to do this kind of thing now and still developing stuff the traditional way is great, but it does feel a little bit kind of clunky almost when you have to work on a legacy project, which I do from time to time still today. But even when I work on a legacy project, what I try and do is move the things that I can off onto containers. For example, I run multiple versions of SQL Server in containers because certain projects need specific versions of SQL Server, and I can have a container that I only spin up for a specific project and when I’m not working on this project, I just turn the container off. That resources - those system resources - are not being used when I’m not using that project. Which means, traditionally, where I might have had on my main machine, I might have had SQL Server installed and I might have 30 databases for the various projects that I’ve worked on. I now don’t need that. I can just have 30 different containers, but I only spin up the ones that I need and when I don’t need them, turn them off. They just sat there as files on the file system now.
Jamie
Carl
Jamie
Carl
Jamie
Carl
There are a lot of concepts that you need to kind of think about when you start working with containers, but you don’t need to know all of them from day one. And I think that’s just to kind of move in a slightly different direction. If you read a lot about the stuff, it can be very daunting to think, “wow, do I need to learn Linux? Do I need to learn about the Linux file system and how to work in command lines?” Yeah, that kind of stuff is helpful to know, but you don’t need to know that stuff from day one. The Windows Docker desktop application is a GUI application. You can use the GUI to just run it inside run containers inside there, run test applications inside there. Absolutely, learning more about the Linux file system and Linux commands and how to navigate the file system is helpful but you will naturally pick that stuff up anyway.
I knew very little about this when I started the experimenting with Raspberry Pi’s a couple of years ago. Whereas now, just through kind of playing with them in my own spare time you learn a lot about this stuff just by being immersed in it and playing around with it and trying new things and failing a lot. The number of times that you try and learn something and just you spend the whole evening scratching your head going, “this isn’t working, I don’t understand why it’s not working.” And then more often than not to come back to the problem a couple of days later and, “oh yeah, that was it.”
The biggest one is usually for me, I’ve got the wrong line endings in my files because I’ve been working on my files and Windows and Windows has the carriage return line,feed line (CRLF) ending, whereas Linux files only use line feed (LF) as their line endings and that kind of thing that can throw you if you’re not immersed in this stuff every day. But playing around with it kind of helps you get over that barrier.
Jamie
Carl
Wherever you fall on your tool of choice, whether you like to use Notepad, or whether you like to use full Visual Studio, or Visual Studio code - there are a lot of tools out there that you can use. Those are just the ones that I personally prefer. But I found that when you’re working with files and when you’re working on projects, Visual Studio is a really awesome IDE. It’s a really heavy weight tool for working with this stuff, but there are so many other editors out there: Sublime, VS Code, Notepad, notepad++ you use the tool that works for you.
Personally, I think VS Code, visual Studio code is one of the nicest code editors out there. It’s not a full IDE like Visual Studio, but there are so many useful tools, extensions that people have written to work with, docker with, containers with, Kubernetes to be able to connect to SQL Servers and my SQL Servers and various services out there. So and that makes it easier. You can-
Jamie
Carl
Jamie
Carl
Yeah. I think this is probably true of any development tool out there and any language, but if the developers who worked on this stuff, worked in .NET 5-10 years ago were able to see the tools that are just available freely, you know, you don’t need to pay to use Visual Studio, even. You don’t need to pay to use Vs Code. That’s a free thing. But a lot of people might not know that Visual Studio is also available free for community use. And if your company is a small company, I think under up to a million pound. I’m not sure what the license requirements are for Visual Studio, but anyone who’s learning it can certainly pick it up and use it for free.
And you’re not only restricted to those, I mean, JetBrains Rider is another fantastic idea that a lot of people have picked up, and that’s a paid one. That is one that you kind of have to pay a license fee for, but it works for a lot of people and a lot of people swear by it. Personally, I tend to be just vanilla Visual Studio, I haven’t yet gotten over the muscle memory because Visual Studio is something that I’ve been working with for such a long time that I just know where everything is in Visual Studio. And I haven’t quite made the switch ever to be able to use JetBrains fully yet, but it’s really good and it’s a fantastic tool.
Jamie
Carl
Jamie
But like you said, ReSharper is built into Rider. So if you’re interested in doing that, it’s already there. Right. And so if your company is big enough or if your company fits outside of the of the community licensing for Visual Studio, then it may be worth looking into Rider.
Carl
Jamie
Carl
Jamie
Carl
Jamie
Carl
Jamie
Carl
Jamie
Carl
public static main and a whole lot of other stuff where single line applications now with newer versions of .NET are a thing where you don’t need any of that decoration. You don’t need to learn, “what is a namespace? And why do I have to have these curly brackets around my code? Why can’t I just write the thing that I want to do? If all I want to write out is ‘Hello, World’” why do I have to put all this decoration around it?" So the changes that have come along with newer versions of the framework are a huge step to bringing new developers into this ecosystem, because that’s another kind of mental barrier that’s no longer there. But you don’t need to learn stuff that isn’t relevant for the thing that you’re trying to learn. You just need to do if I just want to write out “Hello, World” onto the console application, I just write out “Hello, World,” and bang, there it is. Which is really cool.Jamie
Carl
Jamie
Carl
Jamie
Carl
To circle around to containers again, that’s another great reason to use containers in your code where you can because when you compile an image into containers, when you compile your code into an image that is repeatable, that image is there, that process is the same. And wherever you run it, you know you’re running the same code, you know you’re running the same process, so you no longer have that. “well, it’ll work in this machine because this has the libraries installed.” The image will already have everything that it needs to run. It will already have all the references to libraries. It will already have the services it needs baked right into it. So wherever you choose to run that, it just works. It just works.
Jamie
Carl
Jamie
Carl
Jamie
docker run on that file or docker build && docker run.Carl
Jamie
Carl
docker-compose, which basically will not just run one container, but Compose lets you kind of create an application with multiple containers. And it will spin up a web server, a database server, a small website that’s running Blazor, and a small website that’s running an API, and fire them all up. And you can just go docker-compose up. It will build all of it and it will run it for you. And then you can just open up a browser and run it, which is really cool.Jamie
So gone are the days of I remember, “oh, we’ve got this new app that we’ve built. We better talk to Ops about them buying a server and finding the budget to buy a server and then getting them the budget to install the correct operating system with the right licenses, then installing the security systems, then setting up all of the network hardware to wire it all up so it sits nicely behind our firewall. And then maybe in two weeks time, we’re ready to deploy and then we can point out the outside world and have a DNS entry pointing to that server where the app will eventually be running.” Right. Whereas you were saying you just do a
docker-compose up, hit return, and it spins all of that infrastructure up on your machine.Carl
Jamie
Carl
Jamie
Carl
Jamie
Carl
Jamie
Carl
Jamie
Carl
Jamie
Carl
Wrapping Up
That was my interview with Carl Sargunar. 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 .NETcore.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 .NETcore.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.