Join us on March 26 with Swizec Teller for Rockin' The Code World with dotNetDave - a weekly show to learn & live Q&A focused on .NET and other programming technologies.
AGENDA
• Introduction
• Refactoring and Architecture (both frontend and backend)
• The mindset of a Senior Engineer
• Serverless
• Special Prize Give-A-Way!
GUEST SPEAKER
Swizec is a software engineer, author, and indie hacker from Slovenia. His career in San Francisco changed how he thinks about coding, and he likes to share those lessons.
C# Corner - Community of Software and Data Developers
https://www.c-sharpcorner.com
#CSharpCorner #rockinthecodeworld #live #dotnet
Show More Show Less View Video Transcript
0:30
Thank you
0:59
Thank you
1:29
Thank you
1:59
Welcome, geeks, to another episode of Rocking the Code World with .NET Dave
2:06
I'm David McCarter. I'm really glad you're here. And I've had a couple of weeks off, Simon and I
2:12
So we're back, got a couple of shows, and then we have to take some more time off
2:17
because Simon's going to be busy doing some conferences in April. So I got three really great shows before that happens, including today
2:26
So I'm glad you're here. And I missed you all. I miss doing this show in a way because it's a way for me to reach out and talk to you and be connected with you all
2:36
And speaking of that, this morning I was really kind of missing my friends in India
2:43
So I decided to put a picture up there one of the times when I was speaking in India
2:49
And I can't wait to go back someday. We're not sure when
2:54
My first in-person conference since COVID started will be in June. I'm going to Australia and speaking there, and so I'm super excited about that
3:05
But anyway, today my guest is Swizz Teller. He's a software engineer
3:10
We're going to be talking to him this morning and also some other great stuff
3:17
I want to, you know, again, talk a little bit about the Ukraine
3:21
I'm, you know, I'm still devastated this is happening to, you know, the people in Ukraine when they certainly didn't deserve any of this
3:32
And just an hour ago, they started bombing this city, Lviv, where I was when I visited the Ukraine and speak to speak at a conference there
3:45
And I got to tour, you know, some castles and Lviv. I took a full day walking tour of Lviv, which is a very beautiful city
3:54
And so anyway, I hope you, along with me, send you thoughts and prayers
3:58
and any support you can to the Ukrainian people, either in Ukraine or the ones that have been
4:05
the millions that have been displaced outside of Ukraine. So let's hope this ends soon
4:15
It's it's just makes me sad. So anyway, anyway, help them out as much as you can while they go through this
4:25
You know, one thing I've been thinking a lot about, you know, when I see the pictures of people leaving Ukraine, I just think and go, wow, what if I had to meet
4:34
I had to, you know, flee from San Diego and I had to put my whole life in a suitcase
4:40
Just imagine, you know, just imagine what he would put in there
4:46
And I don't even know at this point except for some clothes and my medication
4:51
And it's just sad. Anyway, send your thoughts and prayers to the people in Ukraine
4:59
Because I want to go back and speak someday. I don't know when that will be. But I've always wanted to go back to Ukraine because I really loved my visit there
5:07
And I hope to go back as soon as this conflict is over
5:13
And speaking of my time off, you know, I went I was in between jobs
5:19
I started a brand new job last week as an enterprise architect at a company based out of Salt Lake City
5:26
And so I decided to take some time off, five days off between jobs and go visit one of my friends in a city called Coos Bay, Oregon
5:36
As you can see here, Coos Bay is right on the coast of Oregon in the United States
5:44
It's a very, very beautiful area. It's very small. The town is about 13,000 people
5:52
I was just telling Simon, you can drive through downtown in like 15 seconds
5:57
So it's a very small town. But, you know, the one thing that I really loved about visiting my friends up there, you know, for five days is that, you know, the people up there are so friendly and so nice and everybody takes care of each other
6:13
And, you know, my friend, because he's been living there since the 90s, you know, could not go anywhere without somebody knowing him
6:21
And which I thought was really cool. You know, I live in Southern California where people aren't very friendly and they're not friendly in the neighborhood I live in at all
6:32
And so it's very hard to meet people here and especially tougher when you're, you know, a shy introvert, you know, software engineer as myself
6:40
And so I really loved being up there. I was so happy being around people like that because I grew up in small towns and I've really missed that small town feeling
6:50
ever since I relocated to San Diego when I joined the Navy
6:56
So I took a lot of photography up there. You guys can go check it out on my photography site
7:01
Very beautiful. My friend Vinny took me to these waterfalls, which, as you can see, was going full hologram
7:09
And it was very beautiful up there. I almost fell a couple times because it's so wet
7:13
and I'm such a clumsy guy. But I had so much fun up there
7:19
And so not only was I happy about being around people like that but I was happy I was able to do photography again because I don know if some of you know I an award photographer And so I haven been doing that because of COVID So it been I was really happy to actually do photography
7:41
again. And the other thing I got to do was what my favorite thing, and that is do photography of
7:49
bands. So most of you might know that, you know, I do photography for big, for bands from local
7:58
bands to big recording acts and tour the world. And that's literally one of my favorite things to
8:04
do is go to a show and do photography or do photography for a band and try to bring out
8:09
the essence of the band and, and, and, and the pictures that I take. And so this is my friend
8:14
my friend Vinny's band Toys. They're based out of Coos Bay and they play around there a lot
8:22
And after seeing them, I know why, because they're all total pro musicians and all of them are
8:29
awesome musicians. And so this is Vinny. This is my friend Vinny. I've known Vinny since I started
8:36
working for his band back in the 80s. They were the number one heavy metal band in San Diego. And
8:44
And I started working for them back in the 80s. And so this is Vinny now
8:49
Much different as I am from the 80s. But the middle shot there is my favorite shot that I took of Vinny at the show while I was up there
9:02
And also Vinny is, I want to say this publicly, is Vinny is the guy who taught me how to play guitar
9:10
So it's all his fault. But yeah, he's the guy I took guitar lessons from
9:17
Also, because of his work in the band Assassin, he's the guy that got me to do band photography for real
9:26
And he's the first actual musician to ask me to come do pictures for his band
9:32
Before that, I was sneaking cameras into concerts, which you're not allowed to do, especially back then
9:38
But he's the one who asked me and he's the reason I do band photography now
9:43
So, you know, Vinny, if you're listening, thanks so much for, you know, welcoming me into your home
9:49
And I had such a great time and you have an awesome family and awesome friends
9:54
And I Coos Bay is another place I love going now. So thanks, Vinny. Thanks. You know, I was really happy I was able to get that chance
10:04
But we all need this. Right. That's kind of why I'm bringing it up. You know, you know, our world is just not programming all the time
10:10
We have to go find fun every once in a while to break out of our thought process and just go do something fun
10:21
I hardly thought about programming when I was up there. I kind of just focused on being there as opposed to everything else going on
10:29
So anyway, it was great. I need more vacations, I think, is what I learned from this trip
10:36
So I released the sixth version of SparGene. If you go to spargene.net, you can go check it out
10:45
SparGene is my open source project I've had since mid-2000s, I guess
10:52
And it's changed over the years, but version six for .NET 5 is out
10:58
I plan to release one more version because .NET 5, if you don't know
11:04
goes out of support in May. So no more support. So I'm not going to be releasing any more packages for that
11:13
But I am working really hard on the .NET 6 version of SparGene
11:19
which I'm doing a lot of changes, and that's why it's taking me so long. So I'm trying real hard to get the .NET 6 version out
11:26
That's going to be my focus the next couple weeks. So I hope you go check it out
11:30
And also I'm going to mention next a new article in C Sharp Corner and the code from that article is in SparGene
11:37
So you can download the Nougat packages right now and start using it right now
11:41
So speaking of that, I released a new article this week on C Sharp Corner called speeding of logging and .NET
11:50
I discovered there's a new way now, another new way of logging and .NET
11:58
And they touted that it's faster than the old iLogger method of logging
12:05
And based on my benchmark test, it's almost exactly twice as performant as using the old method
12:14
Because this uses delegates, casted delegates, that makes logging much faster. So I hope you go check out the article and then, of course, check out SparGene
12:28
So you can start using this in your code right now without any hassles
12:34
All right. With that, I'm going to bring on Swizz Teller. He's a software engineer, author, and indie hacker from Sylvania
12:46
His career in San Francisco changed how he thinks about coding, and he likes to share those lessons
12:52
like a lot of us do. So welcome, Swizz. Hey. How's it going
12:58
Pretty good. My eye is being kind of weird, so I'm going to look kind of sniffly and maybe half like a pirate
13:05
I thought about bringing an iPad, but I decided guess. I definitely hope you feel better
13:12
And also, you posted a picture this morning of a bird, and I was going to ask you if that's your bird
13:18
and I think it is because I've already heard it. So, yeah, I think the bird's right behind you right now
13:24
Yeah, he might show up. Yeah. I hope he's not too loud in the background
13:27
I thought I just saw him when you came on. Anyway. He flew off. Go ahead
13:31
He flew off. No, he just flew off, yeah. But I was going to share, I have a fun fact about Kuzbe
13:37
A friend of mine, her daughter actually moved to Kuzbe to be the best tattoo parlor in the area
13:46
So she was like, she's a tattoo artist and she wanted to open her own shop
13:49
And she was like, if I go to a big city, I'm just competing against everyone
13:54
But there's this place, Coos Bay, which is really cool and idyllic. And they don't have a good tattoo parlor
13:59
So I'm just going to go there. And now everyone from the whole area just like booked out, I think, two years in advance
14:06
Wow. Yeah. You know, I did look for a tattoo parlor up there and I didn't see one
14:11
So I'm not sure where it's located, but it wasn't where I was driving around
14:16
Yeah. I don't know. Maybe I got it confused. I just know it sounds a lot like Coos Bay and it's in Oregon
14:23
So it sounds like it probably sounds like a match. Maybe I'm wrong
14:27
No, you're probably totally right. It's just the town is so small, you can miss things
14:32
You know, it's so dang small. And I was looking for shops like that, you know, like their biggest store there
14:43
I think I didn't even see it, but I heard there's a Walmart around there
14:47
And that might be the biggest store they have. They have like one grocery store, you know, they have one, you know, one post, just things
14:54
I'm not used to. One post office you know one movie theater you know That cool Yeah Makes it easy to meet everyone from town right It is
15:05
Yeah. And everybody, like I said in my intro, everybody was so friendly
15:09
You know, it doesn't matter if it was, you know, people waiting on me at restaurants or, you know, people at the show
15:15
you know, when I was doing photos of Vinny and his band
15:20
And I met a lot of people up there. One of the interesting persons I met up there, he's a boat captain
15:30
And what he does is he goes and puts trackers on whales
15:37
Wow. Yeah. And so he was talking to me all about that
15:41
And I thought that was really fascinating. And he's actually going to be down here later towards summer, I think
15:49
And so I told him to reach out to me so we can go hang out because it's really interesting hearing stories like that because I don't know how any of that works
15:58
You know, I just see what you see on TV. You know, I don't talk to the people actually do it
16:02
Right. That makes me think if you could do mesh networking with whales. Yeah
16:07
Yeah. Maybe. Maybe you could. There's a good way to get Wi-Fi out in the ocean
16:13
Right. No, I'm kidding. Yeah. Just put it on a way. it's like um there's a i think it's an april fool's joke there's an rfc about tcp ip over
16:22
carrier pigeon maybe you could do something similar with whales yeah yeah so um anyway
16:30
everybody don't forget to ask questions um you know the topics that swizz gave me were
16:36
refactoring and uh architecture uh on the back end and front end which is always something
16:41
interesting, of course, and what I'm going to be doing a lot in my new job
16:46
The mindset of a senior software engineer. I'd love to know more about that because I try to figure out my mind all the time
16:54
And serverless, which a lot of people, including some DevOps people I work that doesn't really
17:02
understand what serverless is. So yeah, my last contract, they thought serverless was spinning up VMs in the cloud
17:11
Oh, that's 10 years ago. That's not serverless. No. That's what they would be in meetings going
17:20
yeah, we'll just set you up a VM. And I'm going... No, that's not the thing
17:25
That's not what I'm talking about. And you're in charge of AWS, and that's what you say
17:31
Come on. Yeah, yeah. Oh, you know, it's like... I think one of the interesting things about our industry
17:38
is just how vast it is. I remember I had a fun moment about that on Hacker News recently where somebody was talking about how, hey, you know, browsers no longer cache things across sites because of privacy concerns
17:55
So using a public CDN for like loading jQuery or whatever doesn't really give you any benefit anymore
18:02
You should self-host all of your assets so that they're serving from the same domain as the rest of your site
18:09
yeah and i mentioned and i went in there and i was like just a second dude hey
18:15
sorry this is this is usually the time when we go wake up my girlfriend and he's like yo
18:25
you're off schedule you're doing you're not supposed to you're not waking up your girlfriend
18:29
yeah exactly you're gonna get in trouble if you don't right yeah so um yeah so like
18:35
I went in there and I was like, yes, this only like, yes, you will speed up your site if you host everything from the same domain as you're serving your content
18:48
But that's only true if you're using a CDN, because if you're in India and my server is in San Francisco, it turns out the speed of light is not actually that fast
18:58
And you will notice a lag. Yes, you will. And I said, you should self-host on AWS
19:05
and like half of Hackney was like, what the hell are you talking about
19:09
What do you mean self-host on AWS? I was like, well, yeah, it's self-hosting
19:14
You're using AWS to put up a machine or a serverless or even use their CDN
19:19
but you're self-hosting because it's all on the same domain. And everyone was like, no, no, no
19:24
It's only self-hosting if you're like running a Raspberry Pi farm in your garage
19:29
Otherwise you're using AWS. That's not self-hosting. It's like, I don't know
19:37
Is it like somebody even said that just using a data center and putting your bare bones machine, your heavy metal machine in the data center, that already isn't self-hosting because you're using a data center
19:51
And it's like, wow. just the like the vastness of this industry where you can be and we're all calling we call
20:01
we all call ourselves software engineers but we can have experiences that are just never that just
20:08
never meet together yeah yeah yeah people call things different different nomenclatures i think
20:14
and uh and uh some people are really adamant about their definition of these you know words and phrases
20:22
And, yeah, it can be tough sometimes when you're trying to explain things
20:30
And it's even worse trying to explain any of this to a non-software engineer, right
20:34
You try to talk to, you know, people who have nothing to do with this world and try to explain to them what a cloud, what the cloud really is, right
20:42
Because all they've heard about the cloud is on advertisements and stuff like that, right
20:47
But they don't really know what it is. and try to explain it to him is kind of difficult sometimes
20:54
It's okay. Sorry, my audio cut out. My headphones are being weird
20:58
Anyway, was, yeah, can you repeat like the last five seconds? I was talking, Nancy, I forgot what I had said already
21:12
Let's see. Oh, yeah. so the nomenclature and the talking to normal people uh remember when that guy said that the
21:24
internet is a series of tubes yeah that is actually still one of the best descriptions
21:29
of how the internet works if you ask me yeah because it kind of is a series of tubes there's
21:34
a bunch of tunnels right yeah it's just moving moving stuff from one place to another you know
21:40
yeah exactly and um like the other thing i all i often tell people who like uh it feels it's does
21:50
it ever feel to you like half of the work is just jason bureaucracy jason or java or something it's
21:59
just like yeah we're we're fighting over you know java and other languages or jason or
22:04
yeah it's yeah all the time and even the jason stuff keeps changing right and uh yeah um i was
22:13
looking at some stuff this week on how things are changing like using um i don't fully understand it
22:19
yet so i don't know what i'm talking about but like using the proto stuff you know the proto buff
22:23
um uh handlers and stuff to uh uh spit out data and i might be saying it wrong Cause I I I got to learn some more about that but um
22:35
yeah, I haven't used protobuf before, so I don't know. Yeah, I haven't either. I, I gotta learn. They, they're
22:40
they're thinking or they're using it at my new job. And so if they are using it
22:45
then I've got to understand what it is because, you know, I'm going to be architecting all this stuff and I'm going to be helping
22:50
you know, um, at least my domain that I'm in charge of that
22:54
at this new company, I'm going to be helping them move to the cloud. You know, some, some
22:59
some of the teams have moved some other stuff to the cloud, but this team hasn't done it too much
23:04
yet. And so that's one of the things I'm going to be re-architecting and taking their 20 year old
23:08
legacy code, you know, and, and moving it, you know, into .NET 6 and into the cloud and all that
23:15
other stuff. And so that's, that's what I'll be doing. So I'm really excited about that. That's, that's what I do. Yeah, that's what I, I'm good at that kind of stuff. You know, I don't like
23:24
just bang out code all day anymore. You know, I've been doing it too long, you know? I feel, yeah. I think my expertise lends itself more to architecture because I've been through
23:33
this so many times and I've been part of successful projects and not successful projects
23:38
you know? And so I think I have a pretty good range of, you know, what works and what doesn't
23:45
work and how we can get things down, you know, done, you know, in a more timely manner because
23:52
Time is everything these days. That's actually one of the reasons I complain to Microsoft all the time
23:58
about their documentation and some of the stuff they're coming out with
24:02
is not very understandable. I actually had a meeting, a one-on-one meeting with somebody at Microsoft
24:09
last week about the new Bang Bang. What was that? For checking parameters for null
24:20
Oh, okay. Yeah. We've been doing that in JavaScript for a while
24:24
Oh, really? Yeah. I was telling them, okay, there's a bang for this
24:29
There's a bang for that. Now we have a double bang. So when you introduce a triple bang, what's that going to mean
24:35
Right? Can we stop with the bang, you know, and come up with ��
24:40
I actually told them, I go, can't you come up with like keywords
24:44
that actually mean something as opposed to an exclamation point? Yeah. So, but that's one of the reasons I am hard on Microsoft
24:55
is because, you know, we don't have time to just learn all this stuff in depth
25:00
and we have to learn just enough to get going and understand it so we can get our job done
25:06
as fast as possible. And the more we have to research or go look at GitHub code and things like that
25:12
is just dramatically hurting us, right? And delivering the applications in the timely manner that companies want
25:20
And, you know, we all know that companies want it cheaper and faster, cheaper, faster, cheaper, faster
25:25
Right. Yeah. It's like if you have a, if you have the choice between a good enough solution that gets it done right now or a perfect solution that gets it done next month, they're going to choose good enough
25:37
Yeah, exactly. Yeah. Yeah. But I don't know how it is in the enterprise, but I think in the startup world where I'm more used to it, that's actually the right approach
25:47
Yeah. Because the weird thing about startups is that you're dealing with an expanding time horizon if you pull it off, which means that if your product lands and if you get it done, you will have more time and money later
26:03
But if you don't, then you won't. Right, right. Yeah, I agree
26:08
But with that said, hopefully you'll agree with this statement too. And that is, you know, even if you're coding good enough, you need to make sure you have enough architecture in there to make it easy to change the code in the future
26:24
Because this is the problem I've seen. I, you know, early in my career, I would say at least the first 10 years or more of my career, I was working for startups
26:36
Right. And I don't do that anymore, but I did in the beginning
26:40
And the problem is, you know, when you don't do enough architecture to lend itself to easy changes, then what happens
26:49
You have to rewrite it, right? And sometimes you have to rewrite the dang thing, sorry, Simon, like three times before it's really ready, right
27:03
It's kind of like writing a book, right? You write the first draft, which is the vomit draft
27:09
then you rewrite it three times and then it's actually good. It's just that in software, we usually just write the vomit draft and we're like
27:17
eh, that's good enough, and we ship it to production. Right, because as long as managers and customers can see something working, it's done
27:25
Exactly. Yeah, it works. No, it's not. Yeah. No, but the other thing I wanted to point out is you said
27:34
make it easy to change. And I think that's the most important part, because usually when you're writing software, you're writing, you don't actually know yet what it is that you're going to need. So it's much better to optimize for changeability than for perfection
27:50
And what I've seen, maybe because you're very experienced and you write really good architectures, but what I've seen from especially more, like even myself a couple years ago, or maybe not, especially myself a couple years ago, you do all of this architecture and you think, I need architecture because this is an important system and it needs to blah, blah, blah
28:12
And it ends up just making it harder to change later when it turns out that your architecture is wrong because the requirements change
28:20
Yeah, that's true. Requirements change all the time. And, you know, we're awful at going back and changing things
28:26
Like, you know, if we do have an architecture diagram, there's probably little chance it'll ever be updated
28:32
Right. Because people were just not given the time to go back and do that most of the time
28:38
Right. Unless we do it, you know, without telling anybody. But that's right
28:44
And it, you know, it kind of reminds me of, you know, when I, you know, my last contract was with or two contracts ago was with Verizon
28:51
And, you know, and I did a project there that they said was the best run project
28:56
But, you know, one of the things that I really liked about it was, you know, I was mentoring one of the people on the team
29:02
And after I left, you know, and she had to make changes to, you know, this project, this, you know, program that I architected and wrote there
29:15
You know, she contacted me and said, Dave, oh, my gosh, making code changes in this app is so easy
29:23
And I go, yes, that's the way it should be. You know, not a death march of pain and suffering, you know
29:30
Yes, I agree. The number of times that I've seen code bases that aren't optimized for, it makes it so much
29:43
easier if you optimize for developers feeling confident about the code base and making it
29:49
easy to change. Because you're always going to have to change it
29:53
You're always going to have to rewrite it. So the easier it is to just move things around and change them, the better
29:59
I don't know. I think C Sharp is type safe, right? Yes
30:06
Yeah. So one of the biggest revelations... All the languages in .NET are type safe
30:11
That's nice. One of the biggest revelations in JavaScript land over the last couple of years was everyone switching over to TypeScript because, oh my God, it's so much easier to move code around when it just gives you squiggly lines when something doesn't fit anymore
30:26
Where has this been all our lives? I know. in all of those other languages
30:31
Right, right, I know. And that's why I never liked JavaScript and I never really learned it very well
30:36
because I'm going, this is dumb. You know, I want a good language that's compiled
30:41
I don't want some, you know, interpreted thing that you can put all kinds of different types
30:47
in the same variable and, you know, and because that causes errors and more debugging problems
30:53
and all of those other things that, you know, JavaScript brings. And that's why one of the reasons I moved out of the, you know
30:59
mostly doing front end work, you know, until Blazor came along because I didn't really want to deal with all the
31:05
you know, the brand new Java framework that came out today deal, you know
31:09
how many freaking Java frameworks do we really need? Yeah. Well, you need a couple
31:16
I know. I know you need a couple, but not one like every day, you know
31:20
it seems like somebody comes out. I feel like now with React, React has kind of won the framework wars
31:28
I feel like it's been pretty good. Yeah, it has been. A couple months ago, I took an old React project
31:35
I was like four or five years old and updated the latest React, and it just worked
31:42
I didn't have to change anything, which is awesome. It's not the JavaScript I grew up with
31:49
And even .NET has gotten better, right? Because, you know, when I talk to teams like the one I'm in now, you know, that's still using the .NET framework, you know, 4.7 something
32:01
And I'm going, God, we got to get in .NET 6. We got to get in .NET 6
32:05
Most of that stuff, all you do is just put it in the .NET 6 project and it works, right
32:10
You might have to change some NuGet packages, but, you know, in the, you know, changes of the projects I've done, it's been really, really simple to do
32:21
which is not the case in older versions of .NET for sure
32:28
So they're getting better too, and that's the way it should be. I should be able to just plot my code into a new version
32:35
and it should just work most of the time. Yeah, but isn't the point of major versions
32:41
that they're not backwards compatible? Not always. No, not always. I mean, new versions, even we see this
32:51
and .NET 6 and now .NET 7 too, is that there'll be new stuff in the new framework
32:58
but the old stuff all still works, right? My Microsoft is really careful about not breaking things
33:05
Maybe a little too careful because I think there should be, there's some things in .NET
33:10
that I don't think should be there anymore because nobody uses them. You know, they're old leftovers from 20 years ago, right
33:17
Yeah, but then if they remove them, then you don't have the easy upgrade path
33:22
That's true. That's true. But unfortunately, if you don't remove them, people are going to still be using the old, not as performant way of doing things, right
33:31
Yeah, I've seen that as well. Yeah. So actually, I mentioned it at the top of my show when I talk about my open source project is that I knew the .NET 5 version would be temporary because .NET 5 isn't supported very long
33:48
Like I said, it's going out in May. And so, you know, I knew that, you know, I really wanted to make some breaking changes in the DUNA 6 version
33:58
That's kind of what I'm doing right now, because, you know, I kind of re-looked at some of the things that I use the most and I go, OK, how can this be done better
34:07
You know, screw backwards compatibility. If somebody wants to change, I'll make an article on the major things and teach them how to change it
34:14
It won't take that much time, but there are some better ways of doing things, which I'm working on right now
34:20
And including, you know, some of the things I was even learning, looking at yesterday was all the new code generation stuff that's coming out ever since Donai 6 came out
34:30
It's really fascinating to increase performance on some of this code generator stuff that they're doing these days
34:37
And so I think the code generators, I'm believing more and more that, you know, the code generators are going to be more and more popular very soon because they take care of a lot of stuff that we don't like to do because it's just mundane, boring stuff
34:55
And not only does it take care of it, but it does it with proper practices and things like that
35:01
So, yeah. Yeah, my opinion on code generators is kind of mixed because I feel like if you have a framework or a language that has so much boilerplate that it needs a code generator, then I feel like something is wrong
35:18
Maybe you should get rid of all of that stuff. Yeah. Or if it's so easy that a computer can generate it for you, then why isn't it just built into the framework so I can call a function and it does it for me
35:29
That's true. So I'm sure that will be next, you know, once they see how these things pan out
35:35
But, you know, yesterday I was watching a video that was recorded in February that featured Steven Tube, who's the, you know, one of the, you know, the top memory performance guys on the Donnet team
35:48
And he was showing something that unfortunately isn't out until Donnet 7
35:56
And that is, you know, one of the things that is not very performant in .NET, I mean, is performant, but can be a lot better is regular expressions, right
36:10
And so regular expressions, you always kind of incur a cost the first time you use it, especially if you don't cache, you know, the query
36:23
and so now with source generators you just do it with an attribute and the code that it spits out
36:31
is far better than any of us would ever spend time doing you know what I'm saying yes it's very
36:38
fascinating code especially he was showing doing some really weird looping things in in regular
36:44
expressions and just how the code just immediately figured it out correctly and did it correctly and
36:49
And so to me, that's really powerful because I don't think any of us like dealing with regular expressions
36:55
But if we can make them even more performant, right, that's a win-win
36:59
All you got to do is basically, you know, in the attribute, put your regular expression syntax in there and that's it
37:07
Oh, that's cool. It writes the code for you. So there's no, you know, upfront costs anymore
37:13
It's like parser generator? Yeah. Yeah. It's pretty fascinating stuff. Some of the code generators, yeah, I could maybe live without
37:22
But that one to me is an example of how they can be really powerful for things like that that Right Okay For the really difficult stuff that you know like I said that you know we you know our world is increasingly
37:37
you know, get it out faster and, you know, as fast as possible these days. And so code generators
37:43
really allow you, you know, to do that. You know, that's, you know, that's one of the reasons I
37:48
really liked the new record types of .NET because it just takes care of a lot of the boilerplate
37:55
stuff that we end up writing all the time, right? And so I think records will be, you know
38:04
I don't think a lot of people use them right now, but I'm hoping more do because I think
38:09
you know, not only can they be more performant, but it gets rid of, you know, a lot of the boilerplate
38:16
code that we need to write. And the reason I like that is because, you know, most because I've been
38:23
contracting for 10 straight years, you know, most, I would say 95% of the code I look at don't even
38:31
do the boilerplate stuff, right? Because it just takes too much time, right? They slap it in auto
38:38
property. I'm done. You know, no, you're not. That's not proper object-oriented programming
38:44
And so people just don't do it because it just takes too much boilerplate code to do, right
38:50
I mean, I agree that object-oriented programming takes too much boilerplate. It does
38:57
But that's one of the things I like about JavaScript is we don't use a lot of object-oriented programming because people looked at it and were like, that's just too much work
39:08
I'm just going to call a function and the function is going to do what it needs to do and that's fine. Yeah. Yeah
39:13
It is a lot of work, but there's a lot of pluses for it too. There is
39:17
That's why I do everything object-oriented programming. I know firsthand from all of my years doing object-oriented programming is that you're much safer doing that in the long run than doing object-oriented programming, I think
39:33
Yeah, I think it depends mostly on what kind of stuff you're doing
39:38
Right, right. Because I know that some things really model well as object-oriented, like, for example, video games or things like that, where you have actors and objects, that goes so nicely with object-oriented programming
39:55
But something like a data pipeline, I feel like is easier with the functional paradigm
40:00
Sure, sure. Yeah. Like data transformations. And like I said, a lot of work these days is JSON bureaucracy
40:08
So it's like, I'm just taking stuff out of the database and translating it into
40:13
so that it goes from snake case to camel case before it's fed out to an API
40:18
That is much easier to do functionally. Right, right, right. Yeah, I agree
40:26
But like one of the things I like about serverless is that it removes a lot of the need
40:31
for a lot of the boilerplate. I don't know exactly what kind of boilerplate
40:36
I haven't done serverless with .NET, to be honest. I've mostly done it with JavaScript
40:41
But what's really nice, at least in the JavaScript version of serverless
40:45
is that AWS takes care of all of the boilerplate for you on the infrastructure level
40:52
And you just get a function that gets a request and returns some response
40:58
And that's all you have to care about. It's just that function. And that's really nice because there's no boilerplate
41:03
You don't even write your own routing or controllers or anything. You're just writing the application logic, which I find really refreshing
41:12
Yeah, I was reading an article written by someone at Uber about how they go about architecting their microservices in the cloud
41:25
And I think they said that Uber's got like over 2,000 microservices
41:31
And I was going, oh, my God. That is a lot. Yeah, that's a lot
41:36
I'm sure Amazon's got to boatload more, right? And just, you know, that to me, especially being an architect
41:45
it kind of boggles my mind because how do you control that, right
41:50
How do you make sure everything's going okay? And how do you orchestrate all that
41:56
And so anyway, the Uber article came up with some interesting new terms
42:01
that they use for kind of grouping related microservices and stuff together, I thought was pretty interesting
42:10
If I remember, I'll post it on the blog page for the show afterwards because I thought
42:16
it was a pretty good article. Yeah, it sounds like a lot of services though
42:21
Yeah. I'd be really curious what they all do. Is it almost like every function in your backend
42:26
is a new microservice? Yeah, yeah. It kind of sounds like it. And I don't know what Uber is all doing these days
42:33
I mean, I know they're working on more stuff than cars. And so I don't know if that $2,000 includes the other stuff or is that just for the car stuff
42:41
I'm not really sure. If it's just for the car stuff, yeah, $2,000 seems like a lot to me
42:47
Yeah. Yeah. Although I had a fun moment once early in my career
42:54
I got a gig because somebody came on our college forum and was like
42:59
hey, we have this project and we have something like 200 Postgres tables. And I was like, wait a
43:06
minute. No, that's, why would you ever need 200 tables? This is, you must be doing something wrong
43:14
Yeah. And I got that gig and then I was like, holy shit, the real world can be so much more
43:18
complicated than anything I've ever seen in a textbook or in college. Like, wow, you really do
43:25
need these 200 plus SQL tables. Yeah, yeah. I've been on projects like that too. And yeah, you're right
43:31
It's much different than working for a startup, right? Because you usually don't have that many
43:37
whether you're working for a startup company. But big enterprise companies, that's
43:41
commonplace, right? Having that many tables and far too many columns in the table and things like
43:47
that. Yeah, that happens all the time. That's why I was even talking to someone
43:52
where I work yesterday about, you know, that's one of the reasons
43:58
at least my thought process, you know, my thinking of at least the data store
44:03
is going more and more to NoSQL data stores, right? Because that takes care of a lot of that problem, right
44:11
Because it's a whole different mind. It's a whole different approach when you use something like Cosmos DB
44:17
or, you know, MongoDB or one of the other ones as opposed to a relational database, right
44:24
And I'm still trying to wrap my head around that. Just the differences between that
44:30
Although I feel like I used to be really into NoSQL when it first came out
44:36
And increasingly, the more work I do, the more it feels like, you know what, relational databases are much nicer for a lot of business problems
44:46
It is. I agree. I, you know, I'm not, you know, I definitely am not saying that everything should be in
44:52
Cosmos and, or everything should be in SQL. You know I think every uh you know every data store has a different story to tell But yeah I think companies will move to a hybrid
45:10
The number one thing that companies don't move to something like Cosmos DB is cost
45:17
And the next time I get in front of somebody at Microsoft, like a bigwig
45:21
that, you know, like Scott Hunter that comes on my show or, you know, somebody like that
45:25
I'm going to really kind of talk to them about the cost because that's what I'm hearing from companies
45:31
is that it's just too costly, especially when you compare it to a SQL server in the cloud
45:38
which is really cheap, actually. Cosmos DB is not. It's pretty expensive, yeah
45:45
And that's what's keeping a lot of people out, you know, of doing it
45:50
Like, you know, one of the like one of the times when I first when it was first coming out, I was actually in India and someone was telling me I asked him he was complaining about the cost
46:01
And I said, well, you know, so what's the cost that you're complaining about
46:05
How much is too much? And he said, thirty dollars a month
46:10
Oh, my God. Yeah. But in India, that's a lot of money. Right
46:14
Because in India, you can eat on thirty dollars a month. Right
46:19
so for so to them you know that is a lot of money and yes it's not for us but yeah no but
46:28
it also depends on what you're doing with that right yeah if i was spending 30 a month on something
46:33
that's not making any revenue yeah yeah maybe maybe not maybe not but like i have friends who
46:40
work with uh i know a consult a guy who does consulting for aws stuff and he has clients that
46:47
have several million dollars per month in AWS spend. Yeah. It's like, yeah, it's fine
46:55
They're just throwing money at it. And it's like, we love spending a couple million dollars per month on AWS
47:02
because that is so much cheaper than SRE engineers. Right. Yeah. And that's the other difference is that, yeah, it might be cheaper
47:12
but you might be spending more, you know, with delayed, delayed release of features or having to hire more developers and things like
47:20
that. You know, there's always a trade-off. And unfortunately a lot of people don't look at the entire cost
47:26
They only look at one segment of the cost and, and kind of go make their decisions based on that. And that's, yeah
47:33
Usually doesn't pan out to be correct in the long run. So we only have a couple of minutes left already. Gosh, dang
47:42
So is there anything you want to talk about, like the mindset of a senior software engineer
47:49
Actually, I wanted to mention another thing. Okay. We've kind of spread the senior mindset stuff in between
47:55
It's very easy to talk about between the lines. Yeah. But you mentioned that a lot of companies are probably going towards hybrid, relational, and NoSQL stuff
48:06
I would think so. One of my favorite facts about that is that currently Postgres is the fastest JSON database out there
48:18
It's literally for storing JSON documents and querying them, it's faster than MongoDB, which just kind of blows my mind
48:27
It's a relational database that's better at being NoSQL than the main NoSQL database
48:32
yeah at uh at my last contract that's what they use there for their data stores postgres
48:40
yeah postgres is really cool yeah they're running it off of linux servers yeah and it's one of the
48:47
few that's still properly open source and didn't get a bunch of vc money and become a company
48:53
which is really refreshing in these days these days yeah yeah it's it's you know one i don't
49:01
know this is super related but i just hate seeing companies that are really good and then get pumped
49:06
in a lot of money and go and they turn out to be really bad in the end right yeah and if like you
49:11
know go ahead yeah because once you have the vc monkey on your back it's just you have to go for
49:18
those billions of dollars otherwise it's not worth it for them yeah and case in point you know that
49:25
I was discussing with Simon before the show started about the new show on Showtime about the guy who started Uber
49:36
So if you watch that show, that is definitely going on. All he wants is billions and billions of dollars
49:43
That's all he cares about. This is one of the big problems with the companies in Silicon Valley
49:50
And he this show is really showing just how bad it is, you know, and I'm sure what's on the show is nothing compared to reality
49:59
Right. So, you know, they always tone things down to be palatable to, you know, the everyday person
50:06
But I'm sure in reality he was much more of a a-hole than than they're portraying him on the on the show
50:12
But but, you know, that's what makes some great companies sometimes, you know, look at
50:19
Well, Uber is still not profitable, so we'll see. Yeah. Uber is still struggling
50:28
But yeah, it worked out for Apple after, what, 40, 50 years
50:33
Yeah, yeah. Yeah, I don't use Uber anymore. I tried using them a couple of times when I was ��
50:42
I think the last time I tried to use them is when I was speaking in Seattle. and every time I uh booked a ride back to my hotel um it it put them in a place like a half
50:54
a mile away from me and they could never and they could never find where I was right and so then I
51:01
installed Lyft Lyft didn't have the problem and I never moved away yeah I've been liking Lyft more
51:07
a lot yeah I like Lyft better too like we were saying I think we were talking about this before
51:13
the show it's like uber lyft and all of them were really nice when they were vc subsidized now that
51:18
they have to actually make money it's suddenly like it's the same as it's taking a cab or like
51:25
i would honestly especially in downtown sf it's better to just walk because especially during
51:31
rush hour you're going to be there faster than you would in an uber but it's free yeah yeah do
51:37
you live in downtown san francisco yeah pretty much i live in soma and when everything is gridlocked
51:43
you are literally going faster on foot than you are in a car
51:47
Or if you get one of those rent-a-bikes, it's like three bucks. And you will be there before you would be in an Uber
51:55
Obviously, I'm a young guy in shape, so it's easy for me to say
51:59
But hey, here's what you got, right? Well, yeah. And I remember when I would go to a conference every year in downtown San Francisco at the Marriott
52:09
We would walk everywhere. you know we went everywhere we walked or we took a trolley or something right and that was before
52:18
the bikes and you know the electric bikes and stuff like that long before that but yeah we
52:23
walked everywhere downtown and uh um i kind of liked it you know um um kind of gets you out more you know and not be stuck in a vehicle and something like that
52:35
I only kind of it's my favorite thing about living in a high
52:41
density area being able to walk everywhere and I'm 34 now and I still have never owned a car wow
52:50
I have a motorcycle though so that's nice yeah well for this week and next week i don't have a car because my i got in a minor fender bender it's
53:00
in the shop and in rental cars are just too freaking expensive you know and so luckily
53:05
in the neighborhood that i live in i have basically everything i i will need for two
53:11
weeks is in walking distance right and so that's cool yeah so um um i've had i have two i have a
53:18
small mall um just like two or three blocks away from me and then north of me about less than the
53:24
mile, I have a bigger mall, like a three level mall up there that I can just go walk to and
53:30
you know, I need to. So I do like it for that, you know, aspect. So is there anything else you
53:40
want to talk about before we go? No, I think we talked about a lot of things, which is fun
53:48
we explored some topics we talked about how to think about uh architecture and stuff a little
53:55
bit but i feel like that's kind of a topic you could just talk about forever yeah yeah and then
54:02
and you know the reason i talk so much about architecture and and try especially when i write
54:08
or you know speak in front of people is i really kind of be i'm super hard on it because i mean i'm
54:16
super hard on that subject because I don't see enough of it going on these days. Right. And
54:22
and, and I'm just tired of, uh, you know, people saying, giving you a one sentence
54:31
you know, feature description and say, okay, now go write that and go really. Yeah. And you want
54:38
and you want a good estimate too. Yeah. That's not going to happen. Right. And, uh, and I
54:45
So I'm kind of hard on it because I just don't see enough of it going on
54:50
And for me personally, of all the successful projects I've been on
54:56
every single one was successful because I did a lot of architecture up front
55:02
And that's the way it's always worked out better because you can figure out a lot of stuff just by drawing on paper
55:09
and writing on paper before you even get the coding, right? Yeah, like one of the things I've learned is that somewhere between architecture and domain modeling is where the actual hard stuff is hiding
55:23
Because I feel like once you have a good model of your domain and once the data models are correct, writing the code ends up being super easy
55:32
It just falls out of your data model. But if you don't have a good data model, then it's almost impossible
55:39
And it's just hack upon hack upon hack that isn't fitting together
55:43
Yep. That's true. And then once you're in that land where you have all of those layers of hacks, it's really hard to take the time to scale back, fix the data model, and rewrite the code
55:56
Yeah. I've told this story publicly many times where I worked with this one company
56:02
you know, the worst databases I've ever seen, the worst design databases I've ever seen were
56:07
done by software engineers, right? We're the worst people at designing databases. And I freely admit
56:14
that. But, you know, when I, when I, even when I started at the company, I was telling them
56:21
this is horrible database. It's always going to be our Achilles heel. You know, this will always
56:29
prevent us from doing the things we want to do, we have to, we have to redo it. Right. And even
56:35
one of the last meetings I was in with managers, I, I stood up and I said, look, you know, in these
56:42
a bunch of VPs and stuff, I stood up and said, look, what you're asking for will be a, will a
56:48
take too long or our competitor will come out with the first because of the database. If you guys
56:57
don't break down and redo that dang database you will always be struggling and they just looked at
57:03
me like i they didn't know what i was talking about and luckily my boss was sitting next to me he goes
57:07
dave has been telling you this for four and a half years why won't you listen to him you know
57:13
and so yeah you're right hire 10 more engineers and just hire 10 more people and that will solve
57:18
the problem right yeah um have you ever read the phoenix project or the unicorn project i haven't
57:26
It's a really good book that basically talks just about exactly this
57:31
It's like, if you ever heard of The Gold by Goldrath, where he's applying the theory of constraints to manufacturing
57:39
This is like a DevOps version of that where they take, it's written as a novel and it's talking about how an aging technology company has been trying to launch a new product for the last three years
57:52
And it's just not coming together. And it's more and more tech debt. and it's like all of our competitors are faster than us
58:00
We can't deploy anything. Like we have deploys once a month or every two months
58:05
because it takes the whole engineering team three weeks to piece everything together
58:11
to make a new release. So obviously they can't iterate. And then it's like how the DevOps transformation
58:17
solves all of that. But it's really, I really enjoyed the read
58:22
It was like, oh my God, I've seen so much of this and it's changed how like now
58:29
whenever I join a company, the first thing I do is yell at them to be like
58:33
we need to get deploys down to be a non-event, possibly multiple times per day
58:40
And just nobody should care if we push something to production, it should just be fine
58:46
Yeah. But it's, it takes a while to get there. I know
58:50
I do the same thing when I start a company, why aren't you doing coding centers
58:54
Why aren't you in continuous integration deployment? Why aren't you, you know, doing architecture up front
59:00
I say the same thing as almost every company I go to. Right. And, and that's why I talk about that so much because, you know, that's, you know, part
59:10
of it is I just want to about it. But the main part is, is, is I want to, you know, make people aware of this and, and
59:18
and help try to solve it because, you know, the main, the main reason I about anything
59:23
is I want to make it better. That's why I'm doing it. I'm not doing it just because
59:28
I might be in a bad mood one day. But generally, it's because I'm trying to make
59:36
whatever I'm talking about better. So let's talk about the problem and then let's come up with a solution
59:44
Yeah. It's like if only I knew all of the lessons I learned in the last 20 years of coding
59:49
back when I started. Exactly. Well, I better let you go. Your bird's bugging you to wake up your girlfriend
1:00:00
Simon is going to get upset at me at any minute anyway
1:00:05
Anyway, thanks so much for being on the show. I hope you feel better. Yeah, thanks for having me
1:00:10
And you're welcome back anytime. If you want to hang out afterwards and chat, that's fine
1:00:15
Or if you got to go do other stuff, that's fine too. But I really appreciate it
1:00:18
I got to go wake up my girlfriend apparently. Yeah, you got to wake up your girlfriend. You can't mess that up, right
1:00:24
Yeah, I can't. Well, thanks a lot for being on the show. And I hope to see you soon some way
1:00:30
Somehow. Thanks a lot. Well, that was a great, uh, that was a great interview with, uh, Swiss
1:00:36
Swiss. Um, you know, I, I forgot to mention that the top of the show is that, you know
1:00:42
I, I asked him, I asked him to be on the show just because I liked his tweets. And so
1:00:48
you know, every, if you follow me on Twitter, uh, if you follow the show handle on Twitter
1:00:54
every once in a while I'll put out a call to everybody going
1:00:59
hey, do you want to be on my show? Well, this is kind of an example of, you know
1:01:03
having someone I don't really know. And, but I found interesting on Twitter
1:01:07
and was watching his tweets for a while. You know, I always research people and he, you know
1:01:13
Swizz sounded like an interesting guy. And so I said, come on the show
1:01:17
So anyway, that's how it happens. Anybody can come on my show pretty much, I think
1:01:24
Anyway, that was a great interview talking to Swiss. So just got a couple more things, and then I can let everybody go
1:01:34
do whatever they're doing this weekend. Hi, Ganesh. What are you guys up to this weekend
1:01:38
You got to type quick because I'm almost out of here. So if you didn't know, I put most of my Code Performance book up on my website
1:01:50
You can go there to check it out. Some of the articles are free, but many of the articles are behind a subscription model, which is super cheap
1:02:00
It's only like $4.99 or $5 a month. If you want to help support my work on all the hard work I do coming up with this data
1:02:10
because coming up with performance metrics is not easy and takes a lot of time like my benchmark test for this takes like I would say close to a day to complete all the tests
1:02:27
Yeah, I'm not kidding. So it's a lot of work. So five bucks a month isn't bad, I think, for reading all this information to help you, you know, make faster code
1:02:38
Also, as every week, everybody wins a copy of CodeRush from DevExpress by going to devexpress.com slash Donat Dave
1:02:47
You can download your very own free license, not a trial copy of CodeRush from DevExpress
1:02:55
CodeRush is the only refactoring tool I've used in .NET. I love it
1:03:00
I use it every day that I'm coding. And it actually teaches me to be a better programmer
1:03:06
So that's part of the reason I know some of the things I do is just because I use tools like CodeRust
1:03:11
So go check it out. It's free. Why not? Right. Also, don't forget, my latest coding standards book is out there
1:03:21
I hope you go check it out, especially for those companies that don't have coding standards written down and in use
1:03:29
So I hope you can you'll go pick up a copy of my book to help you get started
1:03:34
or some companies I work at, I was trying to convince my new boss of this this week
1:03:39
that everybody gets a copy of my book. And that's actually how some teams I've worked in
1:03:47
did their coding standards. So they just bought everybody a copy of my book and that was it
1:03:51
So I hope you go check it out. Here's some humor I found I thought was interesting
1:03:59
This happens to me all the time, especially now that I've been around this world
1:04:03
longer than a lot of you. Friday evening, working on something, perfect
1:04:09
I'm finished. I just got a couple more things to do. I'll do them on Monday. And then I do my weekend
1:04:15
And Monday morning, I forget freaking everything. I go, what the heck is this
1:04:22
That's exactly what this cartoon is showing. That's me, Monday mornings. What happened last week
1:04:29
I don't remember. Because when I stopped working on Friday, I clear my RAM and everything goes out and I started new So I thought that was funny I hope you will help me I did a tweet about this at 10 o I hope you will help me help the kids in India If you go to this GoFundMe
1:04:49
page right now, I'm close to $500. I think I looked at it, which I need to donate to the
1:04:55
Voice of Slum this weekend, actually. I finally got ahold of one of the people who run it and he
1:05:02
told me how to donate the money easier than we've been doing it through Western Union
1:05:07
So anyway, I hope you will go help me keep these kids in the slums fed and taught and
1:05:15
close on their back. They really, I've been there. It's a hard, hard situation in the slums of Delhi
1:05:25
And so I hope you'll go help them by either donating to the GoFundMe page I set up or just by going to voiceofslum.org and donate directly
1:05:38
You can even buy, you know, clothing and shoes and stuff like that for the kids
1:05:42
And so I hope you go help them. And with that, next week I have Khalad from JetBrains
1:05:49
Khalid. See, Simon, I'm terrible at names. I have Khalid with JetBrains coming on next week
1:05:56
So I'm really interested to talk to him about JetBrains. And I want to talk about, I definitely want to talk to him about Rider, which I haven't used yet
1:06:06
So I hope you join me next week for that. As always, please listen to your medical professionals about COVID
1:06:13
It's not over. It's actually increasing in some countries like China. So I don't think we're out of the woods yet
1:06:20
and in the meantime please go donate blood at your local blood bank
1:06:25
I think Canada and US needs like 42 million 4.2 million pints of blood a year
1:06:32
that's a lot so I hope you go donate blood it's free it's easy it doesn't cost you anything
1:06:40
it makes me feel like a better person and actually the last two times I've tried to donate
1:06:45
my iron has been just one or two points under the minimum
1:06:49
And so I'm trying to get that back up because I'm not happy I'm not able to donate right now
1:06:53
So I try again next Sunday So I been eating a lot of iron rich foods so I can go donate next Sunday because you all know this is important to me And I don like it when I donate and help people
1:07:08
So and with that, thanks a lot for being on the show
1:07:12
I'm glad I'm back for a couple of weeks before we take another hiatus. If you have any questions, comments, guests you want me to bring on the show, do you want to be on the show
1:07:21
just go to rock just email me at rock and code world at c sharp quarter.com and i'll be glad to
1:07:28
do whatever you're asking me most of the time and with that i hope you have a great weekend
1:07:34
stay fun stay safe and i will see you next week Thank you
1:08:21
Thank you
1:08:51
Thank you
#Programming
#Windows & .NET


