Coding Blocks - Supporting Your Code, README vs Wiki and Test Coverage
Episode Date: May 1, 2023In this episode we talk about several things that have been on our mind. We find that Joe has been taken over by AI’s, Michael now understands our love of Kotlin, and Allen wants to know how to esca...pe supporting code you wrote forever. News Visited with Jamie Taylor from the .NET Core Podcast, Tabs […]
Transcript
Discussion (0)
You're listening to Coding Box, episode 209.
Is that edited in post or is that real?
No, I'll do it again. You want me to do it again?
No, that's okay.
209. There it is, 209.
Alright, subscribe to us on iTunes, Spotify.
No, just kidding.
Uh,
Spotify,
Stitchify,
uh,
wherever you find your,
your podcasts,
uh,
visit us at coding blocks.net where you can find show notes,
examples,
discussion,
rants,
links,
whatever stuff,
social stuff.
What?
You know,
there's things there.
Yeah.
I don't have the lungs that outlaw has.
So I'm just going to,
you know,
stick with the short words.
Um, send your feedback questions and rants to our comments at codingblocks.net.
Email the old way.
You can go to slack, codingblocks.net slash slack, and do it the new way.
How crazy is that?
Will you send me an inter-office communication?
On Slack, please.
You can follow us on the Twitters, at Coding Blocks.
And we should probably sign up for a Blue Sky account.
I'm going to do that right now, if I can.
Waitlist. And also,
CodingBlocks.net, you can find other social links at the top
of the page. With that, I'm Joe Zach.
I just feel like elongating it. I'm Michael!
Outlaw.
He's practicing for his,
he's going to start doing events at like uh it's no longer the georgia dome
it's mercedes-benz stadium right yeah yeah there we go yeah uh me and tate i think are performing
tonight i like it yeah i like it uh so with that i'm alan underwood not gonna be doing any events
i did see a sign because you know she's in town? So I don't know if you saw this, the billboard where, you know, like Atlanta is often referred to as ATL, the airport code.
And it said ATL.
And I have a hard time saying it every time.
ATL.
I mean, dude, that lady has such a cult following, man.
Like, didn't people go crazy when, when a ticket master had problems with her concert?
Like there was like just a mutiny because of the Taylor Swift debacle.
Well, I think there was other things at play there though.
Right.
Like where, like tickets have been pre-sold beforehand or something like they are not
enough available or something like there was, there was others craziness involved there,
but yeah, she definitely has an extreme following for sure.
So I heard she's in town and they expect 100,000 people to be in town this weekend.
They're like, if you have something to do in town, you either need to get there at 2 o'clock in the morning or skip it.
Well, what's also worse, though, too, I don't know if you know, but Miss Janet, if you're nasty, is in town.
Jackson, yeah, both of them.
Yeah, because I think her show got delayed.
Because of the Hawks game.
So both of them are overlapping.
Yeah, yeah, yeah.
So they're both overlapping now?
Yeah.
Yeah.
You think the people would play these things out better,
but you know the funny part about that is that's probably because they thought
there was no way the Atlanta Hawks were going to win game six.
They're like, what's the chances of that happening?
Come on.
I've seen them play.
Let's schedule Janet.
We got this.
It's okay.
It'll be fine.
It'll work itself out.
Just trust me.
It'll be fine.
We're going to take a gamble on this, and it's going to pay off dividends.
That's amazing.
So, hey, real quick, we did outlawing myself we had a chance to go
meet with jamie taylor if you don't know him he does the dot net core podcast if you're into dot
net definitely go check that out he's been doing that one for years they've got he's also got
another one that he does with uh uh james and zach and they do tabs and spaces that one's also very entertaining it's
very much like the style of the show that we're doing today where we're just talking about random
topics and then he's also got one about video games called waffling taylor so if you haven't
checked out any of those go check him out jamie is an awesome dude i I had a good time catching up with him. We even talked a little bit about work code stuff.
So, you know, everything from, you know, just what's life like to, hey, what are good development practices?
Did you get any Jaffa Cakes?
We did not get any Jaffa Cakes.
I got Jaffa Cakes.
I got Jaffa Cakes.
Man.
Hey,
those things are actually interestingly good.
They're not real food.
I don't think,
but they're pretty tasty.
You know,
when I forgot to ask him,
and I'm going to ask him now,
cause I've always wondered like,
cause his handle on Slack is GA prog man.
And I always thought like when,
when I first saw it like years ago,
I just assumed like
oh he's a programmer he's a guy who's a programmer lives in georgia that was my immediate like
reaction to that name and then but wait he lives where no not like so like because he's overseas
right so i've always been curious like what what does it mean do you guys know i have no
idea i mean maybe it's gap rog man instead of georgia no it's it's the capital g capital p
he does do it does capital m so yeah it's ga prog man yeah so so maybe he'll he'll fill us in here
yeah i forget he told me once because i asked the exact same question the exact same way and he told me and that was years ago it's gone now and if the a was this
was capitalized i would assume it would be like you know a like a code level like general
availability kind of like release type reference so i'm confused so yeah jamie let us know i forgot
to ask you i'm sorry yeah good stuff but yeah it was really nice
to catch up with him um he's an awesome dude if you if you get a chance and you like podcasts
definitely go check his stuff out yeah it was awesome and and alan definitely picked a great
place for us to be able to hear everything that was said too that was a thousand percent yeah
totally my choice totally my choice we ended up in the Hard Rock. And what was it? Maybe third grade class or something?
I think it was.
Yeah, there was definitely like a third grade retreat going on there, you know, field trip
to the Hard Rock Cafe.
And they were singing every song that would come on as loud as they could, but only like
the parts they know.
So it was so hilarious.
Because like the YMCA would come on.
They knew the alphabet part of the song, but beyond that, and it was like the ymca would come on they knew the alphabet part
of the song but you got beyond that and it like the place kind of got quiet i mean we're talking
like 130 decibels right like it was it was louder than a football stadium it was crazy it was the
the real uh insanity of it was when they left just how quite you could hear a pin drop and it was like oh wow
but by that time your ears are ringing so it didn't matter yeah it was it was fun but hey
it did give us a chance to actually eat our our sandwiches and stuff in between right
well in fairness i didn't say how big the pin was that dropped that you could finally hear so
that's right oh man so yeah good time all right so this
yeah on with the show this particular episode we're kind of just going to talk about some
things this is more water cooler style and one that has sort of bugged me because it seems that
this is always the case if you wrote a piece of code does that mean that you are the one that
has to
support it and own it forever? Like, is that how things are supposed to work? Well, wait a minute,
because clearly based off of your tone, I'm assuming you are thinking of like in a business
setting, not like code you wrote on your own for a freelance project or open source project.
Yeah, that's fair. I guess if you do it for an open source project, you kind of do it on it. But, but yeah, I'm talking about, well, even if it was an open source project, that's fair i guess if you do it for an open source project you kind of do own it but but yeah i'm talking about well even if it was open source project it would depend on
how open source like you know if it's you know on your own private alan underwood repo that's open
quote open source that's different but if it's like oh i contributed to kubernetes yeah i think
they'd almost treat it different right like if you're working on just a huge open source project
then you're just you you're nobody, right?
Like you just contributed some lines of code.
But at work, it seems like if you, it doesn't matter how big or small this thing is that you create.
Like, I mean, we've all done it, right?
Like we've all written something, Ed, Ed, from the most minor things that go wrong with it to the most major
it's like everybody's like oh well that's that's alan's well worse than that you know that we're
all guilty of well alan wrote that you should probably go ask him yeah i think ideas that is
faster and easier for him because he's more familiar with it even even if it's been a break
but the downside is is like the longer you've been somewhere like you just get stuck you're like
saddled with these things that you worked on years ago that no one else is touching and you know it
just makes the problem worse where now no one's familiar with it five years later and you know
it's like even harder for them to get into you know it's funny you know you said we're all guilty
of it and we all are right everybody who's's ever programmed to anything is guilty of this. But I, I feel like I really try my best not to go on poke the person
that, that did something like, I mean, I have tons of examples, but I will try and get stuck
before, before I like go knock on somebody's door. Right. And, and I feel like most people don't do
that. I feel like most people they're like, Hey, this thing, uh, it's throwing this air. I'm like,
did you, did you search the code for that, that text and see what happened? Like, no.
And the reality is if it's been more than a few weeks, that's what I'm going to have to do.
You know what I mean like i don't
remember the logic flow to get to this exact point so hey do you remember verbatim says bit of code
that you wrote three and a half years ago because i'm getting this obscure error it's uh error
eight thousand one two three minus four divided by pi do you remember what that means? Yeah. I mean, or, Hey,
this thing didn't start.
Do you know why it didn't start?
Um,
cause I wrote it for windows 95.
That's right.
That's right.
Why are you still bothering me?
And you know,
here's the worst part.
And this is,
I think this is the part that drives me the most insane is you can do your
level best to make it so that people don't have to come to you for it
right so you can write wikis you can have readmes in the code you can have you could do everything
you that you possibly can if information goes to die that's the place yes yeah i mean we've
joked about this before but i totally believe it the wiki is the place that information goes to die
well there's also one other benefit of wiki is the place that information goes to die well there's
also one other benefit of wiki is you can pass it aggressively like throw it at people so like
people ask you which would be like uh i answered that i guess you haven't read my wiki you know
that's right it's right here that's so amazing because that's exactly what jay-z does because
because he's not a he's he doesn't have a combative personality he's not a – he doesn't have a combative personality.
He's not confrontational at all, yeah.
At all, right?
Like you can't create a fight with Joe.
But he will definitely drop WikiLeaks on you.
That always makes me giggle a little.
You mean WikiBooks.
That's right.
Yeah.
If Joe wrote it, it's complete.
Here you go. Half of this this is wrong but not this part
it's i try not to be passive aggressive like i try to just you know kind of do it like helpfully
and you know try and encourage those people right in the wiki but every time i say i'm like oh man
i sound like such a swarmy little something but the way you said that though it's almost like
you could substitute the technology there or uh you know, a word there and it would sound even as hilarious as what you said,
where it'd be like,
it sounds like you don't even subscribe to my newsletter.
Yeah,
exactly.
It's like,
um,
if you listen to episode two Oh six of coding blocks,
you would know if you read my blog.
That's right.
You don't,
you know,
though the wiki versus the read me.
I mean,
we've had this discussion in the past, too.
I love the readme in line with the code.
I love it at the root.
You can never have too many readmes.
No, totally.
Like, put them in every module, right?
There should be the baseline one that is, hey, this is how you get up and running.
This is how you get things set up for your environment, blah, blah, blah.
Nobody has to go find a wiki, right?
They don't have to know what to search for in the wiki.
They have the code.
They can open it.
And then every submodule, put a readme in there.
If there's anything, if anything, that's probably the one place where I think I get frustrated get frustrated is you know there'll be all these
things to start up a thing and this i guess this is why people come buggy right like hey i see you
have this command line runner and there's these 12 options i don't know what they do right put
that in the readme put it in the readme i'm a strong fan of information about the code should live with the code and iterate with the code.
So it should be a readme in the repo next to the code. Like if it's about how to use this thing,
how to run this thing, you know, like that, like what you just described, that's in a readme next
to the code. If it's, Hey, here are the 18 environments you know like information about them or
architecturally like how you know we're doing things like that might be in a wiki sure fine
but things about the code live with the code i agree yeah you can do images and videos and stuff
and link those in there too there's not i think it's still a case for a wiki like there's reasons
like meeting notes things like that um sure stuff like that like schedules and stuff like all that
stuff is nice to have in a wiki and it's easier to link like it's hard to link from one readme to
another oh you know you move it it doesn't update all the links you know stuff like that but but
that was one thing i was going to call out though is that you can i was talking about like have like
the parent readme and then like submodule readmes.
You can have readmes that are like
linked to other readmes, you know,
like GitHub will interpret that.
Or even Visual Studio Code will.
Yeah, it's just,
and you can do the whole control click.
It's just, it doesn't,
it doesn't like automatically update
if you move a readme or something, you know.
Sure.
Yeah, it's rare.
That's not a reason not to do it.
Yeah, true. But I will say we you you do end up moving directories and stuff a lot more than what you think as you
start figuring out better patterns and things especially when you move to new languages right
like if you lived in a java world forever and you went to python you're probably going to do things
in a non-python way at first and then you're going to realize the error of your ways.
Yeah, but I mean, like, what I am not a fan of is,
let's say that you have a repo,
and to get that thing running requires, say, some number of steps, right?
Beyond just compiling, right?
Because maybe there's environment variables you need to set or authentications that you need to already have
sorted out or whatever, you know, but if you put that stuff over in a wiki, then like as that code
is iterating and changing, well, the instructions in that wiki, which version of the code do they
refer to, right? Cause they didn't,
they're, you know, it's not like they're linking to a specific commit. They're just like, generally,
this is how you do this thing. Right. But if you put it in with the, the read me, then,
you know, maybe as you check out different branches or different commits or tags or whatever,
maybe the instructions change with that particular version of the code. And so that's why I prefer things about the code living with the code.
Yeah, I agree with that completely.
And I would say also get into the habit of,
as you make changes with the code, think about, Hey,
is there anything in the read me that needs to be updated to support it?
Right. For that very reason, because it does version, right?
Like if you check out last week's branch of the code it should have a different readme if something was changed
um significantly for the new week's code so um it is a fantastic way to let other developers
help themselves as they're going through things so prs mrs too it's a good chance for someone to
say like hey i see you changed arguments but you didn't change the readme like that's not gonna happen with the wiki that's a great point yeah
for sure um so yeah on on the thing of should you support the stuff you work that you created
should it be yours forever i personally don't think so i think do your best to make it to
where people can can find information on it by the read me by a wiki.
You can link to a wiki from the read me,
right?
Um,
try and make it to where they,
they can and then passive aggressively send them the read me link.
It'd be like,
Hey,
um,
here you go.
So I don't know.
I feel like we should be better about everybody spreading out the support and,
and understanding of things so that you don't have one single bottleneck on
anything.
I feel like Joe sends out the wiki links,
you know,
and,
and I'll send out like,
here's a link to the read me because I love how like GitHub,
Azure DevOps,
they all will do this where like they will interpret the markdown for you,
you know,
so you can see this pretty view of it in
the, in the browser. And so I'll send those links out. I do this question, like how, how does this
work or how to use this? Or like, well, what does that parameter mean? Here's the read me.
Yeah. You know, that's interesting. Cause I used to, I used to like send the path to the file on
my system, you know, like root repository, whatever. And over time I was
like, you know what, exactly what Outlaw just said. I know that this thing is formatted pretty
in GitHub or if you have an on-prem get or whatever. So I'll actually go find the link
to the file directly for the branch directly. And then that way they go straight to it and
there's no questions. Well well maybe this is a tip of
the week then for you because in visual studio code you don't even need to find anything you
can just right click on it and say open or copy remote path file path and it'll give you the url
to the repository version of that file oh that's good i didn't know that that is tip of the week
material right there yeah so you and you can get like if
you wanted the relative path so like you were saying like how you would you would previously
give them like the uh a link you know a directory path based on the repositories like hey wherever
you have the repository cloned this is where you would find the file you can do that too but if you
know the file like in that type of situation i'm like you know command p type know the file, like in that type of situation, I'm like, you know, command P type in the file name.
Then the Explorer tree on the left automatically navigates to the file.
I right click on the file, copy remote URL, boom, paste that into Slack.
There you go.
And that's my passive aggressive version of Jay-Z done in a readme fashion.
I love that.
I know that works with GitHub.
I wonder if that works for like other, other sourcing,
other like source code repositories.
Like it's GitHub,
you know,
it's like,
it's,
it's not just that path,
right?
You know,
like github.com slash,
you know,
org name slash repo.
And then it's like,
it would be based on the repo or something.
Yeah.
But there's like,
there's all that little thing that you need to,
there's like that,
the branch name and then the tree,
right?
There's like some other word in there.
I'll look it up,
but it's not just a, I don't think it's blob i thought it was like on this tree but it's not uh it's not like a standard url there's not like a standard for get you know website hosting paths Yeah, I mean, you could be right. It might be specific to GitHub.
I could have swore this existed, too, under Azure DevOps,
but both of those would be Microsoft products.
Maybe there is some standard convention.
I just assumed it was based off of the.get folder.
Like, it knew how to traverse that repository.
Right.
And now you're just like,
Oh,
swap in remote name here,
but maybe I'm wrong.
Still,
still a good tip.
Yeah.
And there's,
so there's my quasi tip of the week.
Cause Joe had to go and knock it down with a wiki.
That doesn't work like that,
Michael. Yeah. I just like to be a jerk. That That doesn't work like that, Michael.
Yeah, I just like to be a jerk.
That's a good Joe impersonation, right?
That sounded just like him too.
Yeah, totally, totally not.
Totally not?
Wait, what?
All right, so.
That was hashtag nailed it.
What are you talking about?
Nailed it.
That's hilarious.
All right, so here's another one that i was wondering what you guys like just your thoughts on this so there's always something that comes up that's a work item
that is not super appealing right like it's it's work that seems like it's not going to be fun it's not it has to be
done do you raise your hand for that to take one for the team um knowing that you're trying to do
something for the greater good like what what are your feelings and why are your feelings
i think sometimes i think some of that work is like really important,
even though it's not,
you know,
fun,
but,
uh,
and it's,
you know,
you should volunteer if you've got the space for it,
but you'll see like over time,
like there's certain people that will just never volunteer for stuff like
that.
And I think that's not right either.
So I think,
you know,
maybe that's the conversation with the manager or something and be like,
look,
I've,
you know,
I've taken the last couple of ones for the team.
We need to spread this out.
Okay.
What about you, Outlaw?
I mean, I'm just thinking about from my own past experience
where I feel like I've absolutely done that in the past.
Others might argue that, but...
No, I'd say you definitely have.
I just kind of view it as like,
I think though the,
the examples that are coming to mind though,
like I like empowering other people like that,
that,
that multiplication kind of factor,
you know,
where I did something for the team and now because that like I,
everyone else is going to be able to like benefit, you know, greatly from it, you know, kind of thing.
So because the kind of things that are coming to mind, like when you mentioned them, like, oh, DevOps is definitely like, I feel like this is definitely a DevOps thing, right?
Like where you take one for the team and you're like, okay, I did this thing.
I made it better for us.
And, you know, I put the work in,
but we all benefit from it kind of thing.
I mean, I know that's not what you were talking about,
but that's definitely a take on it.
DevOps can definitely feel that way.
I'm talking about more like, hey, there's a project that needs to be done.
Everybody thinks that the success rate is going to be garbage.
You're working with stuff that is hard to work with
and maybe even working with teams
that don't really even want to deal with it,
but it needs to be done.
Yeah, I think the bigger one, though,
is when it comes to,
hey, here's an old bit of technology
and we don't want to rewrite it, we don't want to rewrite it we don't want to
change it but we need to like add a feature or update something on it and nobody wants to take
it because they're all like well i like to work on the shiny new thing not on that turd yeah so
i mean yeah what are your thoughts on that i mean yeah i'm of the yeah i'm with joe like if it needs to be done
i will do it if that's what's asked of me you know what i mean yeah totally so it's funny that
all three of us think very similar on that i think that might be why why we are the type of
developers we are i think uh you know i've definitely taken them for the team
you know like here's this thing that nobody wants it's like all right i'll do it but i do think what
joe said is really important there are some people that will never raise their hands for that work
and it's not right that some people always get tasked with doing the dirty stuff.
You know, so you got to figure out a way to balance that out with a team to make sure that you don't have one person always stuck in the mire while while other people are always getting to do the fun stuff or or maybe it's not even fun.
Maybe it's just the not taxing stuff, right?
There's some stuff that's just taxing because there's a, there's
a super tight deadline and you know, maybe that's the other thing, right? Like it may not even be
hard. It's just that, Oh, this has to be done and it has to be done soon. And so it's going to be
a grueling type thing to get, to get through. Or maybe it is a tight deadline, but it's also like mentally grueling.
Right.
Yeah.
I mean, it's okay, I think, to take those on occasion, but you also have to balance out the mental health aspect of it, too.
Like there's some things that just drag you down and it's hard to come up out of that rut sometimes.
So, yeah.
Here's the other thing to it. Sometimes there are pros to doing that right and the pro
might be you've created a trust with with your team or your management that they know that you're
one of the people that's a go-to person um but that may also create the con because they know that you're the person that they can go to, to get these things done.
And so they've built that trust and they're going to lay, they're going to lean on that trust over time, you know?
So, yeah, that's the people problems are the worst problems.
They're the hardest, they're the hardest to solve.
They really are.
Yeah.
So, yeah, I don't know.
I mean, I guess for anybody out there doing these type of things, you know, there are benefits to it.
But definitely try and balance it out with other people on the team who can do those things.
Yeah. I mean, you build good karma though you do at least you hope you do you hope
you are yeah it's it's seriously it's one of the tougher things that i think as a developer you
deal with ever is like man i know this is this is going to suck real bad.
Do I really, really want to raise my hand and offer to do this?
So I don't know.
Somebody's got to, or somebody's going to point you out.
You remember like you'd sit in class and teachers like, Hey, does anybody know the answer to this?
Nobody raises their hand and eventually they're like, all right, well,
you outlaw tell me, Oh, you were asleep.
All right. Wow. wow way way to go like
i'm not even paying attention in your fictitious example that's right i mean i saw it happen so
yeah i mean that's what eventually happens and you know what you know what really stinks about
that is sometimes the wrong person will get paid for it and everybody starts grumbling about it.
And then you're like, well, hold up.
How's everybody upset?
Like nobody volunteered to do it.
So, yeah.
All right.
So we got to get here before Joe does because otherwise things go sideways quick uh if you haven't already left us a review
uh you can find some helpful links at www.codenbox.net slash review we do greatly appreciate
reading those uh they do put a smile on our face they mean a lot to us uh i mean over the years
you guys realize like we are in our 10th year right now right that's Right. And over those years, nine plus years, we, some of the stories that,
I mean, they're truly, uh, you know, they, they truly play the heartstrings. Right. Um,
I think I said that phrase, right. Um, but go on the heartstrings. Yeah. Yeah. That's what it was.
Dang it. It was so close. Um, but yeah, I mean, there've been some really, some really,
uh, heartfelt messages that we've received over the years. So we do really appreciate those and,
and appreciate and thank those people for reaching out and sharing those stories with us. So,
uh, if you have something you want to say, uh, you can find some helpful links at
coding blocks.net slash review. And with that, we head into my favorite portion of the show.
Survey says,
Hey,
you know what? We haven't had yet.
Nobody's like named their kid after coding blocks or anything.
So I guess,
you know,
we still have room to grow.
Okay.
I mean,
maybe,
maybe not.
I call my kids blockheads all the time.
You don't.
Oh yeah,
probably.
Uh,
McGee sounds pretty good, probably. Uh,
McGee sounds pretty good,
right?
Wait,
you wanted them to name in your world. The naming of the kids would be after the three of us.
So,
so somebody would name their kid.
Oh,
yeah.
No,
like outlaw Underwood.
And then whatever your last name is.
Outlaw under Zach.
There you go.
Uh-huh.
Smith.
Or Out Underzak.
Out Underzak.
There we go.
Something.
Yeah.
This is a terrible idea.
Nobody please do this.
Huh.
You could do this all day.
No, actually, I endorse this.
I'm looking forward to hearing what could come out of this.
This might be the most amazing thing.
This is the most amazing idea we've had yet.
I'll get a tattoo if...
Don't believe him.
Yeah, for real.
Where's this Visual Studio one?
I can't show you.
It's so dope, Chad.
You don't want to see it.
Trust me.
I'm trying to even remember why you promised to get a Visual Studio tattoo.
Visual Studio ever came out on Mac.
Oh, is that what it was?
That's right.
It's crazy.
Microsoft was so different back then, 10 years ago.
Yeah, and then it did.
Yeah.
Yeah, so you still owe us a tattoo.
I'm not going to listen to your,
uh,
your one about the names.
All right.
Well,
uh,
like I said,
we head into my favorite portion.
So this is episode two Oh nine,
according to,
to that co's trademark rules of engagement,
which we now all understand what I mean by that.
Yes.
Uh,
it is Alan's,
uh,
turn to go first.
So let me
grab a... Create that winning streak
again.
That was awesome.
To create that winning streak.
Alright, well I'm going to give you
an easy one to start with. No bias here,
but you know.
Name a three-letter word that starts with the
letter z really that does not start with letter z i'm sorry zoo all right this was uh this is
from california right do these questions have just an origin like that like that and the show
is shot.
Like,
I don't know if this came from,
so if it,
if it included the,
you know,
the UK and like,
Oh,
cause I didn't say that.
Oh,
it could have been said,
but I'm going to go with,
uh,
I'm going to go with the California word.
I'm going to go zap zap.
Okay.
Yep.
I think I got this one.
Okay.
So number five answer on the board.
This one's gross.
Zit.
Oh yeah.
Yeah.
13.
Number four.
Hi.
Zen.
Yeah.
Four 13.
Okay.
Good.
Oh,
let me actually move this off over here so I can see these two things at the
same time.
Like a smart man would do.
Um, number three answer on the board is zap for 15 15 pretty good number two answer on the board for 18 points zip and rounding it out for 40 is zoo wow look at that all right so not even a commanding lead i don't feel good about this
so it's california by the way figured it out
here you go joe you ready for this no zed yep
name an office supply you'd use to pick food out of your teeth?
Jeez, that is harsh.
I mean, I would just use paper.
A piece of paper?
Yeah.
Okay.
That's going to get stuck in there.
Then you're going to need the paper clip to get it out.
Yeah, that was my second choice.
Okay. So yours is paper alan yours
is the paper clip paper clip all right so uh number six answer on the board is tack pen or pen
for six no no no no letter opener for number the fifth answer for eight fourth answer staple nine.
That'd work.
Yeah.
Pen or pencil is the number three answer for nine.
That's really don't make it worse.
Right.
Right.
Now it's like,
why are you in your teeth?
Graphite color.
Yeah,
exactly.
Number two answer on the board for 12 points,
paper or an envelope.
Really?
You can get it.
Can you imagine getting a paper cut on your gum between your teeth?
Oh, no.
Remember like when we were kids, did you guys have like, what's grosser than gross?
Do you remember those kind of things?
Yeah.
Like that's what the paper clip cut between your teeth reminded me of.
Yeah.
Like what's more painful than painful? Okay. kind of thing yeah like that's what the paperclip cut between your teeth reminded me of oh yeah like
what's more painful than painful okay number one answer on the board for 53 points look is paper
i feel a little bit better now got some breathing room in here the metal
all right actually swallow it you don't accidentally swallow a paperclip.
You take something out of your teeth.
So, Alan, as is tradition, you get to pick the next and final question.
Your choices are name a weather condition that would be a good name for a wrestler.
Name something that has the word super in it. Name a weather condition that would be a good name for a wrestler.
Name something that has the word super in it.
Or name something that parents can't wait for their children to get out of.
The third one.
Okay.
Okay.
Let me.
Out of.
Yeah.
Hey.
So.
I don't even care if I lose this one This was pretty fun
The house
I hope your kids aren't around when you just said that
They can't hear
Mom, dad said he wants us out of the house
But I'm only 12
I'm running away
Dad doesn't even want me here anyway No. But I'm only 12. Geez. I'm running away.
Dad doesn't even want me here anyway.
That's the right answer, but I think I know the number one answer.
Yeah.
Diapers.
Diapers.
Ooh, that's a really good answer.
All right.
All right.
All right.
Number four answer on the board, and the lack of options here should give you some indication number four
answer on the board for four points teens slash puberty okay yeah i get that that's not a bad
answer oh my god how is that number one right i'll take diapers any day of the week yeah here's
the misconception because jo Joe said diapers,
but diapers are like,
you know,
like every couple hours there might be like,
Oh,
I gotta go change the diaper.
No big deal.
Right.
But when they're going through puberty,
man,
it's like nonstop.
Like that's like,
you're literally,
you have a crazy person living in your house.
They are insane.
Yeah.
Yeah.
And constantly mad at you because you chose to breathe.
Yeah.
Right.
How dare you choose to breathe?
Yes.
Number three answer on the board for 21 points.
These are climbing.
School or college?
Thought about that one.
Yeah.
Number two.
Diapers.
Wow.
Did I get the number one answer?
35 points for diapers.
Number one answer on the board
for 36 points is the house.
Look at that.
I took number one on all of them.
Wow.
Somebody is continuing their winning streak of one.
I studied.
Studied?
I studied.
Okay.
That's amazing.
All right.
Got the winning streak back.
We're good.
So welcome. That's amazing. All right. Got the winning streak back. We're good. Welcome to the winning circle here, Alan.
I appreciate it.
We'll give you a first-time winner's jacket.
It'll be in coding blocks blue.
There we go.
Our masters has their green jackets.
We'll have the blue jackets.
Be out under Zach.
Be written on the back somewhere.
Oh, man.
Under Zach.
Outwood.
Under out Zach.
Yeah.
We'll have to work with that.
Okay.
Yeah.
All right.
That's going to take some work.
Yep.
I think you need another syllable in your name, Joe.
That's the problem.
Yeah.
He's got one syllables, and we can't work with that
yeah he gets to steal the whole part of it see we could be like joe underlaw you know yeah yeah
see where we get to go with this you're ruining things joe
i blame your parents for your stupid name hey wait but you said on a show that that that wasn't
your original your original name right like it was polish on a show that that that wasn't your original your original
name right like it was polish or something yeah yeah i can't pronounce it like exactly
it's got like 12 syllables so we should yeah depending which cousin you ask like they all
say it differently and spelled differently you guys are you even related do you have your own
uh do you have a side show that we aren't aware of this like joe between two computers or something yeah
joe zach galifianakis between two good luck googling it though i can't spell it no you can't
spell it no way all right so i had one more that that popped into my head that drives me crazy. And I think we've talked about it before,
but this is,
we definitely have,
you'll get,
you'll get some commands from up above that you have to hit a certain unit test coverage or code test coverage number with your stuff.
And man,
that drives me crazy.
So like, I, I'm curious you guys' thoughts
on, on test coverage percentages. So versus the actual usefulness of the tests. I, I, okay. So
here, here, I do not have a problem with having a target um percentage of code covered by test i i think that
that's you know not a crazy metric if you wanted to like have a pr gate for example around like hey
you know you introduced so much new code you brought the percentage down you you that implies
that you aren't testing it. And so therefore,
we can't merge your code in until you do that. The problem that I have with this, though,
is that when others above will say that that number needs to be really high, because to me,
that number, and like the PR gate example that I gave, if you aim for like 70-ish percent, give or take five, to me that seems like a reasonable thing.
Because there's absolutely going to be code that cannot be covered with a unit test because by definition it's an integration.
It's integration test code, right?
Or integration code because it's like trying to actually connect to a database or whatever. So there's absolutely code that won't
get covered. And, but, you know, you'll have sometimes they'll, these really high numbers
that will be given to you. And the example that I was given to one of our friends was that you can have a code, you can have code that is
100% test covered, covered by tests. That doesn't mean that the code is bug free or correct or good
or anything like that. And so the example that I gave was like, imagine if you had a simple,
a simple function that, that just took in two numbers and, you know, it was called divide, takes in two numbers
and returns back a result, right? You could absolutely write a test that gave, you know,
four and two and expected an answer of two and boom. Now that method is 100% covered by a test,
right? So as far as management could be concerned, hey, our code is perfect because we have 100% test coverage.
But then the real world comes along, and the first time that a zero is thrown in as the divisor, suddenly your code is broken, right?
Right.
And so that's an example of where 100% test coverage does not mean what some think it means.
Right.
And it's not, it's not like the metric that you should go after.
It's not the metric you should care about necessarily.
And to your point, all it means is it was referenced once in a test, right?
So a hundred percent coverage doesn't mean that you thought about all the cases for the use of that code. It's just, you touched it and I exercised it once.
Right. And, and the part that bugs me more is like when you have things like pojos or, or
POCOs and C-sharp or whatever, like those are not classes you need to test their data movers.
You put a value in them and you move them. And if you're
writing unit tests that, that check to make sure that you didn't pass a string for a number, it's
like, is that a useful test? I don't think it is right. Like, I think that's, that's writing test
code for the sake of having test code, you know, a POJO or any of that, like those shouldn't matter. Um,
business cases, the divider is as simple as it is, is actually a good, a good example of something
that is, is testable, right? Hey, you know, there are, are cases where like putting a zero in for
a divisor should throw an exception because it's not, you can't divide by zero. So that's a, a, a business, um, a business rule, right? And that's what you should be testing
with unit tests and integration tests should be testing that the flow of something from point A
to point B works as expected. Now those are going to be slower, but in my mind that in some cases is more
useful than trying to test something like, well, in every case, that's more useful than testing
something like a POJO. And that's why when, when like blanket blanket statements, like you need to
have 80% code coverage or 90% or something like that, it's like, man, no, that doesn't get you
to the point
of what I think testing is supposed to be, which we've all talked about before, which is
the confidence to make a change. And I don't think any of what we just talked about does that.
All that does is say, Hey, we have a really high test code coverage number.
Yeah. I mean, I agree with all that. I can't say anything really extra other than it i think it's good to have a goal uh having it on be unreasonable
it's just demotivating but you know you got to pick something and it makes sense to pick
something high but the problem is is if you start going after like um
if you make an unreasonable requirement of like hey the test code coverage
has to be like 100 95 whatever 90 you know just something high you can game that you can
completely game that and you're not uh you know really getting the goal that you want you're just
and in fact what you as the manager
don't even realize that you're doing is you're actually encouraging your people to game the
system so that they can get to that number so that you can like check your box like and try
to convince your upper management like hey we are our code's perfect dude 100 test code coverage
and really like to alan's, it doesn't mean anything.
Like, so what?
You ran it through one test case out of an infinite number?
Like, no, you're not even like pushing, you don't even necessarily have to push it to the extremes.
I would rather, I would much rather have code that might not, that might have a lower test coverage percentage.
But what code is covered is thoroughly ran through its paces.
And it's crucial to your,
your,
your app,
your project,
whatever,
right?
Like make sure the,
the backbone of your code,
the thing that does the important work is thoroughly tested and is good.
That seems like the most important,
like when outlaws talking about like gaming it,
like we were talking about this the other day,
me and some coworkers,
like one of the ways people cheat this type stuff is they'll just put code
that they think shouldn't really even be tested in a try catch.
And then it's tested.
You could totally put the thing in there.
It could fail and you try to catch it and it's covered.
Like gaming the system sucks.
It doesn't help anybody.
So creating unrealistic targets also sucks because it, it encourages people to try and
figure out ways around it.
It is, it reminds me of passwords.
You guys remember when they were like, Oh, your password needs to – it has to change every time.
And so people were like, okay, this is ridiculous.
So instead of having a really strong password, people would just use the same password and put the month number at the end of it or something, right?
Yeah.
Don't give away all my secrets.
Right? When you enforce bad rules, then you basically make it to where people don't want to have to deal with it.
Right.
Yeah, I mean, like, we as a civilization, right, like, we're pretty good at problem solving.
Like, that's how we have survived, you know, thousands of years, right?
Uh, is figuring out how to survive and problem solve.
So if you put some obscene obstacle in our way, we'll figure a way around it. Right.
That's, that's the, that's the end of it.
Yeah, man.
So, um, but this is actually a pretty cool segue into my question that I have for you
guys, which is what's a technology that has
reignited excitement in you i guess i'll go first so you know a gpt is something i think is really
cool i've been playing around a little bit uh with it but there's also uh google bard there's
llama there's a couple other things um i i think that there's a lot of innovation space it's really
cool so like i started working on a little thing that would let me compare results across uh like bard and
not bard i don't have access to bard yet dang it but uh like gbt uh has api and uh i'll pack up
so i can just like have one prompt and kind of see what both you know do it's totally you know
kind of silly and doesn't really accomplish much but i'm just you know kind of experimenting and i think it's cool and also unity just game dev in general has
been really fun it's so different from what i do like day to day it's fun to make stuff like
you know jump up and spin around now before you answer alan do you think that joe got that answer
because he went to chat gpt and chat gpt said chat gpt was the thing i think so yeah it
sounded like that that's what it said i was supposed to do think about myself man that so
that's interesting i mean chat gpt and all the ai stuff out there that's coming to life now
has me interested and curious but i haven't touched it. Like I know Jay-Z is always messing
with it, right? Like he's the gift for secret Santa for, for outlaw was generated from an AI
thing from him. Like he's been messing with this stuff quite a bit. So, um, from the information
he's been sharing, like, I'm super curious, the thing that I've actually touched that ignites interest in me.
And I've always said this,
I love big data.
I love huge amounts of data.
So like streaming technology still to me are just,
I haven't gotten to mess with them as much as I want,
even though I gave a presentation on,
you know,
a couple of years back.
Um,
great.
Now I'm thinking my donuts way to go,
Alan,
right? Donuts. There we go. Um, but yeah, I mean, his presentation was on streaming donuts.
Yeah. Streaming donuts. Um, the challenges when you start thinking about unbounded sets of data
and how you have to do state and all that kind of stuff is really interesting to me. I mean,
there's sort of hard computer science-y problems to solve a lot of times.
And those are fun.
Those are interesting.
So I'd say that was probably the one that most has grabbed my interest over the past
several years and kept it, honestly, which is crazy.
That doesn't usually happen.
So I guess I'm behind the eight ball, you know,
compared to where you two guys have been here recently in our professional
lives only because just the way, like you taking,
talking about taking one for the team, right? Right.
Like I've definitely been on some you know, year,
you have two different like year long efforts that put me behind the eight ball and stuff so
there were like things that you guys were talking about i'm like looking at it like from the surface
and i'm like yeah that does look cool that does look really cool but i never had a chance to like
super dig in you know dive in and and like get uh you know like more than just a toe wet you know
what i mean and so this is why i say, uh, this is a great segue
cause you're talking about the test coverage and all that. So for me, it's been Kotlin here in the
last, uh, you know, several weeks and in the, in the segue there was cause you were talking about
pojos and all that. And I was like, Oh yeah, well Kotlin actually like makes it super clear. This
is a data class. Like, yeah, that's all I, that's all i all i expected this thing it's
literally named there's a keyword data boom it's a data class and if you try to do anything else
with it you know what's wrong with you um yeah there's just so many cool little like smart things
about it that i'm like i really i really uh you know that's that's like super well thought out like one i got a tip of
the week coming that i was like just super in love with like how clear and expressive it was like
what was happening there but uh but on the other hand though there's it's not like it's necessarily
perfect though because like the bang bang operator and cotland kind of like upset me because i'm like
wait this means something different in other languages and we've kind of like upset me because I'm like, wait, this means something different in other languages.
And we've kind of already agreed on like what this means.
Why are we, why are we changing the, this definition, you know, instead of the stuff.
Yeah.
Instead of it being like related to not knots or whatnot, not, not whatnot.
Hey, I just did that.
Um, that just happened.
But, uh, yeah, so I'm just just and also and i guess this is a segue into
my next comment here though too i think that part of the thing that has like made me super
in love with it and like just appreciative of it and you know, it's just, can we just say like, what a pleasure it is, you know,
like, like, uh, just to write in Colin, it truly is. Right. But going apart and going along with
that though, it's kind of in an old school, kind of like dopamine hit was like, when you do have
a question, right. Jetbrains documentation for Colin is, amazing it's outstanding it is awesome it's like
it's like back you remember back in the 90s when like the msdn documentation was the thing man like
nothing touched it right yes it was like if you had a question boom you know there you went right
and of course we all loaded the msdn documentation like on off the cd onto our computer or the floppies you know depending um yeah because it was that
awesome you know until it got all webified but uh you know i say that that's a segue in my next
comment because what is also frustrating is that from the beginning of time for Java, right, there was this concept of Java doc.
But the frustration in working in like a Java ecosystem is that where some projects and or developers or whatever will treat, will can think that, oh, well, we have Java doc.
So we have job,
we have documentation for our project.
Here you go.
And you're like,
that's no,
it's,
it's okay.
I see what you did there.
Like,
yeah,
you gave me a page that says,
here's the method name and here's the parameters.
This parameter is a string,
right?
Thanks.
Yeah.
I couldn't tell that before yeah no you really went
out of your way with that one why would i use that like when do i need to use that like right
you may be an example of like when and why and what oh it's so frustrating uh so so i i strongly
i have i have if any project where they like treat like oh, our Java doc is our documentation.
I'm like, I'm already antsy.
It better be really good Java doc then.
It never is.
It never is.
I've never seen good Java docs.
That goes on to my whole rant about Baildung or Baildung or whatever it is.
They are just a step
past java docs in most cases like you know they sort of lead you to what you sort of need but
they leave out all the import statements they lead out all the con leave out all the contacts like
you can't actually make anything work from their docs and it's like i give oh i mean the the the
kyle and documentation is such a pleasure because
like if you do have a question about something in a lot of their uh code examples there's a play
button you can actually you know experiment and execute the code right there in the browser and
be like well how does this work what is it what if i want to do this like what does it do and then
boom and there's a link to a playground if you needed to take it further.
Kotlin, for the win, it's got to be the best technology that's come out in one of the top technologies that's come out in recent years.
They're up there with the C Sharp documentation because.NET also went to that same whole thing, right?
Where if you had a question about code, they've got the stuff on the page.
They've got the Git snippets.
They've got all that stuff.
Did they put live examples with the play button? I haven't seen that lately.
They do, yeah.
Shows you how much C Sharp development I've done recently.
Yeah, I mean, Microsoft was always like top notch, right?
Like they were always tier one.
And Kotlin is right there with them,
which is shocking because you'd think Java would be as long as it's been
around and as,
as much time as they've had to get there and as popular as it is.
Yeah.
And you said it's crap.
The one thing that I do really appreciate about,
uh,
the current MSDN documentation that Microsoft provides is the GitHub link.
You find a problem.
Here's the,
here's the here's
the github repo go submit a pr you can fix that documentation or improve it or whatever you want
to do uh the kotlin documentation doesn't take it that that far but still i'm not gonna hold that
against them but yeah that's i mean the streaming stuff definitely i i mean how do you not like solving those kinds of problems? Right.
They're deaf. They're definitely a big, you know,
they're interesting, right? Like, I mean, the windowing, like if you've,
if you've never had to deal with,
with data coming in in some sort of stream versus a batch,
just look up windowing and your whole world will go,
oh, how do we, ooh.
I never thought about that.
Yeah, yeah.
How do I solve that?
It's just, it's really interesting problems.
I mean, any kind of problems at scale,
which is basically what you're, you know,
in a nutshell, you could kind of think of big data
streaming problems as like a way to solve data at scale.
Yep.
All scale problems are super interesting, right?
Who was it?
It wasn't Martin Fowler.
Who was the screaming code one?
I don't know.
Stack Overflow. Streaming code? No. The screaming. um code one uh i don't stack overflow uh streaming code no the screaming the the the um
oh my gosh he's like avatar he's like he's screaming like oh oh jeff atwood yeah i believe
it was jeff atwood yeah yeah that uh that had like an article about like all things are fast for small n.
Does that ring a bell with you guys?
So you're like, yeah, okay, who cares?
Like, whatever.
But when you can make something fast at the large scale,
that's when it's like, oh, super interesting,
which is what you're describing.
Yeah, totally.
That's exactly what it is.
But you know what?
Jay-Z definitely had right i should have
gone to chat gpt and asked to chat you it's so good you should have all done you said you have
a phone app you have uh i just go to the website on my phone but uh yeah like if you can't use it
at work like you can still get advice for it but like you know depending on your work policy and
like what their you know reasons are what they're trying to avoid uh yeah it's like still nice
sometimes to just just pull it up in your phone and be like how do i do this stupid excel
formula or like this function is deprecated what should i be using instead as long as it's before
like 2021 20 you know early 22 then you're good right yeah yeah i mean i do think i do agree with
you though joe like it is going to be interesting to see like, where does that take us?
You know, there's definitely like a lot of, uh, you know,
experts that are talking about like, you know,
ramifications and things like that. Like, what is this going to mean for us?
So there's definitely a lot of excitement there.
So that's why I was saying like,
I'm definitely behind the eight ball cause my dumb answer was Kotlin,
you know, meanwhile, you're picking something extremely topical.
No.
Cotland is great.
I am excited to see where do we go from here.
I don't know if I said this on this show,
but I think I
talked about this with family
or friends, I forget, but
there was a comment about
with things like chat
GPT, where you can like ask it, like in your example, like, hey, I want to write a function
that does X, Y, and Z, or I need a script that does blah, blah, blah, blah, blah, you know,
and then chat GPT will put it out and everything. And somebody made a reference or comment about
like, well, I wonder if like we're going to need developers or, you know, we're like,
is this going to be the end of developers or something to that kind of effect? Right. Which
that type of comment has come out before. Right. And, and my response was, well, I don't think
it's, it's, I don't think it's necessarily going to replace us. It's going to the industries that
it'll be. And it's not just developers, it could be like legal or whatever, right?
You know, the people that will succeed will be the ones that know how to use the tools.
Yes.
And ChatGPT is another tool at our disposal, right?
It'd be like if you're trying to fly the Enterprise and you don't know how to talk to the computer, right?
Yeah, I totally agree.
There's some things that it's terrible at, too, like things that you would would think like math you would think a computer would be good at math right and just other stuff
like you got to remember like this thing is not like a person that doesn't really have intents
it's a language model it's literally just stringing stuff together probabilistically
and it's easy to forget that so i think that the sooner you start kind of messing with it the better
you'll get at using it and i think that the people that do start are just going to have a head start on where tooling and stuff is going. Yeah.
Excellent. All right. Well, we'll have some links in the
resources we like section for all of this. But with that, we head into Alan's.
Oh, no. Oh, so in the resources we like,
we were talking about the Kotlin Playground, that kind of stuff. I went and just grabbed one example
of the Microsoft stuff where they have
something very similar to that,
where they have things that they're teaching you what to do.
And then they've got their little playground thing on the side.
But this is,
this is their learning thing.
This is a little bit different.
This isn't their documentation.
Their documentation has things in line,
like what you were talking about,
like run this code here or whatever.
But I couldn't find that as quick because I couldn't think of a method to go.
Yeah, that didn't count.
That's a learning thing.
That's not documentation.
But it's pretty good.
It's good.
Yeah, it's definitely good.
Yeah, absolutely.
So I'll find something else before these show notes go live, but yeah.
All right.
So with that, we head into Alan's favorite portion of the show.
It's the tip of the week.
Hey, you're kind of muted, Joe, so nobody...
More than kind of muted.
You were actually muted.
Yeah, sorry.
I usually don't, and I think I am.
But yeah, I decided to drink water right when I was...
Anyway, so I got two tips here.
One from Dave Follett.
Thanks, Dave.
Warp AI is a currently free, but won't't always be terminal for mac os that integrates uh
an ai i say and i ai because you have two choices you can run a local ai which means your stuff
isn't getting uploaded anywhere so none of your context and your files and your stuff is being
uploaded or you can do a cloud-based ai and uh i actually have installed it and i haven't been on
my personal laptop for a while i haven't
done any coding stuff so i haven't used it much but it does have several nice features uh like
that i've got uh i'll tell you in a second uh and sorry i'm getting ahead of myself yeah so
command prediction which is just what you might expect so it's like you know better than normal
intellisense it'll actually kind of help predict what what you're trying to do and fill in some stuff
with like tab autocompletion.
A quick error lookup,
which is really nice.
So imagine like you get an error code,
like when you run a bash command
or just, you know,
like you run a Python program
or something and you get some,
you know, like exit code,
NPE line 2005 error code ABC.
Then what they do is they give you a convenient shortcut for just
clicking on it and like not doing a google but actually uh you know doing some sort of like
ai kind of base recommendation for what you might need to do to correct that problem
um integrated search which is nice uh so you can actually search for you know recommendations with
things that are not ai based like you know stack overflow google type stuff which is
actually kind of crazy to think that like my terminal doesn't already have that i never really
thought to want that but now i kind of do because i really hate tabbing out of the context that i'm
in i want to stay there and of course it's got ai prompts so you can just kind of ask questions or
whatever and so that yeah that's warp ai it is mac os only
for the moment so it has to be pretty dang good to get me out of i term too but we'll see
it will be i got another one for you so this is a book called nature of code and this is uh thanks
to micro g for suggesting this code and what is it is um I don't, I guess I can say the word physics.
It's a book on kind of like the,
the type of physics stuff
you would be doing in games
or just visual programming.
So like the first chapter
is all about vectors,
adding vectors,
finding intersection,
you know, the points
where two vectors would meet,
finding, you know, parallel,
finding tangents,
just, you know, things things like that it's got chapters
on forces i don't know what oscillation means here but uh cellular automata fractals just kind
of like cool visual type stuff and uh it's at a low level so it's not really um you know like
starting with any specific i think it mostly does processing as a language but it's more about the
kind of the principles behind this stuff and how to integrate them with programming that's one
thing i noticed with like you know like physics 101 type stuff from like high school college or
whatever like you learn these formulas and then you go to kind of do them in programming it doesn't
translate super easily sometimes and so it's the way you kind of think about stuff when you're
doing it on pen and paper uh versus uh you you know, doing it in like a program language is different.
So it's kind of cool to have a book that bridges that gap between like kind of low-level physics-y type stuff and programming.
And the book is totally free, by the way.
You can order a physical copy if you want or like a print-on-demand type thing.
But the entire book is available just on the website. You know, I was going to say that they,
I was going to be disappointed that maybe like,
uh,
an opportunity had been missed,
but then when I go and look at it and I see that in fact,
uh,
the author,
Daniel Schiffman did in fact take advantage of the opportunity that I'm
thinking of.
And I super appreciate that this,
because there is a quote from captain over Roger,
Roger,
what's our vector Victor.
And,
uh,
yeah.
So thank you for throwing that in there,
Mr.
Schiffman.
That,
that means a lot to me.
Yep.
You know what's going on.
That's it for me.
All right.
So,
uh,
you know,
I mentioned kind of tease this earlier about,
uh,
Kotlin and,
uh,
thing.
So one of the examples of like something super expressive that I thought you could do with Kotlin that I was like, oh, what a pleasure.
So nice.
The map of feature in Kotlin where you can just literally like whatever your key is, the word to, and then whatever your value is.
So key to value done.
And you can have like a whole list of these things and it would create that map of it.
And where I needed this, where like, I was like, well, I don't really want to create,
you know, something complex for this, but I want to create just a simple JSON format of like these
key value kind of pairs. And, you know, there's
going to be multiples of these and I need it in a JSON format. And so Google has a JSON library
and you can say to JSON of some thing, some object type, right? And it'll automatically
return back a JSON representation of it. And one of the things that you could pass in was the map.
And in Kotlin, it just was so easy to get just a nice, simple JSON representation of
this thing using something like JSON.toJSON, parentheses, map of key to value.
And, you know, repeat however many keys and values you have but
that's just i love where we're at i love where we're at can we just say that it is nice when
you get a little bit further you'll see to build lists oh yeah they have list of, but they take it like to a computer sciencey next step to where you'll have
list of or mutable list of.
So you'll know whether or not you have something that can change or not.
Right.
So they're,
they're introducing some of the tech terminology into the things that you do.
Well,
that was one of the things that like threw me for a loop in the beginning too
with Kotlin that I was like,
why in the world did they change this?
Like, because like when you declare a variable, right?
Like, let's go back to old school way, right?
You know, long time ago, you wanted to declare an int, you'd say int i equals zero, right?
And if i was going to be a constant, then it'd be like const int i equals zero, right?
And then, you know, languages evolve.
For example, C sharp comes along and they're like, hey, you know what?
If we can, if we can derive the type, you don't need to tell us.
Just var the type and we'll figure it out.
So var i equals zero and implicitly we figured out that it's an int, right?
Based on how you're using it right um
and but then in kotlin it was like well val i equals zero and we'll figure out what the type is
or you know you could do val no i guess it would be technically oh yeah and i had it right or or
you could also do like val uh i colon int equal zero if you wanted to but then there was
also var i colon int equal or colon int i equal zero you're like well wait a minute val versus
var like why why it's so weird because like everywhere else is var and then majority of the
time in kotlin you want it to be val and what took me
like a minute i never read this so i don't know if this was i assume this is their rationale for it
but i got to thinking because like in in kotlin to your point alan val was something that's constant
it's not going to change you can't change it right and but var is changeable and i'm like
i hated it in the beginning i was like what a stupid subtlety. It's only one letter difference. That's not even the first letter of the word. So you really got to be paying attention to catch that. But then what I grew to appreciate is I'm like, well, you're really being expressed like totally expressive because in my mind, VAL is this is a value and a value can't
possibly change it is the value period but if it's variable it's a var and a variable by definition
can vary and so that's the that's the thing and and like i said i i don't i didn't bother to read
it so like i'm sure that like other are like, yeah, of course, dummy.
Of course, that's what it was.
But it just kind of dawned on me one day, and I'm like, oh, that's so clever.
Those little nuances are why Kotlin is probably tied for first with C Sharp in my love a language is because they've made it very explicit
for you to express what you want to do. Right. So the vowel versus var, right. The vowel can
actually save you. If you try and reassign it, it'll throw an error. It's like, no, you can't
do that. Oh, okay, cool. I didn't really want to override that. It's build time. It throws the
build time. Like it's a red squiggle as soon as you do it. Like you immediately know.
And the same thing with the nulls, right?
Like I think every language out there, if they could go back in time,
the nulls would like be, no, you have to really choose to want this to be nullable.
And that's what Kotlin forces you to do.
Yeah, you got to super like sign up to be like this variable can be nullable
or this reference type can be nullable.
So it actually saves you in a lot of cases and that's why it's fun. So continuing with the
Kotlin stuff then. Um, so outlaw asked a question the other day about the bank bank to his point,
like it's different in every language, right in most languages it means um truthy right um
is this sort of true or is this you're like double nodding an operation so you're saying like
is you know is the variable true now is it not true is it not not true right so is it and it's
called truthy because it's like basically basically you're just testing sort of,
is this thing a number? Is this thing a whatever? Well, in Kotlin, that's not what it means. In
Kotlin, it means, um, I have a variable. If I put bang bang at the end of the variable, it says,
Hey, this is not allowed to be null. If it's null, it's going to throw an exception. Um,
and it allows you to do things like if you had a person class and you tried to grab the age from that person, if the person object is null, then you can't get the age, right?
So what you do is you say my person bang bang dot age.
And so that's basically saying, hey, that person value can't be null.
So go ahead and get the age from it. Well, Outlaw, there was some bit of documentation on the Kotlin thing that was like, hey, we
convert this.
And when they say convert, it's unclear whether or not they're making a copy of the object
and doing something with it or whatever.
So he asked the question, and I was like, no, I don't think so.
I don't think it's making
a copy but if you said you were going to convert an int to a string you would assume that like oh
it's a new thing right you're going to make a copy of it and cast it or something right
so so he said that and he just kept kicking around in the back of my head and i was like you know
what that you can look at the bytecode and he's like oh that's lame nobody wants to look at byte code and i would agree i would agree
except for the fact that intelliJ makes it so easy so you can actually write code some kotlin code
you can you can basically go up to an intelliJ tools, Kotlin and show bytecode. And so your code, your Kotlin code,
you can highlight the chunk that you actually want to see the bytecode of, and it will highlight it
over in the bytecode section. And so it was super valuable. So it turns out it does copy something.
It copies a pointer in the stack to whatever that object was, but then it just does an assert, not null.
And if it's not, then it just typecasts it.
So it's not actually copying the value.
It is copying a pointer to it.
Not exactly sure why it does that, but it is interesting that you have such quick access to be able to see, Hey, is this doing something nasty behind the scenes? So,
um, you know, if you're doing Kotlin or anything, and I'm sure that they probably
intelligent more than likely has something like that for Java as well. Hey, show me the
bytecode for the Java. And then you can go see what the actual compiler is putting together. So,
um, really, really cool stuff. And then I have to call out that micro G went behind the scenes
with several of us and pointed out this book.
Because, yeah, he cheated on us, man.
Yeah, that's right.
So, yeah, the nature of code thing, I was like, hey, that's going to be a tip of the week.
And then I saw Joe's up there and I thought it was funny.
So I had to point it out.
So it's going to be in there twice.
All right.
All righty well uh with tips that are so good we say them twice you can subscribe to
us on itunes stitchify wherever you like to find your podcasts uh be sure to leave us a review
like i said uh if you haven't already you can find some helpful links at codingbox.net slash review
hey and while you're up there make sure you check out our show notes we have lots of good stuff up there um join in on the discussion more and make sure you go check out our slack channel
we have a lot of amazing people up there so you can go to codingblocks.net slash slack if you want
to um get signed in over there all right and make sure to follow us on twitter at coding blocks or
hey give at jack a little nudge on blue sky to to hurry up our invite there. And if you go to
CodingBlocks.net, if you ever get that set up, you can find
a link to that and all our other social stuff at the top of the
page. Sounds good.