Join us on January 09 with Rich Lander on Rockin' The Code World with dotNetDave - a weekly show to learn & live Q&A on .NET and other programming technologies.
GUEST SPEAKER
Richard Lander is a Principal Program Manager on the .NET Core team. He works on making .NET Core work great in memory-limited Docker containers, on ARM hardware like the Raspberry Pi, and enabling GPIO programming and IoT scenarios. He is part of the design team that defines new .NET runtime capabilities and features. He enjoys British rock and Doctor Who. He grew up in Canada and New Zealand.
C# Corner - Community of Software and Data Developers
https://www.c-sharpcorner.com
Show More Show Less View Video Transcript
0:00
Thank you
0:29
Thank you
0:59
Thank you
2:00
welcome geeks happy 2021 and welcome to the first show of the second season of rocking the code world
2:11
with don ed dave i'm i'm really glad you're here um uh you know it's it's a pretty crazy time in
2:19
america right now and i need a distraction so i'm glad we're back got a great guest we got great
2:24
guests all this month and I'm already working on next month too so I'm excited about what's coming
2:31
up for the show this year so far so anyway the today we have Richard Lander from Microsoft I've
2:40
known him for a few years now and it's gonna be great to talk with him because he works a lot on
2:47
the .NET runtime. So get your questions ready and start posting them. And so we can ask Richard
2:54
all those tough questions about the runtime. So anyway, so let's get going
3:03
So it's 2021 and my conference tour this year is called For Those About the Code
3:14
Worldwide Tour 2021. So if any organizers out there want me to speak at their conference this year
3:23
virtually for now, but as soon as I get the shot, I'll do it in person
3:28
And so go to that URL and you can request me to speak this year
3:32
I'm looking forward to it. I know I'll be on T-Sharp Corner a lot this year too
3:36
So go to that link if you want me to speak this year. I'll speak anywhere pretty much, especially virtually
3:44
So, also, I know the holidays are over, but, you know, we did a lot of cooking on the holidays
3:52
So I hope you will submit some of those recipes to the HelloWorldCookbook.com
3:59
I'm gathering recipes from technical people just like you and I and going to put it together in a book
4:07
And then hopefully this year, get the book out. And then 100% of the proceeds of that book will be donated monthly to the Voice of Slum NGO, which I visited last year in one of the slums in Delhi, India
4:22
So please go there. I don't have enough Indian recipes. So come on
4:28
I need more. I love Indian food. So we have giveaways this week, just like every week recently
4:38
Everybody wins. a copy of CodeRush from DevExpress, my favorite code refactoring tool
4:45
And then at the end of the show, we'll give away some C Sharp Corner swag
4:49
And how do you win? Just pay attention and have fast fingers
4:54
And the first person answers the question gets the C Sharp Corner stuff
4:58
So, oh, so I have a brand new article on C Sharp Corner for the year
5:06
This is my first one for the year. It's called yzing Code for Issues in .etc5
5:12
And I'm not only bringing it up because I hope this article helps you out
5:17
but also I just got this yesterday, the proof copy of the book you see in the tweet
5:25
And it's my seventh edition of my coding standards book there. See if I can figure out how I can do it right
5:32
There you go. The seventh edition of my coding standards book. and it is the biggest book I've ever self-published
5:40
It's over 330 pages. When the package came yesterday, I picked it up and I go
5:47
man, they must have shipped me multiple books, but I only ordered one. And then when I opened it
5:52
there was one in it. I was going, oh my gosh, this thing is heavy. So as soon as I approve this this weekend
5:59
you can start getting it on Amazon.com. right now. If you want an autographed copy, you can go to my website and order that right now
6:08
And some people have done that already. So everybody who's pre-ordered one, thank you very
6:13
much. And as soon as I get them in, I'll be shipping them to you probably later this month
6:19
All right. So the first giveaway, everybody gets a copy of CodeRush from DevExpress
6:28
CodeRush is the only refactoring tool I've ever used in Visual Studio
6:34
I love it. It really helps me be productive. And I would only recommend it because I really love the tool
6:41
And I really, you know, every day that I code, I have to use CodeRush
6:46
So if you go to devexpress.com slash .NET Dave, you can get your own real copy
6:52
not a trial copy or limited time copy, real copy of CodeRush from DevExpress
6:59
So I want to thank DevExpress and our Mark Miller for providing this to all of my viewers
7:06
So thanks. And with that, I'm going to introduce my guest for this first show of the year
7:17
Richard Lander is a principal program manager on the .NET team at Microsoft
7:21
He works on making work great in the cloud in memory limited Docker containers and I want to find out what those are and on ARM hardware like Raspberry Pi He is part of the design team that defines new
7:35
.NET runtime capabilities and features. So welcome, Richard. Hello. Yeah, thank you. How's it going
7:44
Yeah. Awesome. You live in Seattle area, don't you? Uh, yep. Yep. I live about a 20 minute bike ride from main campus
7:57
Oh, that's right. You like, you love the bike ride. Yeah. I forgot. Yeah. So how's the weather going up there right now
8:04
If I look out my window right now, I can't see very far. So it's very, very foggy
8:11
Well, I won't, I won't, I won't make you jealous by telling you what the weather is down here. So
8:17
Yeah, I'm sure. I'm sure. Well, I'm glad you're on the show, especially the first show of the year
8:25
And, you know, you gave me some things to talk about, and we could probably talk about those for hours
8:32
But I do want to start off with a question that someone asked from Twitter
8:37
So anybody, you know, if I have a guest on or a future guest on, please, please pre-email me your questions on Twitter
8:47
and then I can get them to the guest and we can talk about them on the show
8:51
So here's the first one from Twitter. One of the most significant changes to the CLR was the introduction of generics about 17 years ago
9:02
What does the next 20 years look like for the CLR? Yeah. So I agree with the baseline assumption that generics was probably or it was one of the most significant changes
9:16
Yeah. and uh you know so we should pause there for a sec so this kind of could be a bit of a long answer
9:22
that's okay we have a we have until 11 o'clock so yeah yeah yeah so I think um you know one thing
9:30
to clarify is this is the way.NET generics work is different than say the way Java generics works
9:36
so they're sometimes called reified generics which means that they're both a compile time
9:43
and a runtime concept, whereas with Java, they're just a runtime concept, sorry, compile time
9:49
and the runtime largely doesn't know about them. And so it means that every bit of .NET software
9:56
be it a compile time thing or a runtime thing, they deal with generics in the same way
10:04
And generics have 100% fidelity no matter where you use them. And that has ended up being quite
10:08
powerful. So anyway, I just wanted to touch on that. So this is kind of like a three part answer
10:14
That was the first part. Second part is like a lot of the programmability features in .NET
10:20
are come out of the C Sharp design team, which we which we call the LDM at Microsoft
10:29
which is I think it just stands for language design meeting, but we call it C Sharp LDM
10:35
And it's a meeting that I think happens on like Tuesdays at 10 o'clock for two hours
10:43
And it's been like that for like 20 years. So, you know, and a lot of the same people have gone there the whole time
10:50
And so features like generics, link, async, await, and others have come out of that group
10:57
And so I'm not on that group. I don't deserve to be on that group
11:02
I don't have really the skill set for that particular meeting. And so I guess the reason I bring that up is, you know, I hear bits and pieces of what it is they're working on
11:16
And so as it relates to, you know, people watching the show and who like really like generics
11:22
it might be something that comes out of the C Sharp LDM that they really like, you know
11:29
that they, once we get to like 2025 or 2027, you know
11:33
they look back and say like, oh, that's the big new one. And it's something that they built
11:39
So, you know, and I'm certainly hopeful that that's the truth, actually. I'd love it if the best new features came out of LDM and not out of my team
11:47
Because I think they're the most likely to be, you know, super, super powerful
11:53
Now, that all said, the absolute best features that we've ever built
11:58
even though they may have started in LDM, in the C-sharp LDM, they are full stack features
12:06
So they need a little bit of runtime help, you know, a little bit, sometimes a lot of
12:12
base class libraries help, and often a bunch of Visual Studio help. And so this is where
12:20
you know, the kernel of a really good idea from C-sharp LDM actually gets kind of augmented and
12:25
polished by these other folks who work on other parts of the product. And, you know, all the ones
12:32
I mentioned, generic, link, little less so on link, but generics, and certainly async await
12:40
were full stack features that got a lot of, you know, polish and different points of view that
12:45
were incorporated in the final features. Okay, so in terms of runtime innovation, you know
12:55
looking forward. You know, let's see, I actually, I actually wrote down some notes on this. So I'm
13:04
just looking at what I thought. I might skip all that. I think I said all that already. Anyway, so
13:12
yeah, so in terms of the product, like there's these fundamentals, which are like type and memory
13:19
safety garbage collection those are things the dotnet is known for uh i suspect those are not
13:25
going to change in fundamental ways like we're going to keep those aspects of the product
13:32
i won't say as is but like in theory they will be the same so um there are places where we see that
13:41
those could be improved and garbage collection would probably be top of the list but on the the
13:47
very core of the product that will probably remain kind of constant. And so if I look at what we have
13:55
in mind for the future, three things kind of came to mind for me. And this is the now I'm kind of
14:01
really getting to answers to the question. One was this idea and Jan Kodas from our team wrote
14:09
this doc, which we can provide the link to called .NET form factors. And right now, we really only
14:18
satisfy one form factor, which is kind of this generic general purpose dynamic runtime. And
14:27
you know, we've definitely flirted with some other form factors. Like, for example, we have this
14:31
like native .NET runtime that we've offered for UWP, and we haven't offered it for anything else
14:37
And it's actually got some really impressive technology that is part of it
14:43
And it's really easy to see how that could be useful for the cloud, for example
14:49
Now it also the part of the reason we haven extended it to other places is because it has many characteristics that are not like not like the rest of which is a fragmentation problem So the topic we actually working on right now one of the things is making it so that
15:11
we can have multiple form factors and not fragment the platform, which is a tough nut
15:17
to crack. So I have three things. That's the first one is covering more form factors, making them kind of best in class or very close to best in class with the right characteristics yet not for fragmenting the platform
15:31
The second one is around interop. So native interop has actually always been a strong point of .NET
15:38
And, you know, again, this is like the native interop we have is quite different than something like Java, again, to mention that one
15:49
And the features that makes it like that are user-defined value types, native function pointers, and what was another one that I thought of
16:15
I'm missing an obvious one. It'll come to me in a moment
16:19
Anyway, so I think what you'll see is like if you if you watch our repos closely, you'll see that we removed when our T interrupt from the product
16:32
And that actually forced us to expose low level APIs that were not public on in the libraries so that people could write a tool
16:43
I mean, it was another team at Microsoft that was doing that, but that's somewhat irrelevant because the APIs we expose and will continue to expand could be used for anything
16:53
So I think you'll see us focus more on native interop across multiple operating systems with a tool based approach, much like we did with WinRT
17:02
We'll probably end up doing that with column interop as well. We're actually looking at macOS right now with a native interop solution there
17:12
And then we'll probably expand that to like language platform Interop. So, you know, you might see us have a tool based approach, much like Xamarin has, but it'll be a little different so that you can call into like Objective-C or Java code or something like that
17:30
And so, like, kind of a reflection on that is, you know, .NET was definitely not first to the game with, like, big data in the 2000s
17:40
That was Java. Or AI and ML in the 2010s. That was Python
17:47
And, you know, maybe .NET's going to be the next one who's going to be the leader in some domain, but maybe not
17:53
And if we have first class language interop, then it kind of matters a whole lot less that the stack, the dominant stack, like functional stack of the day is built on something else
18:09
And then what was my last one of the three? Can I pause right there
18:14
So do you get a lot of requests for the language interop
18:18
You must if it's on your radar. Yeah, the Java one is probably the number one on the list
18:26
You know, it comes down to people want to have, like a lot of people have a primary programming language, whatever it is
18:39
But then they often want to use components from another system. And, you know, this goes to what I was saying earlier
18:48
which is, you know, Java was clearly the leader in big data
18:52
like Hadoop and that kind of thing. So there's definitely C-sharp programmers that want to use JARs
19:02
And, you know, like I got a request actually already this year from someone saying they wanted the other direction
19:09
They say they have a lot of C-sharp code, but they want to use it from their Java apps
19:14
So, you know, mix and match. You know, I think mix and match is totally legit
19:21
Well, even then, you know, that was one of the, you know, if you go all the way back to the beginning of .NET, you know, that was always one of the things, especially in the beginning that made it attractive is that, you know, you could talk to other, you know, languages from .NET, you know, and, you know, and .NET made it both ways, right
19:43
Yeah, that was more, though, that was the Interop DLLs. That ran on top of the CLR, the common language runtime
19:55
You know, so like Java and Python, they don't run on top
20:00
Yeah, that's completely different. They're separate. You know, that could have been a different strategy
20:08
I think it's a failing strategy. but is try and build bridges so that we can kind of run, say, Java on top
20:18
Like, you know, IKVM does that. Run Java on top of the runtime and then kind of go that path
20:29
You know, I think for some scenarios that totally makes sense. So, like, for example, you can run Minecraft that way
20:35
And, you know, Minecraft is an app. And so it's a closed universe
20:39
It kind of wouldn't work for something like Android Interop because Android is like the operating system in that case
20:48
So you can't kind of like and it's and it's multi-process and that that approach would kind of fall down pretty quickly, in my opinion
20:56
So, yeah. So my last thing was actually around programming safety. So this one might be a little farther afield for some people
21:06
but um you know we've when we started out uh dot net type safety and memory safety were kind of you
21:12
know super high on the list of yes you know core features and and as i suggested earlier that's
21:17
that's remains the case and isn't changing so no one needs to get worried um but uh
21:24
i guess there are some parts of the platform that um have never been like completely awesome
21:34
So like, for example, ownership is an example of that. So like iDisposable isn't necessarily a super amazing system
21:43
Another thing is that we've actually started to build features in safe code that are not quite as safe as we would like
21:52
Like some of them have these performance tradeoffs. So span and memory of TR, an example, array pooling is another example
21:58
and so this is another one of those tough nut to crack issues where we need to come up with models
22:06
where we don't have to have like as pernicious trade as trade-offs on performances and safety
22:13
as we currently have and so I think you know one one way to think about that is
22:22
just to define safety for people We don really have security se right Cause that that what safety the lack of safety can lead to So like for example
22:36
we have all this code in the product and the code is super heavily scrutinized. Um, so we're using
22:43
humans, um, uh, for some of our safety issues and obviously some stuff can get through and does
22:49
and then we patch it. And most of the code is of that type of code
22:54
is written by experts. We'd like to get to a model where more people can safely use
23:01
some of these newer kind of more low-level features, get very high performance
23:06
and get diagnostics that tell them, yeah, don't do that. That's not the safe way
23:12
So that's kind of a last thing. I guess the only other thing to mention is
23:17
uh our gc team kind of has used the same model for the gc for like the last since the more or
23:27
less since the beginning um it's definitely improved a lot like it's probably like 10 times
23:33
better than when it started but it model wise it's very similar right to where it hasn't changed
23:39
much yeah yeah and so like model wise it has changed a lot technically yeah but um uh i guess
23:50
what i'm saying is i don't feel like the current model has exactly topped out but at the same time
23:55
it's time to think of some kind of like a new approach and the team's been doing that for at
24:00
least the last two years um and so i feel like definitely within the first half of 2020
24:07
you'll see some pretty dramatic changes to the, to the GC to help it scale both with respect to very large machines
24:18
Like, you know, it won't be that far off and we're going to have machines with half a
24:22
terabyte of memory. It's yeah, it's not like we're already at the place where we're pushing
24:30
quarter terabyte of, of memory on the biggest machine. So that's one type of scaling
24:36
The other type of scaling is scaling from something like an Apple Watch all the way up to that half terabyte machine, potentially with the same GC, at least from a code based perspective
24:52
So that's kind of my last one. So those are my thoughts on what we can see in the next 20 years
24:59
Sorry, that was such a long answer. No, it's good. And I would have guessed that, you know, making sure that, you know, the GC works well, like with microservices, you know, and Azure Functions and stuff is hopefully a priority too, you know, because those are another kind of thing that just quickly spins up and spins down
25:19
And so. Oh, absolutely. I agree. Actually, I'm looking at my notes
25:26
I see Jan actually asked me to talk about something else too, which was source generators
25:32
So source generators is a new feature in .NET 5. And, you know, Jan's take on this was right now, whenever we want to do some important bit of innovation, you know, we have to add the feature to the C Sharp compiler
25:52
C Sharp compiler often has to generate a bunch of code that it injects into your assembly
25:58
Async await would be a perfect example of where it's doing that, but there are plenty other features where it does that
26:02
And with source generators, we could potentially start building whole new features through that
26:14
and not necessarily have to add them directly to the compiler. they might be actually easier to change in version
26:22
because there might be Nougat packages. And so there's this like brave new world
26:27
that might be possible with source generators that totally wasn't possible before
26:32
So I haven't really looked into the source generators. Is that kind of like what happened when we did
26:40
because I really love this, but it's gone now, when we did a code contracts
26:44
is that kind of the same? I don't think so. No, it's different
26:49
So I'm not an expert on code contracts, but my understanding is, you know, you have these attributes, you know, typically on top of methods
26:59
Then you inject the code into the compiled. Yeah. So I guess that that was way more narrow than source generators
27:10
So source generators can. And, you know, that was focused on kind of a diagnostic contract model
27:19
source generators are completely open-ended. So, like, whatever code you want to generate for whatever reason, you can
27:29
But you could, like, do a new code contract with source generators. Yeah, you totally could do a code contract system with that
27:35
Like, you could actually even respect those exact same attributes that were there before
27:41
It gives me an idea. Yeah. Because I love code contracts. I'm really sad they're gone
27:48
And, you know, they were, you know, a great way to do some things that are quite difficult if you don't do something like that
27:57
Yeah. Actually, so I just looked at my notes. The native interop features that I couldn't remember that I had written down before were user-defined value types, which I mentioned, span of T, which I didn't mention, native function pointers, which I did mention, and then the new pin GC heap
28:15
because with Interop, you know, if you use something like span of T
28:21
what you're basically saying is I'm going to overlay this span on top of native memory that someone else owns
28:27
then actually that's a bad example. It would be the opposite direction
28:32
I'm going to create this memory on the managed side and then expose it to native code
28:39
And then it, I own it, actually I own it, and then it's going to use it
28:43
Now, the GC likes to do this. It does mark and sweep, and then it compacts, and so it moves your memory
28:50
Well, if you've given out this memory to some other system, then you're going to actually give memory addresses
29:00
And so the system isn't tolerant to that memory being moved. So we've had pinning for ages
29:07
But in Dynan 5, we now make it so that pin memory goes into its own heap
29:12
which means that it doesn't, the pin memory doesn't, what's the word like subvert isn't the right word
29:20
It doesn't make the regular GC memory worse. So all the pin memory is somewhere else
29:28
It kind of does its own crazy thing. And then regular memory cannot do the whole compact thing
29:34
And then it limits the amount of fragmentation that we have in memory
29:38
And then the whole system works a ton better. So I think all those features are really picture perfect for interop with other systems, those ones I mentioned
29:49
Yeah, I've dealt with the pin memory, too, when I'm doing memory profiling on apps, you know, and I see that, so
29:59
Yeah, it will be great to see that. And then it changes where you can put it off in some other heap or something or some other area
30:09
Yeah. Yeah. No, you said the right thing. Yeah. So we don't have any more questions
30:15
Come on. Come on, everybody. Got to ask questions. So can you explain to me, because I haven't heard this yet, is the memory limited Docker containers
30:25
Oh, yeah. You said that in the intro. Yeah. It's not as fancy and interesting as you might think, but I will endeavor to tell you
30:34
So let's talk about what Docker containers are to start with. So there's kind of two different ways of thinking about them
30:46
One is they're like a very small virtual machine. and uh you know the docker file is kind of like the recipe for it um for what you want this virtual
31:02
machine to be and then um uh and then you like type docker build and then it like goes and gets
31:09
say like debian linux and a bunch of packages from out in the internet and then you have this
31:16
docker image which then you can either share with others or you can boot up on your machine and you
31:21
have that kind of this virtual VM. It's not actually a VM. Some people are going to hate
31:25
but I even use that term, but I, I, I think that's one way of thinking about it. The second way
31:31
and this is what the one that's kind of going to answer the question is it's definitely not a VM at
31:37
all. It's, um, a super isolated process on the machine. Um, meaning it is actually a process
31:46
uh well it could be multiple but it's basically uh let's let's stick with one process it's a process
31:53
that has a very different set of characteristics so one is it's got like basically no privileges
32:01
um to the rest of the machine um yeah that's that's the main one um and like it's it's whole
32:11
networking setup is often quite different. And then the important one is there's this system in
32:19
Linux, and I'll tell you what the one is in Windows in a sec. It's called C groups. And
32:24
C groups, one of the aspects of it is that you can specify how much CPU time this Docker container
32:33
should get and how much memory it should get access to. And there are tons of other settings
32:39
in windows it's called job objects that does more or less the same thing and so
32:44
uh when you on your machine like on a developer machine if you have docker desktop installed
32:51
it actually defaults to uh two cpus and i think it gives you access to all the memory on the
33:00
machine if i'm not incorrect but you can specify um a different set of cpus actually i
33:06
I think you can't go higher than the two CPUs unless you set Docker desktop to see more
33:13
but I'm ignoring that particular problem for a sec, because I don't know what the answer to that
33:17
question is. But let's stick with memory. You can specify like dash M 100 MB. And then that means
33:28
that this process is only going to get access to 100 megabytes of memory on the machine. If it goes
33:35
past 100 megabytes, it gets what's called um killed. So out of memory killed, and your process
33:43
will literally just die. There's no unhandled exception that you can catch to deal with this
33:51
because the um is well outside of the.net runtime. This is, you know, this is in like the C group
33:57
system. So there's definitely no callback that you can kind of manage. And so like a bunch of
34:03
the work we've done is making sure that like the way that the GC works in containers, like it knows
34:12
what this number is, like say 100 megabytes, the number can be lower than that. But I just picked
34:16
that because it's a round number. And it knows what that number is. It creates its GC heap
34:25
in terms of that so smaller, and it tries to garbage collect such that it keeps you in a good
34:33
place such that you hopefully don't hit that number. And so we put our
34:39
our changes for that went into Dynacore 3.0. So that's kind of when things got good
34:47
We have, I'm hoping we're actually going to take another run at this and 6.0 to make it
34:52
even more sophisticated. But the product is pretty good on this front since 3.0
34:59
Cool. And like pretty much all Kubernetes clusters run with both memory and CPU limits
35:07
Oh, yeah. So it's very common. Yeah, unfortunately, I haven't been able to really use Docker that much because no company I work for seems to want to use it
35:17
So but someday I hope they use it some more. And it's also really good
35:23
like you know one of the ways we use it is if you just want to try you know say you have a
35:28
windows machine or a mac and you want to demo stuff yeah or not even demo stuff but you want
35:34
to like do try something like do some like oh i wonder how this works on linux you can just boot
35:40
up a docker container in no time at all and you know you can either just run run the code
35:49
or you can boot into it interactively. And we do this a lot
35:55
It's just the super cheapest way to get a Linux command prompt
36:00
And you could sell Docker containers now too, right? I think on their site
36:05
Yes, you can. You can. We don't do that. So I don't have any experience in that domain
36:14
But yes, that is a thing. Yeah. I just thought about it before
36:18
about putting all of my coding standard stuff and all that stuff on a Docker container
36:23
and maybe a copy of the book and then sell that. I don't know
36:27
It's crazy ideas I think of sometimes. I don't know. So I was looking at..
36:38
So do you want to see how many... Yeah, do you want to talk a little bit about..
36:43
Because I'm curious about this too. is just, you know, dotnet working on ARM and the Raspberry Pi
36:50
Sure. I don't follow that a lot because, you know, I do mostly, you know
36:55
business, you know, coding for business work. So I don't follow that a lot
36:59
But, you know, I know a lot of people are using it. Yeah. So there's a couple different pieces to that
37:06
So, yeah, when I think of Raspberry Pi and things like it
37:10
I think of the maybe it's a list of three things. One is it's primarily Linux
37:18
so you need to have good Linux support. The second one is they all arm machines which you mentioned so you need to have good arm support and then the last one is um you know these cheap these uh raspberry pies um i got this like they all like hooked up at the moment um
37:40
they all have these pins on them and uh yeah uh they're they're all hooked up even though they're
37:48
really close to me um yeah so i'll have these pins on them this isn't this isn't a raspberry
37:55
pie but these are pins in any case uh yes these are what pins look like um and uh yeah i'm gonna
38:04
focus on talking um um now i lost my train oh yes so there are all these pins then they're all
38:13
electrical, they're actually digital, but that's somewhat irrelevant. And you need a system to be
38:20
able to program them. You know, either, you know, you're trying to drive something like lights
38:27
like LEDs, or you're trying to like, or servos, you know, you're trying to like
38:32
make something move. Or you're trying to pull data out of something like a sensor
38:37
like a temperature sensor or something like that, or light sensor. So then you need a programmability system to do all those things I just mentioned
38:47
We kind of call those GPIO APIs. There's a whole bunch of other protocols as well that we support, like SPI, blah, blah, blah
38:55
But I just say GPIO because it's like a... And GPIO stands for general purpose in-out
39:01
It's not a very fancy acronym. So, you know, the Linux support we've been working on for years since Dynacore 1.0
39:10
So there's nothing particularly special about Raspberry Pi as it relates to that
39:15
Raspbian is a Debian based operating system. That's why it's called BN because it's Debian
39:23
So that part, nothing particularly special there. the arm support is you know we added along the way although we've had arm implementations for
39:39
a very long time you know the first arm implementation i think we did was for
39:43
windows phone and so we kept a bunch of that code so we started with arm 32 we now have arm 64
39:51
as well so on that front just so people know the raspberry pi 2 is arm 32 only the raspberry pi
40:00
3 and later are their arm 64 chips raspberry raspbian is a 32-bit os currently so when you
40:09
install it even on an arm 64 chip you're running in 32-bit mode much like it was in the windows
40:15
space back like 15 or so years ago where you know like windows under windows or no no no no that's
40:24
not the part i'm talking about i was talking about for a while there like you might buy a machine from
40:30
dell that actually had a 64-bit chip in it but they actually sold a 32-bit operating system on it
40:36
it's like that yeah um so you know we've been slowly adding arm support uh at first it was just
40:44
purely functional. If you look at our blog posts from Dunn F5, we did a ton of performance work
40:52
for ARM64. So now we actually have a very capable ARM64 implementation that we're pretty proud of
40:59
We're actually not going to do that same performance work for ARM32. So we see ARM64
41:05
is the future. Clearly Apple thinks so too. Their new laptops are ARM64
41:11
then the last one is this we we have two nougat packages one is system.device.gpio
41:19
and it includes all the base apis you need to use the common serial protocols on raspberry pi and
41:29
similar devices and then we have another one called iot.device.bindings and it includes a ton
41:37
of bindings actually for little devices like this. And and for, you know, it allows you to use these these kinds of things
41:49
I got tons of stuff on my my desk. This is a sense hat
41:54
Oh, wow. Yeah, we have we have a binding for this. So because if we didn't have the bindings, you'd have to use these these these
42:03
GPO and similar types of APIs directly. And then you have to figure out what this thing even wants
42:12
which actually is not super... You have to read a spec sheet that says how this thing even works
42:19
Whereas someone has built up a binding. Most of them have come from the community
42:23
And it just offers you a super intuitive API that within 10 minutes, you can know
42:31
how to light up this grid. Uh, and, and then like we have APIs such that like, not only can you like light up each
42:40
one of these cells or these LEDs, it will allow you to like write text across this
42:45
So like, that's how high level we have kind of gotten with these things. Um, so yeah, so that's what we've been, we've been doing
42:54
And I think, you know, the nice thing is, is that like the, the, the, the last thing
43:00
I mentioned like GPIO, that's very specific to, you know, the IOT Raspberry Pi space
43:05
but like all the work that we do on Linux and an arm 64, uh, for other things just comes here for
43:14
free. Like, uh, you know, and, and since, you know, arm 64 is getting more popular. So like
43:21
right now we're doing a project to add support for the Apple M1 chip, um, as you can imagine
43:26
and otherwise we'd have to drop support for Mac OS, which we have no interest in doing
43:33
And so there's a bunch of new work that we're doing for ARM64 that's not unique to Apple
43:39
but Apple's the only one who currently requires it. And so when we get that work done
43:46
it means like ARM64 Linux and Windows machines will also benefit from those investments
43:53
So, yeah, I guess two birds, one stone kind of deal. That's cool
44:01
You know, I've always been interested in playing around with the Raspberry Pi
44:06
but you've given me a great idea because someone asked me, you know
44:10
on the holiday break because I was asking people about 3D printers
44:15
and they said, well, what do you want to do? And I go, I don't know. I haven't figured that out yet
44:18
But you just reminded me of the project I wanted to do way back when Raspberry Pis came out
44:25
And that is, you know, when I go to conferences, you know, I throw out guitar picks and stuff like that to people
44:31
I have custom guitar picks I throw out. And, you know, and so I always wanted to make like a custom guitar pick launcher, you know, that would just sit there and launch guitar picks while I'm talking
44:46
Although you could also design guitar picks. Well, that too. Yeah, yeah
44:52
But I have these custom ones made by my The only guitar picks I use is from a company called Clayton Guitar Picks And so I actually get them custom made
45:06
And so for like on one side is, you know, me, like a picture of me or something and my URL
45:13
And the other side is I get somebody like Grape City to pay for the guitar pick
45:20
So their logo goes on the other side. So it sounds like a good deal to me
45:24
Yeah. And I even, you know, I a few years back, I got to play at my favorite music venue in San Diego
45:34
It's called the Belly Up. It's just a couple exits up for me in Solana Beach
45:38
It's very famous. It's been around since the 70s. But anyway, that was on my bucket list of a place to, you know, one of the places I want to play, you know, before I get too old
45:47
And and so I got to play there, but I threw those guitar picks out
45:51
so I'm sure the people are going, what is this? It's not in a band, you know
45:59
Yeah, I'm, I'm from Toronto. So Massey Hall would be the, the place to play before you die for a
46:09
for actually a significant, for a big band. Yeah. Yeah. Yeah. So that's always fun to do
46:17
And actually my guest next week is a guitar player, too. So we might geek out all on that. So yeah, who knows? Well, I had a guest last month that
46:30
you know, builds his own guitars from scratch. And they're pretty impressive. I haven't actually
46:37
gotten to play one yet, but I hope to next time I visit LA or the next time he's down here or
46:41
something. But let's see. We only have time for like one more question. And how about
46:55
what do you hear from developers? What are the common trends of Microsoft? Have you talked about
47:02
that a little bit already? I mean, I think we can do a quick one there, which is
47:10
um you know it's super varied so one set of folks you know we hear like you know we talk to people
47:21
on calls and they say you know we're moving everything to docker containers um kubernetes
47:27
doing that thing so there's a ton of people you know we use your docker images that are
47:33
the microsoft container registry uh that's very common uh so that's one quite large slice now
47:40
clearly here i'm talking about the website like the server side um you know another set of folks
47:47
are saying you know uh we have like a bazillion tons of dot net code and you know a thousand apps
47:56
and uh we really don't know where to start in terms of moving it forward uh we don't have that
48:03
that big of a team and you know, we, our company's conservative, blah, blah
48:08
I thought these are, I'm kind of like, these are like caricature, caricature stereotype type things. Um, and then, you know
48:16
those conversations can be a bit hard, um, just because, you know, we don't know that code base
48:21
We give them guidance on how to approach it and they either do or do not do
48:25
that. Um, um, yeah. And with that, yeah. So I guess, you know, it really comes down to two main buckets maybe
48:37
which is folks that are kind of closer towards the bleeding edge
48:43
And, you know, clearly even the ones who are on the bleeding edge, they've decided to leave some apps behind on, you know, say
48:51
some of them are even still undone at Framework 3.5. And, you know, they're pragmatic
48:58
And, you know, that all makes sense to me. And then other ones don't have a good plan for moving forward
49:07
And while, you know, Jyna Framework will be supported for a very, very long time
49:13
You know, I think it's important for businesses to figure out how to move their most important apps forward
49:19
Yeah, I've been trying to recommend that to anybody who will listen to me the same thing, you know
49:26
And, you know, if you're still writing new apps in the framework, you know, you should rethink that, you know, right now
49:33
And especially with .NET 5 and then, you know, .NET 6 coming out
49:37
And I think, you know, finally that, you know, everything's back into one, you know, one, you know, framework, basically
49:45
I think things will get a little bit better about people understanding and hopefully get better moving forward, too, you know
49:52
Let's hope. Yeah. And I've been right now I'm working on moving my open source over to Donat five and and I'm getting close to releasing the first two Nougat packages
50:02
And and I have to say so far I've run into, you know, literally not any problems at all moving, you know, from Donat core to Donat five
50:12
You know, I know framework is a bit different, but at least going that way, it's been a really easy change, you know, pretty much
50:20
And, you know, I also wanted to say before we leave is, you know, now that I have my coding standards book finally almost in print, you know, my next target is my performance book
50:36
And, you know, back in, I think, November, you know, I ran my, you know, performance benchmark test, which takes like literally almost a day to run
50:48
and generally, across the board, .NET 5 is faster than .NET Core
50:57
So you guys did a lot of great, and some of it's significantly faster
51:02
And so I'm working on those benchmarks and stuff for the next version of the book
51:07
which I hope to get out next year. I mean, this year, but I just want to say thanks for all the great work
51:14
because I'm so much into performance and all that kind of stuff
51:19
So Guy's done a great job. Yeah, I think the release is good, just like you said
51:26
But we've got a great team with a great culture. And almost the entire .NET 5 release was done during the pandemic
51:41
So we had to transition. And then obviously my team is not unique in that respect
51:47
but I was super happy that the team was able to rally
51:53
We were able to do much of what we had first intended to do
51:57
And we were able to make our original date, which was November
52:03
That was really never called into question. You know, we have a kind of mentality, which is cut to ship
52:13
and so we did that. We did cut some features along the way to make the date
52:18
and make the quality level that we needed, but I really proud of the team and I think that they really came through in a really difficult situation Yeah Yeah that a so because I know a lot of you know I wrote a series of articles on C Corner last year about you know the benefits of working remote and how you know I been doing you know remote work for eight straight years now
52:48
And so now that everybody is forced to work from home at Microsoft, do you feel your team is more productive about the same
53:00
Because you did get it out on time. I guess two thoughts on that
53:06
One is, you know, Hanselman did a post at some point, let's just say June
53:13
and I'm totally making that up, that quarantine work is not remote work or it's different
53:20
And while I wasn't a remote worker before, I suspect that he's right. He is a remote worker
53:27
so I'm going to trust him on that one. So the stresses are very different. But the second point
53:33
is, I think working remotely is just different. It's not exactly better or worse. One thing I
53:43
noticed is like, you know, we have these team rooms and I was lucky to be in a four person
53:56
kind of desk area with like four people that I, you know, absolutely. It's kind of a weird
54:03
word to use, but I'm going to use it anyway, that I absolutely adore. I think they're amazing
54:07
um and uh so that you you kind of get a bit of a cliques forming just by virtue of where you're
54:15
sitting um and then when you're in remote that like those locations are race now clearly i relied
54:26
super heavily on my network that i you know people that i'm used to working with and all those kinds
54:31
of things. But it meant that like, there were some people I probably should have been working more with in the
54:38
past that during remote period I did work more with because I wasn't
54:43
influenced by the building anymore. Yeah. So that was one, one difference I noted
54:53
Yeah. Well, you said kind of reminded me of cause even though I, I, I
54:59
I, you know, work at home alone most of the time. You know, a couple of years ago, you know, I went and did because, you know, I'm a photographer and, you know, I work for a lot of rock bands and stuff like that
55:11
But, you know, my my daughter-in-law invited me to come do photography for the Austin Film Festival because she was like the number two person there
55:20
and so I you know for the first time was able to do a film festival and got to meet a lot of you
55:26
know famous directors and actors and producers and all these kind of people and I and I remember
55:33
just sitting in those rooms just feeling the creativity being bombarded at me right because
55:39
I'm in these rooms with these ultra creative people and I could feel it you know and it was
55:45
it kind of made me feel better, you know, about, and it helped me turn on my creative juices and stuff. So, yeah
55:53
Yeah. Actually, I think that's a really good point because like when I was in the room
55:59
and actually the room I was in had like most of the C-sharp LDM in it that I mentioned before
56:07
So really, really great, smart people. And so I always felt like this energy around me, it's like, clearly I need to be at the top of my game to even talk to these people
56:23
yeah um and when you're at home uh particularly if you're in a room by yourself um uh you you have
56:34
to kind of do something extra to recreate that environment um to have that feeling that you're
56:41
both you know part of something but also to like get those creative energies from others to kind of
56:47
go across the wires. Yeah. Yeah. It's tough. Yeah. Yeah. Well, we got to wrap it up
56:54
I only have a few minutes left. So I really appreciate you being on the show and being the first guest on my
57:00
show for 2021. I'm glad I got you on. And if you want to hang out afterwards, we can chat a little bit
57:08
Sure. And we didn't get to talking about biking or anything, but, you know
57:13
So maybe next time after the, you know, .NET 6 comes out, we can have you on again in chat
57:19
All right. But thanks a lot. And have a great, safe weekend
57:25
And, well, safe until you get the shot, right? So. Yeah, yeah, for sure
57:30
All right. Thanks a lot, Richard. Well, that was an awesome interview
57:37
It's, you know, Richard, you know, He's one of those guys where I'm going to have to go back and watch my own show because he had a lot of information
57:47
And I don't think I got all of it while he was talking. So I don't like watching my own shows, but I think I'm going to have to watch this one
57:56
So I really thank Richard for coming on the show. All right
58:03
So we got the C Sharp Corner gift. I made it really easy
58:07
Well, hopefully really easy. it'll be easy especially if you've read or used done at five because that's doing done at five and
58:14
first person that answers it in the chat we'll get the c sharp quarter package ready
58:23
what is the new class type of done at five i added the sound i hope you guys can hear it
58:29
that's me playing the jeopardy song on guitar Nobody
58:41
Okay. Well, if someone answers before the end of the show, they'll be picked and put up on the screen
58:48
Okay. There's a new class type in .NET 5. Google it. All right
58:55
Well, thanks for watching, everybody. Next week, I have Brady Gaster, Program Manager for the Developer Division at Microsoft
59:04
He also is a musician. So like I said earlier, who knows what we're going to be talking about
59:10
And Sean, yes, you won. So C Sharp Corner will contact you and get you those gifts
59:18
So anyway, next Saturday, this is who we have on. All this month, I have Microsoft people add in to next month too
59:26
So if you want to be on the show, please email me and I'll try to get you on
59:32
And you can get a cool shirt just for being on the show
59:37
Isn't that awesome? Please, please, please, please be safe out there. COVID is crazy in America
59:47
It's worse than the last time I talked to you. You know, we're the last day
59:52
we had like 4,000 people dead in one day. So no matter where you are in the world
59:57
please, please stay safe, wear your mask, Listen to your medical science professionals so we can get through this all together and until we get a vaccine
1:00:12
And I also encourage you to go donate blood at your local blood bank, no matter where you are
1:00:19
I donated a few weeks ago, and every time I go, I ask them how the donations are going, and they're not going good
1:00:26
They're way down because of COVID. and so they're in dire need of your blood
1:00:31
So please, please go donate blood. It doesn't cost a dime and it will make you feel really good
1:00:38
for helping your fellow human throughout the get out of this crisis
1:00:44
or even do it in the future. I've been doing it most of my life
1:00:48
So I'm almost up to 12 gallons donated now. So anyway, please do that
1:00:54
Please be safe. Please email me with any suggestions or questions. And I'll see you next Saturday on Rockin' the Code World with Donna Day
1:01:25
Thank you
1:01:48
Thank you
1:02:18
Thank you
#Programming
#Windows & .NET


