This video tutorial covers Go programming fundamentals through practical exercises, including variable declaration with the walrus operator, type conversions, string formatting with fmt.Printf, control flow with if statements and switch cases, struct definitions and memory layout optimization, interface implementation, closures, and type assertions. The instructor demonstrates real-world coding challenges while discussing software engineering philosophy, emphasizing that hands-on coding experience is essential for developing genuine architectural knowledge and testing skills that cannot be replaced by AI tools.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
Code + Coffee + Chat: Learn Go with boot.dev
Added:Did we just become best friends?
>> Hey, David Jones, thanks for the sub, man. That's super nice.
Oh no, my coffee camera's upside down.
Hold on one sec.
Good morning. Good morning. Hello, Cyberlanca.
Hello, Tar. Tarfi.
Tarfi. I think I said your name right.
I'm sorry if I butcher your name ever.
It's never my intention.
All right, we're back and we're officially moving on.
We are on to the next one in boot.dev.
Excuse me. Oh my goodness. Good morning, Kale. Thank you for being a member.
Appreciate it. NFC this week. It is NFC this week. Um, at least we've accomplished what we set out to accomplish and now it's time to uh to move on because the re the real goal is to become an arch mage. That's the real goal. So, we're at level 67.
So, we've got uh what is that? 40. No, 33 more levels to go.
So now we get to return to a familiar language and that is go.
So this should be fun.
Nice. Nice. Finally fix your jelly fin.
I like it. I like it.
I've always wanted to do something like a media. Excuse me. I've always wanted to do something like a media server, but I don't have any media, you know? It's like the fun part would be setting up the media server. The unfun part would be populating the media server.
You can rip your CDs. You just can't share them. Man, I have I have this many CDs. I have this many CDs, which is kind of crazy because I I grew up I grew up in a time where that was how you listen to to music, you know, but I I was never a CD kid. I got my first iPod uh I got my first iPod when I was like 11 or 12. It was like right when I started going to the gym regularly.
It was the very first one. was like the very first electronic that I saved up and bought myself.
I was like 11 or 12. When did this come out?
Um, iPod Shuffle first. My Now my wife, my wife, when I met my wife, I was 15.
She was 17. When I met my wife, she had a pretty big collection of CDs. Where those have all gone, I have no idea.
It was introduced in 2005. Wow. 2005.
My dad had My dad had ripped a bunch of CDs, though. We had a pretty big iTunes library at home.
Let's see. I would have been Yeah, I'd have been 12. So, 2005, I would have been 12 years old. That's crazy, man. My kid is almost 12 years old.
[ __ ] goes by too fast.
There's Linux ISOs around. What are Linux is? What do you mean Linux ISOs?
Like ISOs that have media?
Yeah, I would I would love to have a a media server like that. It's just it's just the work of populating it, getting all the getting all the media and Oh, it's a joke for sailing the seven.
Okay, that went over my head.
That went over my head. I don't know.
I'm c I'm super riskadverse. So any idea of doing anything that could potentially land me in trouble with the law, see I get super I get super nervous about it.
All right, here we go. Welcome. Or let's actually let's start our potion.
Activate potion.
Let's also set a timer so I remember to restart the the potion.
Uh let's see. This needs to become 60.
It may land my VPN VPN VPN provider in trouble. I don't I I think it'll be fine. I think it'll be fine.
You know, I mean, I've seen I've seen some people's media libraries online.
It's really impressive. I mean it I do kind of kick myself because like I said my wife had a pretty big CD collection.
We had a pretty big DVD collection. Like now thinking back, we we got rid of a lot of that stuff because we just thought that was, you know, that was a world that was no longer relevant, you know, and now now I think gosh, man, if I had known then kind of what I know now about self-hosting, God, I could have I probably could have ripped myself a a lot of a lot of content. Probably ditched some streaming services by now.
My dad had like 10 terabytes of old movies. Oh man, that's painful. Oh, that's painful.
All right, I'm just going to probably I'm probably just going to go straight to the assignment for this course because I feel pretty um pretty comfortable with go.
Set the username variable to the value Eddie Kitt. Then submit the code.
Sad variable declaration. H happy variable. No, goated variable declaration.
The wallrous operator. Oh, is that what people call this? I don't think I don't think I knew that's what people referred to this as.
Um, the wallrous operator declares a new variable, assigns a value to it, one line. Yes, we love the wall. Walrus operator.
Hey, what's up average person? Yo, Stephen, any way you could review my small Python project git repo? Sure.
Yeah, if you if you don't mind dropping your link in the uh projects channel in my Discord, I'd be happy to take a take a peek at it.
I don't typically do anything like that on stream just because then it kind of gets out of it's gets out of hand because then I feel bad that I'm not reviewing everybody's project that they asked me to look at, you know, and then and then I don't get then I don't get anything done while I'm streaming. But I'm happy to always happy to take a peek at someone else's code. Not even to necessarily criticize it. I just like to see how other people uh write code ando approach problems, you know? just I feel like there's always something I can take away from from reading somebody else's stuff.
That does look like a walrus.
I always I always laugh because I feel like I feel like go is like one character character away from a penis emoji.
You know what I mean?
I was like, "Throw an arrow on the end of it or a greater than sign on the end of it."
There there's some there's some phallicness to it.
Sick message start should be happy birthday.
You are now uh let's see create an age.
You are now 21.
And message years old.
Oh man. We go. So we go from a language that has no semicolons to a language with semicolons to language with no semicolons.
God, they really they're really putting us through the ringer.
I think there might already be a space there.
Can't tell.
Yeah.
How did I get that wrong? Happy birth.
Happy birthday. You are now 21 years old.
This should be capital S.
There we go.
Oh, the other thing I was going to do for this course that I feel like is I should have done for C is I find it's super helpful to have my own little local playground environment when I get stuck.
Let me set that up real quick.
I hate when I just don't read and lose armor, dude. It's the worst. especially on like stupid little, you know, knickk knacky, you know, not stuff that's actually challenging.
Let's see. Let's removede playground.
Sorry, foods.
I always skip not somehow. Yeah, Dota, I see you watched my Kent Beck interview.
I did. It was great. Thank you very much for that recommendation.
It was good. Also met as ultra toxic.
Yeah, I had I so I personally find the story sometimes I find the story of people the people behind a lot of the ideas and technologies and stuff. I I find the biographies of people like very fascinating. I I love it. That's I think that's why I love those Colt repo documentaries so much is because they tell the stories of all the people behind all these projects that I that I admire and and enjoy and get to use every day. And I think the my favorite part about that whole interview was the part that you talked about the yesterday too with basically where he essentially burned out and sort of like retired from being a software engineer for like a decade. Um, and I had no idea that he went back and he he had worked at Meta.
He worked at Meta for quite a while. And he did it cuz he needed money to pay for his kids' tuitions. And I had I had no idea about all that. So that was very and and the things that people believe and say around and think around programming and coding. And to find out that he literally took like a decade away from his field and still today is a is relevant is is I think it's just a testament to the fact that the stuff you think that matters and the stuff that you think is so important right now it's it's just really not like this. The whole idea of FOMO is just completely contrived um in our heads and we should really be focused on just getting better, right? And enjoying our work and enjoying getting better at our skills, building lives that we that we love and enjoy that bring us peace and not a lot of stress.
Yeah, it was good. It was good pers. It was very good perspective, you know, perspective setting.
Hello, Danny. Good morning. Nice to see you. Yeah. And and and a divorce. Yeah.
All those all of these things that like I'm sure TDD didn't matter much when he was dealing with all that, you know.
I wonder if they made him go through the standard tech hiring process. I wouldn't imagine that guy going through a DP problem in 30 minutes. I mean, he seems like he's a very very good programmer, you know, so I I doubt if they did put him through the hiring process that it was much of a difficult thing for him anyways, you know.
I liked his AI take. I constantly say no one knows how to use AI properly. Him agreeing was validating. Yeah, everything he said about AI was very validating. Um, but I I think that's because he has like he said he I mean just hearing like when he got into programming and and hearing about like when he started pro when he started programming like silicon was barely a thing. You know what I mean? So he has such a long her such a longterm perspective on all this stuff, right? That's like it's it's very good to we need to hear more people like that, right? We need to hear we need to hear more from people like like Kent Beck, like Eric Gamma, um Bjorn's Storeup, the guy that uh invented or created C++. Like we need to hear more from these guys that are, you know, 40, 50, 60 years into this, right?
and just they're very tempered, right?
They like they understand that things change, things move fast. What matters today doesn't matter in five or 10 years. What you think you have figured out today, you realize you don't have it in a decade.
Uh there's just there's too much of the tech community that's being animated by tech Twitter instead of being animated by by people like that, by by veterans like that. You know, we we could we could stand to have more of more of those people in our in our like in our uh media diet, right? Media consumption, Danny. I'm sure you will surf your way easily through the course here. I hope so. I feel comfortable with Go and I like it. You know, it's I haven't written a ton of it in the last 6 weeks, but I'm hoping it comes back to me pretty quickly.
The Xerox and Chrysler were such industry forming companies as well, so it makes sense he was involved in those.
Yeah. Whenever he went after Xerox, which FYI, invented the personal computer before the PC was popularized.
I mean, it Yeah. It was just it was wild, right, to have somebody who he he really he's really been there for all of it. Been there, done that, and seen it.
I think the I think the best piece of advice I took away from his his whole um I think from his whole interview was there was a piece in the interview where he talks about how he knew he was ready to move on from that first company he he he worked at as a programmer. And I thought that was a very just the way he described it about, you know, when you're when you're growing or changing or evolving maybe faster than your company can reward you reward you for.
And when you start to realize that like how you see yourself differs from maybe how the company or how your peers see you. And once that delta grows to a certain value, right, once that that difference in perspective gets to a certain place, it kind of becomes a mandatory you need to move on type of situation. And I thought that was such a it was just such a good piece of self-awareness and perspective because I think a lot of us find our especially if you're kind of an an ambitious or aspirational person is you can find yourself in positions where you really have put in a lot of work and you really have grown your skill set a lot but you're and and you're just kind of frustrated all the time because you feel like you're not getting recognized. as you're not getting the opportunities or you're not and I think to some extent that's actually our own fault because we should have probably at some point taken inventory and recognized the signal from the noise and said you know what I've kind of outgrown this or I've outgrown this this place and I have grown apart right we we've we've diverged so much that it's time for me to move on to whatever the next thing is instead of trying to make the current thing conform to who I am, right? Um, I thought that was a I thought that was a really wise like piece of advice. It rang really true for me personally.
All right, let's add a funk main and we want to import uh what is print line in also. Where's all my Where's all my go stuff?
Why is it not working?
Uh, it's almost like my theme isn't loaded or something.
Yeah. Huh, that was weird.
Expected package. Oh, package main expected indent found import.
Oh, it's just being slow.
Okay, now we have a nice little playground where we can.
If we need to get out of the browser, we can. I kind of found I kind of find the browser a little stifling, if that makes any sense. Whenever I get stuck, I kind of feel like I need to be able to do my own things outside the browser.
Okay, so critical bug. Text IO users reported that we're building them for wildly inaccurate amounts. They're supposed to be build 02 for each text message sent without changing any of the other lines. Fix the math bug in the total cost calculation.
Okay, so we are doing Doris spent 72.02 on text message today.
Numb messages.
Okay. So, we have a float here.
I think this can be fixed by doing a little bit of that.
No.
What's the bug here?
Mismatch types. We have float 64 and int.
Okay. So why is float plus a float resulting in concatenation?
This one has me stumped.
This one has me stumped.
Oh, it's not concatenation. It's addition. I'm such an idiot.
That was a That was way That was way easier than when I was making it. I was like, is there something wrong with the type system? What what the was way easier.
Go. Okay, let's just let's lock in here.
Let's wake up. Let's go. Get the let out.
I see that's not the way to go. Go back and you'll see.
We're We are going on because we've already see uh the past.
Uh I'm not as good good at puns as you are.
Let's see. Co has two style comments.
The new intern on the team screwed up their documentation comment. Fix the issue.
Uh let's see. We need to add that there.
We've seen what you got.
Goat.
We've seen what you goat.
Okay. Go program structure. We'll go over all this in later in more detail, but to state to state your curiosity, package main lets go compiler know that we want this code to compile and run as a standalone program. has to as opposed to being a library that's imported by other programs.
Import format imports the format package. It allows you to use format print line function main defines the main function. Uh generally two kinds of errors. Assignment run the code. Notice the compilation error is due to invalid syntax. Fix the compilation error.
Yeah, I think I'm going to just kind of I'm going to probably speedrun this. So, if you guys want me to slow down or you want me to do anything different, um, let me know. But, I'm probably going to speedrun this.
Go Code generally runs faster than interpreted languages and compiles uh, faster than other compiled languages. I'm going to say faster.
Go programs don't run quite as fast as it's okay. So it run generally runs slower but compiles faster.
What?
So faster and faster.
No, no, no. Go as fast as you can.
What's the size represents that how many bits in memory will be used to store the variable. The default int and types refer to their respective 32 or 64-bit sizes depending on the environment of the user. The standard types that should be used unless you have a specific performance need intu float 64 complex 28. Converting between types. Some types can be easily converted like this casting a float to an integer and this way truncates the floating point uh portion. On line seven, create an account age int variable and assign it to the value account age float truncated to an integer.
Account age int here cast account age float run.
When should you elect to not use a default type? When performance and memory are primary concern.
What does the size of a type indicate?
Um, bits text.io uses basic basic authentication to log users in. The code on the right has a type error. Change the assignment statement on line 7 to use a string value for password instead of an integer. But don't use a different password so that it can be concatenated with the user's variable.
Yesterday I recon old game I was playing called Soldat. Uh and I wondered in what lang was written. It was Deli and man Pascal Deli those reels. So I I don't know anything about Pascal or Pascal Deli all other than uh Andrew Halsberg was involved in those in some way shape or form of that's all I know about it.
Angel script. I've never heard of that either.
And what the hell is I Yeah, there's so many programming language. It blows my mind cuz I I learn about another one it seems like every month that I've never heard of before.
Angel script is scripty C++ and it's even used modern games and Unreal Engine. I know nothing about the games industry, you know, nothing at all.
Oh yeah.
question. Generally speaking, which language uses the most memory?
I guess Java. Just going based off the information they've provided.
What's one of the purposes of the Go runtime? to style Go code. Make it easier to read. To scare off JavaScript developers, to clean up unused memory, to compile Go code, not knowing VSYNC was the tell. Yeah.
Yeah. I mean, I've the thing is like I've definitely heard of VSync, right?
But like I did I've never I don't know what that looks like applied to code.
You know what I mean?
I love playing video games, but I I know absolutely nothing about making them or building them.
Complete the code to remove the bug and create the constant basic plan name.
I've been thinking about maybe streaming games. I think it might be fun to stream some games in the evening a couple times a week. I think that'd be fun. Kind of had the itch lately to do that.
Uh, let's see. Yeah, neither do I. I don't know how to build VSync other than it would cat frames dynamically. Yeah, I have I have no like I have no idea how what VSYNC does for me as a user and I have no idea how to build it. I just know it's a thing. You know what I mean?
You know those words that you hear people say and you're like, "Oh yeah, I've heard someone talk about that." You know, Golang part two basically. Good to see you. Just terminal. Basically, um, we are that we're going to speedrun this a little bit cuz yeah, it's it's this is definitely we're definitely revisiting, right? A bunch of information from what was it like fall of last year. So, we're going to get a bunch of free XP.
Rising Java devs.
I feel like I feel like Java devs get a really unfair amount of [ __ ] You know what I mean? I feel like people just love to beat the hell out of Java. And people who love Java, you know, someone out there is going to be like, "Well, it's deserved.
Let's see. Complete the code using a computed constant to print the number of seconds in an hour.
So, we're going to do 60 or we're going to do seconds time seconds in hour.
Undefined. Sec Oh, whoops. Set minutes in hour. Sorry. minutes an hour.
They worked for that. Remember who RZNet devs?
I I I mean I just think people like to dunk. People just like to dunk on net and Java because they are kind of legacy. They're they're not they don't have a cool kid shine to them. You know what I mean?
And in general, I think people just like to dunk on other people, which I I've never really understood understood myself, but see, vertical seek is just a fancy name for locking games uh hertz to monitor output hertz. Ah, well, that's a nice that's a nice feature.
I've never had really nice gaming stuff.
So, I've always just gamed on an Xbox and I've always just used whatever monitor I had at the time, you know?
I've never really had like a real fancy gaming setup.
VC look VSYNC looks like Wait, wait, wait, wait, wait. Okay, now it's in frame. Just waiting for the monitor to enter the slight pause uh after each frame is drawn to push the buffer.
Interesting. I'm guessing it's really complex. I'm guessing it's pretty complex in implementation, but conceptually I can understand that sync comparing go speed.
Does Go generally execute faster than Rust?
No.
Let's see. Create a new variable called message on line 11. Use the appropriate formatting function to return a string that contains the following. Okay, let's go ahead and get the message.
Let's see. Complete the count calls decorator. It should wrap any function count.
Many times that wrapped function has been called. Still return the wrap functions normal result.
Uh no thank you. I'm writing go right now, not Python.
Uh, sprint F.
Oh, sorry about that. Yeah, I I don't know what to do about the uh damn internet connection.
I I do apologize and I and I totally understand if that bothers people to the point of just saying, "Hey, I'm going to go do something else."
I will not hold it against you at all.
So the message should say hi something name your open rate is open rate. So we have percent new law. So we do name open rate and we want percent s here right float is percent f integer is percent d string is percent s v prints any default format it can be used as a catch all so we want percent d here and percent s there.
Oh, yep. Message is undefined.
Hi, Salt Goodman. You're open. Okay, I've got an extra space there.
We have a float here. That should be sh Should it be F.1?
Nope.
Percent.
There we go. I think that looks right.
Hi.
Hi, Saul Goodman.
My comma is in the wrong place.
Your open rate is 30.5%.
New line success.
New project idea. OBS plugin to scream at you when while your internet is dropping packets to Twitch. That's not a bad idea. It sounds kind of difficult, but that's not a bad idea.
Run the code as is. Notice that the simple string boots has five bytes and five runes. Update the name constant to be bear emoji instead of word boots.
Okay, let's go ahead and copy that. update the name.
What was the what were they trying to drive home there?
There are two main takeaways. When you need to work with individual characters in a string, you should use the rune type. It breaks strings up into their individual characters. We can include a wide variety of unic code characters in our strings.
Okay, that's good to know.
This code that prints server logs won't even compile. Fix the bugs.
Unexpected name test at the end of statement. New line in string should be here.
text message untyped string constant as int value in variable declaration declared and not used confirm.
So this should be confirmed success.
OBS plugins are usually written in C++ but they provide the template on GitHub and has decent documentation. Oh, nice.
Well, I don't you the only bad thing about that is I don't use OBS to stream.
I use Mel uh application called Melt Studio is what I currently use and I don't know C++. So I guess I have I I guess if I was going to write that plugin I'd have to switch to OBS and then I'd have to learn C++.
Someone doesn't know about walruses.
Pitiful. Fix bugs on line six to seven.
How many gems do I have?
And I have a lot of gems.
I don't even know what to use them on.
I guess I should buy these. I don't know. I I don't really even need to buy frozen flames. I mean, I stream every day, so I don't know what to use my gems on. Someone doesn't know about walruses.
Oh, we already did that one.
See, edit the pennies protects declaration so that it's inferred by the compiler as a float 64.
Um, so we do float 64 or float or I can do float 64 with a cast. Is that what they want?
See what is that what they wanted?
Oh, nope. They wanted a decimal point.
You've been asked to improve the logs to include information about individual users and their recent messages. Create a user log variable on line 15. It should contain this where fame, lame, age, message rate is subscribed and message coron correspond to the variables above.
Message rate should be rounded to the 10th's place.
Okay.
user log equals format.sprintf.
Let's just go ahead and pass the variables in in the right order. So we have fname, ln name, age, message, rate, we have is subscribed and we have message.
And then the formatted string is going to be um percent s percent s comma age percent d rate is going to be uh percent 1. F right dot at1f then we have is subscribed which if you're not subscribed click that subscribe button see that see that smooth segway so natural uh let's see percent S or yes. Percent V.
Uh, message S. I don't know. What would you paint here? Percent S, I guess. Percent S.
Percent V.
Let's see. Dylan Dylan Colon, age 45, rate is 0.5, is subscribed.
Uh, it wants to go to the 10 place. So that's two decimals, right?
Um, that is not correct.
Message. Sometimes a hypocrite is nothing more than a man in the process of changing.
Oh, okay. What did I screw up?
I think I had this right, didn't I?
Originally.
H no.
Oh no.
age 45 rate is subscribed message.
Ah crap, it was scrolled. I sorry I didn't see the freaking Damn it.
There we go.
If statements in Go do not use parentheses around the condition. Else if and else are supported as you might expect. Fix the bug on line 12. If message length is less than or equal to the max message length, the program should print message sent. else it should print message not sent.
Uh if message length is less than or equal to max message length An if conditional can have an initial statement. The variables created in the initial statement are only defined within the scope of the if else if else block.
Why should I why would I use this? It has two valuable purposes. It's a bit shorter.
This go is interesting. Oh, really?
What's interesting about it? The way they're teaching it is interesting.
Let's see. Instead of writing this, we can write this.
Okay. Why would you use the initial section section of an if statement which is valid go syntax?
This I was reading about speed on the backend side. Ah.
Okay. Pro cost should be.
So we want to do case row return 20 20 z and case enterprise should be returned 50.0 PHP is faster. Really? That's crazy. I would not have guessed that.
Yeah, I would not have guessed that at all.
So, using the given variables, write conditional statements to calculate and update the variables. set final cost to the bulk bulk message cost.
Okay, so final cost equals bulk message cost.
If the user is a premium user, apply the discount rate to the final cost. So if user if is premium user then we want to do discount rate 0.10 I don't even know if this is an operator. I question now all every language I write I question everything I know.
So we would do times 90.
If the user has enough money in their account balance, deduct the final cost from their account balance. So if um account balance is greater than or equal to final cost then we are going to say account balance minus final cost uh format dot print line percent s purchase success message return otherwise we are going to say format print line percent s insufficient fund Message percent s purchase successful.
Oh, print f.
Oh goodness.
Okay. What did I mess up here?
Oh, whoops. I should do final cost multiplied by discount rate uh one sorry one minus discount rate what have I done let's see bulk set final cost equal to bulk message cost. If user is premium, apply the discount rate.
Um, if user has enough money in their account balance, uh, print the purchase message. Print this message. Is it the new line? I'm pretty sure I've written this correctly.
Okay. Now, now we print nothing.
What?
Yo, help me. I take that back. I saw old PHP versions versus Go. Go is faster.
Yeah. I I would have intuitively I would have picked Go.
Yeah.
Yeah, but when I use Okay.
Nothing looks off to me, man.
Nothing looks off to me.
Oh, sorry.
Sorry.
That was a silly one.
Oh my gosh, bro.
It's early in the morning.
See you again, guys. Have a good day.
Appreciate you hanging around the streams.
We often will need to manipulate strings in your messaging app. For example, adding some personalization by a customer's name within a template. The concat function should take two strings and mash them together. Hello world equals hello world. Fix the function signature of concat to reflect its be its behavior.
Fix the what the function signature.
Oh crap.
Which side do the types go on?
right side.
Multiple parameters. When multiple arguments are of the same type and are next to each other in the function signature, the type only needs to be declared after the last argument. Which of the following is the shortest and clearest way to write a valid function?
Not that one.
Um, not that one.
Not that one.
So, first name string, last name string, age int.
Oh, no, probably this one. Sorry. Yeah, that one.
Oh, we're talking about unit tests. I'm so proud.
Complete the get monthly price function.
accepts a tier as input and returns the monthly price for that tier in pennies.
Excuse me. Here are the pennies and dollars. Convert the prices from dollars to pennies. If the given tier doesn't match any of the above, return zero penny.
So, this is where we'll do a switch and we'll switch on tier. We'll set a default of I guess zero.
Oh yeah, that's how Go formats case statements have basic premium which is 150. 50.
We have enterprise which is 500.
I tell you what, that enterprise pricing that'll break your bank account, won't it?
Let's see. Three failed. Expecting this actual 100 Oh, so I'll make a constant uh const pennies and dollar equals 100 and then I'll say syntax error expected this uh unexpected walrus. Oh, cuz we're declaring a constant success.
Developers often why under often wonder why the declaration syntax in Go is different from the traditional established in the C family of languages.
Interestingly, this interestingly is very a very sarcastic interestingly.
Oh, time for a break.
Actually, it's time to activate another potion.
What are we talking about when we discuss declaration syntax? The style languages use to create new variables.
Which languages declaration syntax reads like English from left to right?
Uh, I guess go.
What is f? A function named f that takes an int. No, a function named f that takes a function as the argument uh and returns an int.
A function f that takes a function and an int as an arguments.
A function f that takes a function and an int.
Returns a function.
My phone ran out. Who new old Mac OS Safari doesn't load comment section? Oh, that's lame.
Also kind of surprising, but but also kind of lame. I don't know. Safar Safari as a browser is just one of those things that it's like, does Apple really care, you know? I mean, should they really be building a browser? you know, cuz it seems like they're always lagging.
They're always lagging the other browsers in terms of API implementation and things that are supported. And I just wonder like maybe and just hear me out, maybe don't build a browser if you don't really care about it, you know?
Let's see. Passing variables by value.
Variables in Go are passed by value except for a few data types that we haven't covered yet.
Fix the bug in the monthly bill increase and get bill for month functions. Uh looks like whoever wrote the functions didn't know that get bill for month functions bill parameter would be passed by value. It's not actually updating the last month bill and the this month bill variables as intended.
So monthly bill increase isn't returning the right result. Change get bill month.
So it only takes two parameters and get rid of bill. Instead, simply return the total cost of the messages.
Monthly bill should use the result of calling to calculate the increase between months.
I think that sounds like a lovely idea.
What is it that How do you delete V I W?
No.
V D I V I D. How do you delete an entire word that you're inside of? Them motions. Delete word curser on back to the phone.
See in old VI B moves the cursor move after end of the word or delete after cursor.
D I W D I W Where are we? Here. Come back. There we go.
V V DW V DW. No, that doesn't seem to do it for me.
D IW seems to do it for me.
Just DW DW. So that deletes the character, right? DW or no, DW deletes the word or to the end of the word. So if you're at the beginning, you ws all of it. But if I'm if I'm inside then I have to do DIW.
I find myself I think commonly with my cursor on something.
How about How about deleting from?
How about deleting from delete inside word to beginning of next word.
I'm trying to take an effort to to take time to try to invest more in my vimfu.
See, delete the character under the cursor.
Delete the current line. There we go. D I W. Delete inner word within word boundary. Change inner word.
Delete around parenthesis.
Delete inner single quotes delete around a paragraph.
Delete jumperase inner word.
I guess there's not really a way to do it.
It's a good This is a good cheat sheet.
Whoever put this together.
Hey, network bib. Good to see you. I'm doing well. Trad coding. We are indeed trad coding.
#trad coding.
What is trad coding is just a funny way to say well now because now because we have LLMs we live in this weird weird world where you have to delineate between whether you're using AI to write code or you're not using AI to write code which is kind of dumb. I think that's eventually going to go away. I think it's eventually just going to be a thing like where we're writing code again. And I think eventually we're going to go back to a place where we're just writing code and nobody's asking about how much AI you're using or when you're using AI. It's just that's just another tool just like you have an editor, just like you have a shell. Eventually, it's going to become that way. But right now, we're in this place where we have two competing camps of ideas that represent I think they represent less to do with AI. They represent more to do with philosophical and deeply held values around what it means to be an engineer and what it means to be a good engineer and uh PE about caring about a craft right and because of that now we've come up with these really funny words to describe the two things we have trad coding and we have vibe coding vibe coding refers to people who like to use AI to generate code. Trad coding refers to people who still write code by putting their fingers on a keyboard and pressing keys down essentially.
Um, and eventually those term terms of art will will go by the wayside, but for now it's a thing.
I I I do I stand by that though. I think it's I think it's a very funny thing because if you look at it from the superficial level, the trad coding versus vibe coding debate is framed around this AI opinion. But I think it's deeper than I don't think it's a I don't think it's really about opinions about AI. I think it's opinions about how you accomplish developing software and the level of care and attention that goes into it.
I don't think it's so much about whether you're using AI or not using AI or at least I don't I don't think that's the real thing contention, right? I think it's a proxy. There's there's a there's a deeper underlying um values values difference.
Or maybe maybe it's even more people who care about the software versus people who just care about getting to the end result, right?
Hey, what's up, Victor? Nice to see you, man. Did you see the product OpenAI released called Codeex Micro? It is just a very expensive micro pad for using multiple agents in codecs. So, not even using a normal keyboard. I saw that.
It's It's basically like a um like a stream deck. Like I've seen people wire up their stream decks to their agent workflows, but so it's basically that, right? A dedicated hardware product for for being able to basically click accept recommended.
Uh don't think that's necessary, you know. Don't think that's necessary at all.
But, you know, they're they're in business. They're in the world of business, right? Their whole their whole job is to their whole job is to market and sell you things that you don't really need to separate you from your hard-earned dollars.
That is their job.
Not enough return values. Uh there we go.
This should be uh years adults.
I love that arrow sound effect.
You ever want to live on the west coast like Silicon Valley and all? No. No. I have no I have no desire to do that. No desire to do big tech. No desire to The only place I have a desire to move to at the moment is the Pacific Northwest. So that's the only place that I I look at pictures of it. I've never been, but I look at pictures of it and I see videos of it and I think that that looks like home. that feels like home to me. Um, but yeah, right now, for now, we're in Kansas. My kids really like their school and they enjoy being here. So, we'll we'll stick around here until they finish probably high school and then um and then after that, you know, kind of all bets are off. We'll see what they end up doing with their jobs and their college careers and stuff. See where they land. I'd like to be close to them regardless, you know. Um, I think ideally what I would like to do is I would like to get my kids to do homeschool and I would like our family to try living in different places for extended periods of time to try to find the place we all like the best, you know, because we if you really think about it or if I really think about it, the world is so big and I've seen very little of it. you know, even in my own country, even in the United States, I', you know, I've probably been to less than half of all the states. Um, probably less than that, probably been to less than twothirds of all the states. And so, what I'd love to do is I'd love to like go to Maine and stay three months there and rent like rent a house, stay 3 months, move to Oregon, stay 3 months. um go to South Carolina, stay three months, go to Montana, stay three months, you know what I mean? Just to try places out for extended periods of time and see like do we like the weather? Do we like the community? Do we like the people? And then once we kind of find a place that feels like home, um then put down like longer term roots.
Unfortunately though, when you have kids, you're sort of if you're not if you if you don't homeschool your kids, you're sort of not trapped. Trap's not the right word, but you're sort of locked, right, to wherever to wherever they go to school. You don't want to be moving them around a lot.
I love this Pacific Northwest. I want to move there, too. You know, the rainy day. Yeah, exactly. The rainy day. Moody pictures.
Yeah, that speak that for sure speaks to me. Yep. 100%.
Uh, I've been to California and I've been to New York. I've been to California several times. I've been to um I've been to LA quite a bit. I I used to work uh I used to work for a company that was headquartered in Ontario, California, which is kind of like a suburb or or um another town sort of city uh close to LA.
Uh LA is like the main the large metro metro hub there. So, I've been there several several times.
Been to Hayward, California several times.
Um, been to Hollywood.
Been to the beach out there. New York was New York. I didn't get to go I only went once and I didn't get to go for very long. And so I that's that's kind of my thing with traveling is I'm not really a big like the idea of taking a week to go somewhere is kind of not super appealing to me. It takes so much effort and so much energy to get there and then you've only got like a handful of days that you're trying to rush around and do everything.
And the idea of rushing is just not appealing to me. So, I would I'm much more of a I'm much more attractive to attracted to the idea of like slow travel.
You know, you go someplace, you stay at least a couple weeks, if not more. Um, which I I mean, obviously that's kind of a luxury a lot of people don't have and it's difficult to execute on from a logistical standpoint, but given that I work from home, it's much more feasible, right? So given that I work remotely, you know, if my kids weren't in school, it would be very easy to as long as there's uh internet connection, I could I could go to places for, you know, weeks on end and then come back home.
Have you ever been to the Ozarks? Uh, you mean like in the Midwest? Is that what you mean? The Ozarks here? I'm guessing that's what you're referring to. Because if if so, yes, very much so. I grew up in the Ozarks, that is um that is where is where I grew up the if you've ever seen o the the the Ozarks show.
Yeah. If you Yeah, that's where I grew up. Yep. kind of right I guess you would say where the the town I grew up in Joplin Missouri we're sort of right on the edge of of what I think most people would define as kind of like the Ozark region uh the town I grew up in is like right on the almost near the border of Missouri and Kansas and so it it kind of creeps just outside or right on the the border of the Ozarks but yeah spent a lot of time at Loki the Ozarks spent a lot time playing sports all over Rala, Jefferson City, Columbia, went to Northwest Arkansas a lot. Um, went to southeast Oklahoma or northeast Oklahoma a lot growing up. Those are those are my stomping grounds for sure.
It was a good place to grow up. I think I would like to like to move back there.
I think I would like to have a home base maybe in Joplain and like whenever I retire, get done working or at least when work becomes somewhat optional. I think that's where I'd like to try to make a home base and maybe travel from there. The cost of living there is very affordable. So, that'd be a nice place to have a home, that sort of thing. I'm trying to I'm trying to convince my son I'm going to try to convince both my sons to go to college where I went to college because they get a discount for being an alumni and then um they're both their grandparents still live there. So, I feel like that would be it would be a nice balance like between affordable affordable college a college experience where they're sort of away from they're away from home per se and but yet they still have some level of familial support, right? They're not completely, you know, in an unknown city all by themselves.
But we'll see. We'll see if we if I can if I can convince them.
Let's see. How is life in a red state?
Uh is there racism and all against immigrants or people of color? I mean, there's definitely racism no matter where you go. I mean, I think that's the thing. Not even not even just in the United States. I think that's across the the world, you know? Like I remember when I went to Honduras uh as a in middle school growing up, there's like a weird I don't even know if you call it racism, but maybe uh national I don't know what you want to call it, but like I think humans in general just wherever you go in the world, you find for whatever reason people decide to hate or demonize another group of people. That's just a thing. Um I but like growing up though I I'll say growing up I don't remember like deep dark dystopian moments of racism like that. Like growing up I had friends of all ethnicities and all colors. Um and it really wasn't like I it wasn't something like we talked about. I'm sure though from the other people's point of view, right?
I'm a white guy, so like from my friends who were black or Mexican or Hispanic, like I'm sure they experienced it and lived it, right, more than I did.
So I if I I'm not going to but I but I I'm not going to paint a broad brush though and say that just cuz the state's red, it's filled with racist. It's uh it's way more subtle than that. And from my experience, the vast majority of people are typically pretty kind um understanding people. I guess there is there is one racist experience that sticks out in my mind from when I was in uh high school. When I was in when I was in high school and played football, I had several friends I played football with who were who were black. And unfortunately, there was a doughnut shop uh on Main Street that was pretty popular, been there for a long time. It was familyowned, but the owners were they were much older and of a different generation. And so they they were outright racist. And so we would not whenever we would go into the doughnut shop to get donuts during the summer be uh before like after pra early morning practices um my friends who were black would not come into the store to buy the donuts discrimination.
Other than that though not not so much.
Do you like Indian food? Yeah, Indian food's good. I like um I like naan bread a lot and I've died for just about any curry.
My my uncle my dad's sister um is Indian. Uh so so I had a uncle growing up uncle Papu and his mom we called her Nani Shandria. They were both Indian and immigrated here. I think my uncle Papu immigrated here when he was 18. He went to school at the University of Kansas and got a PhD there. Uh that's where he met my my aunt. And then his mom immigrated at some point. She was a doctor in India and at some point she immigrated to the US. Uh, and why I brought that up was because whenever we would go and visit them, that was always something they would do for us was is that they would cook um they would cook like a very traditional Indian meal at least once while we were visiting them.
They lived in Arizona. Um, and it was always great. It was always great.
It's just naan, bro. Don't call it naan bread, please. Naan is a fat a flatbread. So it's like you're basically saying bread bread.
That's so funny.
Yeah. So yeah, I like naan. Yeah, I like that a lot. Yeah.
Is uh is buttered chicken an Indian food? I like buttered chicken.
Yeah, like chai tea.
Chai.
I'm drinking tea tea and I'm eating bread.
Uh, hey, what's up, Demon Creator? What stack do you use on your daily job? So for work I work as a uh quality engineer which basically just means I mostly do manual and automated testing for um we the product my company makes is like a web app or um it's a it's a complex like business automation platform but at the end of the day right it's the the userf facing portion of it's a web app so I primarily author a lot of code in Typescript at work and C those are the two those are the two main languages I use at work. And of course, like you know your your your regular old CSS, HTML, that kind of stuff. Razor, markup, you know, I have to be familiar with with those technologies.
Um, and then outside of work, I like to I think C#'s my favorite language outside of work. Um, I've been writing a lot more Rust lately, so I think Rust has kind of slid up into like the the third spot of my favorite languages.
Um, yeah, that's currently that's currently how I feel. I always tell people though, if you if you held a gun to my head and said you can only write one language for the rest of your life, I would probably pick TypeScript though because I like to build web related things. And so I feel like having a language that is somewhat native to the browser, right? like it can be translated to a language that's native to the browser but has good development exper developer experience.
That's probably why I would would choose TypeScript.
Uh uh I I I don't know if I would ever return them though.
Oh, naked returns. Yeah, na. Okay, named returns I'm okay with. It's the naked returns that I don't like.
Naked returns, I think, are confusing.
Fix the bug in the code. so that it returns the named values explicitly.
Um, we do years until adults, years until drinking, years until car rental.
Go supports the ability to return early from a function. This is a powerful feature that can clean up code especially when used as guard clauses which is true. Guard clauses provide a linear approach logic trees. Guard clauses are unreadable. Guard clause guard clauses are generally worse than nested if else.
What is a guard clause? An early return from a function when a condition is not met.
Go supports first class higher order functions which are just fancy ways of saying functions as values. Functions are just another type like in string and ble. Complete the format reformat function. It takes a message string and a formatter function as input. Apply the given formatter three times to the message. Add a prefix of text io to the result. Return the final string. Okay.
Uh let's do format.
formatted equals uh string bar formatted string and then we'll say for um I what is it range forget how to write a loop.
Okay.
Yeah. We want to call it three times.
So we will do formatted equals formatter message for Matt.
I'm guessing they want us to mutate it, right? Yeah, they want us to mutate the thing. Then we have to return format sprint f.
This is going to be text io space percent s formatted.
Declare not used. I no new variables on the left side.
Oh, so this can be omitted. Right.
There we go.
See you, Victor. Have a nice day. Thanks for chatting, man. I appreciate it.
It's always nice when people stop by the stream.
For each call of print cost report, give it an anonymous function that returns the cost of a message as an integer.
Here are the cost. Intro is two times the length. Okay. So we do return length of intro times 2 plus length of body* 3 plus length of outro.
Alrop time 4.
Too many return values.
Uh that's a single return value, right?
Print cost report.
Complete the print reports functions. It takes as input a sequence of messages.
It should call print for once for each message by making Oh, sorry.
So, you're saying it should do print cost report for intro an outro and then what? Okay. Once for each message by making three separate calls.
For each call of print cost report, give it an anonymous function that returns the cost of an integer.
Here are the integers.
Oh, I see. Okay, I see what you want. So, you want a function Uh, how do we declare an anonymous function in go lambda function that even a thing?
Hey, what's up? What's up, a new rack?
How are you? Good to see you.
Oh, it literally shows me an example.
So we need uh this is just going to be like that.
params is going to be our message type string return int and we are going to return message times 2 going to be the same thing here the same thing here body.
This is going to be outro and then this is going to be what? four and three and lengths.
Well, we should really extract this to not be an anonymous function, shouldn't we?
Missing return.
17.
What do we have to return? Use the built-in function to get the length of a string.
Why do we need to return? Oh, I accidentally added the type.
Success.
Level 68. Damn. I'm level 16.
Yeah, but I've been going now for a couple months. You know what I mean? So, you can't you can't you can't beat yourself up, right? We all go at our own pace.
Complete the boot up function. Be sure to press the following text. Excuse me.
Just before boot up function returns.
Text IO boot up done.
Don't touch below this line.
Use defer so that you only have to write this message once instead of before each return.
So we write defer and we say what do we say text IO boot up done so Unlike Python, Go is not function scoped. It's block scoped.
Variables declared inside a block are only accessible within that block and it's nested block. There's also the package scope. We'll talk about packages later, but for now you can think of it as the outermost nearly global scope.
It's a bit unusual, but occasionally you'll see a plain old explicit block.
It exists for no other reason than to create a new scope. Run the code without changing anything. You should see a compilation error. Fix the scoping issue in the function so that it runs as you'd expect.
Declared and not used.
Uh we just remove this remove this. And I will do this too because I absolutely hate people who initialize variables on the same line.
[ __ ] hate it, man. I think it's the dumbest [ __ ] I think it's the dumbest feature that programming languages have, and I don't know why anyone would ever do it.
Hey, what's up, Mark? Nice to see you.
Happy Sunday, man.
>> I hope you're doing well.
We're having a We're having a pretty low-key stream over here. We started a new course on boot.dev and we're just slowly making our way through all the lessons place order. So, the amount in stock and calc price functions can be used to look up the current stock and price of an item. If the quantity is greater than the amount in stock, the order should be rejected.
So, if the user doesn't have enough money in their account, the order should be rejected. Otherwise, the order should be accepted and you should return the new balance.
So let's just do I guess amount in stock.
Is that already defined somewhere?
So amount in stock. Oh, is that the that's a function name, isn't it? Yeah, it's a function name. So I guess I'll say amount or stock amount and we'll say uh amount in stock and we pass in the product ID I believe.
Yep.
Sorry big yawn. Hey Mark, thanks for holding it down on Twitch for us too.
Appreciate you, man.
I'm not here last night. Got a life to live. I get it, dude. I get it. I never expect anybody to be able to show up to every stream. Even if even if you just come to say hello for a minute. Uh it's I mean, to me, it's that's plenty, right? So, if if you can make it, great.
If no worries.
If no worries. If not, no worries. I understand, man. The the internet is fun. Digital life is fun, but it is not real life. So, I'm I'm glad that you have a life to live.
Thinker free. Hey, can you talk about the job market? I can answer any questions you have or give my opinion on any questions I have. I I don't really have um much experience with the job market in the last I guess year. I guess last the last time I went through a job hunt was that would have been what was that?
So I the last job hunt I went on was from February 2025 to June of 2025. I did about 20 interviews.
Uh and it ended up working out really well for me.
I ended up not staying. I ended up not leaving the company I am at now, but I ended up getting offers and those offers ended up being I ended up being able to negotiate um a higher salary and ended up staying where I am currently at. Uh, so I don't know if I don't know if that that experience from a year ago is still relevant today, but I'm I'm always happy to share if you have any questions on how kind of I think about things and how I approach things. Um, yeah, I'm I'm pretty much an open book on that kind of stuff.
Okay. So then we need the calculated price or I guess that we can actually do if quantity is greater than stock amount we can actually just return uh false.
And honestly, >> Mark Manzula is telling you to drink some coffee.
>> Thank you, Mark. I actually need to go put some water on cuz we're down to like the last few sips here.
Yeah, man. I'm planning to be out for now. I'm tired. Have a great day. See you. See you, man. Appreciate you stopping by. I wish you the same.
I like I like the coffee emojis.
I don't know what we should return here.
I guess I'm just going to return zero or I'm just going to return the account balance.
Let's see. Uh price going to be calculate price. We're going to pass in the product ID and the quantity. So we have price and we have stock.
Uh, and then we'll say altered balance equals account balance minus altered or equals minus price wall operator.
So then what we'll do if user doesn't have enough money in their account, the order should be directed. If uh account balance is less than the price meaning they don't have enough money return false and I'll just return the account balance as it is otherwise we return true and return their altered balance. And I don't think I need to print the these, do I?
There we go.
Let's see. Closure. Closure is a function that references variables from the outside from outside its own function body. the function may access and assign to the reference variables. Create an enclosed sum value inside the adder function.
Return a function from adder that adds its input to the sum and returns the new value of sum. In other words, it keeps a running total of the sum variable within a closure.
So this would be return function and we'll have a total. We'll initialize that to zero if I can type.
And I don't think we really need anything here other than that.
And all you're going to do is return total.
Uh this would be numb.
Think that'll work.
Hey, we learning go. Let's go. Yes, we are learning go. Captain Lucha or Lucho, sorry, I put I put an A on the end. Good to see you. Hope you're doing well.
Uh, this is a lot of review for me because I've written quite a bit of Go over the last year. So, this is I'm just kind of speedr runninging this course as fast as I possibly can.
There's It's quite a long course though.
There's uh 145. I think it's the second longest next to data structures and algorithms.
So, we've got this will probably take a day or so.
I'm not going to do that right now.
Noise. Yes, noise indeed.
Noise.
The text IO API needs a very robust air logging system so we can see when strings are going ary in the backend system. We need a function that can create a logger, a function that prints to the console given a specific formatter. Complete the get logger function. It should take us input a formatter function and return a new function. The new logger function takes as input two strings and passes them to the formatter then prints the result.
Keep the order of the strings.
So uh just reading this type declaration what are we saying here? We're saying formatter, right?
Is itself a function that returns a function?
So I want to see how it's used.
Formatter pass in our formatter and get back our logger. Then we call logger with the two strings.
And how do we want to?
So format equals formatter picks S1 S2 then it does print line I guess says it prints them.
So I guess format like that or formatted let's see redeclared in this block other declaration of S1 undefined S2 oh yeah that this function right here. This type of uh there I'm always on the lookout for things that like this right here is scare would be scary, right, to new people learning to code. It's like what what are you what what you know? This is like this is probably hard if you're if you're newer, right? Newer to programming, newer to functional programming maybe in general. It's a little confusing what's happening there.
I see we are learning go now. We have we goafa we have moved on to go. Yep. Um or at least that's the course. So just just for like a recap of what I'm doing on stream right now is I'm trying to make it to level 100 on boot.dev. So like the it's less at this point it's more about reaching a level 100 than it is necessarily about picking up new languages. Go is not a new language to me. So, I'm just kind of speed running through the lessons trying to earn XP at the moment. That's that's the goal right now.
I the the next course I think I'm most excited about right now in my path is where we talk about um where is it? Pub sub architecture. So, I've never So, I've I've built things like uh with PubSub architecture before, but I've never taken a formalized course around it. Uh I've taken courses on Rabbit MQ before, but I think this will be a fun a fun thing to go through.
Docker will be good, too. I've never taken a formal course on Docker. I've always just learned Docker through using Docker. Uh so, I'm I'm looking forward to that one.
That's a great goal. Hey, I I just want my coin, man. I want my Have you guys seen the It's like they send you your It's like in Harry Potter where they send you your letter, you know? It's like the inverse of that after once you get done with boot.dev and you reach a 100, they send you a letter and a coin to like to anoint you an arch mage, which I think is cool. The collector of me wants it.
So, this is going to be a phone number and a message. Phone number and this is going to be a string. No, an int and this is going to be a string. So this is message.
Let's Text IO is a bug. We've been sending text are missing critical bits of information. Before we send text messages in text IO, we must check to make sure that the required fields have nonzero values. Notice that the user struck is a nested strruct within the message to send strr. Both sender and recipient are user struck types.
Complete the can send message function.
It should return true only if the sender and recipient fields are uh each contain a name and a number. If any of the default zero values are present, return false.
Okay. So I guess uh what are the default zero values empty string 0 false. Okay.
So if uh if message to send dot sender name uh equals this guy or message to send dot sender dot number equals zero.
return false.
Do the same thing here.
And we'll just change this to reipient and level run.
undefined type message to send has no method sender.
What do you mean? What do you mean?
Yes, it does. It has a sender message to sender.
What do you mean it doesn't have What the hell? Why does it think I'm trying to call it like a method?
Oh, because I'm I'm referring to the type and not the variable.
Like Jesus Christ, dude.
Uh that timer was to tell me to reactivate my another potion.
There we go. There we go.
All right, I'm going to go put some water on real quick.
We must admit humans suck. What?
Marcelo, good to see you, Marcelo. Uh, bro, read the code. Why? Um, so I have a couple reasons why.
uh one is less to do with okay so I I basically have two categories of of reasons why uh the first category has to do with just understanding the limitations of models right now this category of reasons could potentially someday become uh I will admit obsolete right maybe models just do continue to get better and better and better to the point that these aren't issues anymore but right now agents do make mistakes stakes. They do sometimes lack context. No matter how well you prompt them and how much context you try to give them, their context management window is a sliding window. They lose context as it get long gets longer and the context a lot of the times gets compacted or summarized in a lot of these agent harnesses we work with to generate code. So I I still think there's a a place to just trust but verify is kind of where we are with models at the moment.
Um, and then the other categories, the other category of reasons is I think that reading code makes you a better engineer. And I think AI is ultimately a force multiplier for good engineers. Um, if you're somebody who's not a good engineer, if you've never built software by yourself and actually had to make design design choices and make decisions about things, it's going to be very hard for you to be able to instruct an agent to do what you want. And it's going to be very hard to know whether or not the agent is uh is doing what it should be doing, right?
So, and reading code is a great way to level yourself up. it's about giving your opportunities to grow your own capabilities.
So, those are those are kind of the buckets of of reasons.
Um, the first bucket may not be around forever, but the second one, I think, will. You know, if you're somebody who's early in your career, just starting out.
Um, I would encourage people to to not give up opportunities to look at code and read code, whether it be your code or somebody else's code.
Hey, what's up, Thunder Dear?
How am I doing today? I'm doing well.
I'm actually going to put some I'm actually going to put some coffee on is what I'm going to do. So, I'm going to be doing even better here in a few minutes.
We just finished our our coffee.
Greeting arch mage. I'm not an arch mage yet. I'm currently a What am I? I'm currently a sorcerer is my current level.
I am sorcerer Steven, which I wonder where they're do they have like a leveling or rank list where they show all the ranks.
Dev ranks, you're my arch mage. I appreciate that.
Uh I appreciate that.
Huh?
I wish they'd show I wish they'd kind of show like a uh a progre I guess a progression graph or a progression chart that shows all the different I guess not. Oh, here we go. So, apprentice, pupil, acolyte, disciple, scholar, sorcerer, sage. Oh, I like that one. That's a good one. Arch sage, mage, and arch mage. So, this is where we're trying to go to is arch mage. I did find another cool another cool um tea dance testing and architectural knowledge will slash have become more important than code generation. Uh I think testing in my opinion testing should have always been an important thing. Uh architectural knowledge I think has always been important. Uh testing should have always been important but a lot of people just pooed it because they didn't like to write tests.
Uh um yes, but I think I think Teao Dans I think my my contention with that statement is I don't know how you acquire or get good at architectural knowledge and really own that understanding or get good at understanding testing or writing code that's testable. I don't know how you gain that understanding or that knowledge without actually doing the work. Um, I don't buy I just don't buy what the AI people are selling. I don't think it's possible to spend all day talking to an LLM and actually acquire real knowledge and abilities. I think you think you're acquiring knowledge and abilities. I think the LLM makes you think you're learning, but you're I don't think you really are. I think the LLM is like the next version of tutorial hell where the LLM makes you feel like you know what you're talking about, but if we were to take that away from you, you really don't own the knowledge. And in my opinion, you really should own the knowledge. You should should really know these things yourself. Um, doesn't mean you you can't use AI. It just means you need to make time to actually experience building things and tripping over your own um architectural decisions and writing problematic code and understanding why it's problemat. Like all those things I think are important. I don't know how you divorce I don't know how you divorce getting better at building software from actually building software.
Um, I know the AI companies want to sell people that that is a thing, but I just don't buy it based on my own experience.
It's like saying that you can separate the act of being a good writer from actually writing. I don't believe that.
I just I just don't believe that's a thing that can actually be done.
Archbage has not been reached. We are currently a sorcerer.
Testing is treated as an afterthought.
Oh, 100% testing is treated as as an afterthought. I I work as a quality engineer. I'll tell you from firsthand experience, testing is an afterthought.
And it and it's always a mistake. It's always a mistake. I know people say like, "Oh, when you're starting out and you have a startup and you're trying to pay the bills and you're trying to find, you know, product market fit, yada yada yada, you don't want to have testing slowing you down, blah blah blah blah blah blah blah."
[ __ ] It's always a mistake. It always results in technical debt. It always becomes a drag on your ability to make changes and ship software. I just no one's ever going to convince me of of it otherwise.
I think a lot of people like to intellectualize testing um so that they can avoid doing it is my personal belief. I think a lot of people are just lazy and they hide behind sounding smart to avoid doing the work.
Almost like we're living on a prayer.
I like the reference.
I believe been lurk been lurking for a while. But yes, the number of times I've also seen companies use beta branches for free QA and it's never as functional as professional QA testers. Yeah, you you should have both. You should I mean you should automate as much of your testing as humanly possible and but yeah somebody should still be doing some level of exploratory manual testing for sure.
Even mature companies will pressure testing scope and investment and wonder what's going on. Exactly. Exactly. Yeah.
It's just the the lack of forethought, you know, in that domain.
It still shocks me, especially as somebody who came to technology later in life. Um, it shocks me that an industry that's been around for so long still is so immature with the way they approach quality. I you know coming from a manufacturing background I just kind of a lot of the problems that exist in the way software is produced and the way software is yeah the way software is produced a it's just a lot of it solved problems right like you look at the manufacturing industry like this this is solved stuff like you you guys I mean people think building software is complicated like Like there, you know, there, you know, other there's lots of other probably way more complicated physical feats of engineering where the level of tolerance for poor quality is is uh we've addressed it, right? Like we we have systems and approaches to addressing it. Um but for whatever reason, technology has refused to adopt or to embrace them. Even like with AI models right now, it's funny to watch people deal with AI models because it's really the first time I've seen technologists have to reason about how to QA probabilistic systems. But again, in other fields, probability is an inherent thing, always has been an inherent thing and that's been largely solved through statistical process control.
Um, so yeah, I just Yeah, I don't know.
I just find myself shaking my head a lot.
I did 10 years of manufacturing before becoming full stack 6 years ago. Yeah, it's awesome. Yeah. So, yeah, you you have you probably have a very similar experience. I mean, I'm not going to say other other industries don't have their problems, but like there's a lot of learning and education that technology companies or software companies could take from other industries and apply to their processes. They just I for whatever reason they just don't.
Goth, do you get paid 300K? No, I do not get paid 300K. But if you can find me somebody who will pay me 300K, please send it my way. I would love to talk to them with with AI QA is out the window now.
It's turned into prompt, ship, get feedback, prompt. Yep. And that, you know, again, it's like it's one of those things where like I don't know. It's your you know, it's your life. It's your business. It's your company, right? We're all I mean everyone's allowed to have their everyone's allowed to live their life the way they want and build their business the way they want. I just have particular opinions about it. You know, like if it was my company and I was putting my name on the thing, I have a particular standard that I would want to hold myself to.
But obviously other people make different decisions.
Money comes from customers who speak to business people who make the decisions.
No one in that chain understands software quality. Yeah. Yeah. They there's no and but almost everybody in that chain is just talking to each other in buzzwords.
They're they're all talking to each other in keywords and buzzwords.
Yeah. Yeah.
Look at GitHub. GitHub should not be a mess. It really It really should not be a mess. It It should not be a mess. But like I don't know. You know what I mean? Like I It's like you can sit there and rail against it, but what are you going to do? You know, like they they it it's again I just go back to the thing that doing is a lot of times it leads them to thinking that their thing is a unique thing and their thing isn't really a unique thing and their challenges are actually solved problems and they just need to look for answers beyond maybe their own little world or their own domain. like maybe you need to look at how other people approach these similar types of issues outside of software and then figure out how to translate them back into software.
Um, but yeah, there's there's a lot of like unicornism I see in software development, which is kind of interesting.
It makes more sense to invest more in QA in my opinion. You're getting more code, but it's lower quality. So logically you up the testing.
Yeah. You you I mean I just feel like if you're not testing the thing you're building, you're making it someone else's problem, which I think is kind of shitty.
Certain platforms and tools should be reliable by principle and not by venture capitalism.
I'm not going to say I disagree. I just I don't know what to do to influence other people, you know.
Bob Lagourd, I have shipped a testing version 16 June and the LCant wakes up on 17 July telling me that they forgot this feature and the app is not usable.
Deadline is in one week. Come on client, that does not sound like fun. I feel for you.
I feel for you. I wish there was something I could do to help you.
I think that's largely why building software for other people is kind of a painful experience, you know.
Okay, coffee time. I'm just going to go put on my water. I'll be right back.
I did that thing again.
Let's build it. Let's build what?
What? Let's build what?
What is a good reason to use an anonymous struck? You're worried about user privacy. No, you need your code to be faster. It's only being used once.
What's one advantage of being an anonymous truck?
embedded strct that forgotten feature. Oh yeah. I I think I think the I think the painful part in that situation is the time constraint, right?
which I guess is I guess what Bob I think I guess what Bob is trying to say is that's why testing gets or that's why quality or testing in general gets thrown by the wayside. Um yeah I don't know I I just feel like there's I used to see this when I worked as a food scientist.
I saw this a lot because I worked cross functionally. I was in research and development. I but I I worked cross functionally with I was based at a manufacturing plant two manufacturing plants and so my job was basically to see a product from conceptualization to commercialization which m means basically work with a client or customer think like US foods or Cisco these large mostly food service companies. We worked with a few CPG brands. Um, you know, I mean, we really would make we really make products for just about anybody, but mostly food service uh food service and uh CPG type customers.
And I saw this a lot because I had to balance kind of the um I had to balance a lot of people's competing priorities. Operations cares about operations thing. They care about efficiencies. They care about pounds per line hour cost.
Um had to had to balance the marketing people's desires for profitability.
And you know, one of the things that just has to happen in a project is you sort of just have to be a champion for what you believe in. And so, you know, I understand we're all a lot of us are employees, so this only goes so far. But somebody has to be the person that says, "Look, I'm not going to ship a feature that I haven't tested." Somebody has to Somebody has to say that out loud.
Someone has to say it's irresponsible and it's reckless to ship something we do not have confidence in. Right? And granted, if the CEO comes down from on high and overrules you and says, "Well, Stephen, you're wrong. we are going to ship something that we have not tested and we do not have confidence in. Well, that's a that's a completely different scenario that people have taken it out of your hands. Uh but I think all all all too many times I think people are afraid to stand up and say that or push back, right? It's just they're just scared to do it. Um but somebody has to be that person that cares enough to force the hand to say, "Guys, are we are we really going to do this? Are we really going to build a feature under duress with no testing with with no quality assurance, right? With no verification and ship that out, right?
Like we should all acknowledge that out loud. I think a lot of times we we just kind of sweep it under the rug. Well, we'll do our best, right?
We're going to do the best we can.
Yeah.
I mean, yeah, QA is so much important, but you need to have client time, which is the hardest thing. Well, and that's I guess Bob, that's my point is like someone has to hold the line. I guess if you're a freelancer, if it's your business, that's up to you to make that call. And who am I to judge you? Like, you you have to make a living. You got to do what you got to do. But if it was me, if it was my business, I would just be like, "Look, I I cannot build a feature for you in one week and do what I need to do to ship it and feel confident in it." Right? And and I would just put that on the client then, right?
If the client says, "Sure, we're fine with potentially receiving work that doesn't actually work because you haven't had the time to verify it." Okay, sign on the dotted line that you accept the risk of that.
But if it was me, I'd push back really hard on it. Again, if your boss if your boss overrides you, your boss overrides you. But yeah, I'm I guess at my age, I'm I'm past the point I'm past the point of sitting in meetings and keeping my mouth shut and putting my head down and you know what I mean? I'm going to say what I think and I'm going to offer my opinion. It doesn't doesn't mean people have to uh agree with it or necessarily go along with it, but I'm I'm definitely not going to sit there and hold my tongue and make people think that I agree right with with things that I don't agree with.
I've always been that way, even as a consultant. If something is bad, I say it is bad and leave the decision to the customer. Yeah, it that and that's what should happen. That's 100% what should happen. I worked with a lot of salespeople when I was in that food scientist role. I worked with a lot of sales people who really didn't like that, right? They really wanted to be able to tell the customer everything they wanted to hear. Um, and I found personally cuz I eventually I eventually got to this point where I didn't want to I didn't want to talk to the client or the customer through a salesperson.
I would just I would just become the point of contact and I would just show up in meetings and I would just manage the client relationship. And I found that like customers and clients tend to really respect you when you're when you're super upfront and you're super honest and and you speak in a in a principled way. I I I found that it was usually a positive response like, "Oh, you're right. We we we didn't think about that." Right? That things like that they would say. Um, I think it I I personally think it would endear you.
Um, and if it doesn't, I think uh, Oblivion's kind of in a kind of has a good has a good response to that is maybe then you should be thinking about whether those are the people you should be working with or for, right? if they if they are people who who don't believe in doing things the right way. Um, it's like maybe maybe this is not a good a good partnership.
We're copy Good morning, Justin. Hope you're doing well. Having yourself a nice Saturday or no, Sunday, sorry.
I'm happy to be wrong, but there needs to be a conversation.
Yes. Actually, I'm happy even to be just overruled. You know what I mean? I don't even I don't necessarily know I don't even know if I can hear an argument that would that would convince me that I was wrong to care about quality and things working properly. But, uh, yeah, there should be always there should definitely be a conversation. I think far far many far too few people just initiate the conversation. They just, okay, the boss man said, so we've got to do our best.
Like, okay, well, boss man's going to hear my opinion first, then I'll do what he says.
You've been on PTO. Nice. What have you been doing? Anything fun? Good morning, David Bailey. Nice to see you. Uh, things are well here. Yeah, it's uh it's summertime. It's it's hot. Other than other than the weather, things are great. It was like 90 something degrees yesterday and the humidity was felt like it was 70%. It was like a swimming pool outside. It's terrible. Other than that, life's good. Kids are healthy. Wife's healthy. Um making progress on boot.dev.
I'm almost level 100. I think I'm level 68 right now. U been building Atari app in my free time. Been working on a terminal chat app in my free time.
Work is pretty even keel like you know business as usual at work. Kids are growing up way too fast. I'm excited for football this season to start.
I'll do it. But damn will they hear me complain for Yeah, exactly. And it's not even complaining. It's I I I don't want to frame it as complaining because that complaining complaining is what paints you as like the negative Nelly. And it's not even being a negative Nelly Nelly. It's just I want people to acknowledge what they're saying. I want people to acknowledge that they don't give a [ __ ] about things working the way they should and taking the making the effort to verify that things work and that they work well. I want you to say it out loud. I want to hear those dirty words come out of your mouth.
I am not freelance, Bob. No, I work at I work at uh I work W2 job. So that and that's why I say I can't who am I to judge you, right? So uh I mean my opinions are N equals one.
I'm just a random dude in Kansas, right?
Who's uh streaming on the internet?
33-year-old dad of two living in Kansas who who's just trying to sing for a supper and get to retirement. So, I have my opinions, but I understand everyone's circumstances and life, you know, demands and everyone's got a nut to make and whatnot. So, I'm a realist as well. Life be good.
Life be good. Life is good.
Took the kids and wife to an amusement park. Uh, that's cool. a zoo called Cole Margarine. I've never heard of that. Was a lot of fun. Now we were just chilling.
Dude, chilling's the best. I've taken uh so I took a week off in June. I took a week off in July and I took a and I took a week off in August and with really no plans just other than just to be turn slack off and just be at the house, you know, be around, do whatever comes to mind, enjoy the summer.
I think those are the best. Honestly, I think that's the best PTO you can take.
There's no agenda, no plans.
Uh I don't So, there is soccer definitely has definitely have soccer in Kansas, but I haven't been following the World Cup. And I've never been a big soccer guy myself. Um I like American football. I like baseball.
I like basketball. Um, those are probably the only real sports I follow on a regular basis. Even basketball is kind of iffy. I follow that more towards the playoff season.
There's a level of compliance that is worse because the boss is not getting flak for the project you ship that didn't get the QA you requested.
Yeah.
I mean, I think a lot of times you just end up becoming the I mean, I think a lot of times you just end up becoming the scapegoat, but at least I'll know I said something.
coffee has been acquired. Now we may continue with our boot.deving.
I found another game to play too.
Another programming game to play. Um, I don't know if anybody here has heard of it, but I I'll give it a shout out cuz I hadn't heard of it. It's called Artifacts, and it's basically an MMO RPG that you play through API requests. How cool is that?
MMO RPG.
I think this might be something I work into streams at some point.
But is that not like the coolest thing?
Yeah. Yeah, that's what I when I heard when I heard that, Captain Lucho, I I said, "What?" But yeah, you make um you basically make API requests against their servers to do things within within the game.
So, I think this would be a lot of fun to play and you can use whatever client, whatever language, right? Whatever client language you want to use.
So, I think that I think this would be really fun to explore.
Another potential thing to do on stream once we we got to get through boot.dev first, but then artifacts might make an appearance on stream at some point.
POV the front end is the back end. Yeah.
Yeah. Right. Isn't that funny? That's I just thought that was such a one I thought that was such a clever such a clever idea regardless of if it's actually, you know, a successful business or a successful game. I was like what a creative what a creative idea. But uh yeah, I think that I think that's a product that could definitely find product market fit with a very niche group of, you know, passionate customers.
A sender is a user that has a rate limit field that tells us how many messages they are allowed to send. Fix the bug by embedding the proper strct in the other.
Um let's see. Run the tests.
S.name undefined. S number undefined.
So we can do user like that.
Submit.
Oh, also we can activate another potion.
Yeah, I probably go I'd go for another hour. Let's see. Struck methods and go.
The format of the string should be basic username password.
So this is where we declare a is authentication info and we're going to call this basic get basic off get basic off and we need a type return is going to be string.
We are going to return a string that's formatted as basic.
authoriz the format of the string should be authorization basic and then username password. So percent s percent s this would be a dot username and a dot password.
Oh not spring f.
Sprint f. Oh goodness. Sprint f.
In go str sent in memory in a contiguous block with fields placed one after the other as defined in the strruct. For example, this struck looks like this in memory.
Okay. Field ordering matters. The order of fields in a strct can have a big impact on memory usage. This is the same strruct as above but poorly designed.
Okay, I probably designed a lot of poorly designed strrus then.
It looks like this in memory. Stat strct six bytes total.
So reach wasted. Okay, notice that. Go has aligned the fields meaning that it has added some padding to make for the size difference between the UN6 and UN8 types. It's done for execution speed but it can lead to increased memory usage.
Uh should I panic? To be honest, you should not stress about memory layout.
However, if you have a specific reason to be concerned about memory usage, aligning the fields by size, largest to smallest, can help. You could also use the reflect package to debug the memory layout of the strct.
Hey, what's up, Tyler? Good to see you.
People can be so mean sometimes. Do you have any advice on how to not give a [ __ ] about them? Uh, I don't know. I've changed. This has changed a lot. So, I'm 33 now, right? So, I think I've had I've had several different opinions about this probably over the years about how to deal with with haters. I think now I'm at this place. Actually, I talked to my wife about this yesterday. I'm at this place where I just don't give I just don't care that much about anyone outside my wife and my kids, you know?
Um like I care I care in the sense that like I want you to win. Like I want I want good things for you. I want you to be successful. I don't want you to get sick. I don't want you to die. I don't want you to get you know what I mean? I don't have any animosity or ill will towards anybody. But I also just don't really care a whole lot. I don't care a whole lot about what you think. I don't care a whole lot about what you think about me. Um, and so I think that ambivalence makes it very easy to just people throw stuff at you. It's like I don't care, man. I I don't care unless you can somehow uh advance my path to financial independence.
I I don't care, dude. Uh, so I think I think at 33, my answer to that question, Tyler, is ambivalence.
Um, I think five years ago the answer would have been to remember that a lot of times broken people break others and that hurt people hurt others.
And and that's just it's not a reflection of you, it's a reflection of them, you know. I think that would have been probably been been my my answer five years ago.
uh 10 years ago, I probably would have just it would have bothered me and I would get get upset and try to return I would have probably returned the same emotional whatever their emotional response to me.
I probably would have returned that to them thinking that that somehow was getting even or that somehow was standing up for myself or I don't know. It was it was some it was something, right? It was just it was some sort of response that felt like I was taking ownership of the situation or not letting people walk all over me. Um but today I just kind of shrug. Man, life's long. Life is very very long. Um none of us are getting out here getting out of here live.
Um so yeah, that's probably how I deal with it. Tyler, actually I have a I have a clip to share with you. Let me let me try to find this clip because I really like I really like the clip.
Um, let me see if I can find it. Give me give me a couple second. I think I have it bookmark on Tik Tok and I I listen to it every so often and I think it's just a good reminder of what we're kind of talking about here.
Uh liked favorites.
Have to scroll for a little bit. I have a lot of favored things on Tik Tok.
Come on.
I know it's in here somewhere.
There we go.
seven bill.
>> Oh goodness. I hope I don't get uh there's looks like there's music.
But me turn this down just a little bit.
I don't honestly know what this clip is from, but I I just found this to be very very very good perspective and a good reminder. So Tyler, when someone's mean to you and they're a piece of [ __ ] or they do something bad to you, just remember this.
>> People in the world.
>> So when one of them behaves badly toward you, he's actually doing you a great favor because he's saving you time. He's telling you that he's not worth your while. He's freeing you to say thank you for the information. I will now move on to the 6 bill999,999,999 other people, some of whom may have some value. There are 7 billion.
>> That's that's what I would tell you to do, man. I don't know if I don't know. I know that's much easier spoken than lived, but yeah, I think that's I think that's the mindset you should have is when people are shitty and people are douchebags and people are [ __ ] I don't know, shrug your shoulders and move on to the next guy, right? Next, there's just life is life is long and at the same time life is too short, right?
to to just to concern yourself with it.
There's other people out there. There's there's people out there that will treat you nicely, treat you kindly with grace and dignity. They're out there, man. You're on point. I leave my work because of that. Yeah. Yeah. And you should. You should. Life is Life is too short to be surrounded by shitty, awful people. Sometimes it's necessary to tolerate it for a time. But yeah, it's just the world is very very big. It's very big. There's so many people, so many opportunities.
Sometimes that's hard to see when you're in the moment. Everything feels so important and feels so meaningful and all the people feel important, right?
But now having lived I guess three decades now I've actually experienced firsthand like the the truth of just this too shall pass. Right? Like the stuff I cared about at 20 doesn't matter now.
The stuff I cared about at 15 don't matter now. The stuff I cared about at 25 don't m you know a lot of these a lot of the things just don't matter. They just don't matter.
Maybe the programmer job will be transitioning to agent wrangler. I I don't know, man. That's what it feels like. It feels like that's the thing we're being sold by a lot of people. I mean, and what's crazy is like it seems like we're being sold that even by people who historically have very been very levelheaded um very levelheaded, reasonable folks in the industry. It's it seems like they are even going that way. But I I'm I'm having a very hard time deciphering from who is who is saying these things not because they stand to gain economically in some way, right?
Like uh like Kinsey Dods even, right?
Kinsey Dods is pivoting a lot of his content and a lot of his stuff towards agentic engineering and whatnot.
And while I understand he might believe these things, he also stands to gain from it economically, right? There's a wave and he runs an educational company and so he's trying to keep his company and his content and his courses and everything he's built his business on relevant while riding this wave. So, I kind of I'm just kind of taking all of it with a grain of salt and I don't think anybody knows anything, right? Nobody can predict where any of this is going. So, we should all just kind of hold on tight, save our money, invest our money, do the best we can, um build lives we enjoy, see where we land in a decade.
Real story. I once had a server in production that held a lot of structured memory, like hundreds of thousands in a list. When I reordered the lists in the struck, the memory usage of the program dropped by over 2 GB. It was a huge performance win.
Our overengineering boss is at it again.
He's heard about memory layout. Wants to squeeze every last bite out of our strus. Run the test to see the current size of the strrus. Then update the strr definition to minimize memory usage.
Expecting 24 bytes. Got 32.
Hey, Codius. What's up? You having fun on boot.dev? Nice. Yes, we are. Yep. We finished our C project. Well, I shouldn't say it's finished. I still have a bunch of tests to write. I wrote probably I wrote like five or six tests yesterday. So, I have a bunch of unit tests I got to go back and write, but for the most part, that project's done.
I submitted it. Um, and now we're going on to the course about learning Go.
What are we coding now? Well, right now we're doing boot.dev stuff, but in my free time right now, I'm working on a um a terminal chat application for connecting to basically it's a way to do to to connect to your um live stream chats.
Uh, and I'll probably I'll probably offer it to the public um, too once I get it into a good nice working state.
It works, right? I mean, I can demo it for you. It works. It works now. Um, but that's what I've been spending a lot of time on recently. It is is building that.
Uh, and then I've also been building a um, what do you call it?
I've been building a desktop application or a little utility application for making copying and pasting better.
And that's a Tori app. And when I say making copying and pasting better, basically all it does is it um when you copy text from somewhere, it will replace oddly formatted characters like m dashes or strange quotes to their normal kind of asy representation.
Uh but the thing that's even more valuable to me is when you copy links that have like tracking query parameters in them. Like think of like the UTM query params or on YouTube the SI param.
it will just automatically strip those things out because I find myself doing that a lot where you um where you basically hi from the demo where basically you you want to share a link but the link has a bunch of gobbledygook uh it's basically tracking information is a way for these companies to like understand who is sharing what with whom and I don't want that I don't want that in a link so I just want it to be sanitized when I copy it. So I've been building that but yeah this is the this is the other application I've been working on. This is so the the feature I added yesterday and I'm very proud of this feature because I actually had to reimplement a component from the TUI library is I added the ability to do autocomplete with usernames. So you can actually type at And if you tab, you'll see a list of completions for all the users, kind of how you would get in other like proper chat clients. And you can cycle through those, right? And it also matches like if you've already typed part of their name, it will narrow it down for you. Um, you can switch different targets. So you can send to both. You can send to Twitch or you can send to just YouTube. You can send to both at the same time. And then if you don't want to have to like switch your targets, you know, if you don't want to have to switch who you're going to send to, then you can just prefix your method message.
So, if you're in the if you're in the both sending target, but you only want to respond to to Mark, for example, um I can say I only want to send to YouTube and I can do for slashy and say, "Hi, Mark." And that will only go to Mark.
But if I just again, if I was just in this message and was like, "Hi chat," then the message would go to both places.
So, this is I've been spending way too much time on this over the last several months. Uh, but it's been a lot of fun to to spend time on it. I also added persistent. So if you disconnect from the chat and you come back to the chat um it re you know it basically whatever whatever information or whatever chat message you received while you were connected get re reloaded repopulated.
That was kind of a difficult one to implement because because of how many chat messages could potentially be in your chat history.
Uh I I basically introduced a bug where like if you had a you if you had thousands of messages persisted whenever it would load the UI would basically deadlock for a period of time. So I had to fix that.
Uh and I also I should also I have to give a lot of credit though for this. Um the chat UI like the UI components like this scrolling the scrolling effect here.
Um, like a lot of the base level components I can't take credit for. They come from a library called Terminina.
Terina, which is it's a C library for building 2e applications, and it's AOT compatible. So, I can't take credit for a lot of that, but um but the app itself is is my creation.
nonvibecoded. I will say it's been a ton of fun to to build something and make it what you want.
Uh it stands for ahead of time ahead of ahead of time compilation. So typically innet a lot of applications you build are chitted, right? So they're compiled just in time is what JIT stands for. So ahead of time compilation means that you can actually build binaries that are uh self-contained and they're native. So they they're typically much faster. They start up much quicker. Um they they typically feel snappier, right? And historically.Nnet has had kind of questionable pronouncing siege. It is hilarious. Yeah. So um and and historically net support for that has been kind of questionable but they've done a lot of work over the like the last like several releases of net to make it much much better.
Um but not a lot of libraries like that that's why I was pointing out Terina that Terminina is AOT compatible is that a lot of li not all libraries are AOT compatible. So, um, it was kind it was nice to find a library like that where I didn't have to re cuz this would if I had to reimplement like the the two the UI the 2y aspect of this like I probably wouldn't have a functioning app to show you cuz I've never done anything like that, right? I'd probably still be trying to figure that out. Um, so yeah, good stuff.
Hey Remma, how are you? I make kernels, both Linux and custom, but I'm not official though. I do them for fun.
Well, that's really impressive. I don't know where I don't know where to start with working on kernels, but that's awesome.
Yeah. So, that's that's what I've been building, Mark. And I haven't been doing much of it on stream mainly because I it it bothers the hell out of me when I'm trying to build something and people are like, "Yo, why don't you just use AI, bro?"
But if you're doing an if you're doing a course or you're playing a game, people tend to not bother you too much about how you're building what you're building because they sort of like, oh, you're you're doing an educational course, right? So people tend to leave you alone.
Try the Linux from scratchbook. Oh, okay. Thanks for the recommendation. I don't have much interest in OSS, operating systems, or like low-level stuff. myself.
Um, but thank you for the recommendation.
Just not really my I guess my cup of tea, you know.
I also I've also been using uh Oh, so here's an example. Here's an example of a stream that has a ton of chat messages in it. This is a streamer that I like.
Her name's Sweet Tales. And when you open up this has like thousands of messages in it, but you can kind of see the UI doesn't block.
This took me that took me like a long time to figure out.
I had to go read ter the terminal code to figure out how the event loop works so that I wasn't spamming it with, you know, thousands of events. So I basically do it in batches.
so the UI stays semi-respons responsive.
And then I also added um a loading that little connecting indicator there that took a that took a long time to figure out which is more of a reflection on my skills, not necessarily how hard the problem was, how hard the problem was, you know, but I was proud of myself for sticking with it and not giving up on it.
Mark is remind Oh, thank you. Appreciate that.
Cody, that's why I build offline bare metal AI on edge devices. I don't like my data being looked at. API calls to so many hook scripts that that compile your data. Interesting.
I guess I've never had that concern or that problem.
bonus software. This is really cool. I was looking into doing something like this using QT, which is my area of expertise. Nice. You should do I handle emojis? So, I don't I don't um so I looked at uh have you guys heard of um have you guys heard of uh there's another there's a Twitch client out there that's for the terminal. I think it's called got I think it's called something like Twitch chat client.
I forget what it Twitch Tuy. That's the name of it. So this I there's a there's a streamer I follow on Twitch. His name's Dylan Dylan Dylan something or other. Dylan Molroy. I think he works at Cloudflare.
I found him through the Prime universe of content creators.
Uh, see if I can find him. I think I saw him using this on stream one day. This Twitch tuy.
>> Do you know what Spider-Man?
>> And that's kind of what inspired me to like try to build something of it for myself. But I wanted unified chat. That was the big thing. I wanted unified chat. Kind of like what I have in um kind of like what I have in streamerbot.
And that so streamerbot was kind of the inspiration for the the tabbed UI and you know the separate chats and stuff.
And then Twitch Tuy was kind of the inspiration for bringing it to the terminal.
So, this supports emojis.
And when I went down the rabbit hole looking at how they do it, they basically only support it if it supports a particular protocol. I think it's like the kitty protocol or something, but only I think only Ghosty and the Kitty ter I think only there's only like two terminals that actually support rendering these imagebased emojis. So, it doesn't handle those um because I don't work in I don't work in that kind of terminal, right? But it but I think if if uh if somebody wanted to implement it for those types of terminals, I think you could you and you could probably you could probably use a some of the code that's in this Twitch 2 library to do it. I'm assuming. Um, but yeah, I kind of I kind of bailed I kind of bailed on implementing it when I found out that in order to support them or I bailed on trying to support it when I realized my terminal of choice doesn't doesn't support doing that. So, I just stopped working on it.
Long story short, long story short, do you handle emojis? No. But that's why I I did do my due diligence of of why I don't handle them. It does handle normal though, normal Unicode uh emojis, which to me is is enough.
Yeah, this is this has been a ton of fun.
Interesting. One of my drivers to do this is handling emojis. The current plugins are a pain to get configured correctly for integrated chats. Oh, interesting. Okay.
Yeah. I don't know. Yeah. I'm not sure how you would do it.
I'm not sure how you would do it without relying on the terminal you're in supporting it.
But if you ever figure it out, I'd love to I would love to adopt it or adapt it.
So that's that. That's term chat. Term chat will eventually be publicly available. It is just not it's not in a place where I'm proud of it enough to share it.
Uh it's probably I don't know 85% of the way there. And it's it took me like it took me like a week to get from zero to like 75% done. It's taken me probably a couple months to to push it along to the next 10% as these things go. you know, you kind of you get caught up on tricky things or you want to add polish to this and that. You know, I'm sure somebody could vibe coded in a weekend. Okay. I'm sure I'm sure somebody could do that, but then they would miss out on all the fun I've had.
Excuse me.
Why does the empty anonymous str have two pairs of braces? It doesn't. It's a syntax error. Strruct is the type and is the value. Yep.
which is ordered from least to most memory usage.
16.
Okay. Strruct is zero. So it has to be one of these two. Bool is just a single bite, right?
Yeah. Single bite. So this one we need a way to differentiate between standard and premium users. When a new user is created, they need a membership type. Also fun in software. I don't think I ever actually ever said hi to you, but hi. Nice to see you. Thanks for stopping by.
Appreciate that.
Create a new strct called membership.
Okay, it should have a type string field.
Type string should have a message char limit which is an integer.
Update the user struck to embed a membership.
Complete the new user function. It should return a new user with all the fields set as you would expect based on the inputs. If the user is a premium member, the message char limit should be a th00and otherwise it should be 100.
Okay.
So, let's return a user uh like this.
And we'll say type is membership. Oops.
Type is membership type.
Syntax error undeclared in type declaration non-declaration statement outside function body what can I not can I not do Oh, it's cuz I'm trying to do this like it's C#.
Whoopsies. Okay.
Uh oh. And this can't be What? Okay, hold on. So, I know message chart limit should be limit go. Doesn't have a turnary statement, does it?
Okay, we'll just do bar limit int.
And then we'll say if membership type someone's in my backyard it's my wife.
So if membership type equals what? Yeah premium um else limit equals 100. Uh actually that can be the default right and we can just we'll just say if it's premium we'll just set it to a th00and limit equals 100 limit. So why can't I do this?
What have I what am I doing wrong? Can I not What am I doing wrong here?
doing something wrong.
Should be because I had a spaced unexpected in type declaration line 19.
Oh, sorry. Line eight. Line eight.
Oh [ __ ] I'm an idiot.
Undefined membership.
Unknown field instruct literal of type user field message instruct literal of type user undefined limit user.ype Type undefined undefined limit.
Yes, limit is undefined field in type struck literal of type user unknown field.
Oh, is this because I need to do um like this.
God, man. And my my go is rusty, huh?
User user message char limit message.
Oh, message char, not chart.
There we go. God dang, man. So then I can do this. That wasn't the issue. I can do this.
Line six. Thank you, Cody, for trying to point it out to me before I got to it.
Create a send message method for the user strct. It should take a message string and message length int as inputs. If the message length is within the user's message char limit, return the original message and true indicating the message can be sent. Otherwise, return an empty string and false.
Okay.
Let me see how the tests use this.
These are our test cases. Run run run cases.
Okay. And then how does those get used down here? Send message. Yeah. So this should be defined on. And so we should say type uh u user uh not type funk uh send message and it takes it should take a message string message string and it should return bool and we should say if uh If length of message Oh, message length.
That's kind of confusing. You take the message and the message length. If the message length is within the user's car message character limit, return the original message false. Wonder why you wouldn't just uh Yeah, I don't know. That seems weird to me. Why would you just derive the length of the message from the message?
If the message length is within the user's message character limit.
So if message length uh is greater than u dot membership dot message chart character limit then we have a problem. So we'll return false otherwise we'll return true.
And we can actually make this a little bit more succinct by just saying return that two variables returns one value. What are we supposed to return otherwise return empty? Oh.
Oh jeez.
So we do need this check.
So this will be string.
So this to be true and this will be the original message.
Too many return values. What? I thought it just told me I needed to return return the original message and true indicating the message can be sent. Otherwise, return an empty string and false. Oh [ __ ] I got to put a comma in there.
Sorry. That's a silly That's a silly one.
Let's see. Invalid operation type.exect success does not equal pass mismatch type bool and string.
Oh, these are flipped. Okay, so this should be message and true and that should be empty string and false.
So we should flip these string bull.
Passes passes.
Man, I hear a lot of movement upstairs.
My family must be awake.
All right, we know about interfaces. The birthday message and sending report strrus always have already have implementations of the get message method. The get message method returns a string and any type that implements the method can be considered a message.
Um, add the get message method signature as a requirement on the message interface.
So we should have no params and we should return string.
So we're going to say get message returns string.
Then this is going to be um complete the content of the message. The cost of the message was this the length of the message multiplied by three. So we return message equals oh that's not um I'm just going to call R message dot get message and then we'll return R and the length of R uh times Success.
Run the code. You should see an error indicating the contractor type does not fulfill the employee interface.
Implement the missing get salary method for the contractor type so that it fulfills the employee interface. A contractor's salary is their hourly pay multiplied by how many hours they work per year.
Yeah. So this there's full-time implementations here.
They've implemented get name but they have not implemented get salary. So we should have funk c contractor type as a get salary. Get salary returns an ins turn c.ourly hourly pay time c dot hours per year.
Success.
A type has all the required interfaces methods defined on it.
Can I can a type fulfill multiple inter interfaces? Yes. Why not?
Interfaces quits. Go uses the interface keyword to show that a type implements an interface.
There is no keyword in Go.
Inherits implements a fills. There is no keyword. It's implicit.
Right? In the example given the shape type implements the interface.
So we have a shape interface and the circle implements it. So shape circle no circle shape.
Cool.
Got 15 more minutes. I'm going to go for about 15 more minutes. I'm going to use the rest of my potion and then I'll probably call it a day. It's been a good stream, guys. I appreciate everyone who's stopped by and said hi and asked questions and had good conversation.
Thank you very much.
If the email is not subscribed, then the cost is 5 cents for each character in the body. If it is, then the the cost is 2 cents per character. Return the total cost of the entire email in cents.
Complete the format method. It should return a string in this format. If the email is not subscribed, change the second part to not subscribed. The single quotes are included in the string and content is the email's body. For example, okay.
I actually think it is easier to understand if we put this stuff up here.
So email we'll say if e dot is subscribed uh is false then the cost is 5 cents for each character in the body. So return length of e.body body times five.
If it is, then the cost is 2 cents per character.
Return the total cost of the entire email in cents.
Return length e.body times two.
The format is going to be it should return a string in this format. If the email is not subscribed, change the second. Okay. So, we will do uh let's call this status, right? And we're going to default it to not subscribed.
And then we'll check if E is subscribed.
like this.
And I'm actually going to do the same thing up here. This makes a little bit more sense, I think, to the reader.
That way we just we don't have to invert the polarity of that member and we just say it's subscribed return the lower cost. If it's not subscribed, turn the higher cost. And then here we'll say if you are subscribed then status becomes subscribe and then we will return the final formatted string which is going to be um ft.sprintf sprint f and we're going to need the contents of the body type delimiter and then percent s is our status. So this is going to be e.body and status and did we import ft? We have not E dot is subscribed undefined.
Yes, it's lower case.
Are you required to name the arguments of an interface in order for your code to compile correctly?
Uh, no.
Why would you name your interfaces readability and clarity?
When working with interfaces in Go, every once in a while you'll need access to the underlying type of an interface value. You can cast an interface to its underlying type using a type assertion.
The example below shows how to safely access the radius field of S when it is now when it is not known that S is a circle.
Oh, okay. That yeah, this is our cast right here. Okay, so what we want to do, we want to check if S is a circle in order to cast it into its underlying concrete type. We know from a function signature that S is an instance of the shape interface, but we do not know if it's also a circle. C is a new circle str.
Okay is true if S is indeed a circle or false if S is not a circle.
I like how they they just linked out to the type assertion.
They should have they should really update this they should upd up update this markdown to clearly state that this is the this is like the type assertion syntax cuz they don't really state that. You kind of have to infer that from reading the snippet of code that like that's how you do it. But they really should state that very explicitly in my opinion assuming you know you're a brand new person to go or brand you're reading you know you're learning programming for the first time. Implement the get expense report function. If the expense is an email return the emails to address and the cost of the email. If the expense is an SMS return the SMS's to phone number and its cost. If the expense has any other underlying type, return an empty string and 0.0 for the cost. So, we'll just take care of our default case first. Return 0.0.
Otherwise, we need to do a type check.
So, we'll say um we have an expense.
And how do we Oh, yeah. So, expense, email, SMS, do those both implement costs? Yes, they do. Email implements cost. SMS implements cost.
So, we will just say E.cost and then uh we'll just check. So, we'll say um email, right? And then we'll say is email and this will be equal to e dot email.
And we'll do the same thing for SMS. Is SMS e do SMS.
Okay. If is SMS then we will return SMS dot what was it?
return the emails to oh we have to return other things.
So, this is going to be an empty string.
And then this is going to be uh empty SMS cost, which I guess depending on how you wanted to do this, right? Like you could probably write this a couple different ways, but we'll just do two. So, two address and two phone number. So, two phone number This is a member.
If is email then return email dot to address and SMS dot or email cost like that.
Yeah. I don't know. I don't know what the I don't know what the right way you'd appro you could also do something like this where you could say um you could actually just do ecost right and then you could also do uh like bar I don't even uh destination you do desk equal that to an empty string and then instead of returning here I Guess you could assign to destination.
You can say destination equals email to address and then this one would be uh destination equals SMS.2 to phone number.
I don't know. I kind of I kind of like return like explicit returns because when I'm reading code I kind of feel like my eyeballs clearly say see like oh there here's a clear exit point from the function right here's another clear exit here's another clear exit. Um but you could if you didn't want I guess to do that you could just fall through and then just return destination right.
Yeah, I guess there's a couple different ways you could write that. Um, let's see. Submit.
I kind of wonder what wonder what they did.
So, they they did a return like I did initially.
I think that makes sense.
type switches got four minutes. Can I complete this in four minutes to get my extra XP? Let's let's see if we can. If the expense is an email, return the emails to address and cost of the email. So if so, uh email is email that's going to be equal to e type cast to email.
Uh we can do SMS is SMS E do SMS.
Oh, they want me to use a switch. I missed that.
So do switch B equals E dot type case SMS uh case email.
What's my success?
Okay, I think that's where I'm going to call it for the day. It's been a good solid stream, huh? How long we did?
Three hours. Three three hours and 45 minutes. Yeah, it's a solid stream. One of my one of my favorite streamers who streams Call of Duty, he streamed for 13 hours yesterday. Can you believe that?
13 hours.
People be [ __ ] grinding, man.
Okay, I'm halfway through or roughly about halfway through. So hopefully we'll finish this either tomorrow or the ne or part of the next morning and then we'll move on to learning HTTP clients and then we'll get to build a Pokédex and a blog aggregator.
We're making progress, man.
All right, see you, Bolivian. Have a good day. Appreciate you hanging out. I don't know if anybody else is here. uh if you're here, I'll be happy to wish you goodbye. Otherwise, um I will just generally wish everyone a very lovely Sunday and hopefully you have a great start to the week and I will see you, I guess, tomorrow morning.
All right, bye guys. Bye. See you guys.
Have a good day.
Related Videos

TOP 15 Data compression Interview Questions and Answers 2019 Part-2 | Data compression | Wisdom jobs
wisdomjobs
281 views•2019-06-28

CTS 158: 802.11w Management Frame Protection
ClearToSend
4K views•2019-02-04

NDSS 2019 Send Hardest Problems My Way: Probabilistic Path Prioritization for Hybrid Fuzzing
NDSSSymposium
496 views•2019-04-02

How realistic is Cities: Skylines?
CityBeautiful
159K views•2019-02-14

GUIs & TUIs: Choosing a User Interface for Your Python Project | Real Python Podcast
realpython
2K views•2025-04-04

The OSI Model - Explained by Example
hnasr
225K views•2019-05-12

Cloud Computing - Introduction
elithecomputerguy
98K views•2019-10-07

From Traveler's Dilemma to Dynamic Routing | Demystifying Networking
IITBombayJuly
5K views•2019-08-04
Trending

2.4 BILLION Records Got Leaked...
DeepHumor
15K views•2026-07-22

Playstation NO DISC/NO BUY Fight Is Over...
DavidJaffeGames
4K views•2026-07-23

Should I buy a Sawmill?
essentialcraftsman
29K views•2026-07-22

Americans Confused in Australia for 17 Minutes Straight
IWrocker
17K views•2026-07-23