All right, it's not actually time to start, but I figured I'd do some vamping before we go on. So, firstly, they didn't tell me that I was gonna have to follow Sarah May when I agreed to speak at this conference. And like, usually, when Sarah and I are speaking at a conference together, she's the closing keynote, and I'm right before that. And so like, I don't have to be the disappointing follow-up to her amazingness. So could we just like get a big round of applause for Sarah and the great work she did this morning? Like, we were literally at dinner last night, and Abby, the woman who sort of does most of the top-level organization of this conference, was having a massive freak out because the speaker's flight was kind of broken. And like, I travel a lot for conferences, and so I was like pulling up flying websites on my phone, checking out, I was like, yeah, that connection is almost impossible to make. And it was pretty tense in the room. So Sarah, stepping in at the last moment like that is really huge, and yeah, thanks once again. Hello, Ralph. It's been a little while. I guess I did make it last year. How's everyone doing? Cool, all right. As people filter in, please sit in the middle. People on the edges, I would encourage you to also sit in the middle. I promise you you'll be able to see the slides. I've been sitting at the front middle of the entire conference, and I can see them, and like, it makes the room look a lot more full if you all sit in the middle. You can stand up and move, that's allowed. All right, we have like 30 seconds to go. So as people are filtering in, I'm just gonna go ahead and get started. The first thing is that when I submitted this talk, quick and easy browser testing using RSpec and Rails 5.1, Rails 5.2 wasn't anywhere close to done yet, but it is now, and so I kind of have to make this adjustment. Oh my God, it's a clicker not working. Let's just try unplugging this and plugging this back in. Yeah, Eileen, if you could maybe bring yours up, that would be great. Yeah, that's not, oh actually no, it looks like Kino has maybe crashed. Oh no, we're good, we're good, we're good. Thank you, Eileen. Cool, that's why you start early so that when the clicker doesn't work you can keep going. So basically like, then Rails 5.2 came out and like I kind of had to make this adjustment except that like much of the content in here is quasi 5.1 specific, so I will note adjustments to the slides that I have written, but for the most part, this will all stay the same. It's really cool when Rails versions get released like just around the conference so that we're all able to talk about the upgrades and what stuff is available to you and all the shiny new features in our Rails minor, but unfortunately, RSpec as of today does not officially support Rails 5.2, but I will tell you that fixing it required me to change one internal test and so unless you have a wildly specific use case of active storage that almost nobody has, RSpec will work with you on Rails 5.2 today. This has been confirmed in a number of production applications so you should be all good. It's kind of interesting for me to be up here because I've been doing this for quite a while now and like Rails has changed so dramatically since I started doing this, but that's not all that's changed. The community, the people in the room who's participating actively, what's getting committed has changed and also perhaps more importantly than that, I've changed a lot as well over the past several years. So I've been speaking at Ruby Central Conferences since RubyConf San Diego in 2014 and I just wanted to reflect a little bit on some of the memories I've been able to create through those conferences because you see when you give a tour, Confreaks records it and it goes up onto the internet forever and so your sort of unfortunate looks from the past get well and truly captured and for me this is great because I love this community, I've been working in it for such a long time and I've sort of grown up as an engineer with it so I get these like real time snapshots of who I was over several years including the one time I spontaneously transformed into Justin Searle's JK, that was not a fun experience. But so like the point I'm trying to make is that if you're new here, if this is your first time at a RailsConf, this is a great and incredible thing that we do. It's been literally one of the most life-changing things I've ever done and I would love it if you came back to RubyConf in LA or RailsConf in a year's time or so on and so on. Give a talk, participate, start a user group, go to a user group, this is an incredible community and I'm so proud to be a part of it. So without further ado, you all are probably in this room because you care a little bit about testing and I wanted to start by talking about the testing pyramid. So this is our testing pyramid, it basically defines one model of what a really well-designed test suite looks like and the idea of the testing pyramid is it captures two things. The first is how integrated or isolated any particular test is. So when you're writing unit tests, perhaps a model test, those are typically more isolated. They don't touch the entire system, they touch individual pieces of behavior and at the opposite end we have integrated tests, these are the ones that spin up a browser, hit your database, maybe send emails, hit Stripe, do third-party interactions, make phone calls, all of that stuff. They're as close to testing in the real world as you can possibly have. And basically what the testing pyramid tells us is that you should have larger numbers of isolated tests or unit tests and very, very few integrated tests. And there's a reason for this, right? If we come to the top of the testing pyramid and we talk about the most integrated of tests that we can write, well, we're probably spinning up a browser, probably making all kinds of fan-out requests, hitting the database, caching layers, third-party APIs and all of that stuff. And those tests are necessarily really slow. Like just by virtue of the fact they're doing all of this work across the system, those tests are really slow. And so what the testing pyramid basically advises is you should write as few of them as necessary to have confidence that your application is working. And the way that you do that usually is by testing happy paths in your integration suite and really not caring too much about edge cases. And that's a little bit of a generalization, but that's where I'm sort of gonna start. And then if we come to the opposite end, the isolated tests, well, these tend to be really, really fast. If I run bundle exec Rspec in the Rspec repo itself, you can see that the tests for Rspec basically all execute really quickly.  They're not going out to the file system. They're not doing any IO or anything like that. And so the overwhelming majority of them are really quick. And the point of this is that these, because these tests are fast, you can use them to test all of the edge cases in your system quickly and easily without having to worry about the details of everything that's going on. And you can see here that suite executed in just under 30 seconds. And so that's our testing pyramid and that's like a little bit of sort of high speed testing advice, but really today we're here to talk about the very most integrated part of our stack doing browser testing against our Rails applications. And I would just like to say that this used to be so awful. Like if anyone has ever tried to get a JavaScript Kappy Barra set up going in a Rails 4.2 app, you'll know this pain. But for those of you that haven't, I'd like to show you. So I went away and Googled Rails browser testing. And the first result that comes up is a link to Kappy Barra. And this is the point where I have to pause and say I am in no way trying to dunk on Kappy Barra. Kappy Barra is an excellent piece of tooling. It does everything that it's supposed to. It's just that the documentation and guides for this specific use case aren't that great. So I go to the Kappy Barra website. I follow the gem command. I add the require. I do a little bit of setup for a thing called Selenium. Selenium allows you to drive a browser programmatically from your Rails application and Kappy Barra knows how to integrate with it. So I do that. I literally copy their instructions exactly and I write this test. So I do all of the things they've asked and I run it and I get this blow up. Kappy Barra Selenium drivers unable to load gem blow up and I'm like, cool, I'll slap that gem in my gem file, run bundle install, run my test again. Then I get this error. Please add Puma to your application. This isn't gonna work. And I'm like, this is a Rails 4.2 application. I'm using Unicorn in product. Like Puma wasn't a default in Rails for a long time and I'm like, certainly you should be able to get a test response from an application without having this gem present. And I'm like, Kappy Barra, I have no idea why you're doing this. Please, could you not? Like this actually made me really angry when I saw this error. I was like, this should just work. It doesn't. So I took a deep breath and I went back to Google and the second result is this thing. This gem by FNando called browser, which does browser detection. Well, that's not really what I want. I'm not trying to detect a browser. I'm trying to test with a browser. And so I go back and then I get this. Testing a wrap in the browser with Kappy Barra, parentheses, Rails, backend, medium.com. Well, it's on medium, so it has to be accurate, right? So I click through and literally the first code sample is the exact error that I got. And I'm like, perfect. I'm probably onto a winner. So I copy the author's gem setup. I copy the author's Kappy Barra setup. I run my tests and everything passes. Easy, right? Well, let's just take a quick look at the code sample that that author gave us. Let's do a little bit of investigation. Firstly, the author is passing hyphen hyphen, ignore hyphen SSL errors equals yes to the phantom js configuration. And I don't know about you, but if I'm hitting the stripe sandbox or sending email in my integration tests, I would like to have reasonable confidence that SSL is working all the way through. That seems like a really strange default to me. But more importantly, this is using Poltergeist. And Poltergeist is like the sort of headless webkit with a JavaScript engine bolted onto the side thing, which means it's not a real browser. I suspect most of you don't browse the web on a command line by pausing responses out of an invisible browser that's running somewhere on your system. You probably use Chrome or Firefox. And I don't know about you, but the idea of being able to test correctly to me implies as realistic a scenario as possible. And I'd much rather have a real browser if I can. So I go back to Google and I'm scrolling and I'm scrolling and I'm scrolling and I eventually get to this. Headless Kappy Barra feature specs with Chrome robots.thoughtbot.com. Whenever I see a robots.thoughtbot.com link for something I'm frustrated by, it's usually the answer. The great folks at Thoughtbot have done a lot of writing over the years to make sure that we have really good resources as a community on how to solve our problems. And I click through and the author of the post is Derek Pryor who is sat right there. And I'm like, cool, my buddy Derek, he's a really great Rails consultant. I'm sure this will solve my problem. And this is what he wrote. Like here's all the setup you need to do to get a Google Chrome up and running against a Rails 4.2 application. And so I paste this in and I run my tests in low and behold browser window. Doesn't matter that there's an internal server error, by the way, this was a fresh app with no roots at all or routes, this is America. And so it's working and we've won and we can be calm now and go forth and test our applications happily. But I don't know about you, that sure seems like way too much work to be able to accurately test an application. Like Eileen in her keynote made this rallying cry for us to stop doing specialized things in order to solve these problems. And I'm not just building up to this for no reason, it turns out this problem is solved now. And in Rails 5.1 and 2 and aspect version 3.7, this problem is totally solved. And this all has to really start with a commendation to Eileen. So she gave a talk last year, building the new Rails system tests. System tests solve exactly this problem. It is a well-tuned, Rails optimized, Capybara browser configuration that just lets us run this test. And it's so easy that I don't really even have to talk about it too much because I can just play this video that starts with newing up a Rails application and literally we will be done faster than it would take for you to read a blog post on how to do this. Basically what's going on here is that we're setting up a Rails application, adding RSpec and the necessary configs in order to boot a browser test. And at this point I should say that in Rails 5.2 I'm about to make a configuration change to our Puma file. That is not actually necessary anymore in Rails 5.2. The Rails Puma config file out of the box does the right thing. So we've added RSpec to our Rails app, created the default RSpec install. And here's where I'm changing the Puma config to basically set the worker threads up to do the right thing. There's like a weird nurse where if the browser doesn't boot the Puma configuration correctly the system tests don't work, but like this is well documented if you're on Rails 5.1 and solved if you're on Rails 5.2. I should also say that this video is not sped up at all. This is just me working in real time. So then we open our spec file, load our Rails helper, do our standard describe. Here I initially typed foo and then I was like we should do something real here. It works. I also have the snowman as my trailing white space character. I think it's really nice. And then you add type system to your test. This is the magic that allows RSpec to pull in Rails' stuff. And then you bundle exact RSpec and you'll see at the very bottom there a little Chrome window pops up and like it's actually doesn't steal focus. I get a capybara error here instead of a parse test because I haven't added a root to my Rails router and like instead of the test parsing but it failing in the browser Rails system tests have it set up so the exception will actually get bubbled up back to you which I think is a much better interface. So anyway, I add a controller, add a root to home index from my tests one more time and you can see that now the tests all parse and there's a pause there while Chrome is boosting but it's not a long one. And then finally just to show you this is real I do the best programming thing in the world add a sleep statement, then Chrome boots. And you can see here that's it. Like literally that video sequence took less than two minutes to create and that's all you have to do to add system tests to RSpec in Rails 5.1. So that Puma configuration that I mentioned looks like this the important parts of the threads 0,1 and the work is zero. This basically tells Puma that the test should boot up the server thread instead of one being booted already for it. This is important so that the active record test setup something something can do the right stuff. I obviously don't understand it that well and work is zero. So that basically tells Puma not to boot any additional processes in the web server so processes being entirely memory separate to threads that would also cause our test break. In terms of the structure of the actual test itself this is all you need to do RSpec.describe and then some description for your test. You tag it as type system. I still use the hash rocket syntax because fight me and then you say it and some meaningful description and then you just have all the normal capybara commands available to you. Visit expect page to contain, tag selectors, JavaScript evaluation and all of that stuff and here I have that sleep statement copied in because I wanted to grab a screenshot of the browser. If you don't want a full web browser if you just want to assert on HTML instead of being able to execute JavaScript you can call this method called driven by and swap Selenium out for rack test and what rack test does is it basically fakes out the communication between the real browser with a fake one that capybara can then use to parse the responses without making a web request at all. It's pretty useful for just only testing simple responses. You can make assertions about what the page contains and that's again just showing you that all the capybara methods are included by default. That will fail and one of the things that I wanted to show you, this is really cool, is if you use item two and your test fails, the system testing will actually take a screenshot out of the page when the test fails and render it in your terminal for you. This is like amazing because this is like an extremely useful debugging utility and you'll also notice that it actually tells you what the path to the screenshot is so if you need to make it bigger you can go to temp screenshots, failures, aspect example groups, who fails and then some random number, I'll show you how that name gets generated in just a bit but this is an extremely useful debugging tool because usually when capybara blows up it's because it can't see an element or some text is misaligned or whatever and having that screenshot I found is really helpful. And so this is fire, right? Like look how easy that was. You just have browser testing now. There's no painful Googling, digging through blog posts, having to worry about like exactly which artisanal browser configuration you're doing. It just works and this is an amazing piece of tech that is developed inside Rails and I'm really glad that it's available in Aspect now. So like that's all the explanation of the feature I have. It's pretty well documented and you can go do further discovery on your own but it wouldn't be an Aspect talk without me digging a little bit into the framework and the implementation itself. So let's talk about how this actually got implemented. The first thing is that like I had known this was coming ahead of RailsConf last year but like really had no time to prep for it. So this integration within Aspect actually got started getting written at RailsConf last year when I was like well clearly Aspect needs to support this. The pull request actually landed just a handful of days after the conference and while like it wasn't completely done at that time I was really happy that I was able to get something that worked at all out as quickly as I did. The driven by method is provided to you by Action Dispatch itself and what people do when they're testing their applications with many tests is they write an application system test case that you sort of inherit from that has all your browser configuration. That implementation didn't really make sense in Aspect so we just added the driven by method to all of your system tests and then just called it to dispatch straight onto Action Dispatch to do the right thing. We then actually call that method in a before block for you within your test. So if you don't specify a preferred browser our before block gets evaluated and it defaults to Selenium which is aligned with Rails as defaults. And so what I'm trying to show you here is that Rails is really doing the heavy lifting. One of the things that was really great about this is that the API's Rails provided was sufficiently clean that it was very easy for me to just go ahead and add this into Aspect. The actual integration work was mostly dealing with Aspect's protocols not really having issues with Rails's. Let's talk about those screenshots. The way those work are actually really interesting because what's happening under the hood is the screenshot is being printed to standard out as a series of cleverly designed pixel characters. Like, it's bizarre magic. So just like we added a before hook to your test we also add an after hook. What we do is we grab standard out and then basically rewrite it to be a string IO. For those of you not familiar with string IO it's basically a thing that you can write to and it will build up an internal string and then you can read from it to get that string back. So it looks just like an IO object but it's sort of like an in memory string. One of the things that's like kind of weird is this original after tear down bind self call. So let's take a quick look at that. What we're actually doing here is grabbing the instance method after tear down off the action dispatch system testing helper and the reason that we do this is the action dispatch hook is set to execute when the test finishes but that's not when Aspect prints failure output. Like, when you look at an Aspect failure trace where the output is is right at the end of the test suite run. It's not in line as tests are failing and so we have to sort of re-order the way in which these things get printed and this is how we do it.  It says take this method, rebind it to me and then invoke it. The way that we actually get those failure lines written into the Aspect output is through this protocol. So it turns out that Aspect already had a protocol to add failure lines into the output. So I actually didn't have to even go into Aspect core and rebuild that piece of the framework. It was already working which was kind of great. And then the last thing that we have to do is make sure that the rails after tear down hook never gets called. So we have this method blow away off of this module blow away after tear down hook which literally just defines after tear down to do nothing and then we include it when we get included. It's not quite monkey patching but it's really close. And then finally the one thing we have to do is tell action dispatch whether or not our test has passed. While it's really easy for a mini test test to know if it has passed or failed as you can see it's a little bit more complicated in Aspect. But again, like rails is making all of this really easy. I'm not having to do all that much work at all to get these rails features integrated with Aspect and the point that I kind of wanted to make is this. I think one of the things the rails team does really well is design a sort of inner layer of API underneath the layer of framework that you as a Rails user call. And this makes my job as an external library developer really easy because Rails is providing these great rich APIs and they're just the right amount of pluggable. I'm able to integrate them into Aspect without too much difficulty at all. And I think that's a really valuable thing. So as much as I would like to be able to say that this was a clean and easy integration that's not really the case. With any major feature release like this there are going to be bugs. And so one of the very first things I did after I got that pull request up is I went to my network and to like social media and I was like, hey folks this is available please give it a try. And as someone who had demonstrated himself in being interested in browser testing Derek was immediately like here are all the problems. We use feature instead of describe please fix that turned out to be impossible. I was not able to set the driver in a global before hook. Now we know why. I'm calling before in every single test for you so a global hook can't really override that. I could probably do some magic with like a before all and some global variables and stuff but never got around to fixing that. And then we have this like screenshot thing. And originally the screenshots just got called screenshots failures underscore and nothing. And the reason for that is really interesting and I actually fixed this one so I'd like to talk a little bit about how that worked. Basically what mini test relies on to know what your test is called is the method name that's currently being invoked because in mini test all tests are methods and so it can just call method name to get the right answer. And so in that way that we love to do monkey patching in Ruby I just went ahead and over road method name on an aspect test to do this thing. This is actually a surprisingly good human readable description of your test. So it takes the class name which will usually be like aspect example groups some anonymous or like a description of your test and then the actual string description but replacing all the spaces with underscores and also doing a bunch of natural language scrubbing and then random thousand because if you run the same test multiple times you may want screenshots from different runs and so this random thousand is kind of a poor man's way of making those unique. So fixed, the next one is this which is like ultimate no no for RSpec is Puma printing stuff in your green dots. I don't know about you but I cannot have stuff in my green dots it's unacceptable. And fixing this required actually going into Rails because Rails does the Puma configuration for us and so while implementing this feature I actually landed a poor request in Rails in order to make this possible and this is like one of those great Ruby open source moments that I'd sort of like to highlight, right? I'm a third party maintainer I don't really have any ability to dictate to Rails team what they should be doing with their time but I went ahead and sort of motivated this poor request wrote a simple patch I would like to say that there was some discussion but I just sent it to Sean and he merged it straight away because YOLO I have a contract with Sean that says I have to have at least one picture of his baby in all my talks because I'm his baby's godfather. That's great. Anyway, so fix that because this was released later in the series than when we released compatibility we put the check behind a respond to if Puma responds to it we call the true and then like no more crap in your green dots because oh my God I can't be crap in your green dots and like cool merging core requests so then then the actual worst thing that you can do when you release a new feature in a gem like aspect happened which is we broke people's test suites for people who weren't on rails 5.1 and weren't using this feature and the reason is that there was like a load order issue where we were assuming you would have a capybara present but people didn't and then their entire test suite would stop working which is like really bad so you know it's fine to rescue load error and abort with some like useful error message and the point that I might make here is that this open source software is wildly imperfect we are people working our spare time we are unpaid it's evenings and weekends last spec maintainers do not as a rule get paid to do what they do and you know the MIT license gives us a get out clause for that. The software is provided as is without warranty of any kind express or implied including but not limited to the warranties of merchant ability fitness for a particular purpose and non infringement in no event shall the authors or coffee right holders be liable for any claim damages or other liability I can break everything you do and you can't sue me it's what that says so that's all I got thank you so much just as a quick shout out my cool team from digital ocean is here it's a funny story actually so I had I was a developer on my own for about nine months I didn't have a team because we're trying to recruit them we came to RubyConf and I just like bam immediately had two developers who wanted to join my team it was wonderful I love hiring from this community because you are my people and while we don't do rails as actively at digital ocean as we used to it's still a very heavy component of our stack and I think it's so cool that after being in this community for so many years I was able to sort of hire people I really like working with out of it so shout out to Chris and Kinsey if they're in the room and Dan who is not with us but I'm sure we'll watch this talk at some point we have a booth check it out there's swag there's a demo with a giant button it's really cool yeah and I will actually be down there after this happy to take your questions and have a chat with you for sure and that's all I got thank you so much I'm Sam Phippen on Twitter you can email me as Phippen at digital ocean cheers


Welcome. I welcome you all to this lecture in the course, Samasa in Paninian Grammar, and this is the first course. We begin with the Mangala Charana. In the previous lecture, we looked at the process of speech production, and we noticed that the first stage described in the Paninian Shiksha is about the collection of meanings. Let us look at this aspect in little bit detail, and then we have already related this with the process of compounding. Let us explain that aspect too in this particular lecture. There are three Arthas, three meanings that we come across as far as the compositionality of the sentence into Padas and the Padas into Prakriti and Pratyayya are concerned. In the previous lecture, we also saw the overall sentence structure which is made up of Prakriti and Pratyayya and their co-occurrence, their binding together. So, we have three types of Arthas which were also shown in the diagram that was displayed in the previous lecture, both from the speakers as well as from the listeners point of view. These three meanings are namely Prakritya Artha or meaning of the Prakriti which means meaning of the root, then Pratyayya Artha which is the meaning of the Pratyayya or meaning of the suffix. And finally, Sambandhartha which means the meaning of the Sambandha meaning of the co-occurrence. These are the three types of meanings that we come across in the Sanskrit sentence. These are extremely important because in the process of compounding as we shall see now, one of these plays a very crucial role as input and also as an output. So, Prakritya Artha which means meaning of the root is also of two types because we have already seen that there are two types of Prakritis. One is Dhatu and the other one is a Pratyapadika. So, Prakritya Artha has got these two categories namely Dhatvartha as well as Pratyapadika Artha. So, on this slide, we have the description of the Dhatvartha in brief on the left hand side and the description of the Pratyapadika Artha in brief on the right hand side together with the concrete examples. So, Dhatu means a verbal root and the verbal root means a verbal action. So, this is what a Dhatu denotes. The meaning of the Dhatu or the verbal root is verbal action. This is one of the important meanings, the root meanings in a sentence. This verbal action is to be accomplished with the help of the elements or entities thought of by the speaker as performing different roles. I repeat, the verbal root denotes verbal action and this action is to be accomplished with the help of the entities or the elements thought of by the speaker as performing different roles in the accomplishment of this particular action. And here are the three examples of the Dhatvartha. The verbal root is Gama which means the action of going. The verbal root is Patha and it means the action of reading. The verbal root is Likha and it means the action of writing. So, Gama, Patha, Likha, these are the Dhatus, these are the verbal roots and the action of going, reading and writing, these are the verbal actions denoted by these verbal roots. And these actions of going, reading and writing are to be accomplished with the help of the entities as well as elements thought of by the speaker as performing different roles in bringing about these actions, actions of going, reading and writing. And those other elements, they are part of the sentence and sentence formation. So, this is the meaning of the Dhatu, a very, very crucial, very, very important part of the prakrityartha. This will help us understand different kinds of tattpurusha compounds for example, for example the upapada tattpurusha compound is a very complicated process and it requires one to be aware of the meaning of the Dhatu and how it gets accomplished, the meaning of the action and how the meaning of the Dhatu, namely the action gets accomplished. The second type of prakriti is called pratipadika and the meaning of this pratipadika is called pratipadikartha. The meaning of the pratipadika involves a substance and also gender, also number, etc. For example, when we talk of Gopala as a pratipadika, we know that Gopala is the name of a person. So, the word Gopala denotes a human being or a person. It also denotes the gender, namely masculine and also the number, namely the singular. When we hear the word nadi, for example, we know that it is a flow of water. It is in feminine gender and also singular in number. Similarly, when we utter the word vana and hear it also, we do get the meaning, namely a collection of trees. This meaning is having neuter as its gender and it is also in singular number. So, these are the three pratipadikars, Gopala, nadi and vana and they denote these respective meanings. These are the pratipadikarthas, Gopala, nadi and vana, these are the pratipadikas and their meanings are called the pratipadikarthas. So, obviously it is this interaction between the dhatvartha and the pratipadikarthas which forms the core of the sentential meaning on the basis of which the sentence gets formed. And we shall also now study what is a pratyayartha. Pratyayartha is the meaning of the suffix. This is that meaning which links the meaning of the prakrityarthas or meanings of the root and link of the meaning of one nominal root with another nominal root. This is the first type of such pratyayarthas, namely meaning of one nominal root is linked with another nominal root. This is done by the pratyayartha and also link of the meaning of one nominal root with one verbal root. This is the meaning of the pratyayar or the suffix added to the pratipadika. Here are the examples of the pratyayartha. On the left hand side, we show the link of the meaning of one nominal root with another nominal root. This is achieved by the pratyayar and the meaning is the pratyayartha. And on the right hand side, we show the link of meaning of one nominal root with one verbal root denoted by the pratyayar, that is the pratyayartha. So, let us first look at the left hand side of this slide. Link of the meaning of one nominal root with another nominal root. And here are the three examples. Janya-janaka bhava, swasvami bhava and avayava avayavi bhava. Janya-janaka bhava is the relation that is shared between the two nominal roots where one meaning of one nominal root is the janaka, the father. And the other is janya, that is the descendant. So, parent-child relationship. This is what is janya-janaka bhava and this particular relation is expressed by the suffix. Swasvami bhava, the owner and the owned, swasvami bhava. This is another link, another relation between two nominal roots. This is expressed by a particular suffix. And also avayava avayavi bhava, part and whole relationship is also the meaning of a particular suffix. So, these three are the examples of the particular relations which are the meanings of the pratyaya which link to pratipadikarthas. So, dasarathasya putraha. In this particular example, dasaratha and putra are the two nominal roots and they are linked by seer which is the suffix which indicates the janya-janaka bhava which is shared by dasaratha and putra. And similarly also in the case of swasvami bhava and avayava avayavi bhava. This is very crucial, very fundamental because as we shall see the process of compounding requires the meaning interrelation between the padhas and those meaning interrelations are precisely of these kinds. So, these are the basis for the process of compounding and that is why it is extremely important to go through them with some amount of care. Now, let us look at the second type of meaning of the pratyayas, link of the meaning of one nominal root with one verbal root. If we take gamma, the action of going for example, we can say that gopala which is a pratipadika and whose meaning is a person, masculine gender, singular in number etc. This gopala is an element, is a person, is an entity which the speaker thinks of as performing a particular role in the description of the action of going and that role is the doer of the action. So, gopala is thought of as the doer of the action of going. So, this is the role gopala played, plays as far as the speaker is concerned and this particular role, this particular relation between gopala and the action of going is what is the meaning of the pratyaya. Similarly, vana which means a collection of trees and vana is a pratipadika and so the pratipadika rtha includes a collection of trees, neuter gender and singular number. This pratipadika rtha is related to the dhatvartha gamma in a particular manner, in a particular relation. That relation is that vana is a place which is aimed to be reached, it is a destination and this is an important part of the action of going which is required for its accomplishment. So, this is how the pratipadika rthas and dhatvarthas they are linked and pratipadika rthas and pratipadika rthas are linked. These are the cores, these are the core foundations of the process of compounding. We also have the sambandhartha, namely the meaning of the co-occurrence. The fact that the words are uttered together indicates that they are bound together, makes them one unit which is interrelated. This is not stated explicitly, only the utterance together indicates that they are making one unit. The interrelation of words in this manner results in euphonic combination arising, this is on the level of words. Similarly, the fact that the words are uttered together indicates that their meanings are bound together as well. Just as their word forms are bound together, so also are their meaning forms bound together and that makes them one meaning unit which is interrelated. Now, this interrelation of meanings results in specification of meanings and pruning of the over-generated meaning template. This is an extremely important factor as far as the meaning of the sentence is concerned. Once again, it is on these basis that the interrelation between the words is decided and such interrelated words then become eligible to be the input for the process of compounding. It is extremely important for us to study the Karaka theory in this particular regard which focuses on the relation of the Pratipadi Karathas with the Dhatvartha. When we study the Tattvurusha compound in detail in this course later on, one of the categories of Tattvurusha compounds is the Vibhakti Tattvurusha which is quite a big group of compounds. This particular group of compounds involves invariably the Karaka theory and also other types of compounds, they also require this Karaka theory. We can say that the Karaka theory forms the basis on the whole of the theory of compounding in Sanskrit. In fact, we have already said so where we said that it is the Samartha theory which is based on the Karaka theory which is the theory of compounding in Sanskrit. Let us therefore study the Karaka theory in some detail. There are certain things which are very crucial, very important to note. The first question is what do we do when we speak? As far as the current Paninian grammatical tradition is concerned, there are these three steps. The answer to the question is first we as speakers decide primarily about the action we want to describe. This is by default. Second, then we decide who all are the participants in this action that we have decided to describe. And then what roles these different participants, these elements play in the description of this action. Then we select the words which express the action as well as the entities that participate in that action and also express the roles that they play. This is what we do when we speak as far as the Karaka theory is concerned and these are the by default positions. It is also very important to note that the action and the entities participating in the action are selected from the lexicon of entities. Namely the list of the Pratipadikas and also the action is selected from the meanings of the list of dhatus. Now the action gets expressed by the dhatu and the entities which participate in the accomplishment of this action that is expressed by the Pratipadika. These are much bigger sets of elements and theoretically they are infinite and we have already seen a brief description of both these in this particular course earlier. Now the roles that these Pratipadikas and the Pratipadikas as thought of by the speaker are however smaller in number and they are 6 in number. These roles also show the interrelation between the elements and the action. These roles are called Karaka and they are expressed by the Vibhakti. These roles are called Karaka and they are expressed by the Vibhakti. Once again what is more important to remember is that these roles are called Karaka. They are primarily the meanings and they are expressed by the Vibhakti and Vibhakti is the name of a particular verbal element which is audible. Karaka is the meaning which is expressed by the Vibhakti. Vibhakti is a word which expresses the Karaka. This interrelation should be very clearly understood and there should not be any confusion about the status of Karaka as well as the Vibhakti. Generally we see people referring to Karakas as the verbal elements and Vibhaktis as the meaning elements that should be avoided at least when we speak in terms of Panimian grammar. The roles which are called Karaka are of the nature of meaning and the Vibhakti suffixes that express the Karaka are the explicit words. And these words become audible in the course of time when the process of speech production comes to its fruition. Karakas are only 6 whereas Vibhaktis are 18 things suffixes stated in Ashtadhyay 3.4.78 plus sutras and the Vibhaktis also include the 21 sub-suffixes stated in Ashtadhyay 4.1.2. 3.4.78 consists of 18 suffixes and 4.1.2 consists of 21 sub-suffixes which are described as Subhavujas, Samavukshas, Tabhyambhis, Nebhyambhyas, Nasi-bhyambhyas, Ngas-os-am and Ne-os-sup. These are those 21 sub-suffixes and all these the 18 things and the 21 sub-suffixes they are called Vibhaktis. Yes, along with the 21 sub-suffixes the 18 things suffixes are also termed Vibhaktis in Paninian grammar by the sutra 14104 Vibhaktishtha. This is very, very important. This is very crucial. Generally, we know only sub-suffixes as Vibhaktis. In Paninian grammar however, the things suffixes are also termed as Vibhaktis by the sutra 14104 which says We have already seen these subs. Let us quickly have a look at the subs. Once again, these are the Vibhaktis. These sub-suffixes are added to a Pratipadika. The meaning of a Pratipadika is a substance and gender and number. And the meaning of these subs is the relation that this Pratipadikarth has with another Pratipadikarth as well as with another Dhatpartha. It is this link that is the meaning of these 21 suffixes. When these subs are added after a Pratipadika, we get the following forms. Ramah, Ramau, Ramaha, Ramam, Ramau, Raman, Raman, Ramabhyam, Ramayi, Ramaya, Ramabhyam, Ramebhyah, Ramat, Ramabhyam, Ramebhyah, Ramasya, Ramayoh, Ramanam, Rame Ramayoh, Rameshu. And we can show the meaning composition even in these forms where the subs suffix indicates the link and the Pratipadikarth indicates the respective Pratipadikarth. These are the 18 things suffixes. These are divided into two groups, 9 on the left hand side and 9 on the right hand side. Because they have different functions and these are also termed as thing. When these things suffixes are added to the verbal roots, we get following forms. Nayati, nayataha, nayanti, nayasi, nayataha, nayatha, nayami, nayavaha, nayamaha on the one hand. And nayate, nayate, nayande, nayase, nayate, nayadve, nayenayavahe, nayamahe on the other. We have already seen that these thingant forms are not the input for the process of compounding, never. But the subanthas, they are the input for the process of compounding. But the subanthas cannot form on their own a sentence as we have already seen. So, we need a thinganthas in the sentence so that those subanthas can form a compound so that those subanthas can be interlinked with the thinganthas and then obviously the subanthas can be interlinked with themselves. So, this is the sentence structure. This is what guarantees the interrelation between the paddhas and it is on the basis of this interrelation which also is referred to in a technical manner in Paninian grammar in this particular field also known as Vepekshah that the compound is formed. Now, here are the six karakas which we shall study in detail. Kartha, Agent, Karma, Object, Karana, Instrument, Sampradana, Recipient, Apadana, Point of Separation and Adhikarana, Location. These are the six karakas which are the meanings of the sup suffixes as well as the thing suffixes and also other suffixes which are added after the verbal roots other than things. We shall study them, we shall study these six karakas one by one in the next lecture. To summarize the six karakas act as representation of an individual viewpoint and also individual world view. They form the core of the meaning element in the sentence which is the relation of entities with the action. These meanings feed into the theory of compounding. The meanings which are interrelated in this manner become eligible to be used in the sentence and thereby become eligible to be the input for the process of compounding. Now, we shall study in the next lecture in detail what these six karakas are, what do they mean, what are the definitions of these karakas provided in the Paninian grammar. These are the texts that are referred to. Thank you for your patience.


In this case study, we're going to look at garnets in religious use in objects made for the church in medieval Europe. And we're going to start with a really nice early example. This is the so-called Enger Reliquary, and it's named Enger for the church it ended up in in a part of Germany in the Hereford area. And what I want you to notice is that this is an object that strongly resembles some of the garnet objects that we saw just in the last case study where we were looking at early medieval goldsmith work from migrating or so-called barbarian tribes. And I want you to notice that we have that same division of gems and glass into sort of a framework. Many of the pieces are missing here. But then we also have a number of other gemstones being used. You'll notice on the left there's a particularly nice bright amethyst in the center. And I hope you also notice the engraved gems with a figure of a satyr and one that's been placed upside down at the very top of this reliquary casket. And we'll talk about those in a minute. So what is a reliquary? Well, it is a container for relics. That means that it would generally have held bones or other bodily remains or possibly things associated with one or more Christian saints. And this is a particular type of reliquary called a purse reliquary. These were used by early missionaries, probably coming from Ireland and Scotland and the north of Britain, as missionaries to convert the pagan tribes in northern Europe. This is a work from the late 8th century. It's also possible it could have been made perhaps somewhere in France but then sent with missionaries to sort of the pagan frontier, if you will, in probably northern Germany and some of the areas that had never been in contact with the Romans. And the reason that reliquaries would be brought with missionaries is that when a new church was established, reliquaries had to be placed inside the altar or relics had to be placed inside the altar in order for that altar to be considered a holy place where services could be performed like the Eucharist, the celebration of Christ's sacrifice through the bread and the wine, which are the body and blood of Christ. So you would have a precious container like this to hold those even more precious substances, the relics themselves, as they traveled from whatever church was sending the missionaries out to where they're founding this new church. Here's a closer look at the anger reliquary and if you compare it to some of the really extraordinary examples of metalwork that we saw in the previous case study, this one kind of looks like it's suffering by comparison. Clearly the person creating the cells and holding the enamel glass and gemstones here is not as familiar with that process as the goldsmiths responsible for the pieces we saw before. But still it is imitating those works that we've seen and we have the inclusion of these engraved gems from the antique world, these Roman ones that have been reused. And there are three reused engraved gems here. At the top left you can see a satyr. You can see his tail hooking up behind him and he appears to be carrying some grapes in one hand. On the right you see some sort of a figure, I believe, in front of a sphinx, speaking to a sphinx, if I can read that upside down properly. And then just below our satyr on the left between that and the really nice amethyst, we have something that has sort of three different things engraved in it and I can't really tell what those are, frankly. But I want to also call your attention to the garnets. We have a garnet at the top in the center and a garnet on the right here, as well as a number of garnets in that sort of cloisonet work, the inlay, that look like they might have been gouged out of other pieces and reused. And it looks like there are some garnets and that there are also pieces of a clear red glass kind of standing in for the garnets. Here we're looking at the bottom of the piece and you can see that we have one more garnet in the very bottom center and one more engraved gem just up and to the right of that garnet. And what I want to mention is that there are some definite meanings that can be associated with both the garnets and with those reused engraved gems. Now, on one hand, we are simply presented with an object that is made out of precious enough substances to justify it being used to hold the even more precious relics of one or more saints. Saints were incredibly important in all sorts of aspects of early Christianity and at the time that this piece was made in the 8th century, relics played a key role in the conversion of previously pagan areas of Europe. But there's also symbolism associated with some of these gems. Why use possibly pagan gems from Rome in a work like this? Well, they were considered to be precious antiques there was a sort of symbolic memory associated with Rome. Rome was the site of the Pope and where the early church really first saw its greatest rise when Christianity became first a tolerated religion under Charles or under Constantine in the 4th century. And in the Carolingian period of the time of Charlemagne in the 9th century, Charlemagne was very consciously trying to imitate Constantine. So things that were Roman were given particular value in that period. Also, by turning some of these pagan gems upside down, it's a way of sort of getting defeating the power of the figures in them and asserting the conquering power of Christianity. So that's another interpretation that we can see in these reused jewels. And then, of course, the garnet becomes associated by Christian writers with the blood of Christ and they also pick up on that fire aspect of the garnet and make references to passages in the Bible. For example, prophets describing Christ coming as being like a refiner's fire that this will change the world forever. And so there are a number of deep meanings that you can see here. The pearls, similarly, are both a precious substance and something that refers to purity. Here's a wonderful photo taken by a colleague of mine, Geneva Cornbluth. She studies engraved gems. And you can see on the left, there's that one piece that was kind of hard to see when it was upside down. Here we can see it's a female figure who is speaking to a sphinx that's up on kind of a rock. The sphinx is the little winged creature there. And you can see that satyr upside down and get a better look at the overall purse reliquary. And I think you can get a sense of its size. It's really the size of a woman's purse meant to be easily portable but at the same time precious. So very quickly, here is the back of the anger reliquary and you can see on this that we don't have gemstones on the back but we do have some work done in repoussé. That's a technique in which you hammer and otherwise push on the backside of a flat piece of metal in order to create projections in relief. And so here we have Christ giving a gesture of blessing at center top. He's flanked by two angels. I think you can make out their wings. And then at bottom left we have Saint Peter. He's holding a very large set of keys and has a book also. The Virgin and Child are in the center. And then on the right is another figure and I'm guessing by the texture on his garments that he might be John the Baptist because John the Baptist always wears kind of a hair shirt. Here's the side with another angel and you can see signs that something has been pried off the side above this figure of an angel and below the head that you see just above that. And perhaps that might have been some sort of a place for a carrying strap so that this could truly be carried like a purse. Now we're looking at a second really famous piece from the same church at Enger. This is the Enger Cross and this one is believed to have been made by a famous 12th century goldsmith, Roger of Helmershausen. And if so, it would have been from the early part of the 12th century. And it is a truly spectacular work. I think you can tell right away that we're dealing with a piece of much higher quality and a much nicer state of repair overall than what we saw with the Enger Reliquary. And this piece is dominated by beautiful gemstones, some of which are reused and you can see, for example, a lovely antique cameo down at the base and on the left arm of the cross there is an engraved sardonyx that seems to have at least one figure, possibly two. And then just above the cameo at the very base of the cross is a gem that almost appears to have a head on it. But when you look at it from the side, it's not, so it might just be a trick of the light. What I want to draw your attention to first, though, is that beautiful engraved rock crystal lens that we have at the very center of the cross. And you should hopefully recall the effect of rock crystal to magnify and brighten. And this has an engraved angel on it and then behind in the inscription in Latin we are told that there is a piece of the true cross as a relic inside of this cross. So this is a cross in more than one sense of the word. It actually reflects the outside is meant to reflect something that's held on the inside. So this is a reliquary cross. I also want you to particularly notice the very large garnet that we have at the very top of the cross. And you might remember that in the Middle Ages, garnets tended to be called carbuncles. And there are numerous references to carbuncles in the Bible in both the Old Testament and in the New. And it was very often that churchmen tried to have examples of all of the gemstones from the Bible in the treasuries in their churches just to celebrate the preciousness of God and salvation and Christ and so on. And here we can very clearly assume that the garnet is also meant to call our attention to blood and to Christ's crucifixion. So we have this really prominent garnet and then we have smaller garnets also used on the cross arms. Again, the pearls are a sign of purity and so they're a good metaphor for Christ and his virgin birth and his innocence and the fact that he's sort of an innocent sacrificial lamb for the Christians. Here's a closer view of that top garnet and interestingly you can actually see the reflection of my hands holding my camera in the gemstone. I kind of got a kick out of that when I blew this up on the screen. The other thing you can notice is the wonderful work in filigree wire. Those are those little decorative details in wire and the wire has actually been shaped using stamping or a special tool to look like it's all made of individual little beads of gold rather than strips of wire. So this is really beautifully worked again and just a tour de force of the goldsmith's art and that's part of the reason it's associated with Roger of Helmer's housing because he was the most famous goldsmith of the day and so we have some records of things that he did, we have some records of things that he worked on and then by association a group of works has been attributed to this great goldsmith. Here's a slightly earlier cross and like the Enger cross this one would have been either carried into the church at the beginning of the ceremony or placed at the altar on a pedestal. It looks like this one because of its size was probably meant to sit on the altar and you'll notice it's a bit smaller than the Enger cross. It is also a bit earlier, probably made about 150 years earlier than the Enger cross. It has a really wonderful little plaque in the center done in enamel showing the crucified Christ and he has the Virgin Mary on one side, John the Evangelist on the other side and then up above him God the Father and also a reference to the inscription that labels him Jesus Christ, King of the Jews. I hope you notice the wonderful filigree work here and the pearls. These are all beautiful additions to the cross but here again we also see the use of garnets and here they are very deliberately placed in all the places where Christ would have bled on the cross so up at the very top of the cross where the crown of thorns would have cut into his head. We have two garnets flanking a really beautiful rock crystal and then at the cross arms we have three garnets on each of those arms around sapphires and then at the very base of the cross we have the largest garnet and then two smaller garnets and beneath those we have a little rock crystal area that is shielding some relics inside this cross so again like the Anger Cross it had precious contents in the form of relics and so these gemstones need to be appreciated not just for their symbolic value but also because they are a sign of how precious the relics are inside of these objects and also a sign of the honor and respect that are being given to important figures like Christ who is considered to be the savior of humankind. His crucifixion is the means by which he sacrifices himself for humanity. We're going to finish with this gothic piece this is probably from the 13th century this is a brooch for a bishops mantle 13th maybe 14th century and it is in the Musee de Cluny in Paris it has an enormous eagle in the center and you can see pearls, sapphires, rubies, garnets and rock crystal as well as translucent enamel being used on this so it's really showing off a series of different techniques and then also some really wonderful engraving on the gold surface behind this eagle and with the garnets again these are probably references to Christ and to his blood they can also be references to the Christian experience to Christ being the refiner's fire the rock crystal is mainly used here to shield tiny little relics and you don't really see the relics here what you see are little scraps of parchment with the name of the saint whose relic is kept in that capsule and so each one of those little capsules on the outer lobes has a relic that has been labeled and then the sapphire was particularly associated with the pins and gemstones that were given to bishops as part of their office when they assumed the role of bishop and it's because sapphires are associated with truth telling and with honesty traditionally in that period and so this would be part of the charge to that bishop to be a responsible officer of the church and to care for the church population in a proper way plus this is just a really extraordinary lovely work of art


Good afternoon. I am cough and this is confidence game theater we are going to demonstrate a couple of con games and Talk about how they work Yeah, sorry that was that was my whole introduction. I didn't have anything else to say so yeah, okay and our first Our first demonstration is gonna be a confidence game that I'm guessing a lot of you have heard of and some of you may have even seen It's called three card money And I don't actually I don't actually have any cards up here.  Hey, this one right here that one right there. Hey, we have a winner here you go The winning card is exactly where I thought it was gonna be this game looks easy Alrighty, look here win lose lose watch them cruise. Which one do you choose right there again right there? This one here. Oh, hey, that's a red card. We have a winner. There you go Card is exactly where I thought it was again. This game is easy Alrighty here we go. I don't bet low. I only bet high Look look look try try try. Where'd you go? Is that one right there? Oh No, that one's that one's a black card. Sorry the black cards lose the red card wins That's this one here the red cards the winner She totally chose the wrong card. I knew exactly where the card was going to be Alrighty alright here.  I can't hear you can't hear you All righty here we go win lose lose watch them cruise. Which one do you choose? This one right here. Oh, nope. See that's a black card the black cards lose the red card wins That's this one here the red card wins Scoot this game man.  This is a real game. I'm playing this for money. You know, please please play fair Did you see that she just bent the winning card? This game is gonna be so easy to win. Heck. This is a sure thing Hey All right, here we go one two three which one do you choose 20 bucks 20 bucks that one? I'll double that bit. All right, and we have a winner. There you go, sir Thanks, I had the winning card if I just bet more I would have won All righty, here we go Win lose lose watch them cruise which one do you choose 20 bucks 20 bucks that one? All right, I'll see your 20. I'll raise you 80 hundred dollars or no bet hundred bucks or no bet. Um, I've got a 80 bucks I'll go in for 20 my 20 his 80. That's 100. All right money in hand money in hand or no bet All right turn over the card. Oh No, see sorry, that's that's a black card the black cards lose the red card wins. Oh shaman cops. Oh, thanks WTF I can't believe this what just happened. I shot. I thought I had a sure thing You should go to the cops These guys came by and there was a game going on and I lost the money game three card money Oh, yeah, I was here last week and they took me for about 120 bucks So maybe I should go to the cops.  Do you need cab ride or something? You got did you lose all your cash? I can walk to the bus or something like that. I'm good a couple bucks. No, I'm good You know I got taken to man But just the best thing to do is just cut your losses and don't tell anyone. All right I think I'll do that and That's how mr. Victim lost his money Three card three card money illustrates a lot of the important aspects of a confidence game A confidence game is a crime of deception Where the victim is persuaded to more or less voluntarily hand over their money Now where confidence games differ from other crimes of deception for example cheating and gambling or outright fraud is That in a confidence game the victim believes that he is taking Dishonest advantage of one or more of the con artists typically This has this has several advantages for the criminals one is You will take you will get more victims Right, you can only take someone with fraud if they're actually interested in buying what you're pretending to sell You can only take someone by cheating in a it's like in a card game if they're interested in gambling at that game Whereas with a confidence game when you when you offer someone an opportunity To to play and they think they have a dishonest advantage. They are confident that they're going to win You can get more people involved They confidence games also have another advantage, which is You can typically take a victim for more money than you can With with straight fraud right a a savvy gambler will only bet what he can afford to lose a prudent purchaser Will only buy Things that he can afford. I mean I realize not everyone does that but on average You you can get more money out of your victim with a confidence game because They don't think they're going to lose the money and so they can be persuaded To to risk more than they could afford to lose. They can be persuaded to risk borrowed money they can be persuaded to risk their savings and A a third advantage of the confidence games have over typical fraud again from the criminal's perspective is They tend to be less risky It's harder for the victim to complain because then the victim would have to admit to having done something either illegal or immoral For example trying to trying to take advantage of someone else trying to in the case of three-card money trying to cheat at the game and In fact, it's it's common for victims to give reports that are wildly inaccurate I've heard stories from law enforcement agents of actually having to arrest the victims in three-card money games for filing a false police report for example saying that that they were robbed with threat of violence when that's not what happened and Another way in which they are less risky is the fact that typically the con artists outnumber the victim significantly Now now aside from sort of the obvious advantages in the case of violence or threat of violence This also has the advantage that the the con artists can create a consensus reality and a very powerful and compelling one Since they're pretending not to know each other When they things that they just all sort of agree on, you know, the victim is kind of drug along into In in the case of three-card money in particular There there are a lot of a lot of interesting subtleties one is this game or Relatives of it go back over 600 years. In fact, the earliest Currently the earliest known deception with playing cards is from 1408 and it was a game very similar to three-card Monty now we don't know all the details the the records are vague, but The basic idea is that the dealer dealt some cards out one of them was a winner right it There was a pretend game that the con artists were playing Where where the the dealer dealt out cards the players Tried to pick which one was the winner and the victim thought he knew which one was the winner because it was marked In its current form it came into New Orleans in the 1820s or 30s from Texas then a part of Mexico Later spread to the Mississippi River Boats After the Civil War spread to the railroads was an extremely popular confidence game in the in the Old West You'll even see it in some old westerns in in three-card Monty there are There are a whole bunch of of sort of lies that are sold to the victim as part of this consensus reality For example, the biggest one is it's a game There's also the fact that the the other players are playing against the dealer Right when you when you see people who are apparently in conflict and they agree on something like oh It's a game that that makes it easier to be drawn into There's there's the lie that that if you bet on the correct card you will you will win You will be paid now. There are lots of ways to not pay someone if they bet on the correct card We we only showed off one one of them, but you know long story short is the Even if you do manage to get the correct card, you will not get paid one way or another And and it's extremely rare to get the correct card Because the dealer cheats So yeah in reality In reality, you're not gonna get paid The the other players are working with the dealer in fact frequently there are several of them It's not it's not uncommon for there to be five or six shills and really the the only Only one person in the group is is not part of the mob and that's the victim The the card can be marked in other ways. It doesn't have to be have a bent corner It can be torn a little bit it can be more a dot gear a marking can be placed on the back of it with a pencil Someone can smear something on it. For example a female member of the mob can can rubber lips and rub little lipstick on the back of the card Well, she's turning it over Small piece of paper can be stuck on the back of the card However, it's done right the point is the victim believes he has a dishonest advantage And when he tries to take advantage of it, he loses It's also worth remembering Sometimes sometimes in these in these games well while tourists are being attracted and watching the game It's easy for the mob to press in on them and pickpocket them And it's also been heard of That you know since since you're dealing you're dealing with a whole group of thieves, right? They pretend not to know each other, but they're really all working together against the victim It's not unheard of for the victim to go, you know leave the game not get taken for everything or not play and Then some members of the mob follow him around the corner and mug him and let's see It's also related to the shell game Which I'm sure some of you have heard of the the walnut shells and the pee which is over 300 years old Nowadays, it's typically done with bottle caps used to be done with thimbles. It was called thimble rigging and Let's see there there are there are some There are some some techniques in that to also give the victim the the illusion of having an advantage over the dealer I'm not going to discuss that for time And I think we're about ready for our second demonstration So let's let's pull a couple of chairs out Mom chance Got your phone. Okay. Let's let's pull a couple of chairs out and we need okay. You got three over here. I think three is good Okay, so this part of the stage is a bar That part of the stage over there is a sidewalk on the street and the action starts over there take it away First I need to select a victim and learn about them. Oh Yeah, the the painting convention is going great No, no, it's My office isn't building a you know, I don't go into building G with the accountants. No, you've gone too far Yes Okay, so you found it great So What am I supposed to bring to the office party next week? Okay, I guess I'll just beg my wife Gina to make her world famous ribs like last year Yeah, so Yeah, the convention floor doesn't open for another couple hours. I I don't think I'll have a problem finding something doing Vegas though Okay, now I need to interrupt their train of thought so they forget about the immediate conversation. They just had Excuse me. Sorry about that Now I need to put the victim at ease Hey, I know you we work together. No, no, no, we do work together, but and But we work in different parts of the same company. Yeah. Yeah You came to this painting convention and I came to this game painting convention. They sent two of us at the same time That's unbelievable. That's a huge waste of money and they sent me here to check out accounting software Unbelievable what we have totally works and yet they want to buy something new. It's just a huge waste So so you're in accounting. Oh, yeah, yeah out in building G in the thick of it addition subtraction multiplication and division Yeah, but we're all having a good time over there in accounting. Hey, don't you don't we have an office party coming up next week? Maybe yeah, and your wife last year. She brought potato salad. No, no, no She brought barbecue something wasn't it? Yeah, my wife strips. Oh, yeah, those were great. Oh, I'm looking forward to that party this year Oh Good times at the office really really good times there so um Look at the time What do you have a plan while we wait for the convention to open up? I don't have any plans yet Don't have any plans. Check this out. My hotel gave me coupon bring a buddy. No cover charge.  Sure, let's go.  Okay? I can't remember the last time I saw you and this guy. Oh, I would be rude forgot to introduce him This is a guy who works with me over in paint. Of course. He's not an accountant, but he still is a pretty good guy You know it's been such a long time since I've seen you I can't even remember and I last time I saw him was at our office party last year. Let me buy the first round of drinks. Well, we could Okay, so Hey, you want to you want to help me have a little fun with my buddy over there when he gets back Sure, I'll give you in. Okay. I Didn't plan for the mic when I was rehearsing I Got a yeah, I got a deck of cards here And I'm gonna I'm gonna propose a little something to him and when I cut the cards what I'm gonna do I'm just gonna take a couple cards off the top of the deck And I'm gonna let you see the bottom card of the rest of the deck Then I'll finish the cut and and later I'm gonna ask you to name the card to name a card and just just say the card that you saw there Okay, can you do that? Sure? No problem. All right? This is gonna be fun Thanks, man It's real nice of you. It's real nice of you to buy drinks and all but you know, I'm thinking I'm thinking we should we should be kind of sporting about this Maybe maybe you and I should you should play for who buys the first round. No, what kind of thing do you have in mind? Mom chance. What's that? It's a game of pure chance. We each name a card and then we then we We deal through the deck. I got some cards here We turn the deck face up and we deal through the cards one at a time whoever's card comes up first as the winner That seems fair. All right here shuffle them up. Okay? Here you go. Alrighty, and I'll just I'll just give these a cut And now what card do you want? I'll take the jack of clubs All right, what's my card to a diamonds? To a diamonds. All right, so what'd you say again Jack of clubs Jack of clubs to a diamonds? All right? Let's see what we got Three spades five of hearts eight of spades up to a diamonds.  I don't normally do that sort of thing But I guess it was just just for fun and he was gonna buy anyway So, uh, hey buddy you want you want in on a secret? Sure. I like secrets. You didn't lose by pure chance Oh, what do you mean? It's an old scam. I learned years ago. You see what you do is When when I was cutting the cards I Only took a couple cards off the top of the deck and then I let him see the bottom card of the rest So then the card that he saw was gonna be right near the bottom just a few cards from the bottom Huh, that's pretty clever. You know, we got to remember this at the office party next week We could we could have a lot of fun. Oh, okay, so he's all right with it. I guess everything's cool Are you guys playing cards like totally a lot of cards? Oh My god, can I take your picture? Oh My god, this is going on my face. I totally love my space if you are not on my space You know like way like, I don't know old or something But you need to like check out my space. Will you friend me on my space? Oh my god Will you be my friend? I'm on Facebook. You can fan me too. It's totally awesome.  What's going on? Do you know her not at all you? Come on guys Let's play some cards cards cards cards cards cards cards cards Okay, we're um We're playing a game called mum chance. It's a game. It's a game of pure chance What we do is we we each name a card and then we we deal through the deck face up like this and whoever's card comes up First is the winner that sounds like totally easy I'm gonna clean you guys out, but wait. I gotta twit this but here's a hundred to get started well Shuffle them up whenever you're ready totally And I'll just give them a cut So what the what card do you want? It's spades Okay And you know what I'm gonna let I'm gonna let this honest fellow who I just met today name my card for me What's what's my card for clubs? for clubs Okay, let's see what we got Six of hearts for diamonds eight of spades four clubs. I guess this is mine Whatever I tell you what let's make this a little bit interesting because that's kind of boring Let's um, let's make a round of betting after each each card So I'll start how about another hundred? Well, I can cover that with a hundred. I just won from you whatever Here shuffle them up and now I'll just give them a cut And what card do you want ace the spades? Okay What's my card nine of diamonds? Ace of spades nine of diamonds Let's see what we got first cards the ten of clubs Okay Here's I'll raise you another hundred Let's see. Um, I'll see your hundred. I'll raise you. I'll raise you another hundred Deal or call deal the next card. Totally. I got it. Alrighty Let's see Six of hearts. I'll raise you three, honey Yikes, let's see. I've only I've only got 50. I might need to tap out here Wow, that's a lot of money, but she is getting on my nerves and I am sure to win so Alrighty and now let's see we got Ace of spades Suckers, I told you that I would clear you out Yeah, that's right. Peace out Damn it How could we lose? How could we lose? I mean, what are the odds? What are the odds? Just out of curiosity. What's the next card? Nine of diamonds nine of diamonds.  I still have credit card. Why don't let me buy the next round of drinks and That's how mr. Victim lost his money three Mike Monty here So is this on Now this is this is an example of Or this is this is a fairly representative example of a Gambling type con In order in order to pull this type of thing off. You only really need three things, right? You need a you need a game that you could bet on or something you can bet on really You need a way to cheat at it and you need a way to lose even though you're cheating If you have those three things you can you can put this together fairly effectively Okay, if you if you want to see if you want to see this being done in a in a poker context There's there's a movie called shade which has a decent depiction of it There's also a movie called the sting which I'm guessing many of you have seen which shows the same basic idea in a race horse betting context and In this particular case we used a sort of a two-stage process to get the Get the victim comfortable with cheating and familiar with doing it and confident in the process an actual practice there would be multiple games, but you know we we wanted to try and stay under time here and Let's see we also we also try to illustrate the idea of Making the victim not feel empathy for the person that they're trying to swindle This this this particular game that we used to illustrate this with you know naming the two cards and dealing through the deck is Also over 400 years old so these these things still work pretty much the way they always have and Let's see that's that's all I've got to say about that for now. So Let's move on to our next demonstration We are now in the lobby of a hotel and There's there's some kind of shindig going on which includes a Swap me So let's see where's Here when I should take this one here. There we go. It's not good tangled up and Alrighty. Oh, what you got in that box? Oh, just some old electronic components and taking up space in my garage She I was trying to get rid of them at the swap meet But they wouldn't let me park my garage in the look or park my truck and loading dock. Oh, man So I got to go move it. Would you mind watching this box for me for a little while? Yeah, sure. No problem. All right, thanks Are is this your stuff or are you selling this? No, no, the guy the guy who is just stepped out for a minute. Oh dang Oh my goodness. Would you look at that? That is an Apple one that look at that look at all that detail That's a that's rare. That's classic right there. I bet you the walls himself made that How much are you selling here? How much is he selling it for? You know, I have I have no idea I mean he said he was gonna try and be back as soon as he could but he also said he's parked away as well I'm totally late for a meeting. I can't wait for him. But here I'll tell you what Give him my car. Would you please darling and let him know that I will buy that? $20,000 Thank you. Yeah, sure. Oh, wow. Thanks for watching this stuff for me Yeah, sure. By the way, how much are you selling it for? Well, it's mostly junk. Well, see this part right here That's a that's a flux capacitor and I figure it's worth at least a grand But I don't want to have to deal with finding buyers for all the pieces. I'm just gonna sell it as a set Well, I'm well, you know, whoever whoever buys it's gonna have to piece it out, too I mean you're selling it as a set for your convenience. Maybe maybe you'd be willing to go down a little How about 800 900 and you got a deal? Okay I just happened to have a huge wad of cash on me one two three four five six seven eight nine Thank you, sir. All right. Thank you Be take it. We're sorry the number you've reached has been disconnected or is no longer in service And that's how mr. Victim lost his money So this is this is an example of what I call the buying con right where the the object is to to induce the victim to Buy something that is not worth nearly as much as he thinks it is now This is of course a very common theme in fraud. It's it's sort of the definition of a lot of kinds of fraud but what makes this into a confidence game is the fact that the victim is Induced to believe that he is taking advantage of someone else In this particular case Right the basic idea is oh, he doesn't know what he's got. It's worth way more than he thinks it's worth Now I'm guessing this hasn't actually been done with Apple ones But you know the basic the basic principle is the same this one's also centuries old you know, I've I've personally found found references over 400 years old and Beyond that they they go into languages. I don't speak but Yeah, so the basic Now now this this scams been worked with all sorts of objects ironically enough Both some of the oldest and some of the newest stories are about the same Right the stories from 400 years ago One of the most popular things is jewelry in particular rings That's also there are also plenty of stories floating around of it being worked today with rings jewelry rings It can be seen worked with a ring in the movie shade again But but this basic scam can be worked with anything jewelry lottery tickets violins gold bricks art stock collectible coins For example with with a gold brick, you know, oh, I know a guy who's who's bought this gold brick 40 years ago. He's short on cash. He needs to sell it he thinks it's worth the same as it was worth 40 years ago, right things like that and My goodness, we're we're ahead of time here I'm just about done and so I'm going to leave you with a couple of thoughts One is there is a lot of truth in the saying that you can't cheat an honest man Ironically, although confidence games are one of the kinds of Crimes of deception that can harm a victim the most They're also one of the crimes that are the easiest to protect yourself against There are really only two rules you have to follow to not be taken by most the vast majority of confidence games Avoid any chance to take dishonest advantage of another person and don't try to get something for nothing Now I am I'm gonna I'm gonna open for questions, but before I do I want to say where's Where's our fourth? All right, I want to say I want to say a huge. Thank you to my cast We all did they they put in a ton of work on this yes, indeed Nikita and Alex and Kevin Mitnick who made a special guest appearance and And and that guy that I found in the parking lot sleeping on a cot And I'm gonna I'm gonna open the floor for questions now pardon That would be awesome So I've just been informed that someone agreed to demonstrate the Monty With actual cards so like here or somewhere else here. Okay So I will I will open the floor for questions for a couple of minutes and And then we can we can move into that and Before before I do I'm I'm just gonna say I will I will try to share what I can about confidence games I'm not going to answer questions about myself personally or my history or experiences So are there any questions? Well, that was easy Did I miss one? Okay, yeah you Repeat the quay repeat the question back. The question was would the made-off scam be a confidence game? That really depends on your viewpoint well, well because I Guess what that comes down to is what do you think the victims believed? You know do they Did they think that oh, there's really no way he can be making these kinds of returns honestly But screw it. I'm gonna invest with him anyways If you know if you think the victims really believed that then I guess you could make a strong argument for that if you If you think they just thought he was really good Then then no, I would I would just call that fraud. I mean, it's still it's still crime But I mean it doesn't fit quite it doesn't fit quite so neatly into in you know into the categories as the things that we demonstrated But any any other questions? Damn, I can't see anything with these lights. Okay. Someone's pointing to someone. Oh in the green shirt. Okay. I finally saw you I see I saw three people pointing at you. Oh Goodness I could go on I could go on and on sorry the question the question was do I have any recommended reading and confidence games? There are a couple of references that I contributed to the the DEF CON CD and I imagine they'll be on the website There there is so there has been a lot written on the subject and personally I Find most of the older material just as good as most of the newer material So, you know, I've sort of spent half a lifetime reading on it and I think there's plenty left for for the rest of my life but a Really good place to start is a book called gambling scams by by Darwin Ortiz It's got a whole chapter on the subject which which has good illustrations of Of the different roles played by the confidence artists in the gang Good illustrations of what it is What it is in the game that that hooks the victim in each case So so gambling scams by Darwin Ortiz is a very good place to start Actually, someone just before the talk I was talking to someone who reminded me about a wonderful book called the big con by David, I believe it's ma you pardon Maurer excellent excellent. I was just gonna spell it. I believe it's ma you are er. Is that correct? Yes so Wonderful wonderful book on the subject and I could probably keep listing books for for ten minutes or more. So I'm gonna stop there Any more questions? I'm I'm sorry. I I can't hear whoever it is that speaking Yes, yes, indeed the it was it was a comment that the show's hustle and leverage are both very good ones Any other questions or should we move into the okay? We got one there the The nomenclature is is not a hundred percent agreed upon I mean I tend to consider those fraud But but there's still oh, sorry the the question was how do you draw distinction between? Between these types of con games where you're trying to trap someone in dishonesty and things like medical scams You know different people have different opinions on this my personal opinion is That most medical scams are are simply fraud right you're selling something that isn't what you claim you're selling You know you you claim that you can psychically pull someone's organs out of their body without cutting them Open and fix it and put them back and if you actually can't do that Then when they pay you you're not really giving them what you claim to be giving them I mean, it's it's still it's still a crime. It's still a very devastating crime in many cases I certainly don't mean to minimize it and yeah I mean the nomenclature is really a matter of opinion in in that case so All right, I'm gonna I'm gonna turn the floor over to Apollo Who has who has kindly agreed to give us a demonstration? So are we how closely can how closely can we zoom in on the tabletop? Well, yeah, the question is can we get can we get the if we do it on the table can we get it on the camera? Looks like you this is as far as you can get right. Okay. Can you hear me? All right here? All right There's a simple movie if you can't hear me in the back. Just raise your hand so I can see about where you are Okay, I'm gonna talk to you. Can you hear me all right? Yes, I'm taking the race and it's gonna say we got plenty of mics if you need one The only thing is could you hold it for me? I'd be happy to hear what he was talking about with the three-card Monty There's one move that they use for the slides now. There's a move called a hype Since he had the cards here. I just want you guys to be able to see that now It's hard for you to be able to telegraph it here So I'm gonna hold these up and exaggerate the movement so you're gonna be able to see a gap now Are you're gonna give away the move? Yes, I give away the move crap I wouldn't agree to this but Afterwards if you guys want to see this with it fooling you even after you've been educated you can still do it again You won't be able to see it for instance I've learned that some of the moves that are necessary for the three-card Monty, but if I were watching a group I would never gamble just like what he said because that frame that he was talking about With the wire the stick and the shade the steer all those positions If you can't win it even if you know the move and you can't see the move the move basically works like this It's called the hype you have one card you're going to show the other cards the same So you'd say that you can win on the red you lose on the black The exaggerated move is a throw over of the top card while they apparently think that the second card is going down So when they throw down like this, they're actually throwing the card on top I want to try to do that where you can see here So you can see the two movements the bottom card here the top card on the top So as I would throw down I throw across from the top movement to do that It's a toss that motion looks the same As whether I do the toss here or here Now if we can try to get in a little bit Let's see. I'm going to try to do this against without my badge on there So you can see just this position here Now if this goes down and these obviously have a bend So the way that you fix this for three-card Monty you bend it in the horizontal position here Then they put what's called wings on it Now the wings stop it from being seen on the corner So these edges here are flat on the table and this bump in the center when it's thrown down Also stops it from the wind whenever you're working outside and they're about to kick the box So when you're throwing the card you're holding it in this position as you throw down You're throwing the second position card Like I said, I know it's very hard for you guys to see if you guys want to see it up close afterwards Be happy to do it for you guys one-on-one. I hope that adds a little clarity. Thanks Thank you very much. All right. Yeah. Thank you, Apollo All right, and um, I guess uh, I forgot which room we're going to be hanging out in afterwards. Uh, was it one oh One oh five one oh five we're hanging out in room one oh five afterwards for a few minutes If if you want to come in and talk to us more more close up And have a uh, have a great time. Thank you for all coming. I hope you enjoyed it