Well, let's talk a little bit visual processing in the brain. This is very important because a lot of the early approaches on confnets have been inspired by insights from the brain. So let's look at historical electrophysiological experiments. These experiments are arguably still the most influential ones that drove kind of the drive towards confnets and towards thinking about neural networks. So, typical experiment from Eubel and Wiesel. We have a cat on the left hand side. They're recording from the brain of the cat. Just to be clear, this is a very thin electrode in the brain, so thin that it doesn't really disturb the cells. And then that electrode is attached to an amplifier and out of that amplifier we get signals. You can see the kinds of signals in the middle, these big black lines that we have here. These signals consist of two parts. They consist of some background noise that comes from all the other neurons in the brain. And then it has the spikes from usually one neuron. That's the neuron that is closest to the tip of the electrode. Now, almost by chance, what they discovered is that neurons in primary visual cortex really produce very high firing rates when they see an edge. So what they did is they showed in front of a screen in front of the cat stimuli like this. And they can produce dark stimuli or bright stimuli. In this case they will be using bright stimuli. And with the cat seeing those stimuli and then what they did is they took these edges which make the neuron fire a lot if they come up at the right position with the right orientation. And then they rotated them. And then they moved them. But let's first talk about rotating. So what you find is if the stimulus looks like this, no responses at all. That's what we can see here in the top part. Now if we rotate that more towards the direction that the neuron prefers, the so-called tuning of the neuron, then we see some spikes. Now at the right orientation we see lots of spikes. Further on we see a few spikes. Even further on we see no more spikes from the neuron. Now what they do is they take that what they record and directly play it on a monitor. Now directly playing allows us to listen to that. And that's what we'll do in the next slide. But just to take the upshot already what they find here is that as we vary that orientation stimulus orientation which we have on the x-axis on the graph on the right, we find that the firing rate of the neuron varies between 0 and 50 Hertz. 50 Hertz is a very high firing rate. Keep in mind that the average firing rate of neurons in the brain is of the order of one per second. Okay so now let's look at how this actually looks like. Okay now we'll just play that video of a complex cell and we'll talk a little about what complex cells are in a second so that you get a feeling for how these experiments work. And what you will hear are the spikes from the neuron and what you will see is what they show in the stimulus. So let's play this and I will need to do some fancy operations so that you'll hear it. So I hope you can hear the spikes. Every time you hear it's a spike. There they mark the favorite orientation the size of the receptor field. Okay I think you get the idea here.  So when I was in Zurich Kevin Martin was doing these experiments. It was in the basement of the institute and whenever they did the experiment it was basically two days of non-stop doing these experiments. And now remember seeing Kevin do this mapping and it so much feels like you understand how the brain works. It's just like really visual how seeing this kind of mapping gives you a feeling for at least the illusion of understanding how it works. Now let's recap what we have here. We have a nerve cell that will be very active if you show a bar. It doesn't care where you show it within that area. It just cares that it has the right orientation. So it's if you want within limits it's an invariant cell. As I move the bar within that area it produces exactly the same response. And this idea of having a production of invariances is what gave a lot of drive to what's the search for neural representation and for the search for representation learning as well later. So let's see what the idea is that it drove. So the idea was that we first have a neuron, the so-called simple cell and Hubel and Wiesel found those units. They are only active if you show a bar at the right place. And if so it would be here very active and if you move it even just a tiny bit it will be gone the activity. Contrast that to complex cells where it will be active anywhere within the region. Now what today's tutorial is about is basically this. We have a bunch of neurons that have a receptive field. In fact we have lots of them that's what we use convolutions for. And they basically tell us the existence of a feature at a given place and then we have complex cells. In the context of what we will do this will be implemented as a max pull layer which basically say look I mean there's something with this orientation. I don't really care where it is. So wherever it is I want to have like the best fit of that feature. And we'll talk much more about this today. And now the idea of course coming up immediately with the Eubel and Wiesel data is the idea that we could be hierarchical about this. So here's a nice review paper by Rawls who had been doing a really really important work throughout the 90s in that area and later as well. Where you can say we have an input layer and we have then a layer one, a layer two, a layer three, a layer four. As we go on and on the the receptive fields get to be bigger and the invariances get to be larger. Where you could say at the first layer we're really in the retina in our eyes. It just really tells us if a point is bright or dark. It has arguably no meaningful invariances as we go towards v1 and complex cells. It has some invariance about small movements and as we go through the hierarchy of the brain we have more and more invariance. Whereas towards very high levels we might have object recognition. It doesn't actually care about where exactly that object appears. Now let's briefly talk about invariances. When we talk about invariant object recognition in cognitive sense. And it's a beautiful slide here by Matt Krauser. You can say what are we talking about? The first one is translation invariant. Now if I detect an object maybe a coffee cup as a random object out of Convert's environment. It's the same coffee cup regardless of where exactly it's shown. A concept called translation invariance. Then there's rotational invariance and viewpoint invariance. The size invariance we might want to detect the object even if it's scaled. And there's illumination invariance. So there's all these different invariances and within the domain of cognitive science there's a lot of research on what kind of things people are invariant to in their high level recognition. Now I want to say that the idea of invariance is what as we will discuss later ultimately gives rise to Convert's. I want to also emphasize that it's not entirely true. So here's some analysis from one of the earliest papers I've ever been involved in. Where what we did is we measured as a function of where we are in the visual field of a cat in that case. The average brightness. And look it's much brighter towards the top than it is towards the bottom. Why is that the case? It's the case because there's a horizon. Not like this below the horizon usually is the stuff that we walk on. Above the horizon is the sky. And that's why there's this brightness difference. And it turns out that if you look at real nervous systems they are slightly different above the horizon. Then below the horizon for example on the right hand side you can see here the different receptors. You can see it's not quite the same towards the top and at the bottom. And there's also different differences in the neural responses to stimuli as a function where they are. Now here's a question that I want you to discuss. How do you think neuroscience and cognitive science have inspired deep learning? And how do you think they will continue inspiring deep learning? And how much do they inspire yourselves?


Yeah, thanks. Thanks for having me. You did get all the consonants in there in a different order, but close enough I'm laughing because it's such it's such a mouthful VML Y and R we get it. We need a few vowels I only have two letters to my name You know, I know this has been the start of many many conversations on Friday Can you give us give us a little light right now for you? Yo, what are you doing? What are you guys doing? Yeah, you're right. We had a Friday was just one of many Conversations forums meetings that we've had over the last week and you know, we kind of Week week and a half ago really started with a whole set of you know actions that that we needed that were different than what we were doing and went through all those and then Began to communicate those out get feedback on them and Friday for me personally you know, well first of all it was it was After a series of emails and lots of mini meetings and meetings and conversations in the agency Friday was a moment We said let's all get together. There's about, you know, 1500 of us in the United States in VML wine are probably a few more and we literally had almost everybody on one call together in a conversation and it was It was great. It was great to be together as a VML wine our family and kind of take everything from the outside and just talk As a family and it was format was a lot of me just saying what was on my mind and how I felt personally what I'm learning as a Person as a CEO of the agency and the focus was in that particular meeting was on ourselves and what we can do Here and I think You know, it was it was a chance. It's a really good family. We've been together a long time even though there's there's a course of new people but I felt really really comfortable saying what I think and and not being Not reading a corporate statement that That you'd expect just denouncing racism or you know, it was it was much more How how we're feeling and how not how we're feeling how I'm feeling and then the chance to get a lot of reactions Which I've gotten over through the weekend and a lot of questions and emails and comments and ideas and debate. That's for sure Yeah Perhaps the echo that's coming out What what kind of kind I can you give us a little bit more John Yeah, no, that's good question so so all kinds of feedback and I'm still going through it I mean, there's there's hundreds of pieces of feedback, which is great Sometimes I find that as one thing I'm learning is one piece of feedback if you let it cancels another piece of feedback and the what you could you could You could let those cancel one other or you could take those two pieces of feedback together and make something different with it but specifically You know, you just take it from from lots of different angles. There's there's lots. I'm not trying to be brief You know, we talked about letting Giving people some grace on what they when when somebody is trying to make progress and improve themselves and they say a Word choice that's in flux and let's give each other some grace on that particular If somebody's trying and the intent is there let's together work for the grace. I mean black white or any other race You know, you get feedback that says I hear what you're saying, but I never want to hear the word Colorblind from somebody even if it's accidental, which I totally understand And I was an example of a word that's getting misused or even the hashtag black lives matter Which you know came under a lot of criticism and how you use it when you use it If you're black if you're white last week and people were confused and we're asking for grace on that confusion some people would say I hear what you're saying John, but I don't want that kind of grace for someone that somebody's learned somebody might say I completely agree with that and here's what I can do to do it You know, the biggest collection of feedback is what how are we going to change how we hire promote retain? Our black community and that was the that was the fuss any common denominator It's it's actions related to that questions related to that or people committing To that or things as specific as hey, I know this person. I want to hire them now Yes, you know, so it was it was it was it was all over the place all positive even in the constructive criticism right And what do other holding companies need to do right now? Are Real Well a couple things there, so do we need to do things eating? Yeah, we I am Maybe maybe my epic but a billion percent focused on VML wine are and VML wine are within WPP So those two channels of feedback and impact is where I have the ability to make the most change So I haven't thought too much about other holding companies. I do see you know, I am a believer in Focusing on yourself and what you can do rather than Communicating to the world what you're going to do or and I do see some holding companies some agencies focused on communicating to the world how You know, how they think and we haven't done a lot of that's been more on what what can we do internally and it's There's a raft of things that we need to do to me The phrase none of it matters is is not the treasure But none of it matters unless we're changing how we hire and how we well Not just how we hire how the profile of our company looks in terms of a more diverse company when we we have to be and we We're just what I think we have progress or just when I think one city's Statistically better than another in the aggregate. It's just woefully short and that that short on that voice and that's That's that's by the way, not just black voice. That is lots of voices diversity and that I say that Without saying we're devoid of that voice. It's just it's just Short of where we need to be so I don't know what other holding companies need to do I know we need to you know to be a give you a specific example of lots of them, but you know, they're there needs to be more KPIs or performance indicators of anybody in leadership who's making decisions To have this in their leaderships that we don't have that We just have an expectation that you will do that and and it's not a KPI the other thing I think we have a really strong we call it the fearless champions, but Diversity equity inclusion team. It's 90 people big But I find it a touch disconnected from the people who are making hires and and it too wonderful things going on hiring and De and I the two don't touch as closely as they could if I'm being candid, but that's not a lack of Intent or good people. It's It's it's life moving on without stopping yourself to really think are you doing the right things the good things? Right and I appreciate it strategy And what do we need to do with that leadership and what do we need to do with hiring? What's your kind of response to to you know, how he's spoken up in the time added at the agency and what it really means to to connect and have Black voices and diverse voices at the table in the C-suite Yeah, you got a little cut off. Sorry about that. Is it did you say you talk about Yusuf's article today? Yes Yeah, I thought that's what you meant Yeah, I completely agree with him first of all Yusuf is is wonderful whenever he Wants to make an impactful point. He he makes it very personal. He will never just give you Generic thought it always come and and I guess who would well I see a lot of generic thought out there I think what Yusuf does really well is he always brings it a hundred percent from personal reflection And there's no doubt about that when you read or listen to Yusuf and I appreciate that Because it gives you a sense of where he's coming from on that even in a short article like the one on on Ed We and to answer your second question, I completely agree with him I think one of his biggest points as I take it to read it Is Presence is critical presence of black voices in agencies not just but it's not just presence It is power and it's one thing. I think a lot of people will be chasing numbers and statistics just like I think a lot of the agencies have probably done with with gender and with and with this topic before I think that will be we'll be selling ourselves short if we're if people are trying to If they're honest themselves checkboxes and things like that it's it's it has to be in your heart to not only have the right Amount of diversity but diversity with impact the ability to shape the work to make the hires to make decisions about the agency Yusuf's in a position to do that. But as he would tell you in our agency He's one of very few In that position and that's that's what has to change and just being really candid with you Yeah Is this a problem that you're seeing across the locations that we have offices in London So how low as the CEO? Is there a diversity? Lack of diversity in Across agencies perhaps that we are all awakening to that we are all reckoning Sorry, I'm hoping I'm hoping you can hear me. Okay Yes and no I think I think as an agency leader in a company It's relatively big especially after we merged together VML wine are there's 7,000 people around the world and you can You can look at the company makeup and you can sort of rock yourself to sleep that is diverse because it's diverse in terms of Chinese Latin American, you know Hispanic White black men women Every nationality in between it's a it's so so on one level One of my favorite things about working at VML wine are or an agency that's global is the diversity in the voice a hundred percent true that Perspective that I've gotten from having every country involved in the voice and the decisions and their leadership on that level Absolutely, it's it's it's it's wonderful and it's been one of the my favorite things of the career one of my favorite things about working here On another level when you double click into that the diversity within any one country as it relates to that Country's makeup is where we would fall, you know shorter than I would want it to be far shorter than I'd want to be and that's when you start to speak to Mix of black community voices in VML wine are in North America and you could even Start to think it's right because some of our cities are way more advanced within the company but it's it's kind of depends on how you choose to look at it and I don't I I feel like I Don't want to to sort of get take Just take the overall global diversity of international diversity and make that a proxy for diversity within a country where we have to Change dramatically and that's not just true for America. That's true and and how we are and in Brazil, you know, that's how true we are in South Africa There's there's diversity within each country that we need to look at even if the overall diversity of the company is international right Countries and campaigns, I guess, you know, I wonder how you're looking at your communication that you have externally With those clients in terms of diversity. Do you expect to see or the already happy? or Speaking just from personal Observation over not just the last week, but you know through time, but especially the last couple weeks. I found The you know clients and brands are working with our first. I think as they should be focused on the decision-making and the and their own diversity and And expecting us to be progressive in that change and to progressive in how we think about that and that again, that's not just Didn't just start last week And I didn't just start with George Floyd. That's that's been I think a good press by most of our clients on themselves For for some time, which I think is good. Obviously intensified And but it's been more of a focus on themselves and their their conversations was about more about how What's the appropriate response for them when they want to be authentic? They want to be true But maybe sometimes they don't have as much truth that they that they want to represent and how do how to do that? It's been more of that and then the second thing has been Putting the pressure on us to make sure the teams that are working on their business are diverse and and representative That's a pressure that we welcome Hopefully we have enough pressure on ourselves Before that pressure comes from a client partner, but You know in in we haven't found ourselves in Diometric opposition of any of our client partners I think the reason a client and agents here together if they've they found some success and some Some similarity together, but in that similarity You can find some comfort and you have to you have to push push yourself. So Right fine collaboration so discomfort and the kind of Slow long journey Of progress. I I want to leave you with the last question of I know you're still sifting through feedback and you know thinking about what to do But what can you kind of you know to our ad weak community? Commit to in for the for the rest of the year going forward in terms of dealing with David for the future future Yeah, I mean, I think I think my Personal commitments are are all you know internal and I'm happy to commit to the to the ad weak community I mean my my personal Passion and commitment to this to be specific And I but I hope I hope those commitments are known and first known internally and and known by the people who know me And know I think us as a company but As it ever specifically answer your question, you know, we're we we had lots of programming and awareness and narratives and forums that happen Happen internally. I'm very pleased with that But it's the commitment that I want to focus most on is is how we hire and who makes those hires end it to Dramatically change the way we think about that and not to get not to get trapped in feeling like Things are changing just because we're creating awareness and education I don't I want to do those things Uh, and we will do those things and they are critically important I think the trap we can fall ourselves into we can fall into not not just me but one could fall into is Mistaking those things For the real thing which is at the end of the day is your company look differently than needs to and that My commitment is to focus on on the ladder and The other commitment is to open up the voices that have the discussion about how we're going to do that because You know in a lot of agencies You've got the people sitting around making those decisions or having those ideas are the predominantly white executive teams of an agency sadly and I'm speaking generally there's massive differences between agencies And a lot of agencies have that and then they have a diversity and equity and inclusion team Those those things being completely separate It's just it's that's that will be an endless cycle of of where we've got ourselves so far And I think some of the biggest actions that we've discussed in the last week have come because Somebody who's not It currently in that leadership team or even in the de and I part of the organization. It's just somebody with a voice Comes forward and says here's an idea. I'd like to do we're gonna we're gonna close vml ynr on on juneteenth um week from friday and And celebrate that as a as a day of coping that was not an idea That we've it's something we've never done before and frankly I never would have thought of Whether that's sad or not if I would have thought it or not the truth is I probably wouldn't have thought of it If I'm being honest with myself um A black man in an organization said I think it's important we have a day of coping and what if we did that on juneteenth and Before it even becomes a success or something we do well or not well here in this agency It's already been successful because now 100 of the agency knows what that day even is. I can guarantee you a lot of people the the Sad sad fact that there are very few people including myself knew much about that particular day as much as they should um Is a change but we could we could sit here and not do it Because we didn't know what it was or because it's just one tack one tactic one thing to do Or we can lean into it and do it and do it the right way and I'm really You know, it's one of a hundred things, but it's just a good example of something that wouldn't have existed If we hadn't up up the voice to what we need to do Yeah, absolutely. Well, I want to thank our audience Um, I want to thank the the folks that let us know about our technical issues We do apologize for that and hope it got remedied uh during this conversation And I absolutely want to leave on john global CEO And are for your time Thanks, kia. Thanks for having me. Absolutely. And next week. We're continuing the abbey together series We are going to be joined by dave newway From ibm wants a media and weather to talk about the future of brand trust So we hope that you'll tune in Next Tuesday and in the meantime if you would like unlimited access to our content conversations and resources You can grab a adweek pro subscription at adweek.com slash offer. My name is coim I hope your conversations at work and at home continue in a peaceful productive way. Thanks so much


The Celtic Twilight, by W. B. Yates, published by the New American Library, a remonstrance with Scotsmen for having soured the disposition of their ghosts and fairies, not only in Ireland is fairy belief still extent. It was only the other day I heard of a Scottish farmer who believed that the lake in front of his house was haunted by a water horse. He was afraid of it and dragged the lake with nets and then tried to pump it empty. It would have been a bad thing for the water horse had he found him. An Irish peasant would have long since come to terms with the creature. For in Ireland there is something timid affection between men and spirits. They only ill treat each other in reason. Each admits the other side to have feelings. There are points beyond which neither will go. No Irish peasant would treat a captured fairy as did the man Campbell tells of. He caught a kelpie and tied her behind him on his horse. She was fierce but he kept her quiet by driving an awl and a needle into her. They came to a river and she grew very restless, fearing to cross the water. Again he drove the awl and needle into her. She cried out. Pierce me with the awl but keep that slender hair like slave. The needle out of me. They came to an inn. He turned the light of a lantern on her. Immediately she dropped down like a falling star and changed into a lump of jelly. She was dead. Nor would they treat the fairies as one is treated in an old Highland poem.  Every day the fairy put out his hand from the hill with an enchanted knife. The child used to cut the turf with the knife. It did not take long the knife being charmed. Her brothers wondered why she was done so quickly. At last they resolved to watch and find out who helped her.  When the turf was all cut they saw her make three taps on the ground with the handle. The small hand came out of the hill snatching the knife from the child. They cut the hand off with a blow. The fairy was never again seen. He drew his bleeding arm into the earth. Thinking as it is recorded he had lost his hand through the treachery of the child in Scotland.  You have made even the devil religious. Where do you live good wife and how is the minister? He said to the witch when he met her on the high road as it came out in the trail in the trial you have burnt all the witches in Ireland. We have left them alone to be sure. The loyal minority knocked out the eye of one with a cabbage stump on the 31st of March 1711 in the town of Carrick Fergus. But when the loyal minority is half Scottish you have discovered the fairies to be pagan and wicked. You would like to have them all up before the magistrate. In Ireland warlike mortals have gone amongst them and helped them in their battles and they in turn have taught men great skill with herbs and permitted some few to hear their tunes. Caroline slept upon a fairy wrath. Ever after their tunes ran in his head and made him the great musician he was. In Scotland you have denounced them from the pulpit. In Ireland they have been permitted by the priests to consult them on the state of their souls. Unhappily the priests have decided that they have no souls.  But more in sadness than in anger they have said it. The Catholic religion likes to keep on good terms with its neighbors. These two different ways of looking at things have influenced in each country the whole world of sprites and goblins.  Our Irish fairy terrors have about them something of make-believe. When a peasant strays into an enchanted hovel and is made to turn a corpse all night on a spit before the fire we do not feel anxious. We know he will wake in the midst of a green field the dew on his old coat. In Scotland it is altogether different. You have soured the naturally excellent disposition of ghosts and goblins. The Piper McCrimmon of the Hebrides shouldered his pipes and marched into a sea cavern playing loudly and followed by his dog. For a long time the people could hear the pipes. He must have gone nearly a mile. When they heard the sound of a struggle then the piping ceased suddenly. Some time went by and then his dog came out of the cavern completely flayed too weak even to howl. Nothing else ever came out of the cavern. Then there is the tail of the man who dived into a lake where treasure was thought to be. He saw a great coffer of iron close to the coffer lay a monster who warned him to return whence he came. He rose to the surface but the bystanders when they heard he had seen the treasure persuaded him to dive again. He dived in a little while his heart and liver floated up reddening the water. No man ever saw the rest of his body. These water goblins and water monsters are common in Scottish folklore. We have them too but take them much less dreadfully. Our tails turn all their doings to favor and to prettiness or hopelessly humorize the creatures. A hole in the body of the man who dived into the lake our tails turn all their doings to favor and to prettiness or hopelessly humorize the creatures. A hole in the Sligo river is haunted by one of these monsters. He is ardently believed in by many but that does not prevent the pleasantry playing with the subject. Sorry but that does not prevent the peasantry playing with the subject and surrounding it with conscious fantasies. When I was a small boy I fished one day for congers in the monster hole returning home a great eel on my shoulder his head flapping down in front his tail sweeping the ground behind I met a fisherman of my acquaintance I began a tale of an immense I began a tale of an immense conger three times larger than the one I carried that had broken my line and escaped that was him said the fisherman did you ever hear how he made my brother emigrate my brother was a diver you know and grubbed stones for the harbor board one day the beast comes up to him and says what are you after stones sir says he don't you think you had better be going yes sir says he and that's why my brother emigrated people said it was because he got poor but that's not true you you will make no terms with the spirits of fire and earth and air and water you have made the darkness your enemy we we exchange civilities with the world beyond


More than 3,000 people in the Russian city of Belgorod were returning to their homes on April 22, after being evacuated while an explosive was disposed of, the local governor said. Two days earlier a Russian warplane accidentally dropped a bomb on the city, damaging local houses, authorities said. Those evacuated lived in the same area. Military explosive experts decided to neutralize the explosive at a training ground, Belgorod region governor Vyacheslav Gladkov wrote on Telegram. The operational headquarters decided to evacuate 17 apartment buildings within a radius of 200 meters. According to preliminary data, it is more than 3,000 people. Anyone who needs help with temporary accommodation, it will be provided, he said on Saturday.


This is going to be a really quick video where I show you some examples of go code translated into JavaScript using the go for JS compiler. If you want to convert your go code into JavaScript, it's helpful to understand how that conversion works. So first off in this example, we have the simplest possible go program, just a main function that prints out some variables. And if I come down here and I build the program, so if we go to the output, which is a single file here, go for test.js, there's a whole lot of code in here. It's like 70,000 bytes about most of this is of course not a result of my code. It's the runtime code. It's an equivalent of the go runtimes code for managing go routines and a few other things. Obviously, if we're compiling to JavaScript, this runtime code doesn't have to add a garbage collector. JavaScript has its own garbage collector, but there's various go runtime equivalent stuff in here. And then our actual code is way down at the bottom. If we look for main, this is our actual code, just a single function main. And you can see that our int string and Boolean variables in the go code are translated into their direct JavaScript equivalents. Though of course in JavaScript, we lose all typing information. There's no declaration of what type of variables that these are. Booleans become Booleans, strings become strings, and our int becomes just a JavaScript number. We have a number type in JavaScript, which is basically a float 64. So when any number type in go gets translated into a number in JavaScript, the underlying type is always going to be just JavaScript number. And also note that when we use the print line built in function in the go code that gets translated into console.log. If you import the fump package in your go code, and then invoke fump.print or print line, it doesn't get translated to console.log. That is translated into code, which in a node environment will print out to actual console, will print the standard output. Whereas in the browser, we want to print out to console.log. So that's why we're using print line and not fump.print line. Though also, you have to be careful about importing fump because the fump package uses reflection and the reflection package when compiled into JavaScript requires a huge amount of special code that is like almost a megabyte in size. So in general, when using Go for Jazz, we avoid fump than any other package which uses reflection because it blots the output code enormously. In our next example, now we're introducing a struct type foo with three fields a, b, and c and string and booleans. And we create a single variable x of type foo and assign values to its three fields and then print out x. If we come down here and compile, and we go look at the code, now you see this is the equivalent in the JavaScript code of the struct declaration. There's quite a bit going on here with this call to new type, though that's really internal business of the Go for Jazz compiler. I'm not entirely clear exactly what it does, but it basically creates a data structure in the JavaScript side, which is a representation of the foo struct in our go code. And then down in main, our x variable of type foo, of course, does not have the foo type on it because we don't have static typing in JavaScript. And when a value of type foo is created, it's done so with this code, which returns an object. And then the fields of our struct value are just properties of that object, a, b, and c. So real quick to see this in the browser. I've created this test.html and I've loaded it up already in the browser. If hit refresh, we see on the console, this object, which has an a, b, and c. And then under the prototype, we can see that Go for Jazz has given this instance of foo. These get in set methods. I'm not sure what those are about. Also, there's the property val, which is a recursive reference to the same object. I don't know why that's in here, but we can just recursively descend forever. That must be there for some reason, I suppose. Anyway, notice that the struct values are basically represented as JavaScript objects where the structs of the field correspond to properties of the same name. In this next example, it's the same code, but now we're creating variables y and z, assigning to y the value of x itself, which in Go would mean copying the struct value. When you assign structs, the assignment is a copy, really. And so what we're going to see in the JavaScript code for this assignment is it's going to have to actually copy the foo struct and then assign the result of that copy to y. Whereas here, if z is a pointer to foo and we're getting a pointer to x, it just copies x to z. In JavaScript code, it's just going to be a plain assignment of x to z. So looking at the actual JavaScript code, here's that assignment of x to y and the x object is copied in this call to clone. Whereas when x is assigned to z, it's just a plain assignment. Here we've introduced a function bar, which takes in a value of type foo, our struct type. And we have again our variable x of type foo, which we pass to this call to bar. If we compile the code and go look at the JavaScript code, when bar is called, because structs when assigned and passed the functions are effectively copies, x has to be cloned and then passed the bar. And notice that in our function bar, we don't have any type on the F parameter. Of course, you can't have static types in JavaScript code, but that's not really a problem because when our go code is compiled by Goverges, it's doing static type checking. So we're still getting the benefits of it checking for our type correctness. So in the call to bar and our go code, it would complain if x were not of the right type, if we're not of type foo. Now let's look at a couple pointers. Here we have variables A and B of type int, but also C and D of type pointer int. And we initialize A to the value three, B to the value of A. And C and D will both assign the address of A. And go look at the JavaScript code. You can see that our declared int variables are initialized with the value zero, no surprise there. That's the default value for an int. Our pointers C and D are initialized with this nil value. But then the reference operator expressions have all this funny business. And what's going on is that a pointer type is being created. And in this pointer type, it's provided two closure functions. The first returns the value of the variable pointed to, and the second sets it. And the reason for this funny business with the A dollar sign 24 pointer, this variable that is introduced by the compiler is because when we get the pointer to variable A more than once in this function, we don't want it to be different pointers. We want it to be the same singular pointer object both times. And so what this code is effectively doing is caching the pointer type in this variable and next time around, if it's non null, that is then what's going to be assigned to D. So it doesn't create a second pointer type object. Off the top of my head, I can't imagine a scenario where two separate objects representing a pointer to the single variable A would actually create incorrect code. So I wonder if this is just done as an optimization to avoid proliferation of redundant pointer objects. In any case, you can see how they simulate pointers to local variables using closure functions. In this next example, we're creating some arrays. First an array of size three of type foo, assigning that to A. And then an array of size three of type int with these three starting values, and that's assigned to X. An array of two strings with these starting values, and that's assigned to Y. And then we're assigning X to Z. And we'll see two interesting things in the JavaScript output. Arrays of most types in Go will be translated to the generic array type in JavaScript. But for ints, it's going to use the special in 32 arrays, because that's going to be a little more compact and so a little more efficient for the special case of ints. And then when the assignment is performed, again, arrays like structs are assigned and passed by copy. So in the JavaScript here, we'll see that X is cloned for this assignment. I'm going to compile the code. We go look at the JavaScript. And yeah, there's that assignment with the clone. Notice that for every array type we're using in the function, it creates these local variables representing the different array types. And these two native array calls are what return actual array objects. And the compiler passes in something specifying the type of the array. And if we go over to the browser and reload the page, it spits out on console the arrays we created. The first one here was our foo array. It's basically a normal JavaScript array. And each element is an object representing a foo value. The X array is just an ordinary int32 array. This is all just standard stuff to JavaScript. And a string array, same deal, it's just an array of strings. If we change the arrays into slices, then the first notable difference is that this assignment of X to Z is just going to be assigned by reference. Because, and this is a subtle point, in Go, slice values themselves are actually immutable. There's no operation that will directly modify a slice value itself, where the slice value is a pointer to an array, a number representing a length and a number representing the capacity. The arrays pointed to by slices, of course, are mutable, but the slice value itself is not. And so this assignment of X to Z here does not require any cloning. Now I'll compile the code and we'll go look at the output. Basically like what we saw before, there's no clone here for this assignment. And instead of creating arrays, the compiler generates these slice type functions which create values of slice types. If we run this code, what it prints out to console are objects representing the slice values that we created. And the slice object has an array property pointed to some underlying array, a capacity value, a length property, just like in Go. Except the new thing here is there's an offset value. Because in Go, you can have a pointer to a location within the middle of an array. But you can't do that in JavaScript. If you have a pointer to array, you have a pointer to the start of the array. And so this offset value is used to logically index into some middle part of the array rather than the start. There's also, again, this val property, which is a recursive reference to the slice object itself. I don't know what business it serves, but it's there again. I'd be kind of interested to hear an explanation of why the val property is there, what purpose it serves. But I think we can pretty safely ignore it. Next, we have an example with a couple maps. The first to map those strings to ints assigned to a. The second to map of foo values to int, where foo again is our struct type. And we create a third map variable z, which we assign the value of a. And lastly, we'll print out abz and the value of a subscript yo. And we'll look up in a the value for the key yo. So let's compile the code, go look at the output. And note first that the assignment of a to z, because maps are always passed and assigned by reference. There's no clone here. Z and a are pointing to the very same map object. And the maps are actually created with this make map function. There's some funny business that'll make a little more sense when we look at the output in the console. And down in the console, we print out the values of a, b, and z. But notice that when we look at the key yo in the a map, it's this complex expression. Because in the underlying object in the JavaScript side, when we look up for key matching the string yo, if it's not there, we don't want to get back undefined. We want this expression and go is supposed to return the default value for the value type of the map. And so this is a map of strings to ints and the default value for int is zero. So in the event there is no string key yo, we want to get back zero, which is what you see here in this conditional expression. So looking at this in the browser, I'll refresh the page and it spits out our objects. What do they look like? Well, it's a regular JavaScript object where the properties notice our strings, but they've tacked a dollar sign onto the front. And then the value of the property is itself another object with k and v for key and value. So every key value pair is stored as its own object within the object representing the map. The second object here, which I recall is a map of foos to ints. It only had the one entry. And strangely, because our foo type was just a single int value. Strangely, the single property has key four. And the value for key four has two properties k and v. And k itself, its value is an object representing the foo value. I think what's going on here, and I should test this and demonstrate it with another example, but I'm not going to bother. I think what's happening is that for our foos struct keys, it is getting a string representation, which in this case is just the value four. And that's how it determines the keys for this map object. So it looks a little strange just to see number four here. I presume if our foos struct had multiple fields and somehow all those field values would be combined to one string. And those would be the keys in this map. Now let's look at an example of GoRoutines, which is surely the trickiest thing that the Go for JS compiler implements. Because JavaScript, of course, runs in a single threaded event driven context. And so somehow in that context, Go for JS has to simulate a multi-threaded context for GoRoutines. But what we'll see in this simple example is we just have two functions, which go through loops and print out a bunch of values. In Elastic and Main, we print out Main. Now normally in Go, when you return from Main, any remaining GoRoutines are killed. Once the main GoRoutine ends, that's the end of the program. So if you want them to keep on going without terminating the program, you have to put your main GoRoutine into a loop or have a block or something. You have to somehow stop it from terminating. But the way this is going to execute in JavaScript is these Go statements are going to register these functions to execute later in events. But those queued up events are not going to be executed until our Main has totally finished running. So when we compile and run the program, what we see is Main followed by first, first, first, first, first, first, second, second, second, second, second. And notice that the loops of printing out these values from the first GoRoutine and the second, none of it is interleaved. If you go look at the compiled code, you have this function here, which is the first GoRoutine and this function here, which is the second GoRoutine. They're both registered with the compiler's Go function. But note that nothing in this JavaScript code is going to interrupt it. When a JavaScript function runs, no other thread's going to come along and interrupt it. That's just not how JavaScript works. So in this example, our code is not in any way concurrent. Not only is all our code running in just a single thread, there's no real interleaving. It's just our Main function and then some set of events on a queue that are just executed in some order. If though now, we bring in a channel, here a channel of ints with a buffer size of zero, we'll print out the channel value just to get a sense in the console of what that object actually looks like in JavaScript terms. And we have a single function which just sits in a loop and reads from the channel, printing out the result. And from the Main GoRoutine, we're sending a bunch of values to that channel. So let's compile the code and go look at what we get. And we get a lot of weird, funny business. Because what the Go for JS compiler has to do is anytime you introduce a blocking operation, like sending or receiving from a channel or in Node.js, there are certain other kinds of IO operations you might do that also might block. All those things must be specially implemented in the compiler such that it logically splits the function into two. At any point you have a blocking operation that has to actually be split at that point into a function representing everything before it and then a second function representing everything that comes after. And as you can see, this looks really ugly in the compiled code. It's not even formatted properly.  But that is what's ultimately going on here. This receive operation on the channel effectively has to logically split the Go function, which was just one function into two. So everything before it's one function, everything after it's a second. And down here you can see the send operation back in our main function, same business, the main function, everything before that point is one function, everything after is a separate function. So that's pretty frightening, but that's what the Goverges compiler has to do given the limitations of the environment. So let's actually go see this run, control R. And it's printing out all the numbers, which are being sent from the main Go routine and then received in the other Go routine. The first thing here, it's printing out our channel object, which probably resembles a slice object. It has that buffer and capacity fields. But then also closed flag and then receive queue and send queue. OK, last thing, what about interoperation with the JavaScript environment? In our Go code, we want to be able to access, say, the DOM API of the browser. Well, to do this, we import a special package, Goverges's JS library, which has not much stuff in it. I suggest you go browse the documentation. It's not all that long, but the most essential things for this package are first, there is a object type. Which is what we use in our Go code to represent values of the native JavaScript object type. Or more accurately, we use a pointer to JS object, not JS object itself. And most essential methods on a pointer to JS object are get, set, and call. For getting set, you specify a property name as a string. And get, of course, retrieves the value of that property and sets a value for that property. JS.global is a global in the JS package, which references the global object of your JavaScript environment. So for browsers, that would be the window object. And so this here effectively is equivalent of window.document, which we're signing to doc. And then the call method on a JS object, you specify as a string the name of the method you want to call on this object. And then afterwards, you provide any necessary arguments. So here, if I have this single argument, this is like calling document.getElementById with an argument of id foo. So in this case, it's like I'm calling getElementById to look up the element with id foo. And that's going to be assigned to this foo variable. And note that the compile time type returned by call is always pointer to object. Regardless of what the JavaScript method actually returns, if it returns a number or a string or whatever, in our go code, the compile time type, regardless, will always be pointer to object. And so if the underlying value of a pointer to object is actually a string or a Boolean or a number, pointer to object has a string method, which returns the value as a string, and an int method returns the value as an int, et cetera. So now let's see how this compiles. And what you should note here is that the JS package, when compiled, is treated specially by the compiler. The call method, for example, when compiled, just translates into a direct call to that method. So you don't see any dot call here or anything like that. Also notice that the arguments to call are processed through this externalized method. This will translate values of certain types, like slices and arrays and maps, so that they appear more like ordinary JavaScript arrays and objects that don't have those funny properties. Now, if you're writing go code to run on the browser, it can get quite clumsy and verbose when you use the JS package, and you're also effectively losing the benefit of static typing because you're calling dynamic language functions where it has no idea if you're passing in the right kinds of arguments. And in fact, when you use the call method, you're specifying a method name using a string and the compiler has no idea if you're referring to a method name that actually exists or not.  What you might prefer to do then is to use a wrapper for the DOM API, a wrapper that creates a go equivalent for all of the DOM types and their methods. So if you use these wrapper types and methods, in the wrapper code, they're just translated verbatim into the JS package equivalent, but you'll get the benefit of less verbosity and static type checking. So there is already a open source DOM wrapper. This is the import path. And here in the code say, we're getting the window, it returns a window object, not just a JS object. It has a document method, which returns a document object, not just a JS object. And from that, we can call get element by ID. That looks like a proper go method call. Notice that it begins with capital G and this returns an element object, which has this class method, which returns what they call token lists, which is a list of all the classes on that element and then the setString method effectively adds another class to the element, et cetera. So you can see the wrapper doesn't correspond precisely to the DOM API, but that makes sense because the wrapper has to introduce some compile time types that just, of course, don't exist in the JavaScript code. So you might prefer to use such a wrapper. I find that when I'm using go for JS for browser code, I'm doing so because my logic is gonna get quite complex and most of my logic isn't directly touching the DOM. The DOM is generally a relatively small part of my code. And so if accessing the DOM is a little verbose and not properly statically typed, it's generally not a huge deal. So in such cases like that, there's probably not much advantage to using this wrapper, but if you're gonna be touching the DOM extensively, then it can be a benefit.


Oi oi, how's it going? It's Dogen here, we're back again with another video, bye bye! And since I've already actually seen and listened to Chicken Noodle Soup and didn't record my reaction, I'm going to do my thoughts on it and before we get into that, just look at my desktop background. Demon Slayer fans, anyone? Zenitsu? Probably one of my favourite anime characters of all time. And it's because I've also read the manga and he becomes so cool and that's what I'm saying. Anyway, so let's go to J-Hope, Chicken Noodle Soup with, forgot the name, with Becky G. Okay, so it starts off with these guys dancing and I'm loving the beat, I'm loving it, and I'm like... Okay, so I'm loving the start of the song already, again like that, see, like, yes. I'm loving the start of the song and this is what I was like when I first listened to it and I'm like, okay, this is going to be freaking sick and it is sick. And then we get to J-Hope rapping. Don't do that with any fizzy drink or soda. What do you guys call it? Okay, here in New Zealand, we call it fizzy because you know, it's fizzy, it fizzes up. What do you guys call it? Comment that down below. But anyways, so the song is popping off, I'm loving it, I'm seriously loving it at this point. And then we get his rap and I'm liking it. I'm liking it. And then the cars come in and this is where the first moment of the song I dislike. I'm loving the music video, I'm loving the choreography, but then as soon as these cars come in, the part of the song, I just dislike this part of the song. And then it goes back to being good, okay. And I'm loving it. And like, it's just like that... I don't know, for some reason, I don't like it. Okay, I just... My thoughts. But yeah, so like, I'm loving the song and then the cars come in and then it's like... And I'm not liking it. But then it goes back to this and I'm loving it. And like I'm saying, choreography, awesome. Freaking sick. I'm loving it. It is dope. Who needs J-Hope when you have D-Dope? And we'll get to the next part. Oh wait, I just realized he says with Becky G on the side. I didn't even realize that. Well, this is when Becky G comes into the song, which now makes sense. I'm loving it. I love it.  She's pretty cute. And I'm loving it. Chicken soup. But anyways, her singing is awesome. I'm loving her singing and like, it's just, it's good. Okay, I love that part. I just do. And it goes back to this and I'm loving it. And also like the monster truck is falling from the sky. I love it. I wish I was just underneath them at the time, even though they are clearly edited in. Just saying. Okay, okay, okay. Maybe maybe say this again. Because I just rewatched the video and I realized I kind of messed this up. So it's... So the monster trucks, they're edited in. They're probably definitely real, like on the set. But when they're falling from the sky, there's no way they will drop them from a crane. Because one, they just bounce so high. Well, the actual monster truck suspension is kind of like that, but they wouldn't put anyone in danger. So they probably rotoscoped it and edited it in. And I made a dust cloud and all that stuff. And that's how they edited that. Just from looking at it. Because if it is real and they did drop it, then I do worry about their safety on music videos. But other than that, it should have been pretty safe. No particular reasons. And I'm just loving it, man. I'm loving it. Wait. Wait, okay. So I'm loving it. And isn't there like a dance thing going around about them doing the chicken noodle soup dance or a challenge? If this somehow gets... I don't know how many views this will get because no one really watches my videos. And I just want to do different K-pop videos that aren't just reactions. So this might even get like maybe 100 views. And I got 25,000 subscribers. That's pretty sad. But if this gets 1.5k likes, I will join that challenge and try and do the chicken noodle soup dance. It's not going to go down well, is it? But anyway, speaking of the song, I'm loving this song. It's actually real good, except for like that one part. It's just that one part that I dislike, okay? Like maybe there's a bit more. But it's just that one part so far. Okay, so I was kind of surprised when this first happened, when Bikki G came in rapping. When I first listened to it, I wasn't a big fan. But after a few more times listened to it with her rap, I'm quite liking it. Okay, so I'm like, yeah. It's like a 75-25%, you know, 75% liking it, 25% not liking it. Wait, did I get the math right? Yeah? But when it first happened, it was like, it was like the complete opposite. Like 25% liking it, 75% not liking it. But now it's like flipped. There's just something about it that is just making me, I don't know. I don't know, there's just something about it. But like I said, choreography is something that I'm loving. There's just, I don't know, maybe it's just like the long part that she does. Maybe I'm not a fan of that, but I'm liking basically everything that I saw for rap. And I'm just still loving the correct, wait, where did that car come from? Was that always the, I don't know, anyways. Go J Herd from BTS. Okay, so I always laugh when this part comes on because of the chicken taxi, the chicken car, the Cooper. But anyways, I always laugh when I first see that because I mean, it's chicken on a car, look at that. How's that not funny? No, but I like this part with Becky G. What am I going to do? Did they edit that? No, it was just a camera play. I liked this quite a bit. I got shocked when I first saw it. But then I was like, wait, they did a close-up on Becky G and J Herd as like down, further down, like all the way down, like by her. And then he just like pops out. And I was kind of surprised because I was like, oh, wasn't it a wide shot? But no, it was a close-up. And then they like just, it was just beautiful. I love that stuff. Or maybe he was just behind the cameraman and then was like ran and, um, no, they probably wouldn't have him because they would make the choreography a mess. Yeah, he was stirring behind her. And I like that. Oh, bro, I love that part there. That part was dope. And yet again, I like that part. It's just like when she first started rapping, it was like, it was, it's like, and then like she gets better with going through and I'm loving it. Okay. So like that's why it's like, maybe it's like now 90 10 90%. I like it 10%. It's just, it changes each time I listen to it because it just grows on me more gradually, more often each time I listen to it grows on me. Yes. Slay it. Bro, but her singing voice is so beautiful. Oh, it's just so good. Like when this part comes on and then I pop like whispering, I'm freaking loving it. Anyways, let's just have a quick break and somehow get you to look at my other monitor. Boom. Look at that. Okay. So there's a lot of stuff on this monitor. They stop and I need to clear it. But like, come on, man, you got to love it. Anyways, let's go back to the fourth video. Yeah, I'm just loving it. I'm just loving it. Notice. I love this song, except for that one part, when J-Hope is doing that thing at the very start, but it doesn't matter because the rest song says, I don't know what I am doing. I paused it at the right time. Wait, what does it say on that? Seat chicken award? Seat chicken award? Oh, best chicken award. Why did I think that was S? Ah, yes, that makes more sense now.  Who knows? Okay, we all love this part. We have to love this part. It's just so cool. But yeah, that was basically my thoughts on this video. There's only one thing I dislike about it, and it's just that one part. The Becky G part has now basically grown on me, but it might be a little bit long until that one J-Hope part. Hopefully in the future, this part will grow on me. Hopefully that part grows on me in the future. Maybe since I've done this video and I'm looking at it differently and just actually saying my thoughts, it might start growing on me because just then I was kind of like, oh, I'm not hating it, hating it. I'm hating it. We're not hating it, disliking it. But yeah, that was my thoughts on this video. What did you guys think? Let me know by commenting down below. Also, I want to do reactions to New Releases, but I haven't done that. I'll start doing that now. So everything that has come out, I mean has, yeah, everything from now on, I'll react to New Releases. So the stuff that has happened before, I probably won't react to it because it's just too late. It's just too late. But I will also do more my thoughts videos if you guys like this. So let me know by commenting down below. And also, I've got some other videos I would love to do, really would love to do. So if you guys like this one, expect more. I'm going to be doing Getting to Know series, where I get to know the idols. Not in person, because I got a really small channel. But it's like, it's basically just like, it's a very in-depth series that I want to do. So it'll take me like probably three days to make one video. So probably I'll try that after this. So after this, I'll do a Getting to Know. I might even do J-Hope, because I don't know that much about him. You know what? I'll do a J-Hope one. I'll get to know J-Hope. And I got some other videos where I want the public to listen to K-pop. So you know, I'll bring my camera into public, have a cameraman, and we just get people to listen to K-pop and get their opinions. I want to do that. I also want to do T-News, which is basically talking about K-pop news, what DKDKTV does. But this is the New Zealand version, baby. So subscribe today. And there will also be reactions. And maybe some gameplay videos in the future, like League of Legends. So yeah, subscribe. Have a great day. Follow my social media that is up there. Right. See that. Follow it. And yeah.


In February of 1999, a 23-year-old immigrant from Africa, a man by the name of Amadou Diallo, was shot to death by four plainclothes police officers. Amadou was returning home from a late meal at around 1 a.m., when the four officers in street clothes exited their car. Their account of events says that they yelled that they were NYPD officers, and they ordered Amadou to stop and show his hands. Instead he ran for his porch, where, thanks to a burned-out bulb and the porch light, he was only backlit by the light from the interior. Realizing he couldn't escape these four men, he turned and reached into his jacket and retrieved his square wallet. One of the officers shouted, Gunn! And all four officers opened fire on Amadou. In the initial volley, one of the officers tripped over a step, leading the others to believe he had been shot. In all they fired 41 rounds. Amadou was hit 19 times and pronounced dead on the scene. The NYPD Investigations Team ruled it a justified shooting, in spite of no weapons being found on the scene, because the officers acted consistently for the situation they were presented with. The officers were indicted for second-degree murder by a Bronx grand jury, but after a change of venue to Albany, which has less than half the black population of the Bronx, they were all acquitted in jury trial. For one officer, Kenneth Boss, this was his second fatal shooting of an unarmed black man in a two-year period. He still worked for the NYPD and in fact was promoted to the rank of Sergeant in 2015. How often does this happen? The correct answer is short. We really don't know. The statistical tools used for crime reporting and officer homicide aren't consistent or national. Our best attempts have centered around tallying events from newspaper reporting. The 1999 incident is upsetting, but it presents a puzzle. Why do police officers keep shooting unarmed black men? And why do they frequently avoid any legal consequence? There are many points of view on this question. You could argue that it can all be explained by centuries of internalized racism, with cops acting out racial violence in a new legal form. You could argue that the whole thing can be explained by the prevalence of crime in the black community and the siege mentality of gangs and the police who combat them. It's easy to choose the explanation that best conforms to our political views, our worldview. I want to see if we can set all that aside, not as unimportant, but as unproductive lines of inquiry at the moment. I want to propose a theory that's rooted in mental information processing. There's some groundwork I have to go over before we get there. I want to introduce three concepts, the diagnostic matrix, automatic versus controlled responses, and the role of anxiety in decision making. First, the diagnostic matrix. For every type of physical test for a condition, there are four possibilities. A true negative, true positive, false negative, and false positive. A classic example might be a home pregnancy test. If you actually are pregnant, the test will either read as a true positive or a false negative. The percent of time that the test detects correctly when you are pregnant is the sensitivity of the test. If you aren't pregnant, the test can return a true negative result, otherwise it's a false positive. The percent of time it returns a negative result for negative conditions is the specificity of the test. Actual pregnancy tests will have both sensitivities and specificities of 99% or greater. We then have to factor in the prevalence of the condition to determine how useful the test is. For very, very rare conditions, returning a false positive only 0.001% of the time could still mean that most positive results are actually false. For example, a mammogram screening in women under 40, who only develop breast cancer very rarely, most positive findings turn out not to indicate actual cancer. The stress and anxiety and risky biopsy procedures this false positive creates is why most physicians don't recommend mammography screening for young women at very low risk. In the case of a police shooting, let's imagine the officer as a diagnostic test for people attempting lethal harm. If they shoot and the person posed an imminent risk, that's our true positive. A false positive result is an officer shooting an unarmed person, as in the case of Amidu. At this point it doesn't matter why the error was made, it's merely a way of describing the condition and the response.  So there's sensitivity to threat and specificity of response, and the two almost always require tradeoffs. If the officer hesitates to increase specificity of response, the sensitivity necessarily suffers. If the officer is maximizing sensitivity to threats, specificity will necessarily suffer. This is the basic game theory of police response as viewed by perfect actors, a robot or a computer, but we're going to have to modify it for real humans. The next factor is an awareness of how our brains process information. We aren't simple computers, each new stimulus is interpreted depending on the other stimuli leading up to it. For example, if we see dark clouds gathering, we're more likely to correctly detect and recognize the distant rumble of thunder. We're primed by one stimulus to sense or interpret the next stimulus. Advertising is very good at priming us subliminally, combining images and close succession like farms and fast food, social gatherings and beer, so that our response is primed to interpret the fast food is healthy. Beer drinking is primarily a happy social event. We call this type of association the automatic process. We're often aware of it, but it operates primarily at the level of automatic effortless response to stimuli. Intention with the automatic response is the controlled response. This is the slower process, requires effort and is under conscious control. It's not always rational or measured, but it is the process that we feel more in control of. In our example, while our automatic response to the farm and fast food might be a tendency to view the product as more healthy, our controlled response might be more aware of the fact that fast food is mostly premade in giant factories and stored in ship frozen. There are some experimental ways to assess automatic processes by exploiting the fact that they're faster than controlled processes. By comparing results between tests where the subject has only fractions of a second to respond to time unlimited responses, the scientists can differentiate between them. In a key study on this subject, a researcher at Washington University took a small group of 32 non-black undergraduate students. And asked them to identify whether an object they saw on a computer screen was a gun or not a gun.  The screen then went blank until the student responded gun or no gun with a button push. The delay in response was carefully measured and accuracy scored. The result was consistent with expectation. When a black face was used as the prime, subjects identified the gun more quickly. There was no correlation to survey responses on attitudes about race. The time scale over which it occurred means that the effect was primarily due to the automatic response. The experiment was repeated, but this time with a time limit to respond of only 500 milliseconds or half a second. The error rates went up for all categories, but the error that increased the most was misidentifying a hand tool as a gun after priming with the face of a black man. So now we have the beginning of a cause and an answer to how race plays into the situation of police officers shooting unarmed black men. In our diagnostic matrix, the automatic response, which dominates our rapid responses, is error prone and more susceptible to priming. It taps into our subconscious and isn't a part of our response that requires effort on our part. I hate to say we're not in conscious control of it, but it's more determined by conditioning. It's entirely possible for a police officer to have no conscious racist intent to be acting in good faith in their decision making. And yet the finger that pulls the trigger isn't responding to that conscious sensibility. Into this mix, we also bring the realities of being in law enforcement. Even simple traffic stops can be risky to an officer's life and their response time and good judgment might be the only thing that saves them from serious injury or death. Police, like soldiers, deal with a level of anxiety on a daily basis that is hard for most people to understand. There's a robust body of evidence on how anxiety impacts judgment. What we know is that people who are anxious, as measured by heart rate and blood pressure, tend to over-detect threats. They produce more false positives for weapons. A good example is a 2012 study where 36 police officers went through a shoot-don't-shoot computer video simulation where a subject popped up and either fired their digital weapon or had no gun and threw their hands up to surrender. The experimenters added anxiety by including a shoot-back cannon that could fire plastic bullets at the participants for wrong answers, just enough to sting and be unpleasant. When the high anxiety scores were compared to the low anxiety, no shoot-back cannon scores, the officer's shot accuracy was lower and they fired at unarmed suspects almost twice as often. Their response time was faster with the anxiety, but more error-prone, specifically in the direction of false positives. There were no racial cues or priming given this experiment, so we're just looking at how anxiety to harm makes police and indeed probably anyone more likely to detect a gun where none exists. In light of the data on this subject, I wanna propose an answer to the question in the title.  I think there's room for everyone to be a little right and a little bit wrong. Cops can be explicitly racist and that can't be ignored, but I suspect that the more common case is a level of implicit racism that is ingrained beyond conscious control. Older officers lived in an era of segregation even if they were enlightened or have had personal experience of threat that became part of their ingrained response. The very nature of the job that law enforcement officers do, relying on snap judgments, constant anxiety, and error-prone threat assessment will serve to magnify any innate racism or stereotyping. A good cop, one with no conscious sense of racism, can still be threat-oriented when confronted with a simple traffic stop as in the tragic case of Philando Castile shot during a traffic stop when he calmly reached for his ID. I wouldn't prevent anyone from protesting about what they view as injustice. Protests are a good way to raise awareness and move toward change. What I would propose is that more funding is needed to study how to reduce the likelihood of these events. Better training can actually help. Officers who train in high anxiety scenarios like being shot with soap pellets for incorrect decisions, learn to better manage their automatic responses. Hiring practices for new cops can be informed by research on how personality traits and anxiety management improve appropriate responses. The point is that we can do something about this and it will be better for police relations, it will be better for individual officers and it will go a long way towards rebuilding the lost trust between the police and black communities. It will take time and funding and research and most importantly, a serious will to get it done. Thanks for watching.