 See if anybody turns up the audio down on that and the audio up on that and but there's a Why is it always that the microphone volume is too low every time I do any of this the microphone volume is too low? everybody's Ears out probably that looks okay Yeah, I don't get a proper microphone, which I had all set up on the other computer so frustrating There's no microphones. They just crack all of them bad. Well, if you're gonna at least hear me I can just turn the music off on the game Seems pretty substantial But okay, I can look with that. Okay. Good Well, I might as well get started We're just It's just you now We'll do some stuff and This will be my practice although I have done this before so I didn't need to practice Well, you need to practice you don't need to see my OBS setup That's going Okay All right human resource machine. It's a programming game. I don't know. So have you seen this game before? It's programming in Assembler really But the concepts are also similar that I think it's interesting for 1,000 people and a fun way to learn some of the basics of programming so my jobs are Well, the programming is done via this drag and drop interface Drag commands into this area to build a program. Yes, I can do that take it from the inbox move it to the outbox So just like real programs. It's always taking input creating output Yes, not enough stuff in the outbox expected three items Because it's not looping Okay, so you have not played the game before cool. Well, at least you'll be interested to listen Okay, so it puts one thing from the inbox and put it in the outbox, but that's just a command. He wants all three things So I stop And I've got to repeat the commands three times. I assume Pick up the inbox take it to the outbox Pick up the inbox take it to the outbox inbox inbox Outbox outbox So these do relate to commands that we might have in our programming languages read line print line See in see out depending on the programming language um But the main concept here is that it's sequential And that you have to but one of the cool concepts that I like when you learn it this way Is that that if you're doing that, um on a tutorial or something that would have been saved for a loops concept, but here it just makes it clear that You've just got to do it three times and even later on when you get some more facilities All you're doing is finding an easier way to say Do it three times. Okay. What is your next? Oh, I got promoted to the next mail room on the screen still a little bit too Big I see Yeah, I couldn't even get the screen resolution right on the screen All right bright future of course new assignment Ah, so now I've got the jump which will help me To do the exact same thing without having to repeat it over and over Grabbing each thing this time. He's asked me to please do it with only three commands And the jump I get to tell it where I want to jump back to So the sequencing here is super clear. It's got an arrow every time the sequencing just doesn't go it goes out of line So unsprisingly I just use the brand new thing The little green arrow is my Program counter telling me which step is being run We get something similar to that when we do our programming with the break points and we step one bit of time Oh, let's walk faster Easy peasy Okay, the copy floor So the cool thing here is that we've introduced now effectively memory um There's a reason I lay out my memory in In number of examples I do as a grid because I find it's Intuitive for me, but I think one of the reasons it's intuitive for me is I Played this game. Okay. What does he want this time? Oh, no the inbox conveyor system is completely broken Doesn't mean we get to take a break from work So ignoring the inbox just send through the following three letters to the outbox. So here we're we're Getting introduced to memory by not having to do any manipulation of it. We're just using the ones that are in there b u and g So it helps me understand the copy from now copy from is What would copy from be that's the use of a variable in Other programming languages I'd have a programming language. I'd have a variable named for they're just labeling each memory slot by number, but Uh, we would label it with a name So the memory the variable would be called for and we're just using that variable Let's copy from nought to outbox And copy from To out now, but they're already here somehow they already got here I'm sure we're going to see how to do that continue scramble handler What's next All right, good. So the conveyor's back. We've got a smaller piece of memory. There's three slots in this memory if you remember from Last week we were talking about bits and bytes and whatever each of these little boxes down here on the floor Slots on the floor I'd count that as a byte Of memory it holds a single character by the looks of it and a character needs eight bits So we can say we got three bytes worth of memory here Data went collate itself. What do they want me to do this time Grab the first two things from the inbox and drop them in the outbox in the reverse order And then repeat repeat repeat. So I get four and eight and they have to go out as eight and four J and u and they have to go out as u and j So i'm going to have to grab it from the inbox Put it somewhere on the floor, which is the copy too And then I can grab the next thing from the inbox and immediately send it through to the outbox Because After I've got four out of the way eight is the next thing to go to the outbox And luckily for me the next thing I want is already on the floor waiting for me So I can copy from that exact same location But I can use any location I want but that's the one I've gone with and put that in the outbox So that'll make sure that Four goes on the floor eight goes on the outbox floor goes on the outbox And then I just need to make sure that whole thing repeats over and over So that I can do however many things are in the inbox Let's go So that's us assigning a Value to a variable so that copy to zero would be the same as Zero equals read line or something Looks to be working And you'll notice when we put something new on the floor And we take something out of the floor It's still there and when we put something new on the floor it just wipes out the old thing That's also how memory operates in a computer when you read from memory It doesn't take the thing away. It's not gone. It's a copy And so in this case they're analogy with the floor and bits of paper isn't a perfect one because you would normally put them down To pick them up they would go They would disappear when you pick them up but that's the reason they chose a copy to operator instead of a put down operator or a pick up operator because How computers work and they're trying to do an analogy for a computer Oh, no cutscene. I like your cutscene You can't hear what's saying They have funny cutscenes for whatever reason I personally just want to skip past these and get back to more puzzles, but I guess this is what makes it a game Alrighty Let's do this next one rainy summer All right, it's welcome to my personal rain cloud. I was never very good at math Since I have only three fingers on each hand. Whoa. Oh, we just do But I hear you don't actually need to know very much about math to complete these assignments good So we've just got a new instruction, which is add now when you're adding You can't just like add you have to add two things So this add command must add something. What is it adding? It adds the contents of a tile on the floor to whatever you're currently holding So I've got to be holding something when I call the add And then I got to tell it which spot on the floor and it'll add those two things together This also is just like how computers operate inside when you get to the cpu operation for an ad it always says add well it will often say add the The a current register to a value from the memory So that's what we're really doing here. We're adding a special register Which is me the thing i'm holding to one of the values in in memory If you can imagine other ways to do add you might make add need You got to tell it two spots on the floor and it'll add them together Or it might just say you got to hold two things and it'll add them together But in this case it's gone with the one you're holding and the spot on the floor So Did you tell me what to do? Yes, he did add them for each two things add them together and put the result in the outbox All right, that's an easy. So I'll grab one from the inbox that'll and pop it on the floor And always choose position zero Then I can pick up from the inbox And as long as I add to position zero, I'll be adding to the thing I just picked up So this is now like saying read read a variable read a value X equals value read a value X equals X plus the value I'm holding And then I should be holding the new Output I should be holding the addition so I can drop it in the outbox And then I can jump because on the floor Way seven add them together I'm holding nine which is the ad gets added to the outbox Okay, so I put the new one down and that's what I wanted right Had them together and put the result in the outbox. Yes To be doing okay. Let's hurry it up Oh, you don't need the volume anymore. It's probably messing with you. All right. So again, what as a programming person that Appreciate about this is that they're showing me how to program actually The system they're using is one that does exist on real computer processors And obviously it's different to what we do with our higher level language with processing but this The concepts of sequencing and having a memory slot and putting things in memory slots and the way you construct What things you have to keep in a memory slot versus which things that you can just process straight away that's all stuff that They're the kind of implicit skills that you pick up as you do more programming. So this kind of practice is cool Let's do the sidetrack Who am I I'm the male dude. It's optional areas high performing employees only it sounds like me Oh, okay We need to make some changes 100% performance performance we value with extra scrutiny. I can get bonus points from here For each thing in the inbox triple it And outbox the result. Ah, well, that this is easy enough once I pick something up and copy it to the floor I'll be holding a value and that value be on the floor So I can add them And then the original value will still be on the floor so I can add them And that's tripling So it's another little programmers trick when you need to multiply by three You can instead add the same thing three times Why would a programmer ever want to do that? Because multiplication can be slow on a computer whereas addition can be quick So sometimes if we're doing smaller multiplications, we'll choose to add instead These kinds of super fast numerical algorithms are important the most famous one would be the Is it the square root algorithm used in doom or something? The John Carmack wrote to make it fast enough so he could do his 3d graphics on a whatever it was 486 Okay So we grab it we copy it to the floor so that we can add it because you've we've got to add between What's in your hands and what's on the floor? Let me add That one let me add again That one Then we take that to the outbox Then we jump and we keep just doing that over and over and I think that will triple each thing on the inbox Yep So another fun thing that I like about this program is that it pushes you into these little programmer tricks that Assembler program, I mean in this case this is it's just emulating assembly programming right not not the type of programming We do which is a high level programming And you're learning the tricks that assembly programmers have to learn along the way To get it done, but you do them each in a little really constrained way So that you can You know like a puzzle like at any game where you get to a harder level and you just keep trying it over and over until you get it But when you do get it what you've actually got is a programmer's trick And so by the end of the game you've built up a ton of programmer tricks one by one Okay, so what I'm going to do is I'm going to call that experiment done We've got half an hour. Well, not half an hour probably 15 minutes because it took me so long to get sorted Uh, but we got half an hour of that experiment done and we'll see if I said 23 minutes, so we'll see if um YouTube keeps this and all that kind of stuff and then I'll chat again in the lectures to see what people want to do In the future. Are there any questions or things on a chat that I should deal with before I disappear? Because the lag I think I wait I want to see my head going back and forth on the preview And I know it's caught up Okay. All right. Thank you very much and I will catch you around sometime