It is now widely accepted that diets high in animal fat and processed foods are an important risk factor for the development of type 2 diabetes. It's not just animal fat, but animal protein intake intensifies insulin resistance, which predisposes people to type 2 diabetes. No wonder studies have shown that elevated consumption of animal products in the low intake of unprocessed plant foods increases the risk of not only cardiovascular disease, but diabetes. But of all whole plant foods to pick, why choose oatmeal to treat diabetes, which, as I discussed in my last video, was used for the treatment of diabetes before insulin was discovered. We've long known that higher consumption of whole grains, including oats, is associated with a lower risk of diabetes, but you don't know until you put it to the test. There's been over a dozen randomized controlled trials looking at the metabolic effects of oats intake in patients with type 2 diabetes. And oats were found to significantly improve both short-term blood sugar control and long-term blood sugar control, in addition to lowering cholesterol levels. We think the benefits arise from a fermentable fiber in oats called beta-glucan, because you can get cholesterol lowering even if you just give the oat fiber straight as well as an improvement in blood sugar control and insulin sensitivity in both type 2 diabetics as well as type 1 diabetics. How exactly does the fiber do that? Well we know one of the underlying cholesterol-lowering mechanisms of oatmeal consumption might be its microbiome-manipulating ability, in other words having a beneficial effect on our intestinal bacteria. A little fiber goes a long way. Here they were talking about the anti-inflammatory effects of the short-chain fatty acids that our good gut flora make from fiber. There are dozens of randomized controlled trials showing the types of fiber found in oats and beans can improve long-term blood sugar control and diabetics. In fact nearly double the FDA threshold required for new blood sugar-lowering drugs. Why? Because the gut bacteria selectively promoted by dietary fiber intake can help alleviate type 2 diabetes. In fact, on the basis of 50 distinct bacterial markers of the feces, you can tell who does and does not have diabetes. But change your diet and you can change your gut flora within one day. We feed them with fiber and in return they feed us right back with these short-chain fatty acids like butyrate that have all these wonderful effects. Put people on a diet pack with oats, beans, fruits, vegetables and nuts and the number of fiber feeders churning out the beneficial short-chain fatty acids shoots up and fasting diabetic blood sugars drop about 25% within one month. And the more fiber feeders they fostered, the better their blood sugar control. When the fiber-promoted short-chain fatty acid producers were present in greater diversity and abundance, participants had better improvement in their hemoglobin A1C levels, which is a measure of longer term blood sugar control. Then before and after fecal transplant studies helped nail down cause and effect. The oat fiber itself has been shown to act as a prebiotic boosting the growth of beneficial bacteria like lactobacillus and bifidobacteria. So between the lack of animal protein, lack of animal fat and bursting at the seams with prebiotic fiber, it's no wonder that oatmeal diets grew to become part of the clinical routine in the treatment of diabetics. However over time this practice has later become increasingly forgotten, a disappearance that's been compared to the fate of unpopular theories and successive additions of Soviet encyclopedias. Despite advances in therapy, we still have many people with poorly controlled diabetes. Thankfully this forgotten tool is back. I'll review all the new oatmeal diet studies next.


Welcome to another episode of GUI Challenges where I create interfaces my way and then I challenge you to do it your way. Because with our creative minds combined, we're going to find multiple ways to solve these interfaces and expand the diversity of our skills. Today's GUI challenge is building a media scroller or whatever you call these. I call it a media scroller. There's one on, you know, Netflix. There's one probably where you're shopping. These appear everywhere. And this one is kind of special. If you see we have like images that are lazy loading. We have aspect ratio that kind of changes the way that the thumbnails of this like content is presented. And look as I tab through, I get some really nice arrow key navigation. Did you see even how the scroller scrolled to the element that was in focus? Look up I hit the edge, it scrolls over and puts it in focus. And we're still snapping over here on the left edge. We're still snapping. So if I hit tab, I'll go into this other scroll view. Excellent. I hit my arrows to go left and right. And I'll hit tab to go into this other scroll view. And what's cool is if I hit shift tab, look, my position of focus is maintained in each of these scrollers. So I can sort of like resume where I was, right? That's how you would want to do that on a controller, right? If you were sitting down using a little tiny remote that just had arrows, you would really appreciate an interface that had this. And I had a ton of fun building it over here in the debugging corner. I've got it pulled up across all the different browsers. As you can see opera down here in the bottom left chromium down here in the bottom right safari in the top right, we have a newer safari which has flex gap and has some other cool features in it. And we have Firefox in the top left and of course iOS and Android. So it's interesting, right? This is a responsive layout. You'd expect to have this in a nice widescreen as we were looking at just a second ago in like a single widescreen monitor. But on your device, you're going to want to see an upgraded experience as well. Like you want to be able to pan through these items just as you could before and maybe tab through them, depending on how you're using your device. And we'll get all the snapping that we want. If you notice though that iOS does not support aspect ratio yet and neither does Firefox. And so we're using at supports to upgrade our layouts into this. And you can see down here on Android, we start with the boxes as well. But as we scroll down, we get a nice 16 by nine and then we get a nice larger four by three. Another thing I really want to point out is that a lot of interfaces that would do this on like a set top box or something would cut off the text here. So let's inspect, let's inspect Firefox. If I come into the fig caption and I turn off the custom font family, we can see that none of the text is cut off. And that's really important to me. I don't think truncation is a content solution. You're going to end up cutting off titles in a really weird way. So sure, while this one down here looks a little tall, penny awful in original series, that's just the title. And that should be what something like if someone focuses here and they come down into this item, that should be read aloud to them. And you don't want to truncate that visually or even truncate the text. Actually, I just think that anyway, it was really important to me that I showcased how CSS and grid could allow a dynamic height to still be snapping and still be elegant. So anyway, think about that. As you're kind of like going into other interfaces that do that show this and notice how they're usually one line. And that's just for the sake of for them. It was easier for them to build it that way. Anyway, I chose to take the extra challenge and avoid truncation. And I feel really good about it. So another thing that you'll notice is that there's a lot of items in these, like look at how many items is in here. I think there's 300 or something. And the browser is just buttery smooth across all of them. Also notice how we have like some scroll padding, but we're scrolling edge to edge, see how it exits and enters edge to edge. And then as we reach the end, we hit that. So that's some scroll padding that's matching some padding that we have overall. And I think those alignment features are really what makes this kind of shine as like a layout. And again, down here, you can see that, you know, some of the text gets really long and that's totally okay. Less items in here just to kind of test them all out. All right, I'm in my larger chromium desktop here. I'm going to refresh so we can see everything load and just start fresh. Okay, the goal here is to show you that these scrollable layouts work with any international direction that you want to put this document into. So if we come into the direction or just at the top in the HTML route, we can type direction and do right to left and change the document to right to left and check it out. We have a scroller. The padding is still nice on all the sides. Our gap is looking good and all of our content is right to left as well as our layout. So that's being changed at the global document level and for free since we used logical properties and we just followed the flow and direction of scrollers using keywords like inline and block, we get this layout, but it gets even cooler. So if we take off direction and we set writing mode to top to bottom, check that out. So imagine this is some Japanese characters coming down here or some Chinese characters that are rendering this direction and look at the images. The images are still faced up right because this is still the orientation. I want to look at an image and look at how the aspect ratio scales along in these different writing modes. That is just really cool stuff to me. I don't know if that's as cool to you, but I'm really impressed that this is all able to handle that look right to left and top to bottom. I can still scroll these things back and forth. It's just amazing. Then there's also some really awesome debug tooling to help us look at all these layouts. So we've got a flex overlay that shows us that the main content is being shown with flexbox grid, just some gap in between these sections. Our sections are a grid that separate the header from the list. Our list, so we just have these media scrollers are ULs and LIs. And let's even drill into the kind of structure here really quick. So it's a UL, LI list. My goal was that this is just a list of titles. These should just be a list of links in case someone is using a screen reader or doesn't even want to see the images. Like that's your goal here, right? It's just to go through a list of potential, I don't know, media items. And it should be that basic as like a structural document concept and we'll upgrade it from there. So anyway, that was the thought process I had here. And it was UL, LI, each of them is a link. So it's just a list of links. And inside of these links is a figure. And the figure has an image and a caption. And so that was how I structured it. It allowed me to do a lot of really interesting things too, with just like focus and display. And let's turn on some of these cool new tools. We have like one of them is called scroll snapping. And look at, I have all of these overlaying at the same time. I have grids, flex overlays, and now a scroll snap overlay and they're interactive. So as I move this, we can see the snapping edges over here on this particular item. So this is the items snap destination. And we can see the snap port here in purple. And we can see our scroll padding. So that's the green that's on the edges here. I have scroll padding in here to help it line up with these other elements. And look at, we could just see all of that at once. I just love it. Can we turn on a grid for a figure? Sure. Oh, is it over here? Oh, it's just so cool. It's just so cool. One little last thing to mention here that I thought this was pretty cool. So let's turn all these back off. Is I'm going to go into the rendering panel. And here I'll just search it, command shift P. I'm going to rendering, render, rendering, show rendering. Yes, rendering is down here. Okay. I'm actually going to right click and say move to top. I prefer it to be up here. Okay. So here's rendering up at the top. Scroll down, find prefers reduced data. And I'm going to emulate prefers reduced data. And if you saw something over here, it was that all the images disappeared. And I was like, well, hey, if someone is navigating the site with prefers reduced data on, like they're in a data saver mode, they're saying they're on 2G or something. Like, don't download all the images.  So hopefully it was only getting the ones in view first. But then after that, what if they just don't want any of them? Like what if it's a really heavy video? And these are all video preloads or something like that. You're not going to want those. So I'm hiding them with CSS. And if you pop in here, I can see the image. And let's see, am I hiding the picture itself? Yeah. So I'm hiding the whole picture element itself, prefers reduced data, figure picture. It also has loading lazy. And what that allows us to do, if I come into the network panel and I can see that previously we loaded, you know, 1.4 megabytes of resources, 76 requests. I'll hit refresh. And we've got 166 kilobytes of resources and 10 requests. No images were searched. And we just get the text here. And if I go to elements, let me just turn on fig caption. I'll take up that font. So, okay. So this is essentially what users are going to see if they browse this, like this interface with prefers reduced data on. Like you can even like tab through and still go through all the different items. And they all still save your state in the same sort of, I just thought that was so cool. Prefers reduced data is only available behind Canary. So I'm using Canary to emulate this right now. But it's just, it seems like there's a lot of power here and we're still figuring out how we can use it. We've got to get some more browsers on board. But one or two more things I want to show you that I just think are too cool. I'm going to refresh some of these here is I want to show you how we're doing some prefers reduced motion handling. Because I just, I just love that feature. So we'll come up here to rendering. Well, here I don't know why I scrolled that up. We'll scroll that down. This is emulate prefers reduced motion. We will prefer reduced motion and compare the two. So if I'm over here in chromium, when I hit tab and I hit my arrow keys to move through here, it's going to smooth scroll the new item interview. That's because I don't have any prefers reduced motion properties set. If I come over here and I go left and right, look at that, I go instantly to the next location. So because the user is not doing that gesture, we are going to snap it instantly to make sure we're reducing motion. And there's also one more cool consideration. So if I come up here and Safari and I hit tab, I hit left and right, you can see there's a little animation to the focus outline that's kind of zooming in on here. Look, if I come on a Chrome, I go left and right, you can see it moving there. Now if I go back to where we're preferring reduced motion and I pop down in here and hit tab, hit tab, go left and right, you can see that there is no zoom. We just have some nice padding around the offset and we're doing all of that with just some nesting and some CSS. So here, let's check that out really quick. Here's the first one. So we have our horizontal media scroller to display grid with a gap. Notice that it's just a column auto flow or grid auto flow column. There's no preferences here in this layout. So this primary media scrollers layout is actually really loose. It's just direction and spacing. And I really love doing that. And that's why aspect ratio is able to kick in later and change that column size is because this is so unopinionated. Anyway, that was a little side note. Notice we got over scroll behavior inline, over scroll X, scroll snap type. You've been seeing that a lot in these videos. But here is our nested prefers reduced motions. We prefer reduced motion. No preference will upgrade the scroll behavior on this media element to smooth. Then if we come down here into the links inside of this media scroller, we can see that they by default have that nice little padded outline offset. If they're focused, we have an outline offset of seven pixels. And if their user prefers has no preferences with reduced motion, we go ahead and transition that outline offset over a quarter of a second. So a couple of really simple upgrades that make for a really nice experience, I think. So those were really critical. And then I just want to talk about one more thing. And that one more thing is I made a library this time. So that technique here, if I go back to the scroller here, and if I hit tab and shift tab and I'm hitting arrows, right, this like ability for these to focus with the arrow keys and maintain their state is something that I built. And I built a library for it this time. Instead of just writing some JavaScript code and shipping it in the demo, this one you can find on NPM under roving UX. So this library exports a function called roving index, which is the technique of using sort of tab focus trapping here. So when you tab into this media scroller, I steal it and then I redirect focus to the item that was last in focus. And so I sort of keep track of which scrollers want to have this roving feature, want to use arrow keys to go through them, and which ones what their state is. And I do that and export a function for you so that in your projects, if you want to have roving index or roving UX on any of your elements, you can just NPM install this and use some vanilla, just target an element and you upgrade it. So here how I use that in my project is, I look for each of the horizontal media scroller elements. For each of those elements, I'm going to call the roving index function and pass it some options here. I'm going to pass it the element that wants to have the roving index. So that's the first key thing that you need is an element with like items. And then if those items aren't the direct descendants, so notice I had a ULLI anchor. So that anchor link, which is what I wanted to focus, was not the direct child of the UL. So my little library function is able to take a target. So you can say, oh no, reach further into my children and find the anchors, those first anchors that you find, those are going to be the focusable items. So you just call the function, say which item should have it and which children should be focusable and you are all done. It will remember state for them and handle the keyboard left and right and tab keys for you. And the last thing, the last, last thing, the final, final thing is that we're, let's talk about aspect ratio and how that got upgraded. So let's twirl open aspect ratio down here and check out this code snippet. Okay, so if the browser sports aspect ratio and it recognizes the syntax of aspect ratio one, we're going to upgrade the horizontal media scroller picture element. We're going to set its inline size to auto because we're no longer going to make sure that it's a block. The way that we were doing that before was with a custom property setting height and width. So now we're going to say inline size. No, your auto, your aspect ratio is one. So by default, check your height and be a box. Then if this is the section, the second section, so look, we're using at nest to reach into the parents and say if it's the second section in the list of wherever there's sections, then look at these, you know, horizontal media scroller figure pictures and set their aspect ratio to 16 by nine. Or, and that's what, you know, kind of does this effect right down here, is 16 by nine. That's the second list item. Then we have this one that looks to see if it's the third list item. It sets the block size to double the normal size in the aspect ratio to four by three and then does a media query to look to see if it's a really small screen because that was kind of large and it reduces it by one and a half. So that whole entire aspect ratio upgrade is here right in one little selector using nesting and ad supports. And that just let me really do these kind of like powerful things so succinctly. So that's the end of this GUI challenge. Make sure to check that article because it's going to have so many more code snippets. I had to go over kind of like the code really fast because there was just too much cool stuff to show you in the tools and in the browser. The experience was really rich, I thought. So leave some thoughts in the comments. Fork this and share it and let's see how you would do this. What kind of media scroller do you want to interact with? What have you built? I want to see it. Take it easy, y'all. Thanks for watching. Bye.


Today we're going to dive into Hinduism versus Islam. This isn't about stirring up debates, it's just an honest comparison using clear and concise infographics to highlight key aspects and differences between the two. Yeah, sure, we're going to take this word for it, but ultimately discussion is of course welcomed for the YouTube algorithm, but beyond that as well we need to open up the discussion between Muslims and Hindus, why else would we make such videos?


What's up guys and welcome to the best publishing channel on YouTube because we're focused on providing the most value and information that you want to hear about that no one else is willing to talk about. Yes, sir. So in this video, we're going to be talking about and showing you how to hire a ghostwriter to write your book for you. And where are you going to get that done? Let's just forget everywhere else. We're going to tell you exactly where and that's Upwork. Upwork is an online freelancing platform where freelancers go to to offer their services of any variety you can imagine. So you can basically go there to find workers, essentially. And we're going to use Upwork to find a freelance writer to ghostwrite our book for us. So there are two primary methods that you want to use Upwork to find a ghostwriter. And the first one is to make a job listing, which is essentially where freelancers come to you. The other option is where you explore the profiles of ghostwriters on Upwork. So you're essentially going to them instead of them coming to you. You want to use both methods to find your ghostwriter.  Oh, this is a disaster good here, Doc. Mid video, what's this dog doing? Uh, is he catching? Where'd he go? Let's chase him. Look at him. Look at him. Look at you. You know you're not allowed to be here. He's barged in. What are you doing here? Get out of here. You look a little bit like Stevie, but I can tell you're not him. Get out of here. No, you better not piss. Leave, leave. No. Alright guys, we're at the computer now. And before we dive into Upwork and show you guys how to use it and how to find a freelancer for yourself, I want to talk a bit about like the pros and cons and why you would choose to find your own freelance writer. As opposed to using a ghostwriting company to write your book. So the big con of hiring a freelancer to be your full-time writer is the hiring process. Yeah. It can literally take, I mean it can take months until you find the right person, right? So it's all the time and effort. You have to put it up front with no return, right? You can put in so much time into training and then they turn out to be not good. Which is why it's not ideal for a first-time publisher. Yes. But for an experienced publisher, you definitely do want to give Upwork a shot. But once you get past that phase and you find the right person for the job, this is by far the superior method to use your ghostwriting company. Right. If you can get past and actually find that perfect fit for you. Right. Because the big con with ghostwriting companies is like two big things. It's the lack of involvement in the project and the lack of communication. Because all communication goes through the ghostwriting company and then to the ghostwriter, then to the company, then to you. It goes like this and it's very inconvenient when you want to be super hands-on with the writing of the book. We want to skip this part and just go back and forth like that. Yeah, exactly. That's what we do with the freelancer. So when you hire a freelancer on Upwork, you can literally Skype with them. You can talk with them on the phone. You can even set up a Google Doc so that you can literally see where in the process your book is at all times. In live time, you can see them writing the book. So you can be super, super involved. People who want that want to do this. That's why we're here to make this video because it is a massive help. If you guys can actually get someone, like, it's just guys the limit for your publishing business. It's just the hiring process.  But that's where we're going to show you in this video how to actually hire someone. Okay? So shall we get into it? Let's jump in here now. So the first thing that we mentioned is that you could post a job on Upwork and so let's walk through that process and show you how that's done. So you're going to make an Upwork account. This is just a job listing that I made a few weeks ago. So everything's already filled in but that makes this a lot quicker. So this is what the process looks like. First step is getting started. Step one, enter the name of your job post. You're looking for a ghostwriter so you're just going to want to put something like ghostwriter needed for ebook about puppy training in this example. Specifically, we write puppy training because we want someone who has at least some experience or background knowledge on that subject. Well, you want to let the ghostwriter know what the topic is about so that only people who are interested in writing about it will apply for the job. Yes. So you're going to just go like that. And then the next step you need to do is move on to step number two which is the description. You're simply going to provide a description for what you're looking for with this job. So what we have written here I'm looking for a skilled and reliable ghostwriter to write a 30,000 word long book about puppy training. I will provide a very in-depth book outline so that most of the research is already done for you. I'm looking for a writer who cares a lot about the quality of their work and that is what is most important to me. And then I give a little bit more information about what's going to be talked about in the book. Hey guys, we are here to do as much of the work for you as possible. Which is why we're the best publishing channel on YouTube. And which is why we'll let you guys copy and paste this job description if you'd like. Yeah, comment down below if you want that. I guess we could make a document where you guys can just copy and paste so you don't have to spend the time looking at the screen and writing it. So step number three is details. It's very simple. What type of project do you have? This is just a one-time project. Just put in one-time project. It might be ongoing but you can't guarantee that. So one-time project, move on to the next which is the expertise section. Now this section is honestly not that important but it's something you have to fill out. It's just providing the type of skills that you're looking for in the Ghostwriter. Good writing skills, we have fact checking. Humor was one that popped up as suggested. We're like sure. Humor in your book especially if you pick this one or that one it's not going to change the writer that you're going to get. It's the other parts that are much more important than choosing these categories. So just don't stress about it to my point. Writing genre, this is non-fiction. What additional skills and expertise are important to you? These are all auto-suggestive. We just click the ones that apply to what we're looking for. Ghostwriting, crave, writing, proofreading, editing, ebook writing, English grammar. They're just obvious and self-explanatory. But we're just going through the motions to show you everything. And then for location, you want to do worldwide. You don't want to limit yourself to just U.S. only writers because for one, worldwide writers are going to be cheaper because it costs a living in different countries to give you cheaper writers. And there are phenomenal English writers who are not technically native English writers from the U.S. And then just regional preferences. I just like to add every big content. America's Asia, Europe, Oceania. We're going to move on to the next step. Right here, visibility. Who can see your job? Just make it anyone. Again, it's one of those situations. You don't want to neglect anyone who can't find your job listening because you did Upwork Freelancers only or Invite only. You're just looking for one freelancer, qualifications, optional. It's just not necessary. And then the next step after that is your budget. So for your budget, you have two options. And for ghostwriting, you do not want to do pay by the hour ever to be honest with you because that honestly can just start drama. Now that is part of another con that we haven't talked about yet with hiring a freelancer. When you hire a ghostwriting company or when you use a ghostwriting company, they handle all the customer service and dealing one-on-one, like the personal relationship side with the freelancer. Dealing with people. When you're working one-on-one with a freelancer, they could scam you. If you're working with them, they deliver it.  They might not give you revisions. They might argue about the price you really agreed upon. Things like that. Now that part is annoying, but it just comes along with it. It just comes along with the territory of hiring your own freelance ghostwriter. So you're going to want to pay a fixed price every time and then do you have a specific budget? Again, that's up to you. The higher budget you set, the higher price writers you'll attract and also higher quality writers you'll attract. So when you put in your budget, this is not saying anything. This is how much I'm going to pay for the book or anything. It's just giving a ballpark figure. You should give a ballpark figure. Don't say you'll pay $2,000 for a book, but in reality you just want the good ghostwriters. You just want to lure them in and then offer them $400 for the book. You don't want to do that. Put something realistic. We've chose $900, which is exactly $3 per 100 words over 30,000 words. I'm absolutely willing to pay that for an epic book. Level of experience. A lot of these things are not important. The important thing is the job description essentially. So just do intermediate. The last thing is the review. You can simply just review your listing and then you're going to go down and click post job now. Then it's going to be on Upwork and any ghostwriter on Upwork who is searching for work will be able to find that job listing and they will send a resume, they'll apply and then you now have some resumes to go through. That starts the interview process. Now that's a video for a whole other time. We'll actually make a video about that because it is super important and that is probably the hardest side of this. That's like the big con to hiring a freelancer. We want to help you guys as much as possible to do that, but that won't be this video. Right now we're showing you how to go into talks with qualified ghostwriters. So then the second way that we mentioned is where you go to them instead of them coming to you. So what you're going to do is simply just explore ghostwriter profiles on Upwork. It just involves going on here. One of the big categories Upwork has is writing. Just click on the writing section and then you can scroll down and there are a lot more subcategories for writer skills. You can simply just open up some of these categories, ghostwriters. If you want a business book, businesswriters. Yeah, ghostwriters is something for ghostwriter, but that doesn't mean that's the only category you should go through here. Then there's also for US writers you can look through that as well. If you want a fiction book, fiction writers. The point is there's tons and tons of tons of options on Upwork. So let's look at ghostwriters and here we just have a bunch of profiles and this part is very simple. You're just going to explore Upwork. You can see that look through any profile that looks interesting. So we'll look here at Marie T. Go into her profile. She has a little resume about herself and if you go down you can see her previous work history and feedback. If you go further down you should be able to see her portfolio. Right here is a portfolio that you can see of her previous work. You basically just want to explore all these profiles. Figure out if any of these are a good fit for you and then contact them and work something out from there. And then they are now in the hiring process. I think the two most important parts to explore of their profile is one their portfolio. So you can see their previous work and you can read it and like, is this something I could imagine this? If yes, good, if not, no. And then also the ratings and reviews. That's massive. Marie has a 100% job success rating and then if you go here and work history and feedback you can see exactly all the jobs she's done. On seven jobs she has 100% rating. So that's very good. Earned over $4,000. That's unheard of, like 100%. I don't see that very often. She's only done seven jobs. But anything above 90% is really good. Once you start dipping into the 80s and below I wouldn't even bother trying to interview them. No, no. Because then you're going to be dealing with someone. Again quality is most important for us. But even just like dealing with a headache of a person. But that is basically how you use Upwork to hire a freelancer or at least to find freelancers. Now the hiring process begins there's a lot to talk about with that as well. It involves going through their work having them write a sample for you. Things of that nature. And then the final thing to do is simply give them a shot because you don't know how good a ghostwriter will be until they actually write for you. The resume and portfolio, everything can look perfect. And then when it comes down to it, it's just not the right fit. It's the best you can do. So that wraps up this video. If you enjoyed it, please leave a like. Please comment any questions you have regarding this. We're here to help you as much as possible. And subscribe as well for the audio. And with that this magic emoji of the video is the pencil. Not the pencil emoji. There it is. Free training in the link in the description. See you guys in the next video. Bye.


What's up, guys? Mine's Michael and welcome to my YouTube channel. Today, we're gonna do another code forces problem. This is code forces round 606 division one of the problem is called as simple as one and two. So you're given a non-empty string or that consists of some minor substrings, right? That has a lower case line letters, but this guy named polycard doesn't like it. If it only if it contains at least one one or at least one string two. Okay, so I've has one or two. He doesn't like it or if he has both, right? So one two or one, both one two. Okay, as a substring. So in other words, he doesn't like it if the string s has any of the characters are something that equal to one and two. Okay. So for example, these strings one, he doesn't like it because it has a substring one. And on two w doesn't like it because there's a two here. And two one, he doesn't like it because there's a one here and there's a two here if you interpret this way, right? And he doesn't like it because he has one one one two because it has one as a both of ones and twos right has one two one one one two, right? It has at least one of these. So he likes it if the strings are like this like only me the reason why because it doesn't spell one like it just doesn't spell one. Wow, wow. Okay. The reason why because it doesn't spell to like there's no T. W. Oh, right? Ton now, whatever. It has no one ones and twos. Okay. So in this case, if you let's look at this example one two one, right? Um, so if you want you basically he wants us to select a set of indices positions and remove all the letters of these positions. Okay. Excuse me. So, uh, he wants in this case, he wants to select three and six, right? So this industry at three, uh, they're in their indexing at one, right? They're doing one, two, three or five, six. So they want us to remove this index and this index. Okay. We'll be selected and the result is on town. So what is the minimum number of indices or positions that polycarte needs to select to make the string liked? And what are these positions will be? Okay. So there's these test cases and then there's a strings s stuff like that. Okay. So what I'm going to do is, uh, I should tell me a lot of tries to get this right, but, and my solutions, it was still kind of long. So I'm actually going to go over the editorial solution. But anyway, uh, in order to do this, let's go back to the paper because if you draw out all these inputs and output and the corresponding outputs, you actually see the pattern. The problem wants us to basically remove the minimum number of letters to not have the substring one and two, right? So in this case, we saw that from the input statement, there's this one, two, one. So the letter they want us to remove is three and six. So they want us to remove this E, which would get rid of this one and this O, which would get rid of the one here also, but it also gets rid of two. Okay. So basically based on the first input statement, I know that if I want to remove the minimum number of letters to, to not have the string one, two. If I just remove one O, then that's actually the minimum, the minimum number of the letters to remove in this case. Toe one, right? Because the reason why is because that if, if I remove, let's say I remove a T to get rid of this two and an N to get rid of this one. So there's a sub string of one here and there's a sub string of two here. If I remove a T to get rid of this two, that counts as one removal, right? And then I remove an N to get rid of this one sub string here. That counts as another removal. And then if I remove this E, that counts as three removals, right? So that's, that's way more than removing one letter in this case. So in this case, if we see a two own, right? I got a two merge with a one, we should remove an O, okay? Based on the first input statement that I looked at, this would minimize the number of letters I have to remove. Then after looking downwards, as you can see here, this test case, there's nothing to remove, right? So they put zero and then they print out an empty string for this test case. The rest of the test cases, this test case and this test case, they just removed the first letter and that's okay. Let's, let's go to an interesting one, like this one. Two O, okay? Well, if I were to remove the last letter to get rid of this two, I still have a two in the end, right? If I get rid of this, I still have a two. So that, that doesn't work. So you can't just remove the last letter whenever you see a two. If I want to get rid of twos for any substring that has two, right? I can't just remove the last letter because then I still, I would still get a two here. I would still have two like that. One, two, three, four. Yeah, I would still have this, right? Two O, O, O. So that wouldn't, that wouldn't work. And if I look at this, let's say I wanted, let's say I look at the next test case, this test case. Two TTTTWO, right? So they picked an O to remove, which makes sense, right? The last O, but picking the O to remove doesn't work in this case, right? In the case that we just said above because of an actual O would still have two there. So let's look at this test case. If I were to pick the T to remove, like let's say, let's say I saw a two. So this test case has a two string, right? The string that has a substring two. That's how I picked this to remove this T. Well, I would still have a two, a substring of two. Like it would still have TTTWO and this is still has a substring two, right? So in this case, the best case to remove is actually the middle. Middle string, which is W. So whenever I see a two, it's actually best to remove a W because then I know that I definitely know that there's not going to be like a T's in front of it or O's in the behind it that would actually affect it, right? Because if I see a two, if I remove a W, that would completely get rid of any of these cases of having another substring two at the leftover, right? Okay, so, and let's go to one. Just like in a O, O, O, N, E. Let's look at this test case. They removed the test case, the letter N, right? They removed the letter N. Well, in this case, that makes sense, right? It makes sense to remove the letter N because then you won't have the substring one, right? So, but let's say, whenever I see a one, I remove a letter O. Well, that wouldn't work, right? Because if I have another O's in front of it, I would still have one later on.  I would still have this one, this one, which still has a substring, so that's not good. And in this case, one E, if I see a one and I see an, and I remove the E, like the last letter E, that doesn't work either. So, because I would still have one E, right? I would still have one E, like that. So that's not a good idea either. So, whenever I see a one or two, basically, I'm going to remove the middle letter, okay? So, if I see a one, I'm going to remove an N and that would completely get rid of my, get rid of my, the, get rid of the substring one, okay? And if I see a two and get rid of the W, that will completely get rid of the substring two, okay? So, that's what we saw based on these test cases, okay? So, if I see a one, I'm going to remove an N, if I see a two, I'm going to remove a W. And then, if I see a T, W, O, and E, I'm going to remove the O, okay? And insert that into whatever vector that I need to return to, okay? So, but, okay, so, first, I have to check, but let's see the, the actual scenarios to check first. So, first, I have to check if there's a T two, two own, right? Then remove the O to not double count it, right? To not double count the number of letters to remove. So, I would just remove this, the O. Then I would check T, now I would check the string to substring two and then remove a W. And then I would check one and remove an N. So, that's basically the code, okay? That's basically the algorithm. We're going to check two and then remove the O. Then we're going to check T, W, O, and then remove the W. And then we're going to check the string one and remove the one, okay? And now I'm going to go to the code and then code this up for you guys. Alright guys, so here I have a visual studio up and I just read in the test cases, number of test cases, T. And I did wild T minus minus to read in the, each test case. And then I read in the string S, I created string S and I read in the string S. So, they start, there's as four string T for every T that's in this array of a set of T, W, own. And then two and then one. So, they did it like this way. So, they're going to go through every string in this set, tone two and then one, to check every single occurrences of each of these strings, okay? So, just like the order that we set in the, when I showed you guys, okay? And then what did they do? Okay, so then they created a position size T position equals zero. So, starting position to search at. And then they're going to search S dot find T with the position. And they're going to keep on doing it until it's not equal to N position, which is negative one, I believe. Okay, so they're going to do this. They're going to keep doing this. What's my problem? Oh yeah, oh okay. So, they did position is equal to this. Position equals a find this size under square T. Okay, well I can't do this for some reason, so I'm going to make it an int. Why can't I do this? Let's see, why can't I? Okay, I'm going to put parentheses to see if, okay, so that works. Why can't I do this for? You can't do it in this. Okay, fine, fine, fine, fine. I'll create a pause out here then. I'll do a while loop. Okay, this is different from the other tutorial now. So, bear with me. Why can't I do this? Why can't I do this? I actually don't know why I can't do this. Okay, now I can do it. Okay, well that's really weird. Okay, so while, so what is this doing? I'm going to find the occurrence of the string. So, okay, so let me step back a bit. Okay, so what I'm going to do here is for every string that's in T, every T that's in this set tone two and one, I'm going to find the string tone and then two and then one. Okay, so I'm going to find the occurrences of each of these strings. Okay, so that's what I'm doing in this for loop. So, in this position, I create a position index to tell me the index of where the next occurrence is, right? So, I'm going to find the string, the first string tone using s.find and that's going to give me the first occurrence of where tone appears in the string. So, that's what this does. And then after it finds that, I'm going to set my position to equal that in the next iteration. So then I could, I don't have to put this in the end, right? Next iteration, so I could do pause equals that, okay, right? And I'm going to keep doing this until I don't equal to negative one. So, end pause is what it returns if find returns negative one, because that means that there's no more occurrences of this string tone, tone, right? And then after this is done, I'm going to find two and then I'm going to find one, okay? All right, then what do they do? Okay, okay, so then what they did was they set s at position plus t dot size over two. And they're going to set this equal to x to remove it, okay? So, they're going to remove the value of this, okay? So, what does this do? This is a hacky way to do it. So, I'm going to find the position of this whatever starting position it was. So, if I find a position of tone, tone, right? Tone, whenever I find the position of tone, right? I'm going to find that position in the string, right, that I'm searching for. Then what I'm going to do is I'm going to take the size of tone divided by two. So, then this gets the middle one, the size of the middle one, which is like, I don't know, three. So, that gives me the offset to add to my current position, right? And then I could just remove the middle to equal x, okay? So, this is just a hacky way of doing it, okay? So, this basically just saying is that I'm going to remove every single middle value, okay, of each of these strings that occur inside the large string, okay? That's what this is doing. So, right, and then what, okay, what else do they do? Okay, then they're going to do a pushback. So, now we actually have to add it to our set. So, I'm going to do a quickly create a vector int r, okay? Then I'm going to do r.pushback and I'm going to pushback this position. So, this is going to tell me the actual, this is the actual position of where it is in the actual string, okay, the middle position. So, this is the middle position of where it's at, okay? So, I'm going to pushback the middle position and then, what does it do? Yeah, then that's it, okay. Then at the end, I have to print out the size of how many that I'm removing and then I have to basically print every integer that's in my vector, okay? Yeah, I actually have to print out whatever integer plus one because they want to index by one. So, yeah. And this ideally should work. Whoop it does. Just copy, go to this one and then submit the code. Okay, well, it stopped at running out of test one so that means something's an issue here. What is my problem? What's my problem? Ideally, this should work. Hmm, oh no, wait, it didn't stop. Okay, it got eight seed. Okay, it just took a while to load, but yeah. Yeah, so that's how you do this problem. I just quickly explain it to you guys here. I'm trying to cut the video length of these bits to be shorter because I don't feel like explaining 30 minutes of you guys and I feel like 30 minutes of explanation is way too long. But yeah, that's how you do this problem. Raycom, subscribe. Let me know if you guys want me to do the next problem of 629. Let me do that and yeah, Raycom, subscribe. I'll see you guys later. Peace.


Hello colleagues! You are stressed to select a highly productive clone? I mean you would like to express high amounts of recombinant protein in a mammalian cell line? We are the same problem. What you usually do? You will take a host cell line, for example C-H-O cell line, and you will transfer the cell line to the surgeon of interest. After this procedure, you will obtain a pool of clothes. So far so good, but now it's going to be complicated. Your pool consists of a mixture of clones, but unfortunately the majority of clones are medium or even low producers. And how you can find your desired but rare highly productive clones? In order to overcome this problem, a very time consuming amplification and selection procedure is performed normally. But we had another idea. Maybe it should be possible to select such a highly productive cell line with a much easier system. And now I will ask you again. You are stressed to select a highly productive clone? It's normal. People which are very busy are often stressed. But what's up with your clones? Are they also stressed by the overexpression of proteins? It has been suspected that even the overexpression of native proteins can provoke ER stress, which activates the unfolded protein response. We have proved this suggestion by using a very smart approach called Bacombinase-Mediate-Cosaptic-Change-RMCE. I will show you. This is the approach we have tested several ER stress response elements, like transcription-factor binding sites, for example, unfolded protein response, amino acid response, or ER stress response elements, and various ER stress-related cellular promoters. All of these elements were introduced into the same genomic integration site of an antibody-expressing C-H-O cell line by using RMCE. In this way, we found that overexpression of a recombinant antibody results in an increased activity of the GRP-78 promoter. Interestingly, a strong correlation between the amount of the secreted antibody and its activity was observed. Based on these results, we have concluded that the ER stress-based selection system developed during this study should be suitable to identify and isolate your desired highly productive clones. We have published all of our thoughts. My name is Lars Kober and my co-authors are Christoph Zehe and Jürgen Boeder. Our current article entitled Development of a Novel ER Stress-Based Selection System for the Isolation of Highly Productive Clones is published in the journal Biotechnology and Bioengineering. Thank you for listening and happy reading.


Thank you for coming to my presentation. We're gonna talk about distributed compilation tools and trying to implement them with Kubernetes. My name is Diogo Guerra. I'm a former computing engineer at CERN with the Kubernetes team where I'm mainly focused on integrating tools, ranging from monitoring, logging, and driver configuration so that the users can launch a cluster with all these features and to be available with our central monitoring on demand. So once upon a time, around four years ago, I was a young computing engineer at CERN and I was just discovering how awesome was Kubernetes and how we could deploy and scale these applications that were load-balanced by a service. And I used to live with a friend which was a software engineer. And my friend who at a Saturday was trying to compile his tool. I was complaining that the application compilation was taking too much time and I was telling him, man, don't you have like, can you use like a distributed compilation tool? For sure, like there's something available, but he didn't know about anything. And actually I had this idea like, would it, because I knew about these tools and I was fascinated with Kubernetes, so would it be nice to like use Kubernetes to scale up and down these worker workloads and like, could we do a service with this? And so we come to our motivation. So at CERN, CERN actually has lots of many applications that are managed and contributed to by lots of many themes, small and big. And these solutions sometimes are not small and they are really, they really take time to compile. And here you have the two most common tools which is root, which is a tool that scientists use to analyze and visualize the large amounts of data produced by the LHC. And also we have our own read-only file system for software distribution. So this has some problems, is that it's problematic for a team to actually manage this. So it's expensive to set up and maintain in terms of manpower. So if you have different teams doing the same thing, you're actually losing resources. And it's also expensive to run because if the resources just stay idle, you're losing money. So also it's my experience, and I hope I think yours too, that users when they use something, they opt for the easiest solution. And sometimes it's not easy enough and users don't do exactly what they should. So from the challenges side, small teams have lower budget. So usually maybe you could say that, okay, let's just buy a big machine and we solve your problem, but maybe this is not possible and maybe you don't want to buy big machines for all your developers. So maybe it would be best just to have some distributed system where you can just compile and share with everybody and everybody would take advantage of these resources. On the organization side, this needs to be something that is easily integratable with what exists because people will not just change in a whim. So it needs to be something that is easily integratable and it does the same job to be accepted. And there's not really a standard way that is offered to do this. So clearly we have a problem here. And also one of the other things is that the user which wants to compile their workload will just use a public machine that happens to have more resources than what they have, but this public machine happens to be utilized by other users that are doing different things. And when you try to run a compilation job, you just starve everybody from CPU time and this is not good for the community because you will have angry users. So how can we help solve this? So we have some criteria that we want to meet. So we want this to be compatible with what already exists with minimal effort. We want the user to be able to use this in an easy way so that it doesn't have an excuse of like, because the user defaults to use what is easiest. So if you present them an easier solution, if it works just as well, they will actually take this into account. And we really want to make this a Kubernetes service because why not? So this is basically my experience and failures trying to implement these tools to run in Kubernetes. And so the first one we tried was DCC, which is probably the most known one to compile C and C++. So the idea is that we have the worker pods that actually do the compilation service, the compilation jobs and we just scale them on demand by the amount of work that we are actually doing. And basically this would be backed up by a ingress and service and we would be happy with it. But the problem is like this will not work. So the reason is why this DCC is static. So before you actually do a compilation job, you need to define all target nodes that you're going to utilize. And if you're scaling up and down, this will not have a good time because Kubernetes service will assign jobs to random workers and then the controller which is the user computer will not know which worker has the job and it will be MS. So also one of the big cons about this is that the client controls actually all the compile jobs. So you'll have back and forth between you and the cluster. But this is common for the distributed tools. So next one, we actually try the spin-off from this DCC which is called Ice Cream. And in this case we have the same worker scaling up and down deployment by a service but it actually has a scheduler which does some auto-discovery for the containers that run the pods that run the compilation jobs. So this works but there's some caveats. So we found out that when if we scale down very fast, we might have problems because the way the scheduler actually discovers the worker pods, they will be killed and the scheduler will not be notified. And then when it tries to schedule stuff on this worker pod, it will fail. And if you have enough failures, the job compilation will fall to the scheduler and you'll basically be limited by the capacity of your scheduler. So also in addition to that, we have a very big problem which is you actually need to compile the container where you're running the compilation job with the dependencies that your job is going to utilize. And this is not, this goes against one of our criteria which is it needs to be easy for the users to actually utilize it. And we don't really want to manage these dependencies. So is there a better way? So at this point, there was no real stable solution and like our idea was not really working so we decided to drop it until a couple years later there was a new user that actually said, look, do you have something? And we said, well, we tried but we didn't really find anything suitable. And he said, well, let's try with escush and with escush we went and here the service works more or less the same way. So the difference is that our worker pods will actually register with the scheduler and there's actually a heartbeat going on when the worker pods die, the scheduler knows a bar is and will replace the failed jobs to other worker pods. And here we can see that we have a compilation going and somewhere in time there was a pod that died by mistake and the two of them were created in place of that and the compilation job finishes. So there was a real advantage of using this we found out that there's no need for dependency managing so this actually removes a big hurdle for us because we don't need to maintain like the container can just be a thin shell of the distributed compiler worker and that's it like you don't really need to add dependencies. But there's also other some big cons. So the client needs access to the worker node because the scheduler will say you can use this worker node but the client will always submit the job to the worker node directly and it will upload all the dependencies to the worker node if they don't exist. And also SKash uses bubble wrap. So bubble wrap is a thin wrapper around the job which basically isolates the kernel from the job and this requires us to use namespaces and thus we need a privilege pod. And also the job limit is not supported in the worker nodes and we found out if we submitted lots of load into the worker nodes what would happen is that all these compilations would be running and we would be run out of RAM and the job was just killed and that's not good. So we presented this to the user look at this works DM and the user was happy but I actually was not happy so I questioned myself like can we go cloud native? And I remember I had this talk with my friend long time ago that he was explaining me that many compilation tools actually create what is called a compilation database which is basically like a registry of all the compilation commands that are run by the compiler. And at this point I was explaining to my team during lunch all these ideas look this works. This doesn't really work because there are these problems and I explained them what this distributed that database compilation database was and it's like wouldn't it be nice if we could just do like serverless and we would just compile everything on demand to which I was said that this was vaporware and I was really triggered because of this and during that night I went home and actually I was like there should be something that does what I want and actually do somewhere in a blog post in a comment I saw someone pointing to this project which is called Chichi. What we have here is we it's an idea to implement this on Kubernetes but with a deployment that has the worker pods and the scheduler where the worker pods register to the scheduler in the same way that works with sgash. So the way the ggworks it's through your compilation files it will actually create a future with the ins and outs of the compilation step and it will bundle them and send them to the storage which we use cloud storage like S3. So I didn't really do this with the Kubernetes instead I wanted to use Knative and because of a lack of time I decided to use something similar like I don't know AWS Lambda so basically what happens is that the client is compiling is inferring all the intermediate reference this is what they call and then they bundle all these objects and they send them upstream and then they ask the scheduler like look give me this binary and the scheduler will create the dependency tree for this object and it will resolve everything calling functions on the Lambda service. And basically in the end what we receive is just a binary so there's actually a good thing here is that we don't actually need to interact with the compilation workers. We just send the objects and we get the result. So this is actually it fits very well in the cloud native ideology it's fastest or equal speed to what the other services like ICC and Ice Cream and VCC offer and it's really flexible and scalable because we're just limited by the amount of pods slash functions that we can deploy. Also in the same way that SKash works it actually determines what are the dependencies of our compilation job and we actually don't need to do any dependency management so this is actually really nice. The problem though is that this is a recent project and it actually has zero or no activity so there's no users or development going on and on top of that there's some lack of supporting documentation so to use you can do their examples but to do something like I don't know backport these to K native you need to actually feel around on how you do this. Also on top of that because for example in this case root which was the original project that we wanted to accelerate and they help our friend Capybara with it actually does some validation during the compilation job so because Gigi actually gives us a future and not the result that we expect we actually need to take this into account and add it to the project workflow so in some projects it might be required some more integration efforts. So I think there's no need to say but bigger nodes will always be preferable because that's the way the world works I guess and this way we can look at distributed compilations to be useful when our friend is compiling application in his four core laptop or some user is using shared infrastructure and it should not be, it should use like some proper distributed infrastructure to compile the job. So we see that legacy distributed compilation tools do not really work with the Kubernetes because they offer some things but they lack on some other place so there's not really a configuration that we could use and there's a need for there's a paradigm where we can take advantage of using distributed tools in the cloud native dynamic so like we had the last example which takes advantage of these very well and if we have a Knative cluster with some spare resources and we can just, we can use this and create a service for our users. So if you wanna have a look I have a link here for the very simple Helm Chat that I did with SKash and if I encourage you to check out the source for the GG project and the paper and if you're interested to actually contribute and hopefully we can do something together about this and last and not least I want to dedicate special thanks to all the Capybaras that's a first judgment for your entertainment. Sorry. And to Diana who helped to review this presentation and her tenacity to help me solve some last minute issues with the presentation. That's all I have. Thank you for your attention. So I'm not a specialist on compiler stuff but we still have lots of time for questions if you have some and I will try to answer them the best I can. Can you do the mic after? Thank you for the talk. It is actually very interesting talk and my question is do you think there are any cases where users want to do distributed compilation from Docker file? For example when you create a container that contains applications that requires like a large compilation and if so have you tried like build a kit, distributed build feature? So that I understand you're saying that you have Docker file and you actually do this compilation job inside the Docker file and then yeah so yeah this would work you just need to have access to the internet or whatever we will have your service and if you just source the environment variables which is pretty much how it works like you just point out to the source remote with the source, with the S3 credentials and it should work yeah. Oh thank you. Yeah no problem thank you. Hey very nice talk and very interesting. I had one question around incremental builds and that is how were you able to compare between someone building locally on their say like weaker machine and then when they built the second time so it's incremental and they should ideally have less to compile how that compared versus sending it to build in the cloud again like were you able to have it so yeah. You know what I'm trying to ask you? Yeah I think so. So I didn't really test like performance wise because that's a very lengthy process it's more like an architecture overview and if it works or not. Related to caching so if you're talking about the GG thing so all your objects will be transpiled in an intermediate representation in the same way so if they are still in S3 it will actually reuse them so you get that covered yeah. And you also have local cache so there's cache in multiple places so there's cache in client there's cache. There's the S3 repository and then if the client doesn't die like in the case of the AWS function it's stateless so it always dies but if it doesn't it has cache also locally in the build server. Okay that makes a lot of sense just one small question on top of that is a second build where you make one change do one like a second build right after is it faster in the cloud than locally on slow machines? I don't have information to answer that. Hey that's no problem very cool and thank you very much. Thank you. So I guess there's no more questions feel free to contact me and have a good day.