Hello and welcome to NewsClick. Today we have with us Prof. Prabhat Patnaik and we are going to discuss the three agricultural bills which have really shaken up the Indian farmers who are out on the streets protesting as well as the opposition parties. In fact, opposition parties did want to register their opposition in parliament itself where they could not press it to a division because the government essentially prevented a vote in the upper house of the parliament in the Rajya Sabha. Prabhat, two things are very surprising. One is of course the fact that they thought about this bills itself. But the second is also the way they have passed it. But let's discuss first what is the significance of these three agricultural bills that they have passed, particularly the first two, which really tries to hand over by what you have written also the farmers to essentially be capital. Yes, that has two very important implications. One is, as you said, the handing over of the farmers to be capital. With the state not playing a role where it can actually come to the aid of the farmers. Because if you think of the Mondays where earlier the farmers used to sell their produce, they were commission agents which would make sure the farmers were not cheated. The prices at which they sold the produce would be recorded. If those prices were below the prices announced by the government, then there was a mechanism whereby the farmers would actually get their rights, get their dues. Now, if you take trade out of this money, then effectively you are really on to a system of contract farming that basically anybody can get to the farmers and ask them to sell commodities to them at contract prices. And whether the contract prices are being adhered to, whether the contract prices give the farmers a certain basic minimum rate of return or anything of that kind is something which is not monitored by any agents. Therefore, effectively, instead of the state playing a role of defending the farmers' interests, you now have the state withdrawing and you're leaving farmers in the mercy of big capital. This is the second aspect of it which is often not sufficiently recognized. Not only would the farmers be cheated, but in the process, as far as the cropping pattern is concerned, that goes completely out of the hands of the government. Now, for a very long time, and once capitalist countries have been telling third world countries that you stop growing food grains or you divert land from food grains to various cash drops, export crops, etc. Which we need. And as far as food grains are concerned, we are going to sell food grains to them. Now this is something which India had got into earlier, PL480 and the Green Revolution, no matter what you think about the Green Revolution's technical implications, certainly implied that the country will no longer import food. Now you'll have a situation where it's import dependent for food. And that's a very important demand of advanced capitalist countries and that is something which actually makes the country extremely vulnerable to pressures from the advanced. So the two things here, one is the fact that once the Mondays that essentially were regulated, that's what it really was. And the MSP became a floor price, even though it is true that the farmers did sell a lot of their products outside the Mondays. But nevertheless, there was a basically a floor which was decided by the minimum support price. Now, if it is through contracts and apparently those contracts are provisions for adjudication, etc, which a small peasant is not a small farmer is not going to be able to exercise. So effectively the MSP will not be either effective or it may not also exist over a period of time, even if the government is saying no, we will keep the MSP. That this bill, if it was honest in saying that we are going to be still wanting an MSP to be given to the farmers, could actually introduce this clause saying that all prices have to be at the MSP or above and not below it. So that is also that assurance has not come even after the protest and the fact that some of the allies have even walked out of the oldest ally of BJP, Shiroman Yatali, has walked out of the alliance. Yes. That is one thing. That is actually the farmers being left to the mercy of the market exactly as they were in the colonial times. Because colonial times agricultural trade was essentially through a contract system, the Dadaun system and you know Indigo was under that system. Indigo and OPM. Indigo and OPM. Now what you have is that in addition, see if land is a scarce input, which it is in countries like ours, in that case, there must be social control over land use. Now, what the earlier system really ensured is some degree of social control over land use. For a start, land could not be that easily shifted from food grain production to export from production. As a matter of fact, this has happened in virtually every other third world country and many of the African families in the recent years are really traceable to the fact that Africa lost itself sufficiently in food grain production. They started growing export crops and of course importing food grains and of course that basically meant that in years in which the export crop prices crashed, they had no money to buy food grains. So a lot of the African families were really traceable to this fact that land use shifted towards export. Now that's exactly what is going to happen now because if you have multinational corporations, agribusiness coming in, they are not going to be contracting farmers to grow food grains. They will contract farmers to grow flowers, fruits and so on, which at the time may well be fetching high prices. The highly fluctuating commodity, their prices fluctuated enormously and therefore there may be years in which the farmers actually have to starve because of the fact that they just don't have enough to buy food grains with. The country wouldn't have enough for an exchange to buy food grains and so on. Therefore, abandoning self-sufficiency in food grains is really a disastrous policy and that would come if you get rid of social control of land use, which is basically what we see. You know it's an interesting point that you also brought up earlier that the PL480 issue that this also leaves you open to pressures of imperial powers, Neocolonial policies and that's what the 60s for the famous ship to mouth argument that because wheat exports are coming from the US that they could arm twist India and I still remember the Kashmir issue for instance. They said settle Kashmir on the terms that we are telling you otherwise PL480 may not be forthcoming. So effectively that was what led to what you talked about with the Green Revolution policies and Mrs Gandhi then deciding that India had to subsidize agriculture. That's when we start talking about the inputs being subsidized in some form electricity fertilizers and all of that so that we'll get self-sufficiency and therefore the dependence on others for food would go. Otherwise it was a political opening of India to imperial pressures. And you know the entire arrangement which the Modi government is dismantling today's all these bills was actually put in place around that time and minimum support prices procurement prices the system of procurement the system of statutory rationing the dual market in food ring that they are certain that everybody gets a certain amount at the issue price. Then if you want more than that you would go back and say everything every single one of these apart from the ones you mentioned about subsidies and so on was really put in place around that time. Of course refine improve subsequently but it came into place at that time and no government till now not withstanding enormous imperialist pressure has been able to dismantle it because and that's the sticking point in the Doha round of negotiation because they say that of course you are buying all this your procurement operations are really against the free market principles and therefore you should wind them up. And the government of India has said nothing doing till now effectively the Modi government is preparing the ground to wind up the procurement operation. It's also interesting that the Doha round of course this was a sticking point WTO at the moment is defunct virtually because Trump has not sanctioned any new appointments for the tribunal. So that dispute settlement tribunal which is the body which finally indicates all the differences as only I think one member left. So effectively they are not interested in WTO anymore. But we seem to be internally moving to hand over Indian farmer to foreign capital as well as Indian capital in this case also Indian capital but interestingly it is a part of the philosophical outlook of this government. That it is not it is not that somebody is telling them to do it. They actually are wanting to do it themselves. Absolutely. Yes. Yes. Yes. Exactly. And it seemed to indicate that their their belief is that capital as Modi claims capitalist or wealth. What is it? This is a part of their philosophy. They believe that wealth creation will be done by capital and they will help farming farmers and agriculture more than the government support would this an ideological belief. Yes, exactly. In fact, I don't think you know, I mean, while I have ideological differences with the Congress and with other early other earlier governments. I don't think any government in India has been as innocent of economics as this particular government has been. I mean, this is very clear when you look at demonetization is very clear. Not only in the introduction of GSP, but actually in the celebration of it by having a function in the central hall of parliament. I mean, they they just they simply don't understand economics and this is something which is clear, even in the fact that during the biggest lockdown during this pandemic, not really a pass was made available to the people at large by way of substance which even by way of income transfer, which even Trump in America did. So it is really quite it is not only the right wing, but I think it's right wing with very little knowledge of economics ideological. That's I think an important point that people don't understand that we have a government which seems to understand accounts but not economics. If you if you see this an accountant's view of the economy, but it is not an understanding that the boy cut off principle doesn't operate, because you have something which can print money for instance, different from that of how any other accountancy principle operates. So that seems to be the really a tremendous vacuum in their understanding of what you call the economy. Yes, and and and their reluctance to listen to any economist, even economists whose views may be quite different from mine. But in fact, the amazing situation now is that there is almost a unanimity among all economies, no matter what their ideological position ideology enters in different places, no matter what the ideological positions economists in the moment are agreed that the government must increase expenditure and financing through a fiscal deficit. If the economy is not going to get into a very serious problem. On the other hand, government doesn't even listen to economists. And because they believe that they know everything. And that's why, and exactly the same is true in the case of the agriculture bills. I mean, the Shiromani Akalidal, not only was their oldest ally, the Shiromani Akalidal is a farmer's organization effectively because their support base is with the farmers and you cannot tell them that this is a pro farmer bill because they know more than you what is good for the farmers and what is not good for the farmers. You know, and also at a time when there has been a huge hit of people returning from the urban areas into rural areas, the reverse migration that has already taken place. The fact the economy is not bouncing back. There is no so no so called V V shaped recovery taking place. The pandemic still has its effect. At least consumption is not increasing. So in the context of huge numbers now we're not dependent more on agriculture than before. At this point to knock a central crop out of the farming economy. This must rank with demonetization and the various other measures as one of the more foolish measures the government can do. Yes, absolutely. In fact, you know, there is a, there's an interesting point about this farmer's agitation that is an agitation that has drawn in not only the large sections of the peasantry, but also agricultural laborers. Now, it is very rarely that in India in the old days, you actually had this kind of a united resistance of peasants and agricultural laborers because of this. But this time, for the entire sector is under a threat. You actually have a cultural laborers joining in all this Rasta Roko and various other agitations. So interesting times because we seem to see this government really take steps against large sections in different ways against the people. But at the same time in a crisis of this proportion which we are in the measure seems to be opposite to what the time seemed called for. And this is something which is inexplicable at not only to economists, of course, most people may not understand the economy, but to common sense. Exactly. Thank you for being with us and I hope that you will be with us in more of this kind of discussions to explain to most people who do not understand economics. What is the direction this government is taking and what are the kind of measures that we really need to have. This is all the time we have for Newsclick today. Do keep watching Newsclick and do visit our website.


Jonathan, did I get that right? Yeah, actually, and I remember my question. It's a quick follow-up. I know you've talked a lot about GameStop, but you've talked as well in the last couple of months about the politicization of everything and the politicization of masks and COVID. And it seems as if now this whole GameStop issue is now become another example of politicization. Either you're kind of on the side, supposedly of the little guy, or on the side with the corporate suits. And I just don't understand it one bit. I think absolutely, I think that's absolutely right. It's not so much Democratic-Republic, Republican, because I think you're seeing a lot of Trump supporters and a lot of far leftists and a lot of libertarians all on the side of Reddit. And anybody who supports Wall Street is just a supporter of the status quo. And I think you saw that the Peterson, forget his first name, Austin, what's that? Austin. Austin Peterson. They just want to see the world bone. And I think that people are far left and that people are far right and that people are far libertarian, I guess. They just want to see the world bone. And this is another opportunity to see the world bone. And they're convinced, and they're convincing their followers that the world is being manipulated by the man, by some group somewhere on Wall Street in Switzerland in, I don't know where, right?  But it's all motivated by this, the little guys are constantly being screwed by this elite that controls the world. It's the same conspiracy theory over and over and over again. And this is what happens when people are alienated, when people are afraid, when people don't have an explanation of what's going on in the world and it scares them, they look for the simplest, cheapest explanation. And the simplest, cheapest explanation is, it used to be God, God is angry with you. That's the old testimony is full of this. The Jews used to have bad stuff used to happen to Jews and they'd go, what's happening? Why is some bad stuff like locusts or whatever? Why is bad stuff happening to us? Oh, we must have done something wrong to God.  But that explanation didn't work too well. So then it became, it's the Jews fault, they did it.  And that lasted well into the 20th century as an explanation for the world, whenever you got alienated, like Germany after, but all through the 19th century, as capitalism caused people to be alienated, not for the Marxist reason, but because the world was changing faster than they could cope, the world demanded from them to think, the world demanded from them change, the world demanded from them to become human. And they wanted to stay animals and they will look even somebody to blame. It must be the capitalist, it must be the Jews, it must be the rich, it must be the businessman, it must be the some cabal or something. They're really bad people out there who are trying to manipulate things, but the world is not run by them, not effectively, not efficiently, they're central, they're not that good at what they do and there are too many disagreements among the devils out there to have one devil in control of everything. Do you think we're gonna have huge show hearings in the House and Senate very soon over all of this? Oh yeah, oh yeah. They're gonna bring the financiers over and they're gonna tell them this is about short, naked short, they're short, that short. And then if only one financier, I mean, I don't know if I could pay them, they make more money than I do, so I don't know if I could do this, but if only one financier just stopped for a second and said, Congressman, could you please define what a short is? So I mean, I wanna make sure we're talking about the same thing. Or could you define what a call option or put option is? Did your staff prepare you to make a definition of that? Maybe that idiot of a woman from Orange County who always has a whiteboard out and is always accusing and always drawing, maybe she can draw for us how an option works and how option markets work and how you clear a call option and why does the call option put price pressure on the stock? That would be the highlight of my decade if some businessmen did that to the politicians. Just ask them, just show that they don't know what the hell they are talking about. They have no concept, nothing, zilch. All right, let's see, two more. What we need today, what I call the new intellectual would be any man or woman who is willing to think. Meaning, any man or woman who knows that man's life must be guided by reason, by the intellect, not by feelings, wishes, whims, or mystic revelations. Any man or woman who values his life and who does not want to give in to today's cult of the stare, cynicism, and impotence and does not intend to give up the world to the dark ages and to the role of the collectivist broads. All right, before we go on, reminder, please like the show. We've got 163 live listeners right now, 30 likes. That should be at least 100. I figure at least 100 of you actually like the show.  There you go. Start liking it. I want to see that go to 100. All it takes is a click of a thing, whether you're looking at this. And you know the likes matter. It's not an issue of my ego. It's an issue of the algorithm. The more you like something, the more the algorithm likes it. So, you know, and if you don't like the show, give it a thumbs down. Let's see your actual views being reflected in the likes. But if you like it, don't just sit there, help get the show promoted. Of course, you should also share. And you can support the show at your own book show.com slash support on Patreon or subscribe star or locals and show your support for all, for the work, for the value, hopefully you're receiving from this.  Cause that way you'll know when to show up. You'll know what shows are on, when they're on. You'll get notified, right? So yes, like, share, subscribe, support. Like, share, subscribe, support. There you go. Easy. Do one or all of those, please.


I'm Kevin Triplett, and this is Nick Sutterer from Germany. I'm from Austin, these brothers. We're going to be tag teaming today. And this is a ruby test case, a case study on if you have something written in ruby and you don't like the features of it, go make a library that makes it much better, make your life simpler. So that's what Nick did. And I found it, fell in love with it and wanted to share it with you all. But this is really a good strength of ruby. So I know a few people out there probably do web applications. And you probably recognize MVC. And of course, we love MVC. Any time you can organize your code, it's good, do it.  We don't have anything for views. But maybe we hate me. We just like MC. It seems like, well, I want to change that. I wanted to kind of share with, I found this super exciting because I'm writing a pretty complicated web app. And I wanted to use Ajax and Webby 2.0 and all that good stuff because it just makes the user's experience much better. It gives you sexy views when I'm about to present to you. And that's really not only sexy for the users who are using your application, but sexy for y'all because it makes your views very organized. You'll see in just a second that what we do is with components. Oh, I forgot components are dead. Starting in Rails 2.0, they killed render component because according to the Rails docs, you don't want to use components as a way of separating concerns inside of an application.  That's just not a good way to do it. Components are a special purpose approach that can be replaced with better use of partials and filters. And I'll get that all the time. I said, why aren't views better? Well, just use partials and filters. It's no big deal. We do it all the time, right? Wrong. At least in my opinion, just opinionated. So let's take Rails, for instance. Rails gives you a nice organization. It has controllers, models, views. And inside the views are different controller directories. For instance, users, it's pretty. You've got one file per action. Maybe you have a partial for handling the forms. Or maybe you're smart where you put the forms, edit, and new all in one file. It's really nice and organized. I love that. Oh, but then I've got this complicated application that schedules resources. It has users, equipment, product. This is the administration interface. I have tabs. In the tabs, there's forms and forms and forms.  And this is where I ran into the wall. I said, this is not going to work, because it's just me doing this. I've got all these partials. And I tried to organize it by putting tab as the first word so that they would all show up in one place. But then I had to have stuff for the tabs in other places, because there are things nested within those partials. And this is just one controller. For instance, in my application, I have today's tasks. And that's not associated with that controller. It's on every page of my web app, because I want to be able to see what I'm supposed to be doing today, or what somebody's supposed to be doing. And so, OK. Somebody said, we just put in a partial. That's fine. You can do that. But then I got looking at the way you write a partial statement. And it's ugly. It's just ugly. We're passing in a hash and a nested hash. And only that. Render is fine. Render is understandable. OK. Passing in a partial, there's the partial name. And then if we have local variables, we pass to the end in another hash. But this doesn't look like the Ruby that I love in models or controllers even. So somebody said, well, just wrap it in a partial wrapper. If you don't like looking at a partial render statement, then just wrap it in a wrapper. And this is what somebody gave to me. It's kind of nice. And so you use it this way.  It's just still, I don't like it. It's better. It's a little better. OK, what about variables like that task panel? There's a variable associated with that. It's not static. I get that from the database. So every controller has to be able to initialize that variable. Or if you want to do it, you can put in an application controller in Rails and have it before a filter so that when the application runs, it runs this filter, initializes that variable, and makes it available for all of your controller views. Oh, yeah, but if we don't like globals, that's the good reason because where is that global? Where does it exist? Is it going to be mucked with in some other way? It's just not a good solution. It is a solution. So the idea for Ruby, and I'm sorry, making this a Trojan horse is kind of like we're talking about Rails. But it's really a good example of how Nick took Ruby and made something very simple because he didn't like views. He didn't like the way that Rails implemented views. And so he created this library called Cells. And it's your first step toward widgets, which is what Nick will talk about in the second half. It's a gym, which is really nice. That's the current standard. And not only Rails, but it works in Sinatra and soon Padrino. And this is the nice part. It actually has a test suite. A lot of Rails plug-ins and gyms don't have good test suites, but it's being currently developed and added to. And that's a really good sign. So what does Cells do? It gives you a new directory called Cells. So again, back to that organization, you know exactly where all your widgets are. It's in one directory, in the app directory. And not only that, but each one of your Cells has a Ruby file plus a folder that you can put all of your view files in there for each one of the actions. So for instance, how that works is originally we had this render partial thing, let's say today's task list. So you go to the console to generate your cell. It creates this directory unless it's already there. That's where all your cells reside. Nice organization. It creates the Ruby file. And we'll see that in just a second. And then it creates this other directory. And that's where all your view code resides. Again, really nice organization. There's the action or the state that I wanted to make a view for. I specified that on the console line. And also like Hamel, so I pass in the Hamel keyword. It works with almost all the different display engines. All the engines that are supported by Rails. And nice, it gives you tests. And you're going to love that part. We'll get to that at the end of the presentation, because tests are very important. OK, so now you call render cell. You pass it the cell family or whatever. And the action or the state that you want to display. Now, what does that cell look like? It kind of looks like a controller. You can use your standard helpers. And there's the state. You can have multiple states in there, so that you can draw different states for your cell, depending on what it is. For this real simple case, we want to keep it real simple. You initialize a couple of variables that are going to be used in the view. And then this is nice. You call render. How many people get the double render error in Rails? You can render as many cells as you want to go crazy. Cells within cells, you call render, and don't worry about double render error. And that's one of the magical, beautiful things that Nick did in using Ruby. So back to the cell that I've got on all my webpages. There's the view code, and it's real nice. It's real contained. You can do everything you want to right there.  It's kind of like a partial, but it's in a nice directory organization structure. And by the way, cells can also be namespaced. So if you have a complicated web app, like mine is going to be by the time I'm finished with it, it'll have nested directories and namespaced directories so that they keep things nice and organized. And then, of course, the Hamel. This is the Hamel code for generating HTML. And you can see what I'm doing to create that little widget there on the side. So this, I like it very much, and that's why I wanted to kind of present it to you all. Hopefully, this may be worth the conference for some of you all that are doing these kind of apps. Caching. The nice thing about this, just would go this over quickly because we don't have a lot of time left, but it doesn't do strict view caching. It does no fragment caching. You can actually specify the cache that you want inside the cell. So for instance, in the case you have a shopping cart, you can say, well, it expires in 10 minutes. Or you can call, you can pass it a block. And in that block, you can do anything you want to to be able to expire the cache. Testing for the win. This is, I love this, you can test your cells in isolation.  I mean, I love unit code testing, but I really can't get into integration testing and the view testing. But this is really simple. You just have a test file per cell. And in there, you can test a state, render the HTML, and then check it and see if you got what you wanted. And it can't really get simpler than this. Ah, but there's more. Again, no double render error. You can nest cells within cells, call as many cells as you want to, go crazy. There's view inheritance where if you have a standard widget, but maybe you want to inherit that widget and change it on another controller or another view, you can do that, it's very object-oriented. Again, nested cells. And you can package your views, your cells, as an engine that can be passed between applications. So that's handy if you want to share your work with somebody else. And now, but Rails are very simple. And the really powerful of Rails is it comes with Apatomo, which I don't know if Nick will tell you what Apatomy means. But maybe we'll leave that as an exercise for the reader. Yeah, you can actually Google it. Yeah. But this is going to be interactivity in the next step. Thanks, Kevin, for this great talk. What about some applause for this guy? OK. It was for you. All right, so can you guys hear me? Because I can. So we got that rendering part about cells. And I will talk about interactivity, how to make your cell act like a real widget, where you can send data to the server and back, and which updates on events and stuff like that. So basically, Apatomo is, that's the framework I'm going to talk about. It sits on top of cells, and it provides interactive widgets. We also have some optional statefulness for the guys who want to have fancy stateful widgets that keep their inner states and keep their structure. Usually, I don't need that. And then we have a very interesting event system in Apatomo, which we are going to discover now. And I really love, I start really loving Apatomo. So I did a browser game with it, like a small example. Then there is some guy from Canada, Paul actually, who did a real complex back-end application. So Apatomo is perfect for building rich user interfaces like having forums and different lists and, I don't know, all these fancy web 2.0 stuff. Then it's perfect for building dashboard applications in Rails. I mean, how do you do dashboards in Rails? Hushalts and Ajax and yeah. And yeah, that's a very new example I got from some user from, I think he's from Monaco. He did some little widget about you can add nodes and you can sort and page these nodes. And it's all handled with widgets and via Ajax. So our domain widget we are going to discuss today is that tests cell Kevin introduced. And I just added some form so you can add items and it will check that item created in the database on the server side of course and will update the page and the widget on the page. Yeah, that was yesterday that beer because today I feel a little bit terrible.  Oh, sorry. Meet nerds, talk to them, use GitHub, get drunk. Yeah, I mean, it was fun but today, yeah, we'll talk about that later. All right, so let's go through this widget conversion progress step by step. Sorry. So keep in mind we got that cell and we got that form below that cell and when I enter and click on new, it will update itself on the screen. So the first task is to drink some water because I'm thirsty. The first task is to generate the widget. Usually there's a widget generator and I just pass tests, widget, the name of the widget I'm going to create and some standard action display and minus, minus, hemel because I like hemel views. So it will create, stop out the widget class and a standard view for the state I want to create. It's the same as a cell creation. Next part is the widget. So instead of deriving from cell base, I derive from a bottom or widget and then I have this action called display which just looks through the database, finds all the tests I'm assigned to. This is a very simple example I know and then it basically renders the corresponding view which is in display html.hemel. Next part is to write a view for that display method and yeah, you know that from cells. I mean you've been watching it. The view is located in the tasks widget, app, cells, tasks widget actually and then display.hemel. What I'm doing here is I just let a bottom will create some basic container for my widget. It's widget diff and yeah, I iterate, I loop over the tasks and stop out that boring list and to get that widget into my controller, I use the controller class method hasWidgets. So this is something new to Rails. All the stuff you saw was like controllers. HasWidget simply yields root widget and I attach my tasks widget which I created to that root widget and I also pass an ID that's the only requirement a Potomo has.  Any questions here? No. I wanted to point out one things when I came across Potomo was the root. That was really a bit of a stumbling block for me. Root is just the uppermost widget. It's always there. It's the default widget, it's empty and you just add widgets, your widgets to the root. And so the root is just a place to hang all your widgets into. Usually Potomo is made for having like 20 widgets and you can nest them and have real widget families. That's how I call it. But there is always that standard top, very top widget root. And to render that widget, my tasks, the task list, I just use render widget in some layout or in some view of my controller. And I pass the ID. So I reference it by ID. So that was rendering only. I mean, I told you we are gonna discuss how to react on form submits and stuff like that. So the first task is I have to, so here we got that list and I will simply extend it with a form. So I use form tag. I create a HTML5 compatible unobtrusive JavaScript or a lot of passwords in a row. Data event URL, that's a HTML5 attribute. And I use URL for event, which is an Potomo helper method. And so a Potomo simply stops out some URL which will trigger the submit event. So you don't have to worry about what happens here. It's just a basic URL to trigger the submit event. Yeah, and then we got basic form stuff. So that's pretty boring. By the way, I'll point out, don't execute this code because the indentation is too much on it. Oh yeah. I took out a lot of parameters and stuff from Rails just to have a small example. So don't try this at home. All right, so we got the URL for event. You're gonna use that a lot because you want a Potomo to create URLs for you. And then I have to add some JavaScript. I, sorry for that horrible slide. But usually when I do talks about a Potomo, everybody is like, ah, a Potomo is a JavaScript library. It's not, it's just using JavaScript to transport events and the content back to the page. So I use jQuery in this example. You're open to use write.js, prototype, Mootools, whatever. So what I'm doing, I just catch the form. I just create it, oh, that way. And attach a submit event handler. I mean that's just, I tell the form when you're submitted, execute that Ajax request. In that Ajax request, I'm a good unobtrusive JavaScript guy. So I'll just take the data event URL from the form that's created by a Potomo and send that back to the server. So basically a Potomo does this, provides me this trigger URL in the data event URL and processes the request and sends back some content. All right, so I had this form. I enter some stuff. I click submit JavaScript. I'll send that stuff to Rails or to a Potomo. So how does my form know that it has to update? And that's the point where the event system in a Potomo comes into play. So I'm triggering a submit event in Rails. How can I catch that in my widget? Let's go back to the code. There's a nice method called response to event. I was about to say response to what? Response to event and I say, if you encounter an event of type submit, just execute your process action or state. So when my widget sees that submit event, it's gonna execute process so I have to write process as well. This is nothing more than a simple form processing state. I grab the text that was entered in the form and then I save it to a new task and then I execute my display method again. That's what state arrow display does. So I basically get all the tasks, the updated list, call render so I have an updated view about my items and then I call replace which will instruct a Potomo or your widget to update itself on the screen, take that content from display and put it back on the page. So this is very handy and this is the only part where a Potomo is doing a little bit of JavaScript. Yeah and what we get is that form where you can enter stuff and it will update itself on screen as soon as you click submit. Without a Potomo, this would be like partials, a lot of partials and maybe some partials as well.  I mean a Potomo is very brief. It's just a simple small library and it provides you with some automatic controller action to process your AJAX. Yeah, that's what I said. You would have uncountable routes. That's what Kevin pointed to, so because you're triggering a lot of AJAX actions and you would have to set up that route to yourself. And yeah, again, in Rails right now it's not possible to test stuff like that. I mean, how can you test partials, JavaScript, AJAX submitting and stuff like that? It's not possible in a Potomo, it's no problem because you have these well encapsulated components that you can test and that you can rely on. So this is just, that was the basic part about widgets and I'm just show off a little bit. So for example, I'm using a Potomo to wrap jQuery widgets. I got a nice Carousel displaying wonderful German beer and then we have some autocomplete box. So I just type in some letter and it will provide me German delicious beer. I could start again. Then you can see it in the Firebug console that as soon as I hit some buttons in the box it will trigger the event to Rails and a Potomo will respond with new content. So how did I do that? I just write autocomplete box widget derived from a Potomo widget. I have my standard display method which will render the view for that autocomplete box. Again, just some text field, some input. I use URL for event to generate a triggering URL. This time I call the event typing. You could also call it attention, we got some input and then I use the jQuery autocomplete method just to turn that little input box into a real autocomplete box. So what I'm doing here is as soon as I type in I trigger the typing event. We all learned that we respond to events by using response to event. So I just assign my widget, hey, when you see the event typing, answer with your state search. So execute your search method. In the search method I just, well it's a simple example. I just render out some standard answer for that autocomplete box. Usually I would look up the input and then would look through the database and send back these items. But it's very simple to wrap that in a widget. I mean doing this in a Rails controller would be like a mess. So that's all I need for that autocomplete box. I also got some nice little example showing how to decouple widgets. So again I have some imaginary Twitter application. I just type in some message, hit the tweet button, the left item will update and the left list will update. And I can also drag and drop items to the trash bin which will basically delete that tweeted item. I'm not sure is that possible in Twitter, I think not. And will just update itself and the list. So again this is very simple in a polymer. I would have the trash bin widget and the list widget and they were both rendering stuff. And in the delete method of my trash bin widget, I just call, I can also trigger events from the server side, not only from the browser.  And my list widget will respond to that event by using response to event, look into update and it will just call its redraw method. Of course I have to implement the redraw method but it's basically very simple to have that kind of interaction between widgets. Yeah, and so we already learned the basic part about a polymer as I said, you can also have complex widgets like being nested and having, I don't know, like spreadsheets or real desktop applications in your browser. You can have statefulness, which is very handy in some cases, you have bubbling events. That's too complex to show it in this talk, sorry. And then we got caching from cells and we got testing from cells. And yeah, we are already thinking about having some generic widget repository where you got, I don't know, like widgets for jQuery, widgets for prototype and stuff like that. So people would write widgets which you can use in your project instantly. So that's about it. If you're interested in that stuff, we got some great new guides online tutorials. They are at guides.apodomo.de. You can always hit me on a free note, IRC. I know I'm outdated, but I like it. So just join the sales channel and have a snack with me. And you can also check out apodomo.de which contains a lot of blog posts about that stuff. And yeah, that's about it. I would say questions and then thank you. Oh, there are really questions. The guy in the front. Is it possible to do it in a pen just to have it replaced? No. We got the method replace and we got update. It's out of the box, but you can also send back your own JavaScript, like you say, render text. And then I don't know, like a pen, something to something. You're free to do that yourself. It's just a handy method in apodomo. Replace. Thank you. The guy behind the guy in the front. Ah, Nelson. I need glasses. You got me. Usually widgets are like a tree. And if I trigger an event in some widget, it will bubble up the hierarchy to root. So the example I did will not work because both widgets are attached to root. So the list widget will not know about the triggering in the trash bin widget. So you did a good job observing. Yes, please. Yeah, I'd probably handle this. It's just like any other view. So you'd have your sass files or CSS files and you give them class or ID names and it just finds it in the CSS file. So it's like any other view is just in different directory. So that's a thing we're working on.  And we're already working on some technique to have a CSS file in your widget directory. So you have your own asset. Or you can also inline your CSS in the widget class using like a, I don't know, CSS and then you can pass in a string. So you have all in one place. All right, like from application to application or developer to developer? Yeah, so I mean that's basically up to the programmer of the widget, but it would be great to ship CSS information with your widget because otherwise if you write some great spreadsheet and it will look messy on my browser, then we all know that. Or even from layout to layout I guess also. If it's on multiple pages of the same app. Okay, I see what you mean, yeah. Yeah, it had to be either global or packaging it with a widget somehow. The guy in pink or is it white? Well, it does not have any built-in widgets except a Portomo widget, which is a basic generic widget. So you would have to write that tap widget for Jake Ferry yourself. That's the last point on this list, a widget repository. Like you would write a tap panel widget which I could use in my application. A Portomo is a framework for writing widgets. So how you would use a Jake Ferry widget? You would just derive a widget from a Portomo widget and then you would have different views like displaying the JavaScript code. And maybe for a tap panel one view would be sufficient. And then you would, you have all that stuff packaged up in one directory and you give it to me and I use it in my project. I would like, we have the root widget and then I append your tap widget to my root and then maybe I could append content to your widget, to your tap panel widget and you would render it in a nice way. So that's your job for today. Actually, there is an example online somewhere and somebody already did that like writing a tap panel widget. Pretty handy, so if you click on different taps it will reload the content on Ajax, yes. I think we may be out of time but I wanted to mention one more thing. In my application I was constantly having to go to the route file, routes.rb and with a Portomo it adds the routes dynamically so you don't have to touch the routes file anymore if you want to do Ajax in your application. So I mean it's important to note that a Portomo does no magic at all. It's very, very simple. It's just based on cells and it does add one default action to your controller. That's all. So we don't have any strange things happening behind your back. You can trust me. Thank you. Oh, well Portomo is view layer. So usually the view layer is sitting above rest. So a Portomo doesn't care about routes. It's just for your view. So you have your rest routes, you have your rest controllers and the controller would have to take care about which widget to render. So a Portomo doesn't handle that kind of stuff. It's just for the view. One question and then we'll be finished because cells is running with Rails 3. Jehuda did some work on it. That's very kind of him. And a Portomo is, as it is based on cells, there is no need to change anything in a Portomo. So it runs on Rails 3 as well. Thanks, you have been a wonderful audience. Thank you.


Good morning children. I give you wonderful and lovely faces smiling all around me. I just want you to do one more thing.   Yes, you can feel the air around you. You can see the plants which is giving you nice and cool air. Now, tell you one thing. Are all of these things safe to feed, touch and taste? No. They all are categorized into three different things. Yes, you are right. Solids, liquids and gases. So today, the topic which we are going to study is the states of matter. All the duster, all the blackboard, all the chalk pieces which is in my hand, the face solid and how? Why do you think it is like that? It is because of the modular arrangement in these objects. So solids, if I consider this bottle as the example of the solid, then I can see the molecules in the solids are very closely and tightly packed or stuck to one another. And that is the reason they do not until and unless I break it. Yes, so the solids because of the molecular arrangement. Next, there is your water bottle or the milk or the juice. They are all liquids. Now, this also is one of the states of matter. Now the liquid or the molecules in the liquid are arranged, not well arranged in the solids. The space between them is, you know we can have a little space in between them. And that is the reason they can move between one container and another in between. So they can be overlapped because of the space which is present in between these molecules. I can feel the air, the oxygen, the carbon dioxide, all these are nothing but the examples of cation state. Okay, now the spaces feel the air.


It came out in the 1860s, kind of a cowboy style gun. It's manipulated with the lever this way. You go forward and back and now we'll extract the old cartridge and put the new cartridge in. It has open sights, which makes it a little more difficult to shoot. And we generally shoot this one from the standing position. What caliber is that? This is a .22 caliber Henry lever action. Thank you, sir.


So before the holidays, I released a video that got a huge response on my release strategy for how to most effectively release music in 2021.  So it's linked to the description or on the screen right now. But if you want to hear more details of the pan, wait till this theme song plays and we'll get started. Hi, I'm Jesse Cannon, a music marketing nerd who's teaching musicians how to grow their fan base from zero to 10,000 fans. And this is Muse Formation. So the first thing I heard from a few viewers is that they don't hear of anyone really doing this, and I must be insane. When I think of the artist who really broke out in 2020, I think of the artist Youngblood, who releases a song every six to eight weeks, just like I said. And to be honest, nearly everyone who said this is someone who is rock music obsessed and doesn't realize this is the norm in hip hop now. And that nearly every busy hip hop artist is already doing this release strategy. And then the next pushback I get is that they aren't hip hop or a pop artist, which I say you have to remember that innovation comes from different sources. In fact, most of the time, the innovations in marketing have come from porn and punk rock, but I have seen pop stars rise to prominence on getting hip to punk's promotion strategies and vice versa. The fact is you want to embrace the smart marketing from whatever source is happening in. And instead of saying, well, no one in my genre is doing this, you need to see that as the big green light, which means you should start doing it before everyone else does. And the technique stops working lead, don't follow as by the time everyone is doing it, it'll stop being effective. And this next question follows up on that works of iron asked, does this work only for short pop rock songs, etc. Our single is 13 minutes long do metal song, we can tell stories about the song and lyrics no problem. But are people really interested in Ice Age landscapes and ancient humans, the song subject, it seems even more niche than the style we play. I actually think it works well for niche genres and may even work better there. I think consistent sustained promotion works really well in metal. But I do get your concern as metal is often a genre where innovation moves slow. And truthfully, those sound like subjects all the dudes I know who go to metal shows are pretty into the next question comes from Ficus. Love your videos. What's the thought behind the new plan of doing a song every eight weeks instead of every four weeks. And with this answer, I'll also answer this one from Ken Davis Jr. I think the strategy is great, but what if I want to upload more than 12 singles. And as well, let's also hit this one from Alex Schecter. What if we want more content to release, but want to keep releasing singles instead of albums? For example, 20 songs mixed and mastered. How would you suggest we go about using a similar release strategy to what you've posted about here? Well, the plan was six to eight weeks before. So that hasn't really changed. But let's embrace this for the question. I feel like four weeks is inundating people with a lot of singles per year. And most people can't devote the time to that anyway. But if you can put out 12 high quality singles a year, you can spread this release plan over each month and do it. And if they really are as high quality, as you say, you're going to do great. I do think if you have 20 songs, you may need to put some of them out only on SoundCloud and Bandcamp and see what your crowd reacts to. Because as I discussed in my video on Russ releasing a song every week, it can get to be a bit too much. And if you haven't seen that video, it's linked on the screen or in the description now. I don't think it's a crime to do song every 28 days since you can get on release radar, but I often wonder if it starts to not feel special to your audience if you do release songs that often. If you should be concentrating on releasing your best songs every six to eight weeks, instead of just everyone that comes out of you every four weeks, I think you got to really think about the balance of quality versus quantity. In that Russ video, we really went deep on that. Someone I can't find on Reddit asked, does it have to be the exact order of single screen, then lyric video, then music video? The reason I like that order is the single screen gets the attention of your most passionate fans engaged with little effort. You have more time to make the content and it keeps upping the ante in how eventful the content you're making is, meaning that a music video is more enticing to click. And if you're releasing the single screen video last, people who watch the music video are never going to click it because, uh, why? So releasing that order from least appealing to most appealing keeps giving your audience more incentive to click. Antonio Langola asked, Jesse been wondering about when to start putting the content out. Is it as soon as the song is released or should I let it breathe a bit and start releasing the videos after a week or two? Yes, do not tease your content or do countdowns. And if you haven't watched my video on that, it is linked now or in the description below. But to get to the heart of your question, don't breathe. You need to start to make a big splash in the pond. Once your song is out, you should announce that midnight for the night owls and then make sure you're online all day telling stories each day or at a minimum every other day. More on that in the future, but truly lean into making your release day always as big as possible. I love this question from Jason Pilling music behind the scenes. I struggle with the video part. I can get behind the lyric videos. I'm strong on backstory and information type content. My lyrics are like an onion. So the effort payoff ratio seems good, but the live-action visual story videos, I don't see the same ratio. Huge effort to produce good ones. I already produced performance videos via the routine live streams that I curate a best of playlist. I'm just more of a words intellect artist than a visual product. Is it insane to think I could skip the official moving picture story videos? It's not at all about being lazy. I'll produce multiple pieces of other good content with the same effort, but I'll be missing this one check in a box. Listen, I think it's way more about playing the strengths. Not everyone's strength is going to be a music video compared to lyric explanations or a live performance. The music video should be the piece of content that is the strongest. And for some, that actually will be lyric videos or even live performances. I just consider how you're doing the strongest iteration of this. If you know you're an amazing live band or people are going to be say really impressed with your freestyle rap ability, maybe you release new freestyles of your songs and then just use the same hookover in there and show people how many ways you can flip it. Like I'm saying in these videos constantly, play to your strengths and feel free to alter this to do so. Ryan Hamid says, great info as always, Jesse, would you say this only works if you have a reservoir of songs ready to go? Or if you're fast enough at writing songs in that six to eight week timeframe? The challenge I have is that at the moment, I just can't write songs fast enough. So it makes me wonder if the strategy is mute for me until I get better. I'm working with the coach on this so it's a work in progress. Yes, one of the reasons I focus on having a surplus of content and always tell everyone you should start releasing songs till you have at least two others lined up and hopefully six in best case scenario is you want to be able to have options. Like if the next song you write sucks, not having to release it can help you if you have a backlog. If the newest song you wrote rules, you can then move it to the right place in the order of singles to release and potentially drop the weakest one and never release it or put it out as a B side or like I said on SoundCloud and Bandcamp and see what happens. It's good to have options and always be able to release your next best option next while you're writing more. Kat Higelty says, hey Jesse, a question. Speaking of attention spans, I worry that as a small arse, people aren't going to want to sit through a single screen video with no lyrics or visuals for a song. I wonder if that first video is necessary versus going to a lyric video and then music video. Basically, I just get nervous that people won't stay unless there's actually visual action happening. Is the first video just so people can hear the song in the same way they'd stream it? Do you do this same video promotion and cross it over onto Instagram? I'm going to pair this question with the lighthouse asked, one reservation I have is when hearing the strategy is that I myself would not be interested in being plugged the same song with three videos. Maybe it works the first time, but by the third song in this carousel, this would feel like spam to me. Do you think you can keep get people interested with non-moving single screen videos if you will be following it up with better videos? Or am I overthinking this and would 75% of my audience never pay attention to every post video anyway? And I guess in the fan building stage, we shouldn't worry about videos cannibalizing each other or spreading the numbers views too thin. Or is this whole point to work into the algorithm and get discovery through there? I guess I'm just worried about putting off the fans that are already connected. One of the things I discuss all the time is we often think that the audience is as picky or as jaded as us. Most people who are actively consuming music are bored and the videos are just there as a further serving vessel, but truly the type of person who clicks on a lyric video will also click on a single screen. I know when I lay around my apartment at night, I often search songs and just hit play and then YouTube starts serving me more songs from the algorithm of that artist. I don't really care whether they play me the music video or the lyric video as I'm just vibing out and hanging out in my apartment. When we make music, we're often rewarded for us following our own unique personal emotions. But then on the business side, what makes us unique is we are often far more sophisticated than our audience. Hence why they enjoy us. You're usually five steps ahead of your audience. And I would have similar reservations, but we forget the audience is one, excited and understanding you have a new song and two, often bored and grateful for any crumb you can give them and three, not paying enough attention to the marketing to care. I want to reiterate this point because musicians focus on the comments of the four people who pay way too much attention to their music. Instead of the average listener who is not psychotically obsessed with all the things they do, all but your biggest fans who are happy you're releasing anything will notice this and think about that. You always release three videos for each song. And if they love you anyway, they're going to be psyched for more content and that they keep getting things to consume from you. Music is in box checking. It's a mood altering drug and people can take it for that. And they don't care about the prescription bottle, as long as the song gives them their fix. My fourth point is there's data that this works. And while I never use data to write a song for marketing, it's gold. You're totally right to question this in this fashion, but I'm afraid you're falling into that smarter than the audience category.  Well, the video that I made before this went deep on storytelling. It's going to be linked on a playlist I made on everything you want to know about storytelling that's linked on the end screen. Thanks so much for watching this. If you liked me doing this type of video where I answer your questions, let me know below. And if there's something that's giving you value, be sure to like, subscribe and share it as I'm really trying to build this channel this year as well. If you still have questions, leave them below, as I'll answer them in the comments. Thanks for watching.


After dropping two straight games before the start of the new year, the Brainerd boys hockey team has played very well of late. Winners of four of their last six. Tonight would be a tough test though, as the Warriors hosted class 2A's 12th ranked Duluth East Greyhounds. Taking to the first period, Brainerd down one nothing, but not for long. Jack Evans scores to tie the game up. Then the Greyhounds took their opportunities to shoot all night. Found it hard against the Warriors goalie Colin Kleffman. He gets the nice block right there. Then down 2-1 now with only seconds left. Matt Fisher gets an opportunity to shoot and he scores. Brainerd ties up the game again 2-2 before the start of the third. That'd be the last goal tonight for the Warriors though, as they eventually lose to Duluth East by a final of six to two. If you've enjoyed this segment of Lakeland news, please consider making a tax-deductible contribution to Lakeland Public Television.