we're live, the movie show here on a given Tuesday with George Cason, and we're really having a good one this time. It's called The Pig. George, you know, that was a real stroke that we should look at and review The Pig for this show. Why? Pig is very, the plot is very, very subtle, but very profound. And you have to sort of look behind the initial scenes and put the whole thing together to understand what the writer, the director, is trying to convey. And it's a, when I say profound, it's lessons for life, for every one of us. Because every time we do one of these shows, it plays into our own lives, all of our lives, right? Now, I don't know if you want me to get into the plot, but this has- No, well, no. But let's talk about the genre first, OK? And then we'll talk, we'll go into the plot and why it is so instructive to all of us. Here's a movie that's not violent. Although there are implications of violence, it never actually gets violent. And there's no particular romance involved. I don't think maybe you found it there. Sometimes if you look hard, you find romance wherever you go. And sometimes you find vengeance. I'm not sure sure I would call this vengeance. I would call it maybe bad memories, memories of all kinds in this thing. So it's different. This movie was different. It's like 99% of the movies are in one category. And this one, Pig, is in another category, kind of all by itself. And that's what's so remarkable about it. And just as you said, it's instructive. It's useful to the individual. You take away something from it, and that makes it different. It's not just the regular stuff. OK, let's talk about the plot, and then we'll talk about the takeaways. This has to do with a gentleman by the name of Rob or Robin. His name was Robin Feld. And he was famous. He was a famous chef. But you don't know that at first. You don't know that. You see him as a schlub living in the woods in a rundown shack. And you never have the slightest idea about his background. You see him as a schlub. I'm sorry to interrupt you, but. No, no, that's good because. One thing that I get out of this movie is that it reveals what happened only step by step. It spoon feeds you. You don't know what happened until you watch it for a while. And then you get, mm, there's an interesting fact. Mm, there's an interesting.  I'm sorry. Go ahead. Similar to the father, which we reviewed a number of weeks ago, right? Where they give you little tidbits that I was going to get here in this big movie. As you said, they're giving you little clues from the beginning, but nothing really comes together until later in the movie. So that that's that's thing. So as you said, you see this guy, middle-aged guy living in the woods in a ramshack shack in the middle of nowhere, right? In the state of Oregon. The state of Oregon. My guess it was it was probably middle, right in the middle of Oregon, maybe on the west side of the mountains there, Cascade Mountains, maybe on the east side, but it was definitely in the woods. And it was remote. It was hours away from Portland, for example. He's out in the middle of nowhere. And he's there. And what he's doing for a living, he finds truffles, which is a delicacy. You know, in France, I know it's a big delicacy.  So the pig helps him to find these truffles. And then he's got this buyer, Amir, who comes from Portland. Before you get to that, one of the tip-off points that I found was interesting. By the way, a truffle is kind of a mushroom, isn't it? It's a delicacy, mushroom. It's only available in high-end restaurants. It's popular in Europe and particularly in French cooking. It's expensive. The other thing is that it was so interesting and maybe mysterious when he goes out with the pig and he gets, this is in the early moments of the movie, and he gets the truffles and then he comes back to his shack and what does he do with them? He cooks them. He cooks them and you see his cooking style. You see the way his hands work and the pan and the way he cooks the truffles with the ingredients and so forth. And you say, this isn't really a bum. This isn't a remote, removed guy living in the middle of the woods. This guy has something special going on that he could cook and like and love truffles the way he demonstrates. Yes, definitely.  I haven't been much in restaurants for like 40 years since I became a movie. One of the clues is he's got this battery operated recording machine or a player and he puts this cassette in there and for just a minute and a beautiful woman's beautiful voice comes on and then he stops it after just a second. So that's another clue that there's something going on. Okay, let me get into a little more then you can chime in if I'm jumping ahead or not. Okay, so he goes out in the woods and he finds the truffles with the pig, the little pig, you know. I thought the pig was very cute. Very cute.  It had kind of freckles on it. It was a brown and white pig. It was a small pig.  You know, pigs can be good pets and this was a pet as well as a truffle pig and it was very friendly and warm and this was his buddy in life in the woods. Exactly. And pigs are known to be very friendly like porpoises. You know, they've done studies. I mean, unfortunately I don't eat pigs, you know but most people eat but they're supposed to be very gentle animals and people don't understand. They may be rolling the mud. So yeah, so this was his, this was like a companion to him and we'll get into that too about what it was. So then he's got this buyer, Amir, that comes with his fancy Camaro or whatever from Portland every Thursday and picks up those truffles and gives them the money so that he can live.  One interesting thing is that when you meet Amir, you don't like him. He's a hot shot. He's a wise guy. He's running too fast and he's a hustler is what he is. He's a truffle hustler is what he is. And you immediately, the way the movie sets up you don't like him but as in all good literature and all good movie the guy changes in the course of the movie. His character is dynamic. He goes from a guy who's really not likable who's a hustler to something else. We should talk about that too. Oh yes. And the thing is, you know the apple doesn't fall far from the tree. I mean, we're gonna get into more his father Darius who is like a real hustler sort of mob related kind of guy in Portland, right? And that's part of the plot too of what happens. So Amir picks up that stuff, you know and takes it and then there is some violence Jay in this movie.  Beat him up and then he was sleeping and all of a sudden he gets up and he's all bloody, right?   They took his pig. You know, and at that point it seems that the pig was very central to finding the truffles, you know that's what we are led to believe at that point. Yeah, he's crushed. I remember that. And he's crushed and then only then you begin to realize how important the pig was. This was no ordinary truffle pig. This no ordinary companion. His life revolved around this pig. You don't realize it until the pig's gone. Exactly.  So Amir comes and he convinces Amir that he can't supply him anymore with truffles without his pig. He needs his pig, right? And everybody believed, Amir believed that the pig was the central point of how to find the truffles. And we'll get into a little later of how Rob tells him later that the pig wasn't that important for them. Amir tells him, why don't you get another pig? Well, you know, there are other pigs in the world.  I need to get this pig back. I'll go to great lengths to get this pig back.  Okay, so Amir, then Rob fell, you know, Rob the guy living in the woods, right in the cabin convinces Amir to take him to Portland. But Rob is still unshaved. Like I did this in honor of Nicholas Cage and he takes him to Portland.  And he says, no, no, I'm fine. So the bottom line is he convinces Amir to take him to Portland because he figures he was able, he know, you know you don't understand at that point who he was that he would know what's going on in Portland, you know because 10 years. You never know, right?  He is filthy dirty. He doesn't want to clean up but he wants to go to Portland because Portland is really important to him.  So what was that chapter in his life? He, now I can get into what I alluded to too early. He was a famous chef and restaurateur like Alan Wong here in Hawaii, hallelujah. He's famous, he was famous, right? And he had a negative turn in life, like all of us. Like one of the things I wanted to get in every one of us, if we don't die young we lose our parents. Loss is part of life. Bottom line, life is about loss and life in this world always and today is about money. And these are the two themes that the writer and the director and the producer are trying to interplay in this movie to give lessons in life. What is important in life? It's love. Love or money, love is more important. If you can have all the money in the world if you don't have any love in your life. So you begin to find out that Rob has sorted all this out. He is not into money, although he could be. He is into dealing with loss and creating a kind of lonely existence. But it works for him. He's very introspective. He's very philosophical and what's interesting is you learn this just little by little because in fact, the dialogue in this movie with Nicholas Cage is really minimal. He doesn't talk very much. And his sentences, his explanations are like one word, always very short explanation about what he's doing.  Nicholas Cage played this role to a team. He's ex, as you've said, one of his best roles that he's ever played. And he's playing a traumatized individual, someone who was traumatized. Rob was traumatized and that's what drove him to go to the woods and give up his famous life. I mean, he was famous in Portland, right? And eventually you get to understand that his wife died young suddenly, right? And a lot of people who go into his negative states of mind, they have a traumatic experience whether it's financial or death in the family or illness that drives them into this.  That's the lesson for me, you know, that seeing Rob, how he fell apart when his wife died, Lori, her name was Lori. And then you realize that at the end, that cassette was his wife singing, who he loved very much. And then she died very tragically at a young age. Well, there were parts of it, you know, parts of the church that I did not really understand. For example, Amir takes him to a place where he talks to a very grungy low life type of guy and Rob gets into this intentional situation where they're beating him up, viciously beating him up. And he doesn't raise a hand, he doesn't. And you're saying to yourself, you know, if he raised a hand, he's strong enough, he's focused enough to, you know, beat the daylights out of these people around him. But he doesn't do that, it's almost masochistic. Did you understand why he did that? What was going on there? It's for money, he made money doing this. I mean, that was something where they have fighters, right, and people pay to watch this, right? And he needed the money, and he also wanted to make underworld contacts, you know, from this bad guy to try to see how he could find his pig. He seems totally focused, totally focused on finding the pig. This is what he wanted to do, find the pig, right? So bottom line is here, that's what that was all about, right?  And then, so he's totally trying, I mean, but basically, as I said, totally focused and everything he does is to find the pig. So he didn't really care about reconnecting with his old life in Portland. No. That was of no consequence to him. All he wanted to do was find the pig. He had no money. My definition, you know, he was living in the woods in a scrubby situation, and he didn't have any money. So I guess he went to that low life dog fight in order to raise a few bucks. And also, don't you remember, also to make contact with the underworld people who might have stolen his pig? He wanted to find out who they were. This was a mission. It was a journey. It was an investigation. Where are those people? Who are they? How can I get my pig back, right? So that's what he's trying to do. And that was his total focus, is to do that, right? So eventually, little by little, you get little clues, right? To Lori, you know, they showed the mausoleum where she's buried, and he must have put all his wine and some of his belongings at the mausoleum, storing them at the mausoleum. Because the director of the mausoleum comes in and later on and gives him a bottle of wine from their cellar and then shows him Lori's place where she's buried in the mausoleum and says, I'm keeping the next one for you, you know? So, you know, the next space right next to that. So it all starts to come together, little by little, but it was the key. But you don't see it coming. You know, he's focused on his thing and he winds up running into people, sometimes by intentions, sometimes by accident, who know him and they're intimidated by his reputation. There was one scene where he was meeting, it was, Amir took him to a restaurant and the guy who owned the restaurant, who was a bit of a schlub, the guy said, Rob, it's you, you're back. You're one of the best chefs that Portland has ever seen and you're here. And here's the restaurant owner pandering to a guy who is an obvious bum in front, I mean, an apparent bum, who's in front of all his clientele in the restaurant.  But you begin to learn that even the high-end restaurants and all the owners of the restaurants and all the fancy chefs in the restaurants in Portland, they all knew Rob, but they didn't know what to do with him. They knew him, they admired him, they remembered him, but they didn't know what to do with him.   And he never changes his demeanor throughout the movie.  But Nicholas Cage, as you said, very subtly with very little words and the plot, you get to get the picture down the line of what happened, right? But you have to watch carefully. You have to take the clues as they come. They're not doing you any favors. They're putting a burden on the viewer. I really like a movie like that. You have to figure it out. You have to track on every little scene, every little piece of dialogue in order to find out what's going on. And that's like life, isn't it? You have to make an examination in your own mind. What's going on with these people?  Stellar performance by Nicholas Cage. Cage, Stellar, Stellar. You know, one of the things I also wanted to say is we're all going to be hit in life with loss of loved ones, maybe sometimes financial loss, loss of work, loss of reputation, but you've got to go on. And that's one of the lessons my parents gave me. Nicholas Cage is not trying to achieve anything here. I mean, you know from scene one what he's trying to achieve. He's not trying to get back to Portland. He's not trying to be a chef again. And the people around him have all changed and Amir is changing while you watch. And Amir's father, who is a kind of, as you said, a kind of mobster who lives in an extraordinary house in Portland, really beautiful house. But I didn't understand exactly what the engagement was, what the dynamic was. The guy was essentially miserable, the mobster. His life had deteriorated. He didn't get along with his son, Amir. He didn't have a life. And he was very pompous and arrogant in all this. And he was nasty to Nicholas Cage. And Nicholas Cage just maintained his stability, maintained his strength of his character. And you saw the mobster begin to deteriorate right in front of him. I mean, from a guy who was a really nasty, threatening sort of individual, all of a sudden he fell apart. Do you understand that scene? That was most remarkable. What happened? I understood it completely. Rob understood because he has a memory. He said he remembers every meal he cooked for every client. Right, that's a very important line for the movie. And the thing that you might have missed is that Darius's wife was in a coma in the hospital. But Amir, she had tried to commit suicide living with this guy. I mean, these bad guys, they have wives that sometimes just, you know, she had committed and she was in a coma. And Amir says, why are you still keeping her in that state? She's been in a coma for years. So what Rob did is he remembered Amir had told him that Darius and his wife were always fighting, but there was one time he remembered they had gone to a restaurant. And it might have been Rob that had done, cooked the meal, right? That they had this phenomenal meal with wine and everything. And they came home and the first time he saw his parents really stopped fighting and loving each other, you know? So that was the whole thing. Rob remembered that. And what Rob did is he recreated that meal because he never forgot a meal. Never forgot a patron, a customer. He never forgot a meal. And he cooked the meal again years later back from the woods, bloodied and disheveled and dirty filthy. In this mansion house, he cooked that same exact meal again for Darius. That was an extraordinary scene and Darius is just blown away.  And then he completely lets down his facade, right? And then you start to understand that this Rob is still pretty smart.  And he shirked all the things of a famous life and in Portland and he went into the woods and he withdrew from society, you know, because that was his choice, right? That's why he recreated himself. Yeah. And it was different than his life in Portland, different than his life as a famous chef and restaurant owner. But he, in recreating himself, he found enormous strength. And you saw that strength all the way through the movie. He could be beaten and, you know, pummeled and it didn't bother him, didn't bother him. He was dirty, didn't bother him. He was bloody, didn't bother him that people saw him that way. He was a pillar of strength. He was clearly the hero of the movie and a different kind of hero, but a hero. And he tells Amir that all his fame was all worthless. It was empty, you know, there was nothing to that because the clients don't really care who you are. They don't really like you. They just, because it's all this fame and fortune and all of this and that money really doesn't matter. Fame and fortune doesn't matter.    I mean, from society completely because it was so traumatic to lose his wife, right? Who he must have loved. And then in the place of the wife was the pig. The pig, because that was his companion. And then he tells Amir near the end that the pig wasn't really that central to finding the truffles. It was that he loved the pig. That was his companion. The loss of his wife who he loved.  And you find out that Amir, Amir's father, Darius, was the one who got those junkies to steal the pig because his son was telling him how good he was doing in his business. And Darius wanted to take the business away from his son. Darius wanted to hurt him. He wanted to hurt him. Make more money, you know. Money, money, money. We've discussed this before, you know. But, you know, I mean, I know you don't like asides, but my parents in Farmingdale, their best friend was Dr. Meierstein who had lost his whole family in the Holocaust. They had similar things. Dr. Meierstein came to New York and became the school district of position, opened a practice after a traumatic experience in Germany with his, he was with his German wife and his daughter. They had to leave Germany in 38 and his whole family was wiped out. So bottom line is we all make our choices. Rob made the choice to withdraw from society, right? Well, I think he was in pain and he found that he could lessen the pain by being in the shack in the woods hundreds of miles away from where he had, you know, lived most of his life.  And it worked for him. It totally worked for him.  And you know that he didn't have any of the, you know, accoutrements of a good life, but it worked for him. And I think the people who he ran into when he went back to Oregon, they saw that strength. And Meier grew watching that string and Meier was in awe of how Rob was handling things, how strong he was. And so did Darius, he's also in awe. But one of the crushing moments of the movie was when Darius admitted to Rob around that dinner that Rob made in this mansion house, this really extraordinary mansion house, that he had hired these guys to steal the pig and they didn't take care of the pig and the pig had died. So, you know, this mission that Rob was on at that moment came to an end, the pig was no longer alive and he was crushed. But you know, you're right about his way of dealing with it and maybe it wasn't so critically important. It was part of his resurrection, if you will, but he didn't actually need the pig. He could find another way to rebuild his life.  It was tragic that they stole the pig in the first place. And so you left wondering, and then we really ought to talk about this, you left wondering, you know, what was this man really made of? What was his relationship with the pig and Ameer who he had known for a while? Maybe since Ameer was young, you know, like 30 or so, where did that start? And his very strange relationship with Darius. So, you know, the movie does not tell you these things. The movie leaves you wondering a lot of why this and why that. And at the end, Rob goes back to his shack in the woods and he resumes his life as a, you know, as a person in a shack in the woods. But the key thing- You don't understand it. You have, you're left thinking, what happened here? What was going on? I never really fully understood it. You helped me understand it a little better. I understand because as I said, my ex and I, we were trying to get back- Yeah, don't tell me about that. Tell me what happened here. That's exactly what I'm saying. Now, that's the key, Jay.  She's singing. This whole thing gets back to, he had this love of his life, right? And she died and he fell apart. And this is why he's living in the woods. It's almost like he feels guilty that he's still living and that she's gone. That's the way I got into the personal thing. That's the whole thing at the end. That's how the movie ends, Jay, is with him sticking that cassette in that player and listening to his late wife- He's still fixated. Yeah, okay, a moment now on the production values. The movie is a dark movie. You know, the color correction on the movie is dark. It's this never a bright sunny day. There's never a lovely scene, an outside scene. He lives in a dark place in the woods. His cabin there is a dark rundown cabin. And even the mansion is dark. Dark wood, dark rooms. You never really see the outside very much in this movie. You see him dealing with dark people. Darius is dark, troubled man. Amir has some promise, but he's also dark. The chef I mentioned in the fancy restaurant, the chef who used to work for him. I wouldn't say he's dark, but he's a clown. You know, he's not a serious human being. And what you have is this very heavy, dark character, Rob, running through his memories, his earlier life. And you learn about it looking over his shoulder. But he does not engage with any of that. He's merely passing through. He's having a moment of memory, but the memory is not of any great consequence to him. Am I right? Oh, totally.  And he only went to Portland because he loves his pig. And that's his companion.  He had no other contact with any other, maybe some of the animals in the woods. But the pig was his only contact. Well, he knew some of those rough and tough people up the trail in the woods. But clearly they were also dark characters and he had no relationship with them whatsoever. So this character, this Rob character is unforgettable. He's a giant of a man. He's a man who has dealt with adversity and loss and manages to have a resurrected life that works for him and that allows him to live alone. Sure, he's in pain, but he was in pain before. And he finds a path, he finds a way. And you are impressed with the strength of this individual. I was. Well, there's strength in him, right? But he basically took his loss of his wife and it changed his life, right?  You know, he's chosen. He's told Amir how empty his former life was, right? And this is his choice, you know? But there's still strength in him from how he became a famous chef. It's a story of heroism and a story of modesty. There's a modesty. He goes back and they all tell him he's the greatest guy around. And he doesn't care about that. He's not, as you said, he's not into money. He's not into power. He's not into fame anymore. He's shed all of those instincts. That makes it interesting. And, you know, I would look for another movie like this, a movie of strength, a movie of personal heroism like this. And I'm afraid that they don't come too often. And I'm gonna continue to look for another pig, George. We have to find one like this so we can make a comparison. But right now, talking with you today, this is a movie that's unforgettable. This is a movie which really doesn't have a comparison. You can't think of another movie that's like this movie. It's in its own category. Yeah. Anyway, George, what's our next one? I think you told, you sent me an email, something about the way America was or something. Oh, yeah. Yeah. It's once upon a time in America, Robert De Niro. It's a movie that was made in the 80s, but it is a fabulous movie. It was fabulous then. And it's one of those movies that has not lost its, its, you know, its timeliness. Anyway, George, thank you very much for this discussion. Thank you for all the points you have identified around this extraordinary movie. And I look forward to our next discussion here on The Movie Show with George Kasich. Thank you George. Lessons for life.


Hello, Happy Circuit by Hyundai. So this is a project build I'm doing. It's a message board that uses these 16 by 32 panels. I'm going to be using four of them and also the Matrix Portal S3 here. I have actually done a project that was similar to this. It had used some of those pixel purses from a few years ago. And it had six of those. They were about the same size as this. And I had powered by a Raspberry Pi. And I wanted to redo it with CircaPython. So I kind of rewrote all the code so I was all deported with that. So I'm going to go ahead and start with building the message board here. For the first part of the stream. And then I'm going to kind of go over that code and show that here. I'm going to start by laying four of these out. And let's start with laying these out so that the text on this is upside down. And the input is all the way to the right here. So then I have these kind of connector things here. And I just make sure this part comes up. And I'm going to go ahead and use just these nylon screws here. All right, those are going to be six of these connectors and 12 screws. So this will take just a bit here to go ahead and attach all of these. I have a couple different, well, three different sizes of screws here. I have these ones that I'm attaching. They're 10 millimeters long. I have a couple that are 15 or 16, I'm not sure. And then I have some M2.5 ones for attaching the board. So I'm going to go ahead and separate all those. Now, one of the things about the timing on creating this message board was because the new Matrix Portal S3 came out and it had enough memory and processing speed to be able to handle it really well. And so once that came out, I immediately was like, OK, let's go ahead and make a project. Now, on this last one, I'm only going to attach one screw on each of these connectors because the mount for the Matrix Portal S3 will be using some of the longer screws and going in through the same holes. And I'll show you that when we get to that step. And David Gludd said the Apple Blending wouldn't work on the old Matrix Portal. That's correct. You just, well, a bit of map tools wasn't available for it, but I don't think it would have had enough processing speed or memory for it to work. Arrows, yeah, that does definitely help. The ones on these particular panels, you can't really see very well, but it does say input next to one side and output next to the other. So that definitely helps. If you're going to stack them on top, I'm actually not sure what direction they come. OK, so the next thing I'm going to start doing is attaching these little side panels on. Those just have a little bit of a dovetail. So they just slide right into the connectors here. And then we have one special one with the, for the, so you can press the buttons or access the USB port. And that one is going to connect right here. OK, now here's the mounting bracket for the Matrix Portal, just a little square thing to help with the orientation. And then it only attaches with two screws. Yeah, let's just attach this here. These have these little inserts. So we just go right into the screw holes there and I use the longer screws for those. OK, now I'm going to go ahead and tighten up all the screws along here. Otherwise, it flexes a little bit. It might be better with some metal screws, but I went with the nylon ones because I knew that was available in the Adafruit store. I have these side panels here. I'm going to go ahead and attach one on this side. This part, I'm just going to slide all the panels to the right and that winds up much better with the buttons and everything. But for this next part, I have this LED acrylic here. It's actually left over from my previous panel. Yeah, I got an extra one and I cut this down. I actually cut this one a little bit on the short side, but it should work in this project anyways. And just go ahead and insert it in here with the mat side facing up. That's right to this. It's catching on that. There we go. Let's get the last panel right on. There we go. Oh, all the plastic parts here are 3D printed. I am writing up a guide and I will be having that all those included in the guide. As for the LED acrylic, there are some sold in the Adafruit store. They are this size here, like 12 by 6 inches, and they could be cut down. And you could put three or four of them in there. And that should work. Here's what it looks like. I'm going to go ahead and plug in the USB cable. I already have it programmed though. Just going to get going, but I'll go over the code here in just a bit. USB cable is not working. I'm doing it in my wiring. That's fine. That makes sense. OK, let's go ahead and click all that. Thanks, DJ Devin. Let's see, on the diffuser. But you were asking what size, screw size, and pitch for the mounting holes. I don't have any mounting hole. Or you mean on the back of the panel? Those are M3. And I think they're like 8 or 10 millimeters deep. I can't remember. Now for attaching these wires, I like to kind of take the two of these forks and then put them so they end up kind of closer, so that they end up more like that when they're touching. Maybe get good content, surface content. Let's see. This is the positive. Yeah, just standard in three sizes. And we'll just plug in these to each of the panels. OK, and then one of the things that I did on this design is I made it so you could get all this wiring kind of tied down with just some zip ties. I just insert right in one of these holes and poke it right out the other side. And it makes it a lot easier to secure everything. I will cover the power on here. Yeah, I tested it and it powers on the computer. It's about the same power requirements as a 64 by 32 panel because it's the same number. They're slightly larger, but I think that's more about the pitch spacing on that. So I had no problem powering off the USB, but I think if you did all white, it would have some power issues based on my experience with the Matrix Portal M4. Running this, if you don't want to connect to do a computer, there are some adapters. So you could just use an external power adapter like this. And we do have this power adapter that goes from the 2.1 millimeter to the USB-C so that can plug right into the top of that. So now one thing I can do to neaten this up a little bit is by creating some little loops here. I'll take some longer zip ties here and feed them through here. Tuck this up here, feed it through this one. And I'm just going to hold everything in place there. OK, now I'm going to go and put all these off. And if you have some, it's a little sticking up around here, you can use them out to secure it. Let's go ahead and plug that in and there it goes. And that's just running off of, I think it's 900 milliamps that comes out of the USB-C. OK, so I'm going to go over the code here. Let me just add my screen here and refresh this and put the blink on it for circuit path on it. Yeah, I think for, like I said, if it's all white or whatever, then I think it would require the external power and it may run into something where it does, then it'll kind of brown out and reset as what will happen. Let's see, code here. This is just a little demo that runs it. Oh, yeah, I was going, originally it was going to go ahead and try and do some complicated thing where I split off power and I powered the matrix portal with half of it and then I powered the LEDs with part of it and it was just getting very complicated. And when I realized it was able to power through here, I just wanted to kind of keep the circuit somewhat simple. So you didn't have to buy like 15 different adapters or whatever. Anyway, so on here, I'm actually importing the matrix part from the matrix portal library to start with and I just initialize it. I found the bit depth of five actually looks pretty good on here and then I have a message board library. I'll go over that in just a little bit, but that was a library written specifically for this guide. So the message board is kind of like the overall library that controls things. The font pool library, it was just basically a way of kind of storing or loading a font in there and then being able to retrieve it without having to have duplicates of the same fonts. And then the message is just kind of like, you could do different messages scrolling across here into my animations. So I just create, I'm loading the font or the aerial font into the font pool and then when I create a message, I say that's the font I'm gonna use. I have a mask color for the image. I found the mixing the different bit depths of the images just doesn't work very well. So I would suggest going with keeping it consistent like 24 bit seems to work really well. You can set the opacity in the message. And this one, I'm adding the masked star bitmap and that already has the same mask color in there and I'm saying hello world. And then I just tell it to scroll in from the right and then out to the left and it sleeps for one second and then out to the left. I'm gonna go ahead and show a different one here. Name this to do for now because I can't think of a better name. I'll rename this to code. But this one has a lot more messages here and examples. So I'm having it sort of changes the message in the middle of it. That way you can kind of do some things like going out to the internet and getting the time. It might have just browned up. So I can actually, yeah, I think it browned up. So probably one of these, it was just showing too many graphics or something. I'm gonna actually stop the from running right now because then I can show you the code without having to interfere. Let's see. Okay, so you can do a bunch of different animations. So a lot of it involves loading. You can load different messages. I have it so you can change the text in there.  So it just kind of goes in the loop here and then there's different animations. Go over those in more detail here. Let's see. So I have the message board here and then what I did is I took the different animations and I put them into these different categories. I just put them into four different categories. So the scroll animation, which you've seen, I'll start again. Scroll animation, what you've seen is you can scroll, well, you can scroll from to any direction which allows you to actually do some diagonal scrolling if you wanted to, but all of these functions just use that same one. And so you can go out to the left, in from the left, in from the right, out to the top and bottom and in from the top and bottom. So basically in or out in four different directions. And then you have a loop one, which is similar to the scrolling one, but it will actually appear to loop from one side of the screen to the other and it'll go in four different directions on that one. You have a split one, which will, it can split out in and then out up or in vertically. So that's four different animations there. And then the static one is just kind of like the miscellaneous one. So it'll keep the text in place, but you can show it, hide it. You can cause it to blink and cause it to flash, which is more about fade in and fade out, a certain number of times, and then there's fade in and fade out. Now I'm gonna go ahead and plug this in using that adapter I was showing you. And then I can show you the little demo I have on here. Okay, so that's the scrolling in, changing the message and then scrolling it out. I had to do the join in and that's the loop one there. So you can see how it kind of goes in from the side of the screen and it flashing there, splitting out. And it was just fading in and the fading out, scrolling up, down, the more scrolling on there, but it'll change your backgrounds and so showing you that and then it kind of starts over again. Let's see, and plug that in. So I'll show you that code of the demo that I just showed you. Okay, so basically I start off by adding any of the fonts I need into the font pool. And let's see. And then I start by creating the first message. I actually, I didn't even use this one, so I should remove that from the demo. So I'm just have message one. I'm just reading it. I'm not even putting any content in that one because I do it down below. What is it? Message two, I guess I could have some private stuff in there for debugging. I'm setting it to the comic font and then putting a mask color in there. And I'm adding the masked Blinka image and just showing secret Python. In message three, I have it set to a, what was that? Oh yeah, and you can do some offsets on there as well. So I had some spacing between the image and the text that way. Message three uses the deja vu font and it's just saying certifyfund.com and the fourth one, it's just saying violet pranks and showing it in white color there. So in the main loop here, I go and I start by adding all the stuff I need to into message one because I know it's gonna change on each iteration of the loop. And I just have it, oh, I should show you the animate function, which is kinda cool. So I have it scrolling in from the left, clearing the message, which basically clears all the contents from the buffer of the message. And then you're starting with the clean slate and then you just add your text and you tell it to animate. See. This one is just from the, basically from the static animations and saying to go, to show it, scroll out to the right. I'm clearing the message again here and then adding or more effects like with couple of spaces and then doing those animations. I was trying to make it as easy as possible to use Python to be able to control the animation so that it's really easy to create these. Oh, and then stuff like the flash one where you can do extra parameters. I'm telling it to flash three times. It's basically more of the same there that I kind of went over already. So let's go and show you the animate function, which is in the message board. So the animate function is pretty cool because what it does is it'll actually automatically load the correct class so that it doesn't have to load everything all at once. Start by loading the, it finds what the name of the folder is, which in this case is message board. Message board. And then it does message board.animations. And then the name of the file, the file needs to match the class name but it just the lower name thing. And then it kind of just dives down a little deeper and deeper until it gets the animation class. And then it can get the function name that you specify and then it'll add any of the keyword arguments. And it'll just call that way. So it kind of does dynamic loading and calling the function. That makes it really easy to add animations because you could add another category of animations if you wanted to and then just create all those. So I had actually ported those from the code I'd written for the Raspberry Pi powered one and this is how I would have actually preferred for when I wrote that code. And so I'm really happy with how this ended up. So this, oh, so this just does basic things like setting the background in there and then the draw function is all in here and it actually makes use of the bitmap tools and it uses the blip function a lot which is the function in order to really quickly draw bitmap and it makes use of the awful blend at the end to kind of blend the message with the background there. And I think, oh, let me show you the message class. Actually, I'll show you some of these other ones. The double buffer one's actually pretty cool. Seems like every time I select another file, it resets a, don't know if it's a bug in here. Okay. The double buffer, all that does is it sets up a couple groups, a couple bitmaps and then it sets up a couple tile grids in those groups and in order when it's swapped buffers, all it does is it will basically set the current group to the correct one and just show that group. And it works really well, a circuit file that I made everything a lot smoother. So this is a pretty basic class and it allowed me to read the, or set the shader if I wanted to or read the act, which is the active buffer. And that seemed to be everything I needed from that. And then the font pool here is just a really 20 line one that I kind of described that already. And the message class is one of the things it does is it'll kind of enlarge the buffer dynamically as you add content to it. And that way you can kind of stick with just the smallest amount. And the buffer just consists of a display IO bitmap. That's at the maximum size and it just will recalculate and blit the existing content onto the new bitmap and then set that as the active one. So the only things that it has on here is adding text, adding an image and clearing and then you can read some of the different properties like the mass color and the blend mode and stuff. And I think that about covers all the code. Does anybody have any questions in particular? You can add them to the Discord chat. Here, let's see. Oh, is my audio though? I just noticed a comment on the streamer that said my audio is low. I can turn it up a little. Is that any better? Oh, okay, good. Let's see here. See if any comments I might have missed. Okay. Oh. Okay, well, I'm glad the audio is good. I think I just turned it up just a little bit in OBS. What pitch size is the matrix? This is a P6 for the pitch, which means they're six millimeters apart. And yeah, I got this larger piece from TAP Plastics. At the time I got it, I was living near Portland and I just drove there, but they don't have anywhere I'm at now. I think they only have them in California and Oregon and maybe Washington and they do ship, I believe. Let's see. Let's see. Oh, yeah, the Matrix Poros 3 has the extra address bin, yes. One of the things I did when it was being developed was I went and tested it on all of the projects for the learn guides and most of them worked fine, including some that needed the 64 by 64. So yeah, it's, there's like the only thing I've found that the Matrix Portal S3 didn't do was the PWM audio and just has I2S audio, which is actually a really good quality. So it was good. And yeah, it does require soldering up a lot in the two contexts. Let's see, any other questions? If you think I answered everything, if not, then I think I have finished. And I will be putting out a guide here probably in the next week or so to that kind of goes over the whole build and everything. So that should be, that's why I'm wanting to know some of the questions because I can include that information in the guide. Oh, thank you. Yeah, I really like how this ended up. I wanted to use the strength of the frames that came with these LED panels but really makes use of that. It's a lot less printing than my previous one, which was one of my goals in redesigning this. I think that's it. So happy circuit Python day and thank you for joining me. And let's see, let me just move that. Okay, there, now you can see me. So happy circuit Python day. Let's see, I'm not sure who we are picking up next. I think it was a circuit Python day chat, if I recall. And that starts in about 15 minutes. Anyway, thanks for joining me.


Our first talk in the knee track today. Today, we have with us Haki Benita. And he is a software developer and a technical lead. He takes special interest in databases, web development, software design, and performance tuning. He also writes about development and performance in his blog, which you can check out in the schedule in his bio. Over to you, Haki. Hi. Thank you all for joining me for my talk titled Taming Non-Determinism with Dependency Injection. I want to start by saying thank you to the organizers of the Europe Python 2021. It's a great conference, and I'm very happy to be presenting here. So thank you, everyone, for attending and for organizing this conference. My name is Haki Benita. I'm a software developer, and I'm also leading the development of a large ticketing and payments platform, which I'm proud to say is based almost exclusively on open source technologies, such as Linux, PostgreSQL, Python, Django, and the list goes on. So today, I want to present to you something that is very, something that I experience very often when I work with code, and that's non-determinism. So in this presentation, I'm going to present what non-determinism is and how to identify it. We are also going to look at some examples that hopefully can illustrate why it's challenging. And finally, I'm also going to present a few ways to handle non-determinism or, as the title suggests, how to tame non-determinism to control it. So dependency injection, whether you know it or not, is basically a design pattern that you can use to structure your code. So a lot of talks about dependency injection end up talking about libraries and packages and all sorts of dependencies that are all consuming and affect every aspect of your code. So I really, really tried not to do it, OK? Because at the end of the day, this is just a pattern that you can use in your code. And you don't have to bring in a lot of packages and dependencies in order to do so. In fact, you don't have to do anything special. You don't have to import anything special to tackle dependency injection in your code. So this is basically just Python. And I would even go farther and say that this is not just Python. This is just simple programming. This is how you structure your code in order to address different problems that may come up when you code. So this is what we are going to talk about today. And to do that, I want to present a very simple problem. And that's how would you write a function that returns tomorrow's date? So there's no trick here. Simple. How would you write a function that returns tomorrow's date? So a straightforward implementation, the naive implementation, might look something like that. You use the daytime model from Python. And you take today's date and you add one day to it. That's it, right? Simple. Now, how would you test this function? So that's the catch. It was a very simple implementation. But now, how would you test that? As a first attempt, you might do something like that. You just compare the function with the expected outcome. In this case, if today is the 28th and we call this function tomorrow, the expected outcome is the 29th. So that's OK. That's a valid test. However, it will pass today. But it will fail on any other date. So this is something that we call flaky test. So you might pass today, but then you come tomorrow and poof, it fails. Another approach for testing as a second attempt is to basically repeat the implementation. So this function asserts that basically this is what the function does. So this is not ideal. And in addition to that, we can't really test special cases, like what happens, cross here, or on a leak day. So this is also not a very good approach. So another approach is to try and patch daytime today. Because we understand that we can't really control the outcome of daytime today, so we can try and patch it. Now, if you try to do something like what I've done here, you'll see that you get this arrow saying that you can't patch built models written in C. So this is also not a very feasible approach to controlling the value of daytime day to day. And there are, just like everything else in Python, a third-party package or library that can do it for you. Some of the most recognizable ones are Fliesga and LeadfakeTime and Time Machine that can patch the daytime built-in model. And this works, but it requires a third-party dependency. Now, as we are going to see throughout this presentation, this thing that's making it so difficult to test this function can repeat in various ways throughout the code. So if you end up adding dependency every time you need to test something like that, you are going to end up with a lot of dependencies. So that's also not ideal. So why is this really so hard? Why is this simple function so hard to test? All we wanted to do is get tomorrow's day, right? And the problem that hopefully by now is clear is that we are having a very hard time testing this function because we do not have control over the outcome of daytime date to date, okay? So this is what makes it so hard to test this function. So let's pause for a second and talk about non-determinism. So to understand non-determinism, let's first define what a deterministic function is. So a deterministic function is a function that given the same inputs, always return the same outputs. Take this function as an example, okay? This function called add, it accepts two parameters, A and B, and return the addition of A plus B. So we are in Python, this is not JavaScript. Every time we send add one and two, we get the same result, right? So add one plus two equals three. Every time we send one, two, we get three. So this function is deterministic. On the other hand, if we look back at the function we used before, daytime now, we can see that this function does not accept any arguments and every time we execute it, we get different outcomes, right? Because if we turn to now, today's date or the current date, current date and time. So it's changing every time we're executing it so it's not deterministic. Let's look at a few more examples of common sources of non-determinism. So we have this function called add jitter, it accepts an integer and adds some random factor to it. So is this function deterministic? Will it return the same result every time we send the same value for N? So let's see, if we send one, we get this, the same argument, we get different outcomes. So this function is also not deterministic because it uses random, okay? How about this one? This one is a function called ink. It accepts an argument and increments a global counter by the value that we passed for this parameter. So is this function deterministic? Let's try. Let's call this function with one three times and we can see that every time we get different results. So this function is also not deterministic because it depends on some mutable global state, in this case, the counter. How about this one? This is actually a very common example. You have a function in this case called get username. It gets the user ID, opens a connection to the database, execute a SQL statement to get the username for this user with ID. And if there is no result, it turns none, otherwise it tells the user name. So is this function deterministic? Let's try. The first time we get username one, we see that the username is Aki and then someone maybe even outside the system deleted the user in the database. And now if we execute the same function again with the value one, we get none. So this function depends on data from the database. So this is also not deterministic. In the same way, we can check the status of some user in a remote API. In this example, I'm using requests with some remote API. And it's entirely possible that the status of the user changed in the remote system. And if I execute this function multiple times, I will get different statuses for the user. Now, another thing to note in this example is that even if the status of the user did not change in the remote service, it's possible that we have some network error and then the same argument can result in an exception. So it's possible that I'm trying to check the status of user number one, and then I get the status. And if I execute the function again, I get network error. So exception is also a type of outcome of the function. So this function is also not deterministic. And finally, last example of promise, this function check if this path is a directory or not. So we know that this can be a directory and I can change this to a file if I want to. So this function depends on the file system. So this is also not deterministic. So there are many sources of non-determinism. The ones that are very, very common are time, randomness, network file system in database access, as well as environment and some beautiful global variables. So basically, non-determinism is everywhere. If you look at your code, you'll see that you have many sources of non-determinism that finds their way into your code. So now that we understand that it's everywhere and we understand that it makes it very difficult to test a function, how should we deal with it? So we already understand that in our function tomorrow, we know that this daytime date today is non-deterministic, which makes the entire function non-deterministic, which makes it very difficult to test because we don't control the outcome. So instead of trying to patch this in different ways, how about we change the API of the function and yank out the non-deterministic part? So one way to do that is to inject the current date as an argument, as a dependency into the function and then this function adds one day to the date that we passed to it. So this is now tomorrow as of Sunday, okay? So now is this function deterministic? Let's check. If we take today's date, 28th of July and execute this function multiple times with the same date, we are always going to get the same outcome. So this function is now deterministic. Okay, we made it deterministic. The main benefit at the moment is that testing is now much, much easier. If you look at our tests, we can now test many different scenarios. For example, just to play next day, cross year, right? Leap day, not a leap day. It's very easy to test now that we can inject dependency into the function. So let's make it a bit harder because this is a fairly simple example. And let's say that we now have this function that does some heavy processing and we want to mark the time that it started and the time that it completed. Now, for the sake of discussion, I know that this is a very simple example, but for the sake of discussion, let's say that these dates are meaningful, meaningful enough that you want to test them. If this is just for logging or audit purposes, you might not want to go through the trouble of doing all of this, but if these dates are actually meaningful and you want to test them, then you now have the same problem because you don't control their values, okay? So using what we've done before, injecting some little daytime value would not be enough in this case because we don't know in advance when it's going to complete, right? So one approach here, if we want to control this in tests is that we can move this part into a function outside of our process function, and then we can use it inside the function process. Now, how is this better? We can now use a patch, okay, from the unitest mock. We can patch this function and have it return predictable values in the tests, right? And now we have full control over the outcome. So using patching, we solved one problem of being able to control the value in tests, right? So let's talk a minute about patching. So patching is great, it works, but using patching, the dependencies are not clear, okay? So if one person implemented the function and another one is using it or trying to test it, it can easily forget to patch the value of now because it's not clear from the interface or the API of the function that it depends on now. And also in order to patch the function, we needed to know something about the way it is implemented. In this case, we needed to know that the function is implemented and that it calls now and what was the path to this function that it's called. So this is very fragile. So can we use the patch? Can we maybe implement this function without using patch? So just like we inject a date into the process, we can inject the function. So this time, instead of declaring the functioning on the model and patching it, we now pass the function as an argument. We can even give it a type, callable that accepts no arguments and return the time. And now the function uses it internally. So basically we took this dependency and made it part of the function's API. So to use the function, we can just pass daytime now. This is what your production code could look like. And in tests, we can use a different function. Here I'm creating a function called fake now that every time you call it, the first time returns D1 and then returns D2. This is how it works. And now to test the function, I can inject this into my process and I have full control over the outcome. So before we injected a value, now we injected a function and we managed to ditch the patching. So we have a fairly nice solution without too many magic behind the scenes. Another benefit of embracing this pattern is that if you can actually inject a function into multiple functions and then you can implement end-to-end testing much more easily. So to summarize injection versus patching, in the injection, the dependencies are very clear because they are part of the function's API which makes it harder to make mistakes. If we take the previous example, the other person that is trying to use the function now is now forced to provide some function that produces today's date. So he's forced to address this in the test or in his code or wherever he wants. And since it's just a parameter, it does not break abstraction. It does not break any abstraction because we made it part of the function's API. So far we identified non-determinism. We eliminated it in tests by injecting values and functions. And as a result, we got full control over the outcome. We made dependencies clear and we made it very easy to test, okay? So now I want to take a slightly different example, one that you may know from your code bases and show you how you can apply this function, how you can apply this pattern to this problem. So let's say that we want to add some IP lookup capabilities to our web app, okay? We want to take a request, get the IP from this request and use that IP to find the country that this request probably originated from, okay? This is called IP lookup. So if you wanna do that, you might end up with a function like this. The function is get country from request and I call this function top level function because it orchestrates processed using different kind of lower level functions. So the first function that this top level function does is it extracts the IP from the request. I'm using Django requests here just to demonstrate but it's not very meaningful. So I'm getting the remote address from the request header and then I'm calling some remote API with the IP address and I take the data if it did not fail and get the country code. So I actually see these types of functions a lot when I read code and let's try to write a test for this function. Now keep in mind get country from request is like a top level, what I call top level function. You need to work your imagination a bit and imagine that this is very complicated function that does a lot of things, okay? So if you wanna test this function, I would go through this very briefly because this is a very, pretty much a lot of work for such a simple test but we use request factory to create a request and add an IP to this request. So this is our fake request. And now we use a library called responses which provides mocks for requests and we had a fake response for a get request to this URL and it returns status 200 serialized as JSON and this is the response. And now after doing all of this setup we can actually test the function and check that it returns the expected result. So this is a lot of work for a very, very simple test and the main problem in my opinion with this approach is that I wanted to test the top level function and I should not care about the implementation details of the IP lookup task, okay? I should not care about the URL structure, the status code, the serialization format. Just imagine that right now it's using an HTTP request. I might do it over a web socket or some other transport mechanism that response may be different, okay? I shouldn't care about all of these things. Another problem, another way of looking at it is asking if for example the URL of the remote service will change or if instead of comma case it will be title case. Should the top level function fail? So I think that it shouldn't. So what I like to do is I like to wrap this in a very simple service. So let's call this IP lookup service. We're going to see some benefits of using this approach. So I'm implementing an IP lookup service. I instantiated with a base URL. This is very useful if you have different environments for the remote API and then I implement the function on the instance of IP lookup service to get the country from the IP. So this is the exact same function. We just yanked it into a class. So now to use this function we can actually inject it into our top level function and the top level function can use it, okay? Now if I want to test this function all I have to do is provide the same interface, okay? Provide a class with the same interface but one that I can't control the outcome. One that does not make an API call to the remote API. So this is an example of what a fake IP lookup service can look like, okay? Except it's a country code and returns it. And now the tests look much simpler, right? We instantiate, we create an instance of the fake IP lookup service and then inject it. In this case we test two scenarios. One that the remote address is in fact from the US and another scenario where the request does not have an IP, in which case even though the fake IP lookup service will return US the top level function returns none because it did not find any IP. So now the top level code does not care about the implementation details of the IP lookup just the outcome. So before we move forward, just want to say that we cheated. We cheated a bit because the function I'm sorry, get country code from request it expects an IP lookup service but we sent the fake IP lookup service. So if you're using typing, using my pile then you're going to get some arrows. So to address this problem, what you can do is that you can define an abstract base class called IP lookup. And this abstract base class defines the interface that you require from an IP lookup service, okay? So now both of our services, the remote one and the fake one can extend this base class and use that for typing. So I'm using IP lookup service for typing and I can use either one of this and I can inject either one of these services into my function, okay? I've just not enough time left. So let's look at another benefit of dependency injection and that's switching implementation. So I actually had this service in my code and suddenly or one day I found that you can actually download the entire geo IP database locally. In fact, I found that I already have the geo IP database on my operating system because I'm using a certain distribution that already comes baked with the file. So I said, why should I do a remote request where I can just search locally? So let's implement a local IP service. So look how simple this is. You implement a local IP service that extends the IP lookup service. Now each service can have its own init logic. In this case, we provide it with the pass to the file and then we implement the same function but this time we use the database that we set up during init to get the name of the country from the IP, okay? So all we have to do now is that this function, instead of getting an instance of a remote IP lookup service can get an instance of a local IP lookup service. And this is where you benefit the most because the top level function remains completely unchanged and the tests remain completely unchanged. So we basically switched implementations without making any changes to anything that is not related specifically to this service. So that's great. So this is like the final slides. I know there's not much time left. So let's recap. Dependence injection, it makes tests deterministic which means there are no surprises, no flaky tests. Once you have the test pass on your machine, it will pass on any other machine no matter what the date, the time not, does not matter what random returns. It makes things easier to test. You can avoid patching and it's also harder to make mistakes. Think about the example where someone else is testing and using your code. It makes dependencies very clear because they are now part of the API call. I mean, the API, the signature of the function and as an added bonus, it's very easy to switch implementations. Now, I know that dependency injection can sound very intimidating. So I just wanna remind you, this is just a pattern and you can use it whenever it makes sense. You don't have to use it in an all-consuming way. You can just start by moving things like daytime now as an argument to a function which makes this specific function easier to test and move slowly towards proper dependency injection or full dependency injection. So just to mention, if you love projects use dependency injection extensively, the first one is PyTest, maybe the most famous one. If you ever use the fixtures in PyTest, then you know something about dependency injection and also Fest API uses dependency injection a lot which is I think a very, very nice API to work with. And this whole talk is inspired by an article I wrote. You can read more about dependency injection. It answers many questions, specifically the three that I listed here. So we can find some more information about dependency injection in this article. And this is it, right on time. So my name is Khaki Benita. You can check out my blog. I'm writing about Python, SQL performance and scaling in Django. And I'm pretty active on Twitter so you can look me up. This is my handle. I also send a newsletter once a month roughly with new things that I write. And if you have any comments or questions, you can send me an email. So thank you very much. Thank you very much. All right, so despite all the troubles we had in the beginning, this was a great talk. Thank you, Khaki. Hope to have you soon again on the next version, on the next edition of Eurobyton. Okay.


And her first tour since the pandemic, pre-sale tickets for Taylor Swift's air tour went on sale Tuesday. But excitement soon turned into frustration as many fans experienced Ticketmaster crashing or freezing during their purchase. Ticketmaster issued a follow-up statement Tuesday afternoon on Twitter, writing that there has been a historically unprecedented demand with millions showing up to buy tickets for Swift's tour. The website faced several delays and outages throughout the morning. The sale began at 10 a.m. with some fans waiting hours in virtual queues. It was good at first, but then once I actually got into buying the tickets, like after the queue, I was able to actually put anything into my car. It kept saying like my browser was wrong. There have also been a number of scamming attempts with websites such as TicketFaster, scamming fans into buying fake tickets and receiving fake text messages from Ticketmaster. I think when it comes to buying tickets from different sellers, I try to be pretty good about where I do buy it from. I think Ticketmaster's a pretty well-known, it's pretty well-known ticket source, should I say. And I would think that they would have reputable methods to prevent scamming at this point. I think it's kind of strange that they didn't prepare for an event like this. Like, she's a pretty well-known artist, especially. I mean, she kind of built this anticipation for her concert. The Boston Police issued a statement Tuesday warning fans to be wary of counterfeit tickets for Taylor Swift's upcoming tour. The Boston Police wrote in a community alert, anyone who purchases tickets from a secondary source are taking a chance and do so at their own risk. I think it's really sad. A lot of people love Taylor Swift and their tickets are being taken away from her, especially the scammers. That's really sad. When buying concert tickets, be wary of counterfeit tickets and always purchase from a verified source. With BUTV10, I'm Isabelle Durso.


Hello and welcome to this course on MATLAB programming for numerical computations. My name is Dr. Nikit Kaisere, I am from Department of Chemical Engineering at IIT Madras. This course primarily focuses on using MATLAB for numerical programming basically for numerical programming that is of interest to engineers. The learning objectives for this course are listed over here. Basically this is a MATLAB programming course. We are going to start off with basics of MATLAB programming. The primary aim of MATLAB is to solve numerical computation problems of interest to engineers. So we are going to use this course to understand the numerical methods in context of how we are going to use them in context of how we are going to use them in MATLAB. And we are then going to use MATLAB to solve some of these computational problems. About MATLAB, MATLAB is a high level programming language, it is widely used for computation analysis in controls, signal processing, communications and other fields. MATLAB is a combination of the words matrix and laboratory. The link for MATLAB website is given over here, it is called mathworks.com. MATLAB is one of the more popular computational software, commercial computational software out there. It is rated as one of the top 10 computational softwares in the world today. It is fairly popular in engineering, control, finance, image processing and some of the other fields. It has toolboxes which are geared towards engineering, controls, finance and image processing. What are the prerequisites for this course? Since this course is an introductory course on MATLAB programming, there are not too many prerequisites. We will basically assume some basics of linear algebra and calculus that is usually covered in your first year undergraduate. Besides that, there are no other prerequisites for the course. However, some of the other things which are good to have would be some background or some knowledge of computational or numerical techniques would be useful. Usually, this numerical techniques course is done in second year of a typical undergraduate course. So, it will be very useful if this particular MATLAB course is done after that. However, that is not a prerequisite. You can indeed do this particular course once you have finished some introductory linear algebra and calculus courses in math. Some prior background in programming will be useful, but again in this course we are not going to make any assumptions with respect to prior background in programming. The software that will be used in this course is primarily MATLAB. Again the website for MATLAB is given over here. If MATLAB is not available in your college, you can alternatively use SILAB. SILAB is an open source software that is somewhat similar to MATLAB. Most of the things that we are going to cover in this course are also available in SILAB. And if MATLAB is not available to you, I highly recommend downloading the free software SILAB and trying out the examples using SILAB. There are some minor differences between MATLAB and SILAB, but the primary use of SILAB is similar to MATLAB. Assignment problems will be set using MATLAB's own coursework website. The link for this website will be given to you in the due time. We will use this website in order to have assignment problems given to registered student on this course. The book that I highly recommend for this course is the book by Professor Lorian Fosett called Numerical Methods Using MATLAB. It's a book that we are primarily going to follow in this course. Other recommended textbooks are the textbooks on numerical methods by Professor Chapra and Professor Kanal and the numerical methods for chemical engineering textbook by Professor S.K. Gupta. This course is general purpose course for people with engineering and science background. So we are going to take up examples which are general in nature. A related course to this course is the computational techniques course where I have covered theoretical aspects of numerical methods that we are going to cover in this MATLAB programming course. However, we are not going to use any of the theoretical aspects of these computational methods. We are primarily going to study how to implement these computational methods in MATLAB. And finally, I come to the course overview. This course will be delivered in eight weeks and in eight modules. Each module will be covered in one week. The first week or the first module will cover introduction to MATLAB, which we will follow by approximations and errors that we encounter in numerical programming. This will be followed by numerical differentiation and numerical integration. Then we will cover solving linear equation using numerical techniques. Then we will follow it with non-linear equations. Regression and interpolation will be covered in the sixth week. And the seventh and eighth week of this course will cover ODE, Ordinary Differential Equations, Initial Value Problems. With this, I come to the end of this introduction. I hope you will follow this course in order to learn MATLAB programming. Thank you and see you in module one. Bye.