Alright, good afternoon everybody. My name is Media Ghazi Zadeh, I'm one of the maintainers for Minicube. I'm a technical lead manager at Google and I have the honor of leading the Minicube team for the past few years, past two and a half years. And then here in this talk I want to share with you an overview of the maintaining Minicube in the past five years. And also I'm going to share 20 pro tips of using Minicube. And also some lessons we have learned in maintaining an open source project. I also have with me Anders Birkland from Gothenburg, Sweden. He's online. He'll be joining us in spirit and online on SlackChat. You can follow me on github or Twitter. I don't have that many followers, but I will only speak about Minicube and coding in this Twitter media dev. I'm curious by the show of hands, who has used Minicube here? Okay, that is almost everybody. And another question, who has known or used Kubernetes more than five years? Almost nobody. So I think Minicube is older than all of us, including myself in using Kubernetes. I myself did not use Minicube. I first used Minicube about four years ago. So I think when Minicube was started, I did not even know about Kubernetes at that time. So the previous maintainers for Minicube, Dan Lawrence started it, and then Thomas Sturmburg and Matt Rickard. But the current maintainers of Minicube, the people behind the Minicube emojis are these amazing people under Sharif Algamal, Stephen Powell, and Frederick Orogovic. And we are from diverse set of countries and companies. We have three Googlers and two non Googlers in Europe, Asia, South America, and North America, and Middle East. So these are the emojis behind the faces behind the names behind the emojis. Here are some interesting stats about Minicube. Minicube has more than 685 contributors, which 16 of them have contributed more than 100 commits, like a very active commit developers. You have about 3 million GitHub downloads, which does not include our main method of downloading, which is GCS buckets, but still an amazing number of downloads. You have a 90% CSAT score according to our surveys, and you have had 125 releases in the past five years. 125 times people released Minicube. It's really amazing to me. This is a graph of lines of code of Minicube in the past five years. You have 1.6 million lines of code for this project, which is amazing. That includes the vendor. If you do not count the vendor, it's about 558,000 lines of code for Minicube. And by the way, this method that we chose to count the line of code, it does not include the comments and does not include the docs. It only includes only the go code that we have written for Minicube. An overview of Minicube, something that is unique about Minicube that no other local Kubernetes tool could claim that is a diverse set of technologies that you could use to start a local Kubernetes on your laptop.  We have all kind of solutions for you. So Minicube is not bound to a specific driver. It's all kind of virtualization technologies that you could have, the most inclusive local Kubernetes experience you could have. And also we have support for different operating systems and different CPU architectures. ARM64 is getting very popular recently. And Minicube is also the only local Kubernetes experience that allows you to set a runtime. I'll talk about the difference of the runtime and a driver in the next slide.  Minicube allows you to set the runtime. It could be cryo, Docker or container D. Minicube also supports CNIs. You can specify CNI you want. I don't know if you guys saw the security talks on Cillium. Liz Rice had a very amazing talk and she was using Cillium. I was very tempted to replicate her demo using Minicube, and you could possibly get Minicube, you could just easily specify your CNI. By the way, the green ones are the ones that we test them, and the green ones are the ones that we do not have an integration test for them. What is a driver in Minicube? Drivers are this column. Basically, if you want to install Kubernetes, you need a Linux. You need a Linux box. So somebody has to give you a Linux box, either a Docker container or a VM or basically a remote machine like SSH or a bare metal. So that's the driver that you call that a driver in Minicube. Whoever provides you that Linux box that you can install Kubernetes on it. So you can in Minicube start the driver with whatever driver you want. And if you don't specify it, Minicube will automatically select the best driver for you based on your system health and what you have installed. And what is a container runtime? So in this picture, container runtime is these three ones. Container runtimes is the engine that Kubernetes itself uses to manage the life cycle of the containers inside a pod. So this is the container runtime inside Minicube. It has nothing to do with the driver. These two get confused a lot by the people who use Minicube, and I wanted to just in this talk make it clear for everybody so we never have this confusion again. So the driver is the outer Linux box that you get the Linux box and container runtime is the runtime that Kubernetes uses to create pods for you. So the pink one is your driver, and then there will be Minicube's Linux box is the driver. And then inside of that will be container runtime that could be cryo container or Docker. The confusing part is the driver could also be Docker. So you could have a Docker with a Docker runtime, or you could have a Docker container on time. So that's most of the confusing part, but I hope this slide clears the confusions once forever. But here's even more confusing things from Docker. Docker has so many news in the past few months or past year, and Kubernetes has so many news on Docker past year. Recently, in December 8, 2020, Kubernetes says we are duplicating Docker. And people are like, Frick, what does that mean? And so this is about the runtime. It's not a lot the driver. So you could still have the Docker driver with a container runtime. So, but what does that really mean? Does that mean you can no longer have Docker runtime anymore? No, it means that Kubernetes no longer wants to maintain the code that allowed translating Docker shim to a cry interface, CRI interface. However, there's possible to still have container, sorry, Docker runtime. And Minicube chose to continue supporting Docker runtime, not the driver. Why? This graph shows Minicube's main users are local Kubernetes developers, the people who build an image and then deploy it to their cluster. And we have different ways to build an image. For example, in kind or K3D, there is a command called kind image load or K3D image load. Minicube has eight different ways to build an image. One of them is called Docker and. And you could see the Minicube's Docker and is the fastest way to build images on the cluster. The blue one is the Minicube's Docker and and the orange one is the micro Kate and green one is K3D and the yellow one is kind. The lower, the better the number. So Minicube has committed to continue supporting the Docker runtime because it's significantly faster for the local developers. And that's when you build an image, you change iteration on it and you want to build another time and you want to save time on that. So Minicube is five years old. I was in the conference, I was talking to people, I hear a lot of misconceptions and I hear them in misperceptions and I hear them before in the surveys that we collect from the users. And I want to go over the top misperceptions about Minicube. It is true that three years ago, Minicube was very slow. In fact, it was so slow, it was taking about three minutes to get started. We changed that two years ago. We introduced the new drivers, we refactored a lot, we introduced preload. I gave a talk on that in the previous QCon, how we made Minicube faster. But people still think Minicube is slower because when they compare Minicube with others, they compare the VM drivers with, let's say K3D's Docker driver. So if you want to compare these two, you want to compare Minicube's Docker driver with, let's say K3D's Docker driver. And another misconception is Minicube by default waits for the Kubernetes cluster to be healthy. If you say Minicube start by default, we wait for API server to be up and running, etcd to be up and running, and the coordinates to be answering the DNS. If you don't want to wait for that, you can say Minicube wait false and it will be exiting as fast as others. But these are all not very good ways to claim if Minicube is slower or fast. So we built a tool called Time2Kates. And what this tool does is measures how a local Kubernetes tool, regardless of what it performs, and you collect different metrics. So when the tool itself claims I'm done, let's say Minicube start or K3D cluster create, when they claim they are done, that's the first metric we measure. And then when the Kubernetes API server is answering, and then we deploy an app and we measure when the app is actually running on it. And then when the DNS is answering and also we measure the CPU. Past two years Minicube went from two minutes and 35 seconds to 21 seconds. And here's a chart that we generate automatically in GitHub actions per release. So this you could see Minicube against kind and K3D. So we're significantly faster than kind. We are not as fast as K3D. K3D is beating us. And K3D has an advantage. They're not using the SCD. They're using the SQL light for a database. And which is a kind of, you could say, a fork of Kubernetes because the real Kubernetes uses SCD. It doesn't use SQL light. So that significantly makes it faster. So this is the data and the misconception that Minicube is slow. By data, you could prove it that it's a misperception. The second misconception is high CPU usage. It's true. Minicube used to be extremely intensive on CPU three years ago. And we significantly cut down on the CPU usage. Actually, you can check out the talk by Priyawadu improving performance of your Kubernetes cluster in Qcon 2020. She goes over how we did that in a lengthy talk. And we measured the CPU usage again. So the first one is your OS idle. And the second one is Minicube hyperkit driver. And third one is making a virtual box. And you could see Minicube has lowest CPU usage against kind and K3D and Docker desktop. So this is another misperception that it was true three years ago about Minicube, but no longer. Another misconception is like Minicube is not a real Kubernetes cluster. I see this a lot in the surveys. So we say, I wish Minicube was a real Kubernetes cluster, but it really is. We actually passing Kate's conformance test. I put the link to that. We pass a production Kate's conformance test. We do not, we do not recommend using Minicube in production, but we do pass all the conformance test. And also you could actually configure every component of Kubernetes in Minicube. There is a flag called extra config. So you could pass basically any argument to Kubelet, CubeADM, HCD, basically any Kubernetes components out there. You could configure it using Minicube start extra config. So you could actually do any sort of configuration, real world configuration, advanced configuration in your Kubernetes. So don't think of Minicube as a toy. It's actually a real Kubernetes inside a Linux box. Another thing I hear a lot is like I wish Minicube had multi-node. We delivered this feature two years ago. And not many people know about it, but you could actually start Minicube with multi-nodes very easily. You could just say Minicube start-n2 and multi-node. Or if you already have a cluster, you just want to add another node. You could just say Minicube node add. That would be another way to that. Another one that is out there is like Minicube cannot be a multi-cluster. And this is not true as well. You can create a separate cluster with dash P. That's a little bit unfortunate that we chose the name profile five years ago for a cluster. That is the source of the confusion. So if you want to create a second Minicube cluster, we call it unfortunately P, but we have stuck with that because of backward compatibility. You could just say Minicube start-P P1, Minicube start-P P2. And you could actually configure them differently. You could say the second cluster I wanted with container D and the third cluster I wanted with cryo or different drivers and even different Kubernetes version. You could actually say start Minicube with a different Kubernetes version. I actually missed to mention one of the misperceptions, and that is people think you have to install the latest version of Minicube for the latest Kubernetes version. Or if you want an older Kubernetes version, they think they should go install older Minicube version. But that's not true also. You could just do Minicube start dash dash Kubernetes version and pick a very old version to emulate what you have in production. Another misconception is not good for CI. So that motivated me to create a new org called Minicube CI. And this actually is a real world example with a getups model that has example of Minicube in all of these clouds in Proud, Google Cloud Build, GitHub Action, Azure Pipeline, Travis CI, Circle of CI and GitLab. Minicube is really well suited to be used in the CI, especially with the non-driver, which does not need any virtualization at all. It's just straight on the CI machine that you have. So, but if you want to see an example of using Minicube in any of the CI, you could check out this org. Now I want to go over 20 pro tips for Minicube. I will go over them very quickly. And I apologize for speaking fast. And I know it's the last talk of the day. So you find out running out of caffeine everybody, including myself. But I'll go over this 20 tips that I've gathered that I have not actually seen many users use that, but it's possible. You could copy a file into Minicube using Minicube CP command. It's pretty neat. And actually, you can copy between Minicube nodes. The second one is an example of multi-node. You're copying a file called ATXT to the second node of a multi-node cluster. And you say which directory you want to copy that file up to. For more information, you can check out the documentation. There's another way to copy files to Minicube. And this one is very hidden. We don't talk about it that much. And the Minicube home folder is in your home folder.minicube. There is a folder called files. Anything you put there will actually be copied to Minicube on every Minicube start. This one requires a Minicube start. But that's why you have to run Minicube start one more time to get this affected. Another thing I've seen people not use this feature at all is like CNI. They're not even aware of it. And you could try the same Minicube with Cilium CNI using Minicube start. Or if there's a CNI out there that we do not support yet, we support five, six of them. You could pass the YAML file passed to the CNI and it will just install that CNI. And we do the CNI in a specific order that the core DNS will be configured correctly. This is another one, specifying a different container runtime. Minicube start container runtime cryo. One caveat to this, if you want to use cryo, you want to use Minicube Podman Env instead of Minicube Docker Env. Because cryo goes well with podman. And if you want to build an image against cryo, you could use podman. Another one is Minicube add-on list. We have tens of add-ons and then some of them are maintained by Google, some of them are by third parties, some of them by Kubernetes. You can give them a try. But this is an interesting one. Let's say any of these add-ons, you want to use a different image for it. Let's say you don't want to wait for Minicube to bump the Helm's image. You could just say Minicube add-ons enable dash dash images and then provide the image that you want to override to that add-on. This is an interesting tip for myself. There's another trick that you could use. If Minicube has flags called memory and CPU that you could specify the memory and CPU, you could actually pass the word max and it will use the maximum CPU and maximum memory that you could possibly get out of your system. By default, Minicube tries to get a sane amount of memory and CPU based on what your system is. We auto-select it. The better system you have, you'll get the better chunk of it up to a maximum. There's another flag, Minicube dash dash user. I love this flag. We have started writing an audit JSON to Minicube blogs. If you actually run Minicube blogs, you'll see audit table. You'll see what user ran what command on Minicube at what time and how long it took. This dash dash user flag is amazing. I think if you're sharing a cluster with different tools, if you have a few tools that are all sharing the Minicube cluster, you could see who started the cluster, who stopped it, who deleted it, who upgraded the Kubernetes version of it, who applied a different CNI on it, so you can see the flow of the work. If you are sharing a cluster, I strongly suggest adding the dash dash user to all of the commands that you use for Minicube. Minicube starts, stops, anything really. That would be helping with the auditing later. We have a new trick for Minicube blogs. In old times, when something was wrong in Minicube, if you had talked to us in GitHub issues, you would ask you to give us this file, that file, this blog, this log, this one, this one. It was five, six different things you had to paste for us or find for us. No longer is that the case. If you run this command Minicube logs dash dash file and whatever file you want, it will collect all the different logs from different places, from different inside and outside Minicube, and it will put it all in one file. This is an interesting way to create a GitHub issue. There are other pro tips that I want you guys to try. If you want to be a pro Minicube user, there's eight ways of building images with Minicube, and it's on our website. So give it a try. There is another tool that I think many people do not know about it. It's called Minicube Cube CTL command. So if you have not installed Cube CTL, you could actually use Minicube's Cube CTL. You can say Minicube Cube CTL dash dash gets parts. You do not have to install Cube CTL. But there's another trick that I was amazed by the contributor who contributed to Minicube. I was like, oh, this is pretty cool. If you actually rename the Minicube's binary and call it Cube CTL, the Minicube binary will no longer act like Minicube binary. It will act like Cube CTL. So this is an interesting thing, because you do not need to download both Minicube and Cube CTL anymore. You can just download Minicube, rename it, call it Cube CTL. It will be Cube CTL. So another trick, another pro tip. Another pro feature. I'm curious, anybody ever used Minicube PaaS? A show of hands? Nobody? Okay. This is a very cool feature that nobody has used. So you can actually, when we were doing a lot of analysis of what taking Minicube's CPU usage, API server of Kubernetes is a beast. It takes CPU. And do you need Kubernetes API server if you're a local developer? Do you? You need it sometimes. You need it when you apply your .yaml file, but after that you don't need it. Your app is running. If you pause the Kubernetes API server, your app will still be running in the PaaS. So PaaS Minicube, whenever you don't want it, it will pause only the Kubernetes API server. Your app will be still running and it will save a lot of battery if you're in a coffee shop, you don't have a charger. I mean, if you pause, but still your app will be running inside the Kubernetes cluster. We even have something better called AutopaS. In the previous one, if you paused it and you want to apply another app to your Kubernetes cluster, you had to do Minicube on PaaS. What if Minicube would do that for you? Like each time you apply a new .yaml file, it will unpause itself. And each time that you're not using the cluster, it will pause itself. You have an add-on called AutopaS. This is a dummy diagram that I draw really. I'm not very proud of what I draw. Sorry, but this is how it works. We have a transparent reverse proxy that takes care of AutopaS in Minicube. But if you want to give this a try, Minicube add-ons enable AutopaS, a pro tip. Another pro tip, we have a new driver that I'm pretty sure nobody uses. SSH driver. Anybody use SSH driver? Okay, half of the hands went up, but it went down immediately. Okay. So this is a way you can install Kubernetes on a remote SSH. Or if you have access to a remote machine, you can install Minicube on that remote machine for me. All you have to do is just give us the IP. You'll go SSH into that. Of course, you should have SSH access to it. And then we'll just strap a Kubernetes inside there for you. Another pro tip, you can SSH to the Minicube cluster itself using Minicube SSH command. And if you want to only run one command and be done with it, not go inside. Minicube SSH dash dash, whatever the command it is. Let's say pwd. This is another one. You would be surprised that this is one of the features that people asked us to implement. And this is called schedule stop. What does it do? If you say Minicube stop, schedule five minutes, Minicube will stop itself in five minutes. Why people asked for this? Well, people use Minicube embedded users like in IDEs. So some people say close their ID, but they don't want to wait for it. They force kill it. And that don't give the ID to stop Minicube. It's enough time for a stop Minicube. So this basically says, if I don't hear anything from you, I'll stop myself in five minutes. So in that use case, the IDE was every three minutes was scheduling another Minicube stop for five minutes. So it's basically refreshing it. So this is a way to schedule Minicube to stop. Another new feature of Minicube that people probably don't know about it is output JSON. So you can actually make Minicube talk to you in JSON instead of emojis and texts. And this is also used for embedded use. The format for JSON is actually the standard CNC of cloud events formats. The mount command, if you want to be a pro user, try the mount command. What is mount command good for? Mount command is good for if you want to have persistent data outside Minicube. So if you want to delete your Minicube cluster, but you want to keep the pods data somewhere on your own machine, you can mount a folder from your Mac or your Windows into the pods. And then you will have real persistent data. This is a pretty nifty feature, but I have not seen people use it that much. Because I don't see that. Sometimes I see GitHub issues on them, but corporate search. This is an important one because I get a lot. So a lot of us work for corporations and corporations have their search, right? Who here has corporate search in their company? Yeah, a lot of us. Yeah, and corporate search are very annoying because you want to curl Google. It does not curl Google because I need the search. So how do you add your corporate search to Minicube search? So basically copy it to this folder and Minicube will take care of it. Basically, we want to copy it to this folder and then run Minicube search one more time. So Minicube copies those search into the chain of the search and Kubernetes can talk to the outside world using your corporate search. Another tip. You have two more tips left and I am running out of time. GCP off is a new add-on that we have.  You had to create the secret, apply the secret. It was such a pain. So we developed this add-on called GCP off that automatically gets the credentials from your laptop and puts it to every pod inside your cluster. So it will automatically have access to GCP just like your own laptop has. There is another pro tip. If you do not want a specific pod to get that secret, just apply this label to it. GCP off keeps secret and it will not get the secret. And there is a link for more information on that. Another pro tip. We have two more left. Delete on failure. So Minicube philosophy from the beginning has been be backward compatible and do not delete people's data. So if you start Minicube and we crash halfway, a lot of the times deleting Minicube and starting it again just works. Sometimes it's just a virtual stitch in hyperbill gets stuck.  If you want Minicube, allow Minicube to delete on itself and try again.  But by default, we do not do that because you want to respect your cluster if you don't want to delete it. If maybe you have something interesting in there.  Minicube I think is one of the only local Kubernetes that has direct IP access to the load balancer in the VM drivers, not in Docker drivers. So Docker has its own limitation. And very many more, we have three interesting links Minicube tutorials Minicube handbook and Minicube FAQ check them out. Now back to Docker. Docker has had so much news past year. Okay. The recent news is they are going to be a paid tool for non Linux operating systems. And but they will be free and open for the Linux and open source users. And there's some blog posts on that in read. This is a took a screenshot of the Minicube surveys before I come to the coupon. So it's like why you use Minicube is a Docker desktop going away looking for dust of Docker desktop alternative because I didn't want to be tied to Docker desktop bundle specially they were forcing updates. I need OSS alternative for Docker desktop as a replacement for Docker desktop. This is like people are flying us with messages on, can you be a replacement for Docker desktop? I mean, we are, we are a local development Kubernetes tool we are not meant for that, but we can be. So this is how there are two ways to use Minicube as a Docker desktop replacement. One is using the Docker and method. What does that mean? You can install Docker CLI you can using brew or whatever, but do not install the Docker desktop or quit Docker desktop or exit it. And then use the Minicube Docker and if you evolve the Minicube Docker and your terminal will be pointing to the Docker inside Minicube and Minicube is a Linux box which means it's always going to be free as Docker claims. So, and then your Docker CLI if these do Docker PS or Docker belt is actually talking to the Minicubes Docker is no longer talking to the Docker desktop, or there's no Docker desktop in this case. So you could easily actually replace Docker desktop with Minicube. There's one method one. There's a second method. We introduced a new command in Minicube called Minicube image build Minicube image, which has many, many sub commands like image, build image load image delete image list. There are many sub commands for a Minicube image command, but you could basically build your images using Minicube without Docker at all. You do not even need to have Docker CLI installed. You could just say Minicube image build dash T and then pass to your Docker file. Basically the same syntax with Docker build. And underneath we are using built kits. And so your image will be inside Minicube. This is like a more Minicube native method. The other one is like you're pointing to the mean, the Docker inside Minicube, which either way it works. So there are two methods that a lot of people ask and I hope in this conference, I answered all of these users questions with these two methods. And if I didn't answer it correctly, hit me up on Slack. I'll make a better or more clear instruction. There are some lessons I've learned in Minicube in the past three years of being a maintainer. We've worked with hundreds of contributors. We have had 675 contributors and many of them are very active. There was a time that I was looking at the metrics. There are more new contributors to Minicube than Kubernetes and they're more active developers to Minicube than Kubernetes itself. And this was based on the culture that people before me built it and I tried to preserve it. Thomas Strumberg did a great job in doing this and I followed his lead. Like being inclusive in action. Minicube tries to be as inclusive as possible. We try to have support different languages and we try to have our GitHub issues welcoming so people can talk to us. And we are in a very unique place that a lot of people who try Kubernetes, they come to Minicube for the first time. Some of them are not very technical, but they are very interested to be technical. So it's like a very interesting energy. Another thing that I learned in this past few years was recognizing the contributors and we developed actually tools to recognize the people who do any sort of contribution. It didn't try helping in GitHub issues, responding that. And then I'll show you an example of that. And then the very one is like scheduling short one on one meetings with the contributors helped a lot in energizing these amazing Kubernetes. And also inviting to the Minicube exclusive meetings. We have two Minicube exclusive meetings. It's inviting you guys to that has been a big part of our community management. Here is one of the tools that we developed called pull sheets. Basically, each time you release Minicube in the release notes, we put a link to the charts and on who did what sort of help in what category in Minicube. And if you're not a technical person, but you want to answer people's questions, you get your name recognized in this leaderboard is going to be on Minicube website forever. So we try to recognize contributions. Another maintainer lessons that I have learned is embracing the human part of the softwares. This slide was very important for me and I wish my talk was title differences I could have dedicated the whole talk to this. I'm so passionate about this one, but I could only fit it in one slide and throw it very quickly. What I've learned that some of the stereotypes about software engineers might be not too wrong. There's some, our profession attracts different type of personality and very neurodiverse personalities people with OCPD ADHD cluster C and working with these people learning them on unleashes the power of maintaining a big project. If you learn that some people get obsessed on something and they cannot let it go. That person could be amazing if you want order in 1.5 million lines of code. But you also want to learn what is that strong part of this person, what is the weakness of this person or another type of person. He might miss out paying attention to the biggest thing, but has the most creative mind, and he also need that type of person. Or you have the cluster C type of person who worries all the time. If you want to implement anything, worries all the time about the security implications of this. And the art of this is how we balance all of this. What is the budget that we have? What is the budget for security? What is the budget for creativity and what is the budget for order? It takes, I wish I could have more time to talk about this. There are other talks in KubeCon that they touched this topic a lot, but I really learned a lot in the past three years. Learning the humans around you goes a long way to maintain a healthy project. Once you learn your humans, once you learn your contributors, you know what type of health they might need. Some need assurance, some need keeping on track, some need getting started. Another lesson that I learned is don't take anyone for granted. Some people come to these open source projects to take a break from their day jobs. The worst thing you could do to them is like take them for granted that you're, yeah, you're supposed to do this. Not taking anyone for granted also is a lesson that I've learned. And also another lesson is do not burn out. This is another lesson that I have seen a lot of people in open source. They come work really hard for two years and they burn out. There is actually a good talk in this talk, this KubeCon schedule. I recommend watching it on YouTube. Check out a vulnerable tail up burnout by Julia Simon. This is an important lesson that I learned in the past three years of being in Minikube. Another lesson that as a Minikube maintainer I learned was like learning when to say no. And that was very essential for this old, big project to keep going. One is the spam contributions. I don't know if you guys have seen any spam contributions. People literally write bots to make contributions to projects. Another thing to say no to is a promotion-driven development. There is an amazing Twitter discussion, promotion-driven development. People write codes just to get promoted and you could just smell it. And it ruins a project's future. And I have learned to say no to that. Another thing to say no to that is hard to maintain code. Those who are harder to maintain code does amazing things. It makes the project so complex that only that person could maintain that. Of course, do not emerge or accept any contribution you do not fully understand. There are some special interest people. I have seen that people with some special interest come to your project. They want to try to get this into their project. That's another place to say no. Another place to say no is potential security liability. I have seen a few times people wanted me to add a future that I saw potential security vulnerability. This is a third-party image in this code who can guarantee the next five years this image is going to have the same integrity as today. This project has been five years. This is another place to say hard no even though it adds a feature. And also another place to add hard no is when somebody adds a new feature without integration test. Hard no. This is amazing lessons I have learned by mistakes or by others. Another thing that I have learned is guarding against your own bias. Unconscious bias is unconscious. It means you don't know you have it. And there is at least seven of them that I strongly recommend. Take a Wikipedia page and read about it and put that in your mindset. Another main theory lesson is GitHub issues is an amazing source of information for future work and improvements. When I look at the GitHub issues, I see that the place that I learned from the users and when I am doing PR reviews is where the users learn from me. So they're two-way communications. But GitHub issue is where I am supposed to learn from the users. And for that reason, we actually developed a tool to triage the GitHub issues. This is called triage party. It's a multiplayer game that actually a few other CNCF projects are using it. And we started at Minikube, the other projects are doing it. And basically this helps you to triage the issues more effectively using a crowd sourcing technique. And there's different categories of triaging. For example, let's say somebody creates an issue in Minikube and say, oh, there's this problem with this and I asked them for more information. And then two weeks later, they answer with more information. But that gets lost in 500 issues in Minikube repo. Wouldn't it be nice that a tool would tell me that the person who you asked for more information now has more information. And that would be in a different category. That's one thing that we did in Minikube. Minikube, another interesting that we did is we translated Minikube to multiple languages and Minikube now speaks your language. So if you want to add your own language to Minikube, it's super easy. It's a JSON file. Just translate the JSON to your own language. Currently, we have French, German, Spanish, Chinese, French and Japanese and Korean and Polish. Another thing I like to touch in this talk is the Minikube integration test. There's a challenge in Minikube integration test. And the challenge it is we support many, many platforms and many, many runtimes and many, many drivers. And we also have legacy features that we do not want to break. Five years of user-based features that if we break them, we break somebody. So those are the challenges. And we have different types of testing. Unit testing, integration testing, Kubernetes performance test, pressure test and translation test. Currently, I do not know any other projects in the CNCF world that has as diverse testing environment as Minikube. We get tested in GCP, Azure, AWS for arms 64, Equinex, Bear Metal, Mac Studio, which are basically physical Mac machines and GitHub actions. And also we have Alibaba in progress. And I would say this is the most powerful part of Minikube that we get tested in many, many locations and in many different drivers and runtime combinations. Another big challenge for Minikube was flaky tests. We have many, many tests, hundreds of tests, and in a PR you would see a failure and the failure would say this test is failing. So how would I know if this is a real failure that is caused from this PR, or how do I know if this is from a flake test? So we actually built a tool that measures the flakiness of a test and comments on the PR and tells you the flakiness. And that's also in our website. You could check it out, the charts for Minikube flake based. And this is based on a tool called Gopuk. Gopuk, we built a tool for Golang that converts the integration test to HTML. But this has helped us to make the PR reviews much faster. You can see a test is a flake or not very quickly. Another thing that we have done in Minikube, we have created a Minikube bot that makes a lot of the PRs for us that we used to do by ourselves. Like bumping the Golang, bumping the Kubernetes version, bumping this, bumping that. All of that is done by a robot now. We don't have too much time. I think we actually ran out of time, I believe, and I'm very amazed that you guys stayed because I didn't pay attention that we ran out of time. But if you want, you can follow Minikube's Twitter. We have a Minikube bot called Minikube dev that automatically pushes updates to Twitter whenever there's a new Minikube release. So follow Minikube bots. And for future, we're going to have VM driver for ARM64. We have ARM64 support for Docker driver, but not for VM driver yet. And we also have our plans for maybe unifying the ISO and the container based image. So with that, thank you very much for staying. And I'll stay for if you have questions, I'll be more than happy. And sorry for running out of time.


Welcome to the CTS Learning Series Chapter 4, Data Model Conformance Verification. Video 3, Verification of the USM Using the CTS GUI. In this video, we will understand the Data Model Conformance Testing Workflow, use the CTS GUI to successfully test a USM, use the CTS GUI to unsuccessfully test a USM, and understand how to read and recover from Data Model Conformance Testing Errors. Testing a USM consists of configuring the Data Model tab in the Project Configuration Builder. To learn more about the Project Configuration Builder and the possible options to configure a Project Configuration File, please refer to Chapter 3. In the Data Model tab, we have the option to enter the location of a shared Data Model and the UOP Supplied Model. The shared Data Model may be downloaded at the shown location. The Data Model that we want to download is SDM version 3.1.4. I have already downloaded the SDM onto my machine. In the CTS, let's select the location of the SDM that I downloaded. Next, let's select the location of the USM. After the USM is selected, the USM's path will be shown in the CTS. Additionally, the CTS will automatically populate the UOP drop-down menu, where a UOP may be selected. Depending on the UOP selected, the associated views for that UOP will be listed in the bottom of the interface. To test for Data Model Conformance, select the Top Rate button. The Run Segment Conformance Test Interface opens. We are able to see the progress of the Conformance Test Report being shown in the Progress Bar. The Conformance Test Report's output location will be shown. The report is generated as a PDF file. Let's open it now. The Conformance Test Report lists a title page, immediately showing the name of the project and the Conformance Test Results. In our case, we passed Conformance Testing. Under the Conformance Test Result, we see the version of the face tactical standard we tested against, followed by a timestamp of when the Conformance Test Report was created. Next, a table of contents has been created. The table of contents list entries are clickable and lead to the corresponding page in the report. Then, the project configuration is listed. This is how the project configuration is generated as the PCFG. The TCFG would then be listed, but since we have only tested for data model conformance, we do not have a tool gene configuration file. Finally, the Conformance Test Report lists the Conformance Test Results in detail. Each test is listed with a passing or failing result noted. The data model conformance tests do not list a test log as they were passed successfully, according to the DMVT. Let's create a failing result by using a non-conformant USM. As you can see, this USM has major syntactical errors. Let's replace the successful USM with the USM containing the syntactical errors. The data model will be loaded into the CTS and allow for us to test the data model for conformance once again. When the test completes, we can see we have a failing result for our Conformance Test. For more information about the requirements to make data models conformant, please refer to the FACE technical standard. This error in particular refers to the fact that the official SDM must be the same SDM contained in the USM. To fix this error, it is important to make sure the provided SDM is the same as the official SDM. Thank you for watching. In the next video, entitled Verification of the USM Using the Command Line, we will explore how to invoke a data model conformance test from the command line, understand where the DMVT and DIG are located, and demonstrate a successful and failing data model conformance test.


and let's welcome Ray Ming to be here right. Okay, Ray Ming. Hello, hey everyone. Thanks Chloe for having me. Great to be here and chatting with you guys and to be sharing my journey and also my own 2 cents on Tesla or any other investing topics that we may be chatting about. Fantastic, thank you so much Ray Ming for taking up your time as well and because of the sudden technical difficulty we have to suddenly switch to Zoom but regardless, I think Zoom is even better because you literally get to ask Ray Ming question directly. Now, maybe Ray Ming, we can start off by letting our audience know a little bit more about you and letting me know a little bit more about you as well. Can you share with me a little bit about your investing journey, how you get started and how you manage to achieve where you are today to be like... I've been investing about 10 to 12 years now but of course as a full-time investor maybe only the last maybe 4-5 years suddenly went from retail investor to full-time investor it was a slow transition no one goes from suddenly being employed to a full-time investor overnight no one quit their job it's more like a semi-transition now so back then when I was in uni my path was a bit different by day I was a uni student and by night I was an online poker player so I was doing that for part-time income and I was pretty good at making money online so I made quite a my first spot of goal and from there on I started to learn how to invest simply because I got this money that I made from my part-time income as a uni student so my path was quite a bit different from my peers so I started uni and finance economics and finance and that gave me a decent foundation or background even among my uni peers we talked about investing which local company we're going to buy and all that so I think that helps also after I graduated I continued to play poker and I built up a sizeable portfolio and because of that there's a lot of ups and downs in investing so I slowly hone my skills and of course back then when I was young and I thought and of course I also got burned speculating on penny stocks so I also have my own shares of battle scars but I think it's quite interesting and even full journey so far I see so if you don't mind can you share with us for the past 4 years how has your life become I think a lot of people cannot envision how is it like to be a full time what kind of life are you living so I was living the work from home life before it was popular before Covid so in a way every day I wake up I will look at my stocks and look at what are the latest news regarding my company so for example I'm heavily concentrated in Tesla I'll be looking at Tesla news specifically on the company not so much on what the mainstream media is saying and also look specifically like for example I would say Tesla Investors Tesla Owners I would get a bit more insights into the day to day of the companies in my portfolio then I will also be reading learning, watching investing podcast YouTube channels like yours and also reading up so I read quite widely investing and non-investing topics also so for example right now I'm reading this book do you know it by Christopher Mayer he is the author of the 100 baggers I think it's quite a popular investing books non-investing right now I'm reading this book by John D Rockefeller he is one of the richest so he wrote this it's more of a compilation of 38 letters to his son so I thought it was quite a good so I rented out the kind of book so I spent a lot of time reading so to be honest it's quite a boring lifestyle but it's so to me because I'm lazy I don't want to go out sometimes even nowadays we are going to go out once or twice to meet up with some of my friends or like Tesla other Tesla Investors just to chit chat and also at the same time I also want to make sure I am not just in my own space I want to always meet up especially for example if I hear in other investors who have a bearish view on Tesla I would love to meet up with them because they will play a devil's advocate to my own PC Wow, I think later on we can have a little bit of debate on Tesla and I think it's very important what you say you constantly how many hours do you mind sharing how many hours I never really it really depends but maybe 3-4 hours a day should have not one stretch so I wake up, drink coffee create my messages maybe I'll read 1-2 hours so usually when I first wake up I'm more fresh so I'll read new content where it's a bit more deep work where I need to absorb like children books just because I have interest in it but it might not be investing related and I think it's also very important to read non-investing related books because at the end of the day it's like read boundary disciplinary and that's how along the way I think when I first started investing is just investing maybe financial or having a bit of a counting background might help but how does learning about history, philosophy, psychology how does that actually impact investing but actually it does for example right now market it goes in cycles they are great at the top and they are fair and all that so all these are just basic psychology or basic understanding on human psychology it does help when once enter the market because recently I'm also thinking about reading the history books because that's what Charlie Munger say, don't focus on forecast focus on what happen in the history then learn investing the best way so do you have any books to recommend in terms of stock market history and human psychology? I think one book by Ray Dalio the changing world or something like that I think it's quite it's quite a deep read also but I think there's a youtube version of it he condense 40 minutes his whole book into 40 minutes on his channel you can find it online on youtube so it shares cycle goals she talk about the bigger cycle so the context is bigger cycles every dynasty will have its ups and downs before the US was the most powerful there was a British and before the British there was the Dutch and so on and no one country or empire will last more than a few hundred years and if you look at so this is based on history and if we extrapolate the future maybe the US has been dominant for the last hundred years and they have been showing signs of cracks and declines so everyone knows about China and all this so he did share what the indicators to spot where when the decline is so along the decline is not exactly overnight or even a few years but it could stretch over a few decades so he shared specific metrics where we can see where along the curve are we so there's one and our book that I read is guns germs and steel but even for me this is quite a cheap book also you know the world is where it is right now like how the European powers how do they get ahead like the European colonies compared to let's say like South America or the South America or the South Africa countries if I'm not wrong, I think this book is recommended by Charlie Monberg so these are very good books are one have time to read okay I think later on we can also go back to talking about US and China like how do you actually diversify in case anything goes wrong we can talk about that later but in the meantime at that time I was also very curious what gave you the courage to quit your full-time job it wasn't bad context was I guess based on what I was doing even back in uni, playing online poker and all that I was also very comfortable going off the beaten path traveling to a new country I don't like to take the just going the last travel route on that note, I don't have a pressure or a social pressure everyone is doing this, I should follow the herd why am I doing this real thing I never thought of it that way but more I thought about am I comfortable doing it and I guess once my portfolio reach a certain size whereby you just compound and then you realize I only put 80-20 where I only put 20% of my time and effort and hit space into let's say my investing portfolio but that's 80% of my results whereas 80% of my time is maybe working for a company per se but my salary is only let's say 100k and if your portfolio can give you more returns than that and then that begs the question maybe you maybe not full time yet but maybe a semi full time so some of my friends they're also semi full time investors whereby they kind of reach a certain middle management or whatever and then they don't want to increase their workload or maybe they want to reduce their time spent and I don't want to be on your payroll anymore but I don't mind come back on what kind of consultations for my expertise like that per project basis that free some of their time to do what they want explore their passions when they are in their 30s 40s or spend time with your family and kids it definitely is not an overnight kind of success it took many years investing like over 10 more than 10 years ago if investors over here they want to also have this goal to eventually become a full time investor what do you think is the realistic timeframe to be able to achieve this goal well it really depends on individuals I mean it's a very wide spectrum but I would say if one is asking that question hey should I take the leap of faith or not lah to be a full time not then probably that person he or she is not ready that's a good one to ask then probably you know I'm not ready yet lah that's why I try to marry this girl then probably ya but when you're ready everything will feel online your heart, your brain it just feels right it feels like right move to make but if there's a conflict where you need to it maybe I should maybe I should not there's a conflict within you then probably not ready yet no hurry no hurry already an investor right full time investor just the word full time you quit your job like why do you need to if you're having a good salary you probably climb up to a sizable and then your corporate I assume one is coming out of the corporate ladder and you're making sizable then why need to cut off that income stream like just continue use that money to like save up well keep your expenses low and build up your portfolio lah ya so back to your question like it depends on how one invests like let's say let's say example lah let's keep number simple let's say one take home 5k and then you keep expenses low maybe you can invest 2 or 3k it depends on how there's a bit of luck involved also you hit a few good bull runs like maybe just invest in tesla or even general bull market then x or 5x over the next 3 years quite possible lah then your 100k portfolio might become half a million already or 300k ya that might help but there's a bit of luck factor involved also ya but maybe over the next 3 years we could have a severe downturn or bearables involved you know how much money you are pumping in every month your dollar cost averaging in and Mr market is it kind to you that kind of thing based on how it's performing lah ya so coming back to this question of like the market can be very volatile and all this right so when you are investing full time do you actually draw out cash from your portfolio if not how do you sustain your lifestyle so i always keep although i full time invest i also have a few other income stream that i can cover my expenses so i don't really have to re-draw my capital much per se but i always try to keep at least 2.5 years of operating expenses lah as a backup if i can sustain so i always think worst case scenario like army style worst thing that can happen and prep for it lah so maybe the market over the next 2 years might be down, Tesla might be down for whatever reason i need to have the time to recover to let the stock price sometimes stock price can say stay suppressed for prolonged period ya so i need to have that time and i cannot be like sell my stocks at the worst possible time because i need it to buy prep or whatsoever ya so having that buffer i think is very it is a good move to have lah which is why again beg your question i wouldn't recommend anyone quitting their full time job to be a full time investment because mentally you suddenly lost your main income stream you will be very suddenly you care more about the market now ya you don't care because you are still taking home 5k, 10k, every month day to day livelihood is not affected but when you go full time and you go full time investor then your stress 10x also ya ya how do you overcome it how do you deal with it for the past 3-4 years i guess i was lucky also when i sold him in this transition miss market was very kind my portfolio was green all the way every year, he just compounded 20-30% year on year so i didn't have a severe draw down where i have to really test whether i can withstand 2-3 years or suppress prices and all that i guess did play a part in my journey as an investor la ya but if i were to be talking about this and giving advice i would recommend to arrow on the caution side even when you think you are already full time investor there isn't harm to be a bit more cautious and just give yourself another 2-3 years let's say you are making 80k a year or 35 year old guy or girl 80k a year 3 years there maybe 240k you need to take ya and to be honest based on what i see most of them they have something on the side first they keep themselves entertained and also as a part time income stream so most of them will do consultancy work for their previous companies and also a tip if one want to become full time investor then it does make sense that one network or no more full time investor friends because you will then understand their lifestyle for example if i'm a Tesla investor i will naturally want to hang out with more Tesla investors ya because we have a similar house but as a aspiring full time investor you want to network with people who have been there who are 2-3 years ahead of you in the curve and you want to check with them what are their challenges, struggles their first year they went full time what was their most stressful period so that will give you a crack first time i go to uni then i want to talk to my seniors ask them your first year what are the main challenges you face same i think that analogic translate well to everything but specifically investing so if the people who hang out with all not full time investors then it's very hard for you to make the transition ya because you don't see it as a normal thing but once you start networking people basically in Singapore there's a lot of people who are just living off their portfolio their equity portfolio per se then the more you hang out with them, the more you realise that this is not just doable or possible but actually i can do it on that because i'm just like them they're also not very smart because i know what i know but they're also average people but if they can do it, i also can do it it's like the environment shape you and environment means to see the possibility ya you are the average of the 6% you hang out with so like if your 6% your 6 most favourite friends don't have a full time investor then you need to go out of your way to change that ya that's right and i can just a quick recap what we said just now so how do you know whether are you ready if you're asking yourself this question most likely you're not ready and the second thing is you can see Ray Ming really think the worst case scenario which is what Charlie Munger always think invert what can be the worst thing that can happen then that's why if are you prepared for that at least as 2 years even 2.5 years of operating expenses so that you do not have to be going through this kind of emotion struggle when a market comes down or when it stops just to buy bread and also have different income so that you don't need to liquidate the portfolio for no reason you still have income coming in and at the same time have an environment of full time investor network that will really give you a better sense of what is it like to be a full time investor fantastic now my next question is like i understand talking about Tesla just now you did mention that you are very bullish on Tesla if you don't like sharing what is the percentage allocation of Tesla inside your portfolio right now about 65% to 70% i see so 2.5 2.5 do you build up this portfolio do you build up this allocation along the years or how did it go it didn't like overnight go to 70% it started at like maybe started at 2% even as when my very first like over the last few years as i learn more about Tesla my conversion level increase also they have like Tesla Elon Musk they have shown that they can actually execute upon what they promised to do so since they hit their KPS so okay and i trust level increase and also i feel like right now in the market they are right now in the future growth so i feel like this opportunity is good let's say you got this punch card you can only have 20 companies i feel like Tesla is one of the 20 companies that i should have generational company that i should have in my portfolio so the budget obviously build up over time i won't recommend anyone jumping in for example using swimming as analogy become an olympic swimmer overnight everyone start from the baby pool ya so so they build up the position yes so where was the first time you purchase your 2% about 2017-2018 if i remember correctly okay okay i see that was like a few years before covid and then very few people talk about Tesla my initial was actually just to like i bought like 10 shares back then Tesla was like very low so 10 shares is and i got in just to so i have this habit once it's in my portfolio then i will keep an eye on it on the news and all that and i'm not sure we are going off topic but back then i was very blessed to back then ken he was overseas and then this investors group and then i think he went around and say let's share your top 3 companies each so we just go one round like that and then back then was like this mastercard and i think google and i said he is like one of his top 3 was Tesla this was i think back in 2017-2018 ya back then like although i know the company but i don't know much about it and so much is like this weirdo and all that but then when he said that but i have a lot of respect for ken he is a very good teacher and mentor so like obviously he know something or Tesla that i do not know so because on that and then i say okay that's interesting let me reason that was that i will say the start of my journey with Tesla i see so like right now like understand like Tesla has actually run up a lot i personally think that even though like Elon Musk has been executing very well whatever he say he really deliver no doubt on that but do you think that having a 65% allocation into one single company is a little bit too risky knowing that you know the future of EV just not too sure can it really come true or not i think this is up to individual to gauge there's two ways to go about when it comes to portfolio location one is diversification you don't have more than 10% or 20% in one company and you are very safe but then you have very safe returns also which is fine, which is what most people want which is the recommended path so i actually don't recommend anyone to have a concentrated position in any companies unless they really want to and they feel comfortable with it and there's another way of looking at it which is like i think going back for China Manga they also say diversification is for idiots so when you diversify it's more to protect your portfolio for oneself so for me i feel based on what i'm saying with Tesla, i feel very okay having a concentrated position of course i grounded i know the risk so the worst case scenario it's like Elon Musk die tomorrow and then the day after he is die he is number 2 die the next day after that kind of thing so we will talk about that having a concentrated portfolio what is buying actionable after that my SOP immediately after it happen army always have SOP when something happen what is the immediate step because at that point of time emotions are high no one have time to think i feel okay but at the same time it's not a path that i recommend for anyone it's a crazy path to be honest i feel i need to have a concentrated position in Tesla sometimes but also there are ways to protect yourself from the downside also so if for example if you have a whole bit of cash just to hold cash on the side so that in case the share price drop at least you are not like for example let's say i could have 60% position in Tesla but i have 20% cash also so it does help to have a bit of buffer can i say that cash is not your 2 to 2.5 years of operating expenses cash in the portfolio sitting there waiting for a very severe undervalue situations for example when Tesla late last year in December it hit $100 plus severely undervalue scenarios it will be a good time to add i'm also very curious at that time we know that the Tesla really went through this world what was your emotion back then when you saw that stock drop to $90 maybe in a period of time it was $90 do you ah that kind of feeling or do you overcome that already i guess 2 to 2.5 years and also because i didn't have such a big swing previously over say the last 5 years and as my portfolio grew my portfolio grew quite significantly so when it dropped back down with Tesla it was like 7 figures and there was the biggest downswing conviction was challenged i think go back to drawing board law and say i think there is definitely a bit of doubt i will question myself and say did i make a wrong other fundamentals deteriorating did i make a wrong move anywhere maybe a bit of second guessing but after i go through the process actually all is normal it's not just Tesla dropping the whole general market dropping because of interest rates so it was a general market systematic pull down but i thought if everything is okay then it's a good time to add i wish i had more cash when it was $100 plus so if you don't mind sharing what are your mental model when it comes to situations like this for example you talk about check list what are those check list that you will look through to make yourself in check be in a downturn where everything is great no one wants to be buying Tesla even at $100 and most people will have a question hey did i make a wrong judgement should i sell so if i'm selling i want to be selling i want to be selling for the right reasons not the wrong reasons and i want to be buying more i want to be buying for the right reasons so selling what are the right reasons for selling for example if i make a wrong judgement if Tesla is not as good as i thought or maybe it is but the fundamentals start to deteriorate so for example let's say the management their decision making is no longer optimized for the long term or whatever culture start to shift fundamentals start to deteriorate and that could be a reason for selling because it is no longer the reason you bought it for initially so that could be a reason second reason is you need the cash for whatever emergency non-investing related your personal life you just need the cash the price you have to sell means you have to sell when the fundamentals are are no longer as good so when that happens usually you want to trim your position so for example when the fundamentals deteriorate it won't suddenly go from great generation company overnight to the worst company in the world so i might still want to hold a position in it but maybe i don't want to have 70% concentrated in it i might want to reduce it to 50% i want to start trimming down my position so i will start to trim so that could be a good reason for selling just like buying you go buy so you can slowly buy and trimming you can also slowly trim that reason for selling is panik selling long i sell because of fear i sell because every day shopping 10% i want to 100$ can you reach 50$ definitely i sell now at 100 i write back 50 that is probably not the right reason to sell so as there is no change downward change in the fundamentals i do not want to be selling i want to be adding i see and i think just now you did mention that the draw down for you was like 7 figure was that right wow that is really interesting i think i do i cannot control mr market how it moves i can control what i do so what i do is try to keep myself sane in that really fearful and stressful time meet up more with tesla owner investors it's cool but we hang out and then we try to play and also tesla investor i realise in general are quite independent in your thinking and so we try to place devil's advocates to whatever is going on to the tc's and then we come to the conclusion that the tc's is still intact in fact it's still if you look at the quarter to quarter the numbers are getting better and better so the share price is going from $400 to $100 but the numbers all the right numbers that we are looking at are going in the opposite direction what does that mean that means people are fearful it's time to be greedy so you buy more but buy whatever you can and don't do stupid things buying on average that kind of thing unnecessary stress so actually investing is simple but it's not easy losing weight is simple simple means the technical know how it less work out more how to make money investing is very simple you might not know how to choose but you can dollar cost average into good ETFs you will get that one it's simple but might not be easy to do sometimes they are external influence there's a lot of news out there your friend tell you don't buy now now it's the worst time recession coming U.S. going to war there will always be a lot of this out there so it's not easy and talking about just now you talk about cash in terms of allocation do you always set certain percentage of cash no i didn't use to do so i always thought if i have cash why not just put it in but i thought that was perhaps one of the mistake i made last year as evolution of the investor i want to be definitely i'm not the best investor i'm always making mistakes i made was that i should be holding some cash so that i can enter because in last year going into that job right i wasn't holding as much cash as i wanted so i didn't get to buy as much as i can during Tesla or when general market was severely discounted i think holding cash also helps so this is the monetary benefit but it does help psychology also when you hold a certain amount of cash and it differs from individual could be 10% 20% it gives you like a psychological margin of safety net because i know that wow i still got 20% billet so i can always market you there to drop i got 20% cash i can enter at any point of time even when i want to and i can slowly deploy this extra cash compared to if i don't have cash i can't control because i'm an out of moves i can only look at mr market and then hold it because i don't have cash there's no moves left for me as an investor so holding cash yes i think is always a good cautious move to have but when you hold cash you must know that this cash is not hold for fun symbolic but when will the time come for me to use it you would really use it you have to use it and i need write that out in advance that means like okay so for example if Tesla drop to x amount price then i will enter 2% of that 20% cash for example so i will have so my actionable have to be planned out in advance before the time come cannot be when you drop ready then i go buy now or not 235 maybe tomorrow then it's very depend on my emotions today so it's a very non-systematic car order mode today i'm not feeling good feeling greedy then it's not objective wow i really love that i can see that you're always very systematic in terms of your planning i think army train you very well it's poker train you very well because i know people who play poker they always think very systematically and they think in bets which bet will give them the optimal ROI the lower probability of losing i actually i actually feel like my poker days does give me a bit of each because poker and investing is very similar and a lot of investors they play like even Charlie Munger or Warren Buffett they might not play poker they play bridge so all these games it puts you in situation where you have to make rich reward decision so you're thinking based on probabilistic based on there's no 100% a certainty you always have to make decision based on there's a random like uncertainty involved so i guess it does help and to like for example poker when you have good cards then you want to bet big but when you have bad cards then maybe you bet small so for example if i see a generational company so i want to be betting big no point i put 5% portfolio okay like 10x i assume money but then it's like where's the opportunity so sizing interesting and if you right now what you learn from last year that you think that cash you could have at least as like more so one more thing we talk about just now was like how can a cash is one of the way to protect yourself against the draw down against volatility and another way to protect our ignorance is to have a portfolio right so what's your view on like we've for example Ray Dalim he talk about the rise and fall of different nations different power and with China like seems to be on the rise while US going down do you personally think that it's wise to diversify in other countries i think it's okay if there is a good opportunity so like a very a conservative portfolio can have i know equities in US equities like your blue chips US blue chips and then some China equities like Alibaba, some local like your STI even by DBS bank no one will fault you for lock in 6% dividend or whatsoever so diversified portfolio i think it's okay you feel comfortable with it la for me to be honest i am not at the level where i know how that like the changing world or the how does that play out to the markets like over let's say a next 5-10 years time frame it would be minimal there's high probability that based on my estimate there's a high probability that impact is minimal or there's like zero impact at all you know like this could be 50 years down the line for all we know maybe it's talking about cycles so how does that impact i do not know if one does not feel comfortable having too much allocation in US companies then it's okay to lower that percentage i feel like i guess most people are thinking worst case scenario US, China go to world war 3 then the stock market go to shit as long as for however long world war 3 takes so when you base again the probability of that happening so there's worst case here the probability of that happening over the next 5-10 years might be 0.001% whatever percentage you dimit la so is that a big enough percentage to worry about that it kind of remind me of what i read this morning about the joys of compounding about Gautam bay and talk about great investors, Warren Buffet they don't care about interest rate whatsoever what they truly focus on is the fundamental of the business still is good then just hold on to it i subscribe to this school of thought so to translate your words don't care about the macro, interest rate how the recession is doing right now or which stage of the recession but care more about the companies that you are invested in or want to invest in so that is where i feel like my thesis on Tesla makes a lot of sense like this Tesla there's a lot of qualitative traits for few of the good traits of a good company so as long as all the checklists of that is checked then who cares about what is going on there long run a good company they will continue to execute well and the shepherds eventually will have to reflect the outstanding business and if you are really a long-term investor then it might take a while, 3-5 years or however long and if over the next 3 years the shepherds doesn't move north it's actually good because as long as the business keep improving that's your chance just talk about maybe 6 months ago Tesla shepherds was also drop to about 230 right now but in these 6 months the shepherds is the same but the company over the last 2 quarters might have improved quite a bit so all in all i feel just focus specifically on the company fundamentals you won't go that wrong and for most investors out there let's say there's like 100 participants most of them might not have the time because everyone got full time job and after that they still have commitments they might not have the time to do that so one way is go the ETF route execute the funds basket of all this quality companies you can't go too wrong also or hybrid of both so for example you have maybe 30% in SPY 30% in QQQ and then 10% of your own specific individual choosing because you want to have you like to choose your own companies also kept at 10% so it could be Tesla or Palantir or whatever companies you like then maybe another 20% on China companies then there's quite a diversified portfolio already i see for yourself do you also diversify in other asset class apart from equity properties but recently i wait am i lagging or is framing lagging oh i think you just lag a little bit okay yes i do but i will say right now i am quite 90% concentrated in equities other asset classes crypto a bit but more for like a diversification against the fiat currency yeah that's about it so mostly equity because i feel like it's very liquid and it allows me easy to go in and out if there's a need to and i think like some of our participants are also very curious like for Tesla do you trade or you just buy and hold do i trade i think i do a hybrid of both sometimes i do trade in or small so i have like what chicken dinner say but do not touch portfolio and then there's like eG portfolio where i sell cover calls sell puts on them just to keep myself entertained so i think that is very i think it helps psychological because as an investor sometimes if you just buy and hold you do nothing then you sometimes hand eG so you need to have a hand eG allocation you want to trade the hell out of it also can like so for me could be i just pay i look at the chart so sometimes i still i used to trade more than last time no but you know once the trader always the trader so sometimes i see the chart i feel like i got break out i either to the long side or short side i might take a long or short position might not be Tesla might be other companies also because i can trade anything or sometimes i could like if i feel the price is a bit too on the high side like when you reach like 280 support on it when it's a bit like at the 240 support i mean selling puts the shares so i do do that but that's not to say that i recommend you do it feels comfortable for you if having an eG portfolio like helps you to don't touch your main portfolio then why not yeah but the eG portfolio will be a small percentage as compared to your long term holding percentage it's just like your let's say we talk about a diet so you eat clean every day of the week sometimes you're so sensitive you need a cheat day or cheat meal or cheat snack so once you eat ice cream i think it's fine so for me it's like a lot of my cheat meal or cheat location something like that and i think also asking your long positions or does it include i think mainly a shares and then a little bit of a options, sell puts, cover call i do not have that much buy call or dip course because i feel where we are right now the market have run up quite a lot this year i mean it's a recovery, it's a bounce but tech stocks are up like 30% general like we talk about QQQ over the next 6 months there might not be a lot upside so i don't feel there's a need to have like buy cause like right now because it's speculative trade and i'm losing the time they came up with options so like maybe now it's not the time to be like risk on mode now now it's still a time to be defensive accumulating yeah very good and SK is asking do you buy to average the cost like right now like we 65% portfolio inside Tesla when opportunity come you will even consider adding some more i guess for most people if your dollar cost averaging every month you have a plan to do that you can make it systematic so that means you think guess what of the question you buy on every Thursday of the month for example because of the price you just buy there's one if you want to have a bit more TA a bit more technical then you can only buy when it reach like 50MA so you pull back to a certain support level then you buy all at one shot whatever you accumulate then you just keep storing cash until next time it drop back down to the 50MA or the EMA 20 or whatever is your support but you need to set this in advance so you want to keep it as systematic and non-emotional as possible i see so you can do both but it really depends on whichever is more comfortable for you i see and i think okay so Chiwa i think is very interested in your itchy hand portfolio do you use options such as spread or like i don't do vertical stress i don't sell i feel like i'm not a very good vertical spread seller i feel like my age as a vertical spread seller you cap your reach reward is fixed there's no and in the long run unless you have certain age in it for example okay you see a bounce so that's why you're selling a vertical spread and you're selling you're doing a spread so that your margin requirement is cap $5 wide or $10 wide spread okay i think it's fine but i personally don't do it but of course yeah and i think i just want to wrap up this interview with the last question to Raymond like what is after these decades of investing like what's your if you can only have one advice to all the investors out here what will be that advice to help them to become better generic general advice hmm everything very hard to just think of one advice i think continue to keep learning yeah might not be the advice you guys want to hear but the power of commanding not only works for your portfolio like it goes from 4 figure, 5 figure, 6 figure but it also works for your learning so whatever you're investing or reading it stays with you forever this knowledge, this skill set your circle competency is always expanding and it will definitely help you like over the years while i'm learning investing i think it will help me to spot the next Tesla sooner so like i have an age when the next Tesla come along, i am ready compared to maybe 7 years ago where i am not as good so always keep learning wow i think that is very helpful like what you said, knowledge compound and it's like a skill set you'll be better be able to respond and in fact anticipate the next investing wave or whatsoever and i think it's really awesome and if people want to find out more about you and your work where can they go and find you oh i seldom share videos nowadays just more lazy but sometimes i still do like share my thoughts on market updates on Tesla, earnings course i got an investing channel on telegram i think the channel name is invest with Raymin you just search it on telegram i put a link inside the chat it's a t-doc thanks Raymin Invest thanks so much for the sharing and i think Raymin he really put in a lot of thoughts in whatever things that he does so you can see that from his own way of describing his whole thought process you can see that he is a very very thoughtful and systematic investor and if you follow his telegram channel definitely you will understand more about his thought process as well and together with him continue to level out and i also hope Raymin can start posting more so that more people can get to learn from you i best try your best in the meantime for those who have not follow my telegram channel you can also choose to follow me as well t-doc me slash aligato investor so for me i am more general in terms of investing i'm not super 100% bullish on any single company but i think my investing thoughts come from, for example i do a lot of reading in the past i think since one year ago trying to catch up with Raymin i also thought share what i learned today inside my telegram channel so for those who want to learn feel free to follow both of us as well and thank you so much Raymin once again for being here i enjoy my time i enjoy learning from you so much and let's catch up again and thanks everybody for joining us tonight as well for what we guys learned a lot and continue to learn, continue to stay invested and let's have fun in our investing journey never stop learning never stop learning exactly thank you everybody have a good good night thank you guys thanks for joining the session see you


So, in this lecture, we are going to develop expressions for the change in entropy of a fluid across a control volume and develop an expression for the rate of entropy generation in a control volume due to internal irreversibilities. And we will also develop an expression for rate of entropy generation in the universe as a result of this process. Now the starting point for this development is something that we discussed in the previous course. So, in the previous course, we derived this expression for the change in entropy of a system as it undergoes a process. So, basically delta S which is the change in entropy of the system is the sum of two quantities. One or the first quantity is integral 1 to 2 delta q over t. So, this is the entropy transfer term. And the second one is sigma int which is the entropy generation due to internal irreversibilities that is very important. Remember, we are talking about entropy change of a system as it undergoes a process from state 1 to state 2. So, that means the entropy generation is only due to internal irreversibilities. So, basically what this expression says is that entropy change of a system is the sum of entropy change due to transfer of entropy from the surroundings and entropy generation due to internal irreversibilities. Now entropy transfer can be greater than equal to or less than 0 depending upon the direction of heat transfer. So, if we supply heat to the system, then we are supplying entropy, this will cause the entropy of the system to increase. And if you are removing heat from the system, then of course, this will cause the entropy of the system to decrease. If the system is let us say adiabatic, then q is 0 and of course, so there is no entropy transfer to the system. Now, entropy generation is always positive or equal to 0. If the process is free of internal irreversibilities, then sigma int is equal to 0. Otherwise, as a result of internal irreversibilities such as friction, dissipation, mixing and so on, sigma int is positive. So, the net change in entropy of the system is due to entropy transfer and entropy generation due to internal irreversibilities. Now, this expression as it stands is not useful for calculating entropy change of a system, numerical value for entropy change of a system because there is no expression for calculating sigma int. Sigma int is a notion of internal irreversibility. The only thing we know about sigma int is that it is positive or equal to 0. Even this may be very difficult to compute in actual scenarios. So, the usefulness of this expression lies in being able to tell the change in the magnitude, not magnitude, the change in entropy of the system. In other words, from this expression, we will be able to tell whether the entropy of the system is going to increase, decrease or remain the same. Therein lies the usefulness of this expression. The actual calculation of entropy change of a system as we showed in the previous course has to be done using either tedious relations or ideal gases or using tabulated values of entropy for steam and R134A. It was also demonstrated in the previous course that the change in entropy of the universe is equal to change in entropy of the system plus change in entropy of the surroundings because the universe comprises of the system plus the surroundings. So, the change in entropy of the universe is due to change in entropy of the system plus change in entropy of the surroundings and this is equal to sigma. Sigma represents the total entropy generated in the universe due to both internal as well as externally irreversibilities. Note that this does not have a subscript int or ext which would indicate internal or external irreversibilities. This is the entropy generated due to internal and external irreversibilities as the system executes a process. And as we can imagine just like sigma int, sigma is also greater than or equal to 0. It is equal to 0 if there are no internal or external irreversibilities and it is positive in case any one of these irreversibilities is present. I urge you to consult the appropriate lecture in the previous course because there is a detailed discussion of how we actually show this to be greater than or equal to for all possible combinations of internal and external irreversibilities. Now, this quantity as we can imagine is a very, very important quantity because in some sense it actually is a very good performance metric of the process. For instance, if a system executes a process which results in no change in entropy of the universe then one must assume that that is the best possible process. On the other hand, the higher the amount of entropy generated in the universe due to irreversibilities, the less desirable the processes. So, this is an indication or is a performance metric of processes. And in fact, this will be the basis for us to develop an efficiency for any process in the general case which is what we are going to do in the next module in this course. So, we will define what is called a second law efficiency with this idea in mind that if the entropy generated in the universe is 0, it is an ideal process. Otherwise, the more the entropy generated, the less desirable the processes. So, these two are very important. So, what we will do now is try to develop similar expressions for a control volume, one like this for entropy change across a control volume, one like this for the rate of entropy generation in the universe due to a steady flow process, remember or due to a flow process. Remember, since we are dealing with the flow process, we no longer say just entropy generation, we have to talk about rate of entropy generation. So, sigma dot int or sigma dot is what we are interested in and we will try to develop expressions similar to this for the case of a control volume or a flow process also. The starting point for this is the same illustration that we used in the previous course when we derived an expression for the first law applied to a control volume, when we derived the unsteady flow energy equation. So, we have a device which looks like this. So, this is the rectangular box is a device, it has for the sake of simplicity and without any loss of generality, one inlet and one outlet. Fluid enters the device at the rate of mi dot say kg per second and leaves at the rate of me dot me dot kg per second mi dot need not be equal to me dot in the general case. In a particular case, for example, for a steady flow process, we may take mi dot to be equal to me dot, but for the general development, we do not assume mi dot to be equal to me dot. Now, heat is exchanged with the device at the rate of q dot, let us say watts and external work or power is supplied or removed from the device at the rate of Wx dot watts. Now, as we did before, we simply take the boundary of the device to be our control volume. That is the simplest possible definition and that is what we will do. So, this is our control volume. So, what we want to do now is develop an expression for entropy change across the control volume. So, to this end, what we do is in fact, basically what we want to do is start with this expression because this is entropy change for a system. This is entropy change for a system. So, we will start with this expression and then modify it so that we end up with an expression that involves this control volume. Now, for that purpose, we need to identify an appropriate system. So, let us say that we freeze the device at a time instant t. So, at time instant t, we freeze the device and as you can see at this instant, some amount of mass is present inside the control volume and amount of mass equal to delta Mi is just about to enter the control volume. So, we already have some mass inside the control volume and an amount of mass equal to delta Mi is about to enter the control volume. Now, we supply delta Q to the system, an amount of heat. There is a heat interaction to the magnitude of delta Q to the device and there is a work interaction to the magnitude of delta Wx to the device. So, now, we allow the flow process to take place and at time t plus delta t, the system looks like this. Again, there is a certain amount of mass inside the device and now an amount of mass equal to delta Mi is just about to leave the device. Earlier, we had a certain amount of mass in the device and an amount of mass delta Mi was just about to enter the device. Now, we have an amount of mass, certain amount in the device different from what it was before and an amount delta Mi is just about to leave the device. Notice that the system that we are looking at is shown in gray and that always contains the same amount of mass. So, this is the system at time t, this is the system at time t plus delta t and it contains the same amount of mass between time t and time t plus delta t. Now, we apply this expression, this expression for the system that we have identified. So, delta S for the system. Now, remember, we are talking about an infinitesimal time interval, infinitesimally small time interval. So, we use dS instead of delta S. So, the change in entropy of the system dS between time t plus delta t and time t is equal to S at t plus delta t for the whole system minus S at t. Now, at time t plus delta t, the system is comprised of two parts. One is whatever is inside the device or control volume. Remember, we identified the device to be our control volume. So, whatever is inside the device or control volume plus this small bit which is at the outlet. So, we may expand this and write this as equal to this. So, this is nothing but entropy of the mass that is contained in the control volume at t plus delta t plus entropy of the mass which is just about to leave that is nothing but Se times delta Me. But this is the specific entropy of the mass that is about to leave the control volume. So, we take the specific entropy, multiply that by the mass and we get I am sorry multiply that by the mass and we get the entropy of the mass that is about to leave the control volume. So, this is S t plus delta t and in the same manner this is S t. So, this is the entropy of the mass that is within the control volume at time t and at time t there is a part here which is about to enter the control volume. So, we write the entropy of that part of the system as Si times delta Mi. Now, we also know from this expression, remember this is an expression for entropy change for a finite process. So, if we want entropy change for an infinitesimally short duration process then we may write this in differential form like this. So, we say dS equal to delta Q over T plus delta sigma Int. So, this is for a process that takes place between two at distinctly different states 1 and 2 and this is entropy change of a system for an infinitesimal change in the state of the system. So, this is what we would write. Now, for the system at hand, so this is the system that we are talking about remember SCV is what we I am sorry. So, what we are looking at is change infinitesimal change in entropy of the system and if you look at the system here notice that the heat interaction occurs over the entire surface of the device. So, normally we will simply write dS equal to delta Q over T plus delta sigma Int. Now, in this case because the heat transfer is taking place over the entire device and the device need not be at constant temperature between inlet and outlet. So, this part of the device may be at some temperature, this part may be at some other temperature. So, the amount of heat transferred here will be different from the amount of heat transferred here. So, the net heat interaction of the device with the surroundings then has to be evaluated as a surface integral like this. So, this is the net heat transfer across the device between time T plus delta T and time T. Normally for a system we would have simply left this as delta Q over T because the entire system would have been at the same temperature. But here because we are looking at a device where the temperature may change from inlet to outlet we have to evaluate this across the surface of the device. So, this is the control surface which is the surface of the control volume and T B is the temperature at each part of the control surface. So, basically what we are saying here is, so temperature here is T B some value. Say let us say T B it could be say at some location I this could be T B at some location J and so on. So, the temperature varies across the surface of the control volume. So, we evaluate this as an integral and delta sigma int of course is left as it is because that is only internal irreversibilities inside the device. So, this is the most important thing that you should keep in mind that we need to evaluate this as an integral across the entire control surface. So, now putting everything together we end up with an expression like this and if we divide both sides by delta T and allow delta T to become to approach 0, then we finally end up with an expression like this DSCV DT. This is the rate of change of entropy within the control volume is equal to Mi dot Si rate at which entropy is brought inside the control volume minus Me dot Se rate at which entropy exists the control volume plus this term which is rate at which is entropy is transferred to the control volume and sigma dot int rate at which entropy is generated within the control volume as a result of internal irreversibilities. So, basically what this is is that this is an entropy balance equation. Now in case we are looking at steady flow devices then this term would go to 0 and Mi dot would be equal to Me dot. So, we may simplify this and then write this like this for a steady flow situation. Mi M dot times Si minus Se plus integral across control surface delta Q dot over TB is equal to sigma dot int that is rate of entropy generation due to internal irreversibilities. Now notice that this expression again is not very easy to evaluate because we do not have a means of calculating sigma int. We do not have a closed form expression for calculating sigma int. This integral will also be difficult to calculate in many, many practical situations unless delta Q dot is 0 meaning the device is adiabatic or the system is isothermal in which case the integral simplifies and we may take the T outside and just evaluate this as the total heat divided by temperature. So, it simplifies if it is either adiabatic or if it is isothermal. Otherwise this expression again is not very easy to use. However, it has its utility value and that is what we will see now through a couple of examples.