Good morning folks Steve Rhodes coming to you live from the shores of well mostly cloudy Delray Beach Florida this year 11 am 11 am update we got a mixed bag out there that mix goes like this you got the Dow 43 S&P down 25 Nasdaq 101 48 you've got the Russell up about 10 points the semis are up 11 points the trainees up 161 New York Stock exchange off 24 points about 210% to the downside gold is off 24 bucks trading out of 2002 while Silver's trading out of 24 97 that's off 11 pennies lights we crude is off 37 cents traded 80 36 natural gas up 13 cents trading out of 214 30 a treasure off 24 ticks she's printed out at 130 211 let's take a look at that nine panel market update chart we begin the upper left hand corner you've got the ES mini what do we know about it you have a sell the D point pattern that formed out here on April the 4th you had a nice key reversal bar session that had formed there price is now consolidating with inside its profile it's got resistance up at 41 71 75 and support at 40 76 and a quarter spot ball tonic still remains below its 50 day exponential moving average therefore it gives the edge to buyers we take a look at the NQ there is an A to B equal CD to the upside with a price projection of 13 9 66 however we do get a bearish reversal candle today and at the moment it is a bearish engulfing candle that would confirm a roadsman to indicator top and a price close blow 13 062 95 that would be below the top of its profile and that would suggest a further move lower or could suggest a further move lower the first price target would be about 40 well actually I can't give that number up top man but we can do that during the show the market is having some conniptions so to speak with the US dollar index which formed by the D point pattern did that a couple of days ago and now it's consolidating with inside its daily profile with its site sets on the resistance level the top of that profile 102 58 price closes above that my guess would be we'd at least see gold pull back to 1974 a new profile that's attempting to form a silver at least 24 45 also a new profile that's attempting to form but we won't have confirmation on these until this evening lights be crude still has a teeny night count top but boy it's been resilient it has just traded sideways and very small bodied candles out there natural gas on Friday negated its buy the D point pattern out there however today if you close where you're at right now or just simply close above the open from Friday Friday's open out there was $2.14 cents you close above that you'll have another buy the D point pattern the real issue here for natural gas is that center profile line $2.85 that's what price must close above to suggest that there may be a bottom in natural gas folks stay tuned for the trader said show but if you're out to start your monday please have a magnificent one thanks much for joining us we'll look forward to speaking with you again soon take care


Hi friends, welcome back to my channel and a very special welcome if you're new here. My name is Jen, I'm a certified weight loss and nutrition coach and I'm on WW personal point. Happy fall, I am wearing my fall sweatshirt because today I am bringing you not one but two fall inspired copycat Starbucks recipes. Two of the most famous fall desserts at Starbucks, WW friendly, macro friendly, calorie friendly.  Make sure you're subscribed and your bell is turned on because I upload five videos every week and I have lots of fall and holiday content coming your way. Check out that description box down below for nutrition coaching where I offer personalized to you macros and calories. I can't stress enough how important it is to have this done so you know what you should be eating every day to see success. I have one on one coaching if you would like to chat with me directly. You'll also find links and discounts to my favorite things and come join our Facebook group. We'd love to have you. It's free, it's supportive, it's a great community. So come on over and join us. So let's jump in to copycat Starbucks fall recipes. So our first recipe is one of my favorite things from Starbucks and these are the pumpkin cream cheese muffins. We are making a much healthier version. So let me show you what's in the recipe. First you're going to need vanilla extract, milk of your choice, you're only using a teaspoon so it doesn't matter, use whatever you have on hand. All-purpose flour, 100% pure pumpkin, sweetener alternative, as always I have the Lakonto Golden. This is my favorite sweetener. I find that it tastes the most like sugar and doesn't have a weird aftertaste. So I'll link Lakonto down below for you with a discount. So definitely use the discount, it'll save you money site-wide. You'll also need some light butter, baking powder and baking soda, one egg, pumpkin pie spice and one third less fat cream cheese. So to get started, we're adding one and a half cups of all-purpose flour, three quarters of a cup of Lakonto granulated, one teaspoon of baking powder and then one teaspoon of baking soda and then it calls for one teaspoon of pumpkin pie spice. You already know, I'm putting in more. I'm going to do more like a tablespoon. I love the pumpkin pie spice and that flavor so I really want that to be front and center and then add just a little bit of salt. I don't think I showed you guys the salt in the beginning but you're going to add about a quarter teaspoon and as always, I'll link my gravity-fed salt and pepper grinders down below for you. I love them and then we're going to give this a quick stir and set it aside. In another bowl, we're going to add one egg, one and a half cups of pumpkin puree, one quarter cup of light melted butter, cooled and then about a teaspoon of vanilla extract and then give that a mix until fully combined and then we're going to add the wet ingredients to our dry ingredients and stir again until everything's mixed together really well. We're going to spray our muffin pan with some non-stick cooking spray and I do have my oven preheating to 350 degrees and then using a muffin scoop, we're going to fill our muffins about three quarters of the way full. So we have our muffins, we're going to set these aside while we make our cream cheese filling. So for the cream cheese filling, I've added four ounces of room temperature, one third less fat cream cheese. In my little bowl here, I have two tablespoons Lakonto granulated, one tablespoon flour and then we're going to add a teaspoon of vanilla extract and a teaspoon of milk. And then mix that together until you have a filling consistency. So you can do the cream cheese one of two ways. You can use a piping bag and actually pipe it into the middle of the muffin or in my case, I'm just going to put it right on top of the muffin. So you can really do it either way. I think sitting on top is gonna be really good. It's going to add that layer of cream cheese in every bite of the muffin. So I'm going to add a little bit of that cream cheese to all 12 muffins. And lastly, before they go into the oven, I'm going to take a little bit of the pumpkin pie spice and I'm just going to sprinkle it right on top. So we're putting these in a 350 degree oven for about 15 to 20 minutes. We just want to make sure they're cooked completely through. So the Starbucks pumpkin cream cheese muffins are out of the oven. I'm actually going to let them cool completely. We'll pop them out of our muffin pan and I'll be back to show you the finished product and give you points, calories and macros. So our muffins are done. They are nice and cooled. I'll go ahead and package these up once they have completely cooled, but these look really good with that cream cheese on top. They are very, very, very soft when I pulled them out of the muffin pan. So I'll go ahead and put points, calories and macros here on the screen for you. And let's jump into fall recipe, copycat Starbucks number two. Recipe number two is the Starbucks pumpkin bread. This is another one of my very favorite seasonal goodies at Starbucks. So let me show you what's in the recipe. First, you're going to need, again, Lakonto granulated sweetener or any sugar alternative.  You'll also need some all-purpose flour, salt, brown sugar, as always, I'm using Lakonto. This is the Lakonto golden canned pumpkin, unsweetened applesauce, vanilla extract, pumpkin pie spice, baking powder, baking soda, and some eggs. So for the pumpkin bread, we're adding one and a half cups of all-purpose flour to a bowl, half of a cup of Lakonto granulated, about a tablespoon of pumpkin pie spice. I might just do a little bit more. Some salt, half a teaspoon of baking powder, and then a full teaspoon of baking soda. And mix your dry ingredients together really well and set those aside. To our dry ingredients, we're going to add a can of pumpkin puree, which will basically be the rest of what's in this large can. Three quarters of a cup of Lakonto golden, half of a cup of unsweetened applesauce, that is in place of oil, three eggs, and a teaspoon of vanilla extract. And then we're going to mix that together until combined. Spray your bread pan with some non-stick cooking spray. Make sure you spray it really well. We don't want our Starbucks loaf to stick. And then we're going to transfer the bread mix into the loaf pan. So here's what our pumpkin bread looks like. Now the recipe says you can add pumpkin seeds or pepitas to the top. You could also add chopped nuts if you wanted. But I think I'm going to make it just like this. I wanna share some of this with my in-laws, and I don't know if they like nuts in there. Pumpkin bread. So we're gonna keep it as is, and this is going into a 375 degree oven for about an hour, or until it is cooked completely through and a toothpick comes out clean. One hour later. Our pumpkin bread is out of the oven. It smells so good. It looks so good. I'm going to let it cool completely, slice it up, package it up for the week. I'll go ahead and put points, calories, and macros here on the screen for you, but another healthier alternative than all those yummy goodies at Starbucks. Thank you for joining me for today's video. I hope you enjoyed seeing Copycat Starbucks recipes. These are two of my favorite fall treats, and I'm so excited to have a healthier version at home. Don't forget you will find these recipes as well as all of my other recipes on my website. It is linked down in the description box, along with nutrition coaching, links and discounts to my favorite things. And don't forget, come join our Facebook group. We'd love to have you. Give this video a thumbs up and make sure you're subscribed so you don't miss a future video. Happy Sunday, friends. Happy fall, y'all, and I'll see you in the next one.


Hi, everyone. My name is Xiong Chen and I'm from the University of Illinois at Banner-Champaign. Today, representing my team, Shenyang, Dou, Naveen, who are not here, I'll be introducing multi-stage financial modeling, our package to you. Let's start with some background information. Our package focuses on commodity price. So, commodities such as soybean, corn, cotton, their prices are always affected by different and many factors, such as economy, agriculture, weather, policies, you name it. And you can find those information from different sources as well, such as news media, social media, government sites, and private companies. Since the related data are from different resources, you might have different granularities such as some might be daily, some might be weekly, some might be annual. You might have different formats and the data sets might be dirty. Our package, financial modeling art, can help you read in the data, clean the data, and merge data with different granularities into one combined clean table of data frame. It also provides several data visualizations based on your data. In addition, we also have an auto machine learning pipeline, which helps you tune hyperparameters and pick the best model out of it. Now let's see some examples of the outputs from the package. On the top half, from left to right, you can see a line plots of crop progress data. You can see a correlation plots of expert cells. Then it's a time series plot but with a politic events. Then at last you can see a word cloud of the twits. On the left, there's a sample sequential model generated by our package, and that model gives 71% of the variation of describing future price. We also do a soybean contract dashboard. The dashboard is an interactive way to give you some data visualizations based on the data you upload. It provides time series analysis, Twitter analysis, and stock analysis based on your own preference. You can use this dashboard for data visualization as well as exploring the data sets and getting some idea of future selections and engineering. We recommend you to use it along with our package. So I hope you find our package helpful in some ways. So here our package is on GitHub and you can assess our dashboard using the link given down below with the credentials. Make sure to check it out. Thank you guys so much for watching.


Hello and welcome to the session. This is Professor Farhad in which we would look at trends in cost accounting throughout the value chain. This topic is covered in cost accounting. As always, I'm gonna remind you to connect with me on LinkedIn and subscribe to my YouTube where I have over 1,800 plus accounting, auditing, tax, finance, as well as Excel tutorials. If you like my lectures, please like them and share them, connect with me on Instagram and Facebook. On my website, farhadlectures.com, you will find additional resources to complement and supplement this course as well as other accounting courses. In the prior session, we looked at the value chain or the value creation and we identified those steps, R&D, design, purchasing, production, marketing and sales distribution and customer service. In this session, we're gonna be looking at some trends, at some recent trends and how cost accounting helps in this value chain. Starting with research and development, R&D, research and development is where everything starts. What does that mean? It means this is where the idea is born, the idea of a product or a process or a service. So it's very important to start with the best possible product at the lowest price. So that's the first thing we have to think about. How to accomplish this? How to accomplish this? One way to do it is to partner with your suppliers. Think in advance. What would your production looks like? And when you think about your supplier, you're really thinking about the development stage to ensure cost effective design for product, especially if you have to rely on a third party. Think about what is your relationship with them? What do you know about them? How can you coordinate at the stage with them? So product engineers, they will need cost accounting information to make decision about alternative material. Should I use if I design this product? I'm gonna be using supplier X versus if I design the product differently, I'm gonna have to use supplier Y. What is the cost for me if I used X versus Y? So this is why it's important. Cost accounting and design, that's also important when you start the design itself. So basically R and D is the idea. When you start the design, well, now you're gonna go back, go into specification of the product. How many product, how many units am I gonna be using within this product? So that influence the production cost. And a case in point is IKEA. I just wanna let you know, IKEA for some product, it takes them five years to properly design it, to minimize and to make it easy for them and for their customers as well because if you buy a IKEA product, at the end of the day, you put the product together. So they take their time in designing the product so because it's gonna influence the cost. They want it to be at the lowest cost possible, well, take your time and make sure your design is as good. So there's something called DFM, the design for manufacturing is a concept that manufacturing cost and complexity need to be considered in the design of the product. Remember, there's a cost and there's complexity. You don't want it to be complex and you want to reduce the cost because that's gonna serve the customer. So cost accountant help designers understand the trade-off between complex design for a more desirable product and a difficult and expensive manufacturing. See, once you have the information, once you know how much the cost is, basically cost is accounting number, complexity is an engineering. As long as you have both of these units or both of these concepts making trade-offs and as long as you have enough information about cost and enough information about your product, you can create a product that's not too expensive and not too complex for the customers. But there is a trade-off here. You might have to do some trade-off. If you want it to be simple, you might have, you know, your cost could be higher or lower, it depends. But as long as you have the information, you can make the decision. Also, when it comes to a purchasing, there is cost accounting plays a role in purchasing. One thing is you have to eliminate any necessary step in the purchasing process. The purchasing process could be a really complex process. You could have many suppliers. I know, for example, a company like Johnson & Johnson, obviously they buy supplies from other companies. And the reason I know this because my wife works at Johnson & Johnson. And guess what? To manage their purchasing, to manage their purchasing, they outsource this process. So they don't handle the purchasing themselves. So think about it. I'm buying from a third party. It's not only I'm buying from a third party. I'm hiring a third party to buy the product on my behalf. So purchasing, and obviously J&J believes that's the most efficient, this is the lowest, this is the best way to do it. But the point is you have to eliminate any unnecessary steps. Usually in purchasing, you have to do what's called performance measure to know how well is your purchasing going on and what are performance measures? Those are metrics that indicate how well individual business unit firm or so on is working. What do you mean by working? Look, you're gonna be buying supplies.  What is the waste? What is the, how many defective product are you having? What's the direct material usage? So one way to determine how efficient is your purchasing is to monitor this process through performance measures. Also you can do benchmarking. What's benchmarking is basically looking at a standard or setting a standard and trying to meet those standards as a continuous process of measuring a company's own product, surface and activities against competitors or against the company's itself from prior period. So benchmarking is basically say, this is what I need to do. Am I reaching it? Or this is the standard for the industry. Am I reaching those standards? Also cost accounting could help in production. Well, think about it when you are producing, you have to measure the production output and how well your team is working. So the measure could be done at a work cell or production level. And the reason that we use the word work cell it's more modern versus the production line. When you think of the production line, you think of Ford, Henry Ford, producing cars, each individual is repeatedly performing the same step. Well, research shows that employees or production workers are not, they don't have a lot of satisfaction in doing the same thing all day long. So what you do is you create work cells and if you create work cells, the employee is happy. If the employee is happy, they'll have a better production. If it's a better production, the employee is happy. You'll have a better product. A better product would lead to a happy customer. So operation managers and financial accountant use cost information in the production stage to understand and report the cost of multiple product produced. Once you know how much something is costing you, then maybe you wanna change the work cells. Maybe it's cheaper if you put, don't let those four individual work together, maybe only three individual or mix and match skills between individuals. And how would you know this? Just looking at the production cost. If you know what each individual is producing, how long it's taking them, then you can make those decisions. Also in the production, you could use what's called a just-in-time method rather than buying inventory. So one of the most important development in production is associated with lean manufacturing. It's the use of just-in-time method, which just-in-time method. Try to minimize your inventory on hand. Inventory is cost. When you buy inventory, you have to store it. You have to go through it. You have to maybe buy insurance. It takes a space. So try to have lean manufacturing and part of lean manufacturing is just in-time inventory, just a jit. And we'll talk about this later on in future chapters. Also cost accounting can help in marketing in something called CRM, or Customer Relationship Management. It's a system that allow firms to target customers by assessing the customer's revenue and cost. So for every customer, you should have basically a P&L. How much is that customer cost to you and what's the potential profit? Now, I'm not saying you should treat customers based on that, but if a customer is really profitable, you wanna give that customer more time, more attention than a customer that may not be as profitable. And that's important. That's talking from a numbers perspective. CRM allows firms to target more precisely those customers who are profitable. And this makes sense. If they are profitable, they may buy more product. They may expand their business. And you really wanna know who these customers are to use your resources in an optimal way, to serve the customers along the way. So basically what we're looking at here is a cost information system should give you a P&L per customer. I want to know per customer how much money I am making. So this way I'll focus on the one that are producing profit. And I need to work on the one that I'm not generating revenues from them. Maybe I can increase the revenue. Maybe they need more marketing. Maybe they need to learn more about the product. I also wanna identify those, not to not to take care of them on the contrary. Maybe customers with low profit, I will need to work little bit harder on them to basically show them our product and the value of our product. Also cost accounting help in the distribution process. What's the distribution is basically when you sell it. So basically what you have to do sometime is find the most efficient way. And what's the most efficient way? It's the least costly. When something is efficient, it's least costly. To perform an activity in the firm or have another firm produce the product or perform the service. Look, if we cannot produce it at the lowest cost, we have a solution, outsource the process. What's outsourcing is having one or more of the firm's activities performed by another firm or individual in the supply chain or distribution chain. A case in point, many companies do that. Now, for example, for their shipping, they hire UPS or DHL for consulting or they help or for them to help them handle the distribution channel. Why? Because that's their job. That's what they do day in and day out. So frequently firms consider activities in this distribution's chase for outsourcing. The more you can outsource, as long as it's cost effective, the better off you are. Especially if you can outsource to someone that they really know what they're doing. Focus on what you do, on your specialty, on your product and anything else that's not extracurricular, anything else that you can outsource, that's not something that you specialize and maybe distribution is not, management is not familiar with it. Let somebody else take care of it. Maybe you will have better quality, better quality and at a lower cost. Because the other company, they might be doing this day in and day out and they may find ways to save money which in turn it's cheaper for you, cheaper for them because they do it on a larger scale because that's their specialty. Also cost accounting can help in customer service and that's extremely important. In what comes to customer service, do we have something called TQM which is a management method by which the organization seeks to excel in all dimensions with the customer, ultimately defining quality. So basically we need to take a look at the customer's need. What features the customer is looking for and improve on those features? We also have something called cost of quality. That's a system of identifying the costs associated with low quality items including reworks, return and lost sales. Cost of quality is important. So the question is, do you want to spend more time inspecting the product and incur more cost? Do preventive work or would you like to the customer return the product to you for rework? So basically you have to basically evaluate which one is most cost efficient for me. Maybe if your reputation is important, if the quality of your product is important, then you should do a lot of inspection upfront before you deliver the product or if you think you are selling a lot of product and it doesn't matter if your customers did return some product, then you may not spend more time on inspection upfront. Inspection upfront, it's cost of quality because you need to allocate someone, one or two individual to inspect the product which it takes time. So also cost accounting will help us determine what's the best cost of quality. And obviously with customer service, we need to talk about something called ERP or enterprise resource planning. It's basically think of a software or a system that integrate everything together, link various activities in an organization into a single comprehensive information system. Simply put, what you do is you have one computer system. Think of a one computer system that integrate purchasing, production, HR, accounting, finance, and this way it helps manager avoid lost orders to location of effort, costly studies to determine what's the current state of the enterprise. Simply put, an ERP. So a manager will be able to in one system know everything that's going on within the company from the purchasing side, how much purchases are we having? How much do we have in our inventory? What's our need for our production? How many employees do we need to allocate? And how many employees are available to be allocated to the production? So having one system, having one system, it will improve our production. It will improve also our customer service. And think about it, you don't want to have, for example, just another simple example of ERP. Let's assume you input an address for a customer. Once that address is imported in the system, you don't have to duplicate that address. For example, the production people, if they're producing for X, Y, Z company, let's assume they need their address. Well, that address is already inputted once. Then the shipping department will need that address. That address is in the same address. So let's assume the customer moved. We only have to change the address only in one place. And this is what ERP, an example of ERP. It's an integrated system. You change the information in one place. It flows through to all the other places, including billing. Also, when we build a client, we wanna make sure we have their most updated address. We don't want to be updating the address in account receivable department, in the production department, and in the shipping department. Once we have an integrated system, you update that address once. It's updated everywhere. So this is basically the trends in the value chain, throughout the value chain and how cost accounting helps in that trend. Once again, I'm gonna ask you to like this recording, share it, and don't forget to visit my website, farhatlectures.com. If you are taking cost accounting, I will have a lot of resources, such as multiple choice, true, false, and exercises that's gonna help you improve your knowledge and do a better job. Good luck, study hard, and most importantly, Stacy.


好 你们好吗 这是一个评论您需要查看一个设计基于您的评论就是JavaScript 或者其他我选了JavaScript的评论在之前的谈论中很多人使用了JavaScript您可以谈论水水哇 你买新的电脑了没有公司公司 公司 公司 公司不错 不错 不错好 这点福利还是不错呵呵呵您需要查看一个评论吗好您可以查看一个设计基于您的评论谢谢谢谢JavaScript您可以谈论水水您可以谈论水水您可以谈论水水您可以谈论水水您可以谈论水您可以谈论水水您可以谈论水水您可以谈论水水您可以谈论水水您准备好了吗要开始吗您也想谈论水水您有机会吗好的开始谢谢大家都今天会训练 try code cutterCode Cata together to refactor some of the Lexi code baseOK,let's start itSo what is code Cata?So for those who attended the previous sessionsCan someone remember what is code Cata?Any volunteer?OK,don't be too shySo this is a term coined by this gentleman called Dave ThomasHe take a metaphor from those who practice martial artsSo for those like the practicing martial artsThey usually practice a lot of basic movesAgain again and with the purpose to build their muscle memorySo that during the real comeback or fightIf they want to make a sidekick or make a punchThey can take the action right awayWithout thinking about oh how should I take this actionSo similarly for developersThere are many basic skills that we need to masterAnd we should do exercise regularlySo that those things become part of our muscle memorySo that during the real workIf you have a problem to solveThen you can take those actions quicklyWithout thinking about oh how should I do itSo it's just my ideaAnd today we are going to do a CataWhere you are going to practice your code refactoring skillsSo the Cata is a bit specialBecause you need to deal with some of the Lexi codeThen does anyone know what is Lexi code?Very oldOK,that's one definitionAny other definition?What is Lexi?SorryYes,it sounds code that you take over from other peopleThat's also a possible definitionBut actually one of the definition I heard isLexi code are the code that you check into your code repositoryProbably not by youYou other people is already in the code repositoryAnd even just the code that was written a second agoAs long as they already checked into the code repositoryThey become Lexi codeNo matter whether those codes are written by you or notWhether those codes are having good quality or notAs long as they are there,they are Lexi codeThey are both assessThey are also your liabilitySo you need to make sure that you maintain those codes wellAnd for those who are interestedHow to work with Lexi codeThis is a classic book in this industryWalking effectivelyWalking effectively with Lexi codeSo it basically give you some of the ideaOr good suggestions on how you can deal with Lexi code baseYou can take a rate if you are interestedBut for today,I'm going to give you a fewVery quick pointers and then we can do some exerciseAnd then another questionWhat is refactoring?This should be an easy oneImproveYes,what to improve?CleaningI hear thisIt's similar to thatSo what is refactoring?Refactoring is basically to clean up your codeOr to make some improvements to your code baseSo typically you will haveI guess it's very common for youTo look at this kind of code baseIn your own work,either written by yourselfOr by other peopleIt's a long methodIt's a lot of variable namesSo not very clearAnd probably very confusing logicHere and thereAnd you need to scratch your headTo figure out what it doesSo typically you will see this code baseAnd then as a good developerWhat you should try to doIs to improve the code qualityAnd make it cleanerOr then that activity is called refactoringSo refactoring is basicallyTo improve the designOr implementation of the existing codeWithout changing its behaviorSo thisThe book title didn't really mention this partBut it's very importantTo remember thatFor refactoringYou are not supposed to change the behaviorOf the codeYou are just improving the designOr implementationBut you should keep the existing behaviorAnd in case there are indeed bugsYou solveOr there are behaviorsYou need to improveThen take that as enhancementTo your systemAnd they are separateThey should be separate tasksFrom the refactoring taskOkayLet's also quickly mentionA few challengesAbout the lexical baseSo one challengeOf course is the convoluted codesTypically those lexicalsAre most likely writtenBy someone beforeAnd the person probablyAlready left the teamAnd then whateverHe left with youIs a bunch of codesAnd you read the codesYou still couldn't understandWhat exactly does the code doI guess many of you are notNew to this kind of challengesAnother possible challengeThere is no documentationThere is no specificationOr whateverTo tell youWhat the code is supposed to doThis brings a huge challengeWhenever you are supposed to be the oneMaking further changes to the codeAnd how do you knowThat you are keepingThe existing behavior or notDocumentation or specificationHow do you knowThat you are not breakingAnything that is already workingSo this is a challengeNow the next challengeVery commonYou do not have any test caseFor the codes that you getAnd this brings a challengeBecause just nowWe were talking about refactoringWhich is supposed to beThe activity for you to takeIn order to improveThe quality of the systemBut you can't do refactoringWithout test casesWithout any test casesSupposed to be changing the codeHow do you knowThat you are not breakingThe existing behaviorSo the test cases are importantAnd unfortunatelyIn many lexical debatesYou do not have themAnd another possible challengeEven if you are brave enoughYou decided toLet's add some test casesTo this systemSo that I can do some refactoringBut you will realizeThat it's very hardMany cases it's very hardTo add test casesBecause when the originalDevelopers wrote this piece of codeThey probably didn't really thinkFrom the angle of making it testableAs a resultWhen you decide to test itYou will find out thatOh, it's hard to testLike the code may have a lotOf dependencies on other modulesAnd in order to testThis piece of codeYou need to get another module runningYou need to getSome other existing systemTo be runningAnd it probably also dependsOn some databaseTo be some recross setupFor you in order to runYour test caseSo all those dependenciesMakes the testingA lot difficultThen it should beSo all thisJust becauseWhen you areImplementing the codeYou didn't reallyThink aboutHow to write test casesSo this is alsoA typical challengeFrom the lexical baseThen as a developerWhat should we doWhen we get those codebaseSo todayWe are going toLearn some of the simple tipsAnd then quicklyGet our hands dirtyBy do some refactoringUsing those tipsSo the oneOne of the major tipsThat I'm going to introduce todayIs called theCharacterization testSometimes people also call themGolden master testHave anyone heard about this term beforeCoolI can introduce this one to youSo it's actuallyNot hard to understandAnd actually youProbably already experiencedThis kind of thingIn your real lifeNot as a developerBut for exampleThere is a young ladyHe is looking forMr.RightHe just get to knowA new gentlemanAnd started datingAnd then this ladyIn order to testWhether this gentlemanIs the Mr.Right or notHow would she knowRightSo what she can doIs toPull this gentlemanUnder different scenariosAnd look atHow he behaveHow he speakHow he actAnd how he reactTo differentDifficult challengesOr questionsLike if meAnd your motherWe both fell into the riverWho do you say firstRightSo those areThe type of questionsYou probablySome of you got askedAnd those areSo-calledCharacterization testSo they just want toLike to throw you intoThose questionsAnd see how you behaveAnd thenIn this caseThe young ladyGet better understandingOf the characteristicsOf this gentlemanWhether they fit or notRightSo this isCharacterizationCharacterization testIn the real lifeSo as a developerWe can do similar thingsWhen you getWhen you getWhen you getOur new code baseOur systemThat you're not familiar withAnd you're supposedTo do somethingDo some changesWith this systemThe first thingYou can doIs toObserveHow the systemBehaveUse whatever you canYou can run the programLook at the UILook at the logWhateverAnd try to observeHow it worksAnd actuallyWhen youObserve how it worksYou canActuallyPut those knowledgeInto test casesEspecially theAutomated test casesSo those areThe basicallyCharacterization testTalking aboutSo those test casesEventuallyThey willBecome a safety netOnce you haveEnough test casesThen those test casesWill protect youWhen you makeFurther changesTo the systemThen they can easily tellYouHow to changeThe behaviorOf the systemSo this isThe purposeOf theCharacterization testThere are two waysTo writeThose test casesDepending onThe qualityOf the systemThat you're dealing withSo if you're luckyThe code baseIs actuallyNot that badAnd it's possibleTo writeSome unit testTo understandHow the systemBehavesSo in that caseThe modelOr the unitYou are going to testCan be isolatedFrom the restOf the systemOr model or componentsAs long asYou can isolate thisUnder your test harnessThen it's possibleFor you toWrite some test casesTo exerciseHis behaviorAnd if you'reLucky enoughYou can even writeUnit testTo assertWhat the system doesBut the wayOf writingThis kind of test casesIs a bit differentFrom whatWe showed you beforeIn the first sessionThe test-drivenDevelopmentWhere you'reBasically writingA test caseTo assertYour expectationWhat you expectThe systemTo behaveSo at that timeYou're supposedTo knowWhat the expectationIsSo you startWith a test caseAnd thenYou do the implementationBut in this caseYou have a Lexi systemYou don't really knowHow the systemShould behaveThen howAre you supposedTo writeThis test caseSo I haveClickThe linkSo this blogIs fromThe author ofThe bookI showed you just nowI think his nameIs calledMichaelMichaelphysusHe probablyIs a bad personThat understandsAll these termsHe wrote theBlog articleAnd whatIs theCharacterization testAnd so hereMaybe let meJust enlargeThe phone a bitSo thisIs a functionThat he's tryingTo testAnd justTo give a quick glanceAt this functionI thought anybodyCan quickly figure outWhat this functionShould be doingWith in one minuteIs hard to understandWhat it is doingAnd soAs youIf you want to doFurther changeOn this functionThe first thingYou can doLet's writeSome unit testOn this functionTry to understandWhat the function doesAnd the sequenceOf the test caseFirstlyYou writeA test case like thisVery simpleYou just seeI call this functionI pass in this inputAnd I'mTrying to assertWhat is the outputBut becauseI'm writing this testI don't really knowWhat is the behaviorOf the systemSo I don't careSo I just putA now hereWhatever valueYou can put it hereAnd thenThis is first stepSecond stepYou need to runA test caseMost of the time100%It would failBecause you're just randomlyPutting our expectation thereAnd you don't really knowWhat's the right behaviorVery possibleThe code would justFail like thisSo the outputOf this functionIs so-calledPlantaxBut thenYou are assertingThat this value should be nowAnd by looking atThis messageYou know thatMy original expectationWas wrongAnd the real behaviorOf the systemIs wheneverI gave this systemA plain text stringThe systemOr ratherThis functionWill return meA plain textSo nowYou through thisTask caseYou start to understandHow the systemOr howThis functionBehaveYou got the punchYou write a test caseJust give itGive the functionSome inputAnd thenThrough theRunning the test caseYou get the realReturnFrom that functionAnd through thisYou learnedHow that functionShould workAnd this particular scenarioThenWhat you should doIs updating a test caseUpdating a test caseBasically to recordThis behaviorSo in a wayThis test caseBasically isAutomated recordTo sayFor nowAs far as I knowThis system behavesIn this wayAnd you'd betterChange the nameOf the test caseTo make it descriptiveTo basicallyDescribeThis behaviorVery wellSo just repeatThree stepsFirst stepNo for sureIt will failAnd second stepRun the test caseAnd observeWhat is the realReturnWhat is the realBehaviorOf the systemThird stepRecord on thisBehaviorIn your test caseAnd thenRepeat this stepTo getYour second testCase, et ceteraSo after some timeYou will accumulateA set ofTest casesThose test casesBasicallyThe automated test casesThat describeHow theCurrentlyTest casesAre calledThe characterisation testBecause they are usedFor you toBuild upYour knowledgeAnd howThis system should workAny questionsIs it right?So is it right to sayThat you are usingThe unit test hereMore for reverseEngineeringAnd less for testingTo recordYou are trying to understandHow it is to travelAnd not to testSo the question isSo the question wasFor this kind of testingIs it rightThat we are actuallyDoing some kind ofReverse engineeringInstead ofTesting howThe system worksTo some extentYesBecauseI don't thinkWe should useThe term reverseEngineeringBecause that'sTypically relatedTo become powerSome bannersAnd then figureOut the source codeEt ceteraThe term hereI would likeThis test casesAre for youTo understandLearnThe behaviorOf theThe systemAnd onceYou have this test casesFor nowIt's used for youTo learn the behaviorAnd onceYou have those test casesAnd you keep running themThen they willBecome yourSafe net to protect youWhenever you makeFurther changesOkaySo this is one wayWhere you canGenerateThe automated test casesSo this is another waySo this is a new slideI'm going to showThere's actually another waySo thisThe second one isIn the situationWhen you areNot luckyThe systemThat you gotBasicallyIt's just like aSystem by itselfIt's very hardFor you toDecouple itOr isolate anyModule for youTo do the unit testThen as a resultYou have toTest the whole systemIn one goAnd in this caseYour test casesProbably shouldn't be calledUnit test anymoreUnless you reallyTreated the whole systemAs a unitBut otherwiseIt should be treatedAs a system testBecause you're testingThe whole systemIn one goAnd also becauseIn this caseUnlike a functionIt's not easyFor you toGet some return valueFrom the systemAnd usuallyThe practice isThe system needsTo have some kind ofUIWhere you can getThe output from the UIOr the systemOr havingSome logsEither to the consoleOr to the fileAnd you can observeThe system behaviorBy checking outThe logsSo thoseIn those situationsWhat you need to doIs firstlyYou need to redirectAll those logsInto a fileSo that you canCollectAnd secondlyYou need to find outFor the systemWhat are the possibleInputsGiven thatAll the possible scenariosYou knowWhat are the possibleInputsJust runThe systemAnd all thosePossible inputsAnd thenFor each possibleScenarioYou collectSome log filesFor exampleAnd thenThat log filesBasically capturesAll the behaviorOf how the systemBehavesAnd thenOnce youHave the collectionOf those log filesYou canIt's possibleFor youTo write someTask casesAnd basicallyRun the programAgainAnd forEach timeYou justCompareThe latestOutputYou getWith the outputThat you collectedBeforeAnd to justTo checkWhetherThey match or notLet's imagineThat you canGenerate1,000OutputsWhich recordDownHow the systemBehaves right nowThenLaterWheneverYou runYour systemYou justYourOutputWould changeAnd thenYou willFind outSome discrepancyWhen you compareThe latestOutputAnd theOutputYou recordIn thisSo-calledGolden master testThenThat helps youTo captureAny possibleBugsYou introduceWhichChangesThe behaviorOf the systemSoThose recordsThere's a nameGolden masterGolden master testSoBasicallyThoseGolden mastersWhichSupposed to beThe oneThat capturesHow your systemShould workAnd thenBy rightYou should notDevateFrom those behaviorsUnlessYou knowExactlyThat's a bugThat's a behaviorThat youWould like to changeOtherwiseThose behaviorsAre thereTo helpOkaySoFor this oneI will show youHow I useThis techniqueTo tackleThe problemWe are trying to solve todaySo theUgly codebaseWe are going toDevate todayIs calledThe ugly triviaSoThis isBasicallySimplifiedAlsoUgly-fiedGameOfWhat you can see是IIIIIIIIIIIIIIIIIIIIIIIIIIII比如说 about sports, about music, about the geography, whatever.所以, when you answer the questions, if you answer it right,you'll probably win some talking or reward,and then if you win enough talking,let's say you win the six talking or calling,then you're the winner. Otherwise, if you answer the question wrongly,you could also be punished,like you could be put into some kind of the penalty box,你不允许接下来等等这些是一种游戏你可以玩在这一部分所以我们今天会用的筹码是最美与其他语言的筹码可以看到的首先,因为我们的筹码我们需要明白它 first我们会用筹码然后我们可以认识筹码的筹码明白它然后我们也会认识筹码的筹码我们可以评论一些筹码的筹码我们可以在筹码中处理然后我会试试我们可以建立金牌试试的筹码我会试试解释的筹码我会试试解释解释的筹码但再次,用其他语言可以做一些相似的事情然后我会给你一个简单试试如何去解释筹码然后,希望我们将会有足够的时间大家可以用手势去解释筹码的筹码让我试试筹码的筹码是的,所以,现在如果你查看筹码在码上分享的筹码用了java script这个筹码是非常简单的这里有Main.js,就是进入评论可以转发这个订阅还有另外一个评论叫做GimRunner它叫Main.js它开始游戏建议一些游戏然后,就转发游戏用筹码的筹码让游戏的评论等到有赢这就是GimRunner实际的游戏在这个游戏.js是,你看到这些非常厉害的评论看了不少的评论可以看见它有多大的功能也有很多的评论这是我们今天试试的主要评论我们开始的第一步就是转发订阅看看它有多多的功能好,让我转发订阅我们可以转发在订阅好,让我转发订阅好,我可以转发订阅by justrunningman.js大家是GimRunner大家是GimRunner大家是GimRunner大家是GimRunner大家是GimRunner大家是GimRunner好,那么,这一步我们用GimRunner但,这些评论是同样的评论也许,这些评论是同样的评论所以,我可以转发如果大家转发订阅在订阅阅您会看到一些评论让我们评论这些评论看看它在做什么首先第一个是我们的评论它有一个计算是第一个然后,两个计算他们的评论他们有自己的评论然后,Chet是第一个评论他写了评论然后,这位评论将他的评论转发到第六位然后,他有一个问题在评论中然后,他第一个问题从评论中然后,他他得到评论然后,他得到一块鸿然后,Pat成为第二个评论他得到第四个评论然后,他移动了他的评论第四个评论然后,他开始回答他的评论是他得到不同的评论然后,他发出评论然后,他的评论他的评论是第一个评论他的评论也是对的然后,他得到一块鸿所以,你可以看到就像我刚才所说的每个评论中的评论每个评论中的评论每个评论中的评论几个评论然后,他他可能得到一个评论如果始终有一次他会得到一个评论然后,他可以学会 LegalBolicenne然后,他必须要学会找其他评论对,我...它动药压�对,那么张昌那 Butter他唸然后她没有回答对方的问题然后她发送到手机箱里后来,我认为 next time when Su got her 10她是一个现场的球员她必须承担然后,总之,有些计划她正在选择,根据这些计划她知道她是否得到奸詐的奸詐總之,我們仍然不知有些邏輯因此,她是否得到奸詐的奸詐如果她沒有得到奸詐的奸詐就覺得她已經失敗了她的機會她會回答問題所以她不可以回答問題了然後,下一位球員會來參賽這似乎是個個案如果有人得到六個奸詐那會有一個勝出然後,會有一個勝出就是這個奸詐的奸詐所以,在這次的課程中我們可以在這次的課程中有很高級的理解我們可以在這次的課程中當然,我們仍然沒有有些迷惑的邏輯我們並沒有認識我們要知道如何決定如果有人會得到六個奸詐的奸詐我們也不知道但,我們只要看這次的課程我們並沒有認識所以,我們仍然需要看同一奸詐所以,剛剛講到真正的根據是在這次的遊戲中它們所進行的這奸詐的根據我們需要知道就先看這奸詐可以給這位球員解釋一下我們所觀看的問題包括這次的課程中首先,我看到的是,这个 Code 用了一些 Lexi 技术的功能例如 RAR 技术如果您 familiar with 技术在最新的 ES6 用了它们已经介绍了其他材料例如其他材料其他材料例如 材料或 LAT 材料您应该停用 RAR还有 这些材料这是一个很容易用的材料如果您想做一些改造这些材料很容易用我可以把材料的材料放在空间或 LAT 上也许是用的材料我还能看到这是新的 新的 新的 新的材料但我认为我可以直接使用Rack-Hangle 材料去刷新的材料为什么呢我使用了我认为 这些材料为什么可以直接使用一个简单的材料这样的材料这是我们可以很快的做的刷新的材料好那么让我们开始看来现在的材料尝试材料的材料也许您可以看到现在的材料他有些材料一个材料它有些材料它有些材料那个材料它有些材料而且它有些材料一个材料每个材料有些材料它有些材料适当的材料但是我认为,如果我把所有的领域移到一个分层的团体里我可能想建立一个团体叫做 《玩家》这些领域应该成为一个领域的一个领域的一个领域所以这些领域是不可能的我可以介绍一些设备的设备比如《玩家》而且也有数个计划每个计划的每个问题然后有一个计划是谁是目前的比方还有一个计划是否目前的比方是否得到的奖励箱是否大多数给大家返回好,好但我从这点起我发现了一个问题因为我已经有计划我已经有计划在计划中特别的利用人物在计划中每个计划在计划中每个选择但是在计划中我仍然有一个价值在计划中价值价值所以这是一种迷茫或者迷茫这种这种在计划中我发现这种可能是计划中每个计划每个选择但是在计划中我仍然有一个价值所以这是一种迷茫的计划所以这是一种可能的改变我们需要计划还是没有但是我也都那个但是我们需要计划中这种肆意但是我们需要SYM我们需要SYM需要SYM poi kilometres最先我想今天做一个大家我说这是明從就像如果用户没有六个锅子这个功能会变成两个锅子这就代表用户赢了所以在订阅这个稿子里是非常烦恶的因为刚才在订阅锅里就像是一个户赢了当他有六个锅子但这个功能如果我订阅基本上告诉我一个户赢只要他没有六个锅子这就是我的看法我的观察在订阅锅子里所以当我们订阅有什么错有这个功能不过订阅是错的或者订阅的名字是错的所以要改变我们来订阅然后我们有一个功能它基本上选择用户赢每个户赢根据每个户赢每个户赢每个户赢每个户赢每个户赢每个户赢每个户赢每个户赢能供给控制 Courgér他就是 극争国联国家国内中国66 없는国内然后再次重新重新你也看到了一些雙方式在這裡被打敗的雙方式至少三次還有很多雙方式你可以嘗試把雙方式雙方式的雙方式通常這種雙方式也叫做魔法雙方式或魔法雙方式所以這些雙方式你應該要把雙方式用雙方式的雙方式每個雙方式都需要有名字這些雙方式我會示範一下然後你會有一個功能用來建立一個新的雙方式然後你會這個雙方式只是一些碳它們基本上都需要用來解釋你會有50個每個雙方式但是你會發現那些雙方式雙方式那些雙方式都需要有名字不過這雙方式會有一個新的雙方式我會稱為雙方式你會有三個雙方式你會有四個雙方式這是雙方式需要解釋你會有每個雙方式或者忘記然後將雙方式返回所以你會保持就是怎樣的功能我现在就在这里如果你做一个注意的语言其实你能够发现这个功能没有使用在任何地方所以我可以做一个快速搜查所以这些功能在哪个地方都可以使用这一部分也试试这就是我唯一的功能我所谓的功能叫做是可以使用所以它基本上没有使用如果功能没有使用通常你只能把功能删除好,让我们开始我们有一个功能在这里这些功能叫做在这些功能中它是一种功能使用新的游戏基本上你把游戏名字伸出去然后每个游戏你必须认识一些地方你必须认识这个游戏你必须认识一些金刚用这个游戏也认识他或她在对方的手机里认识的所以整个游戏似乎只是认识游戏所以我现在要说可能会把游戏调整合成一个各式的游戏然后整个游戏认识的游戏是在背景键里的键盘里放进制作者的键盘里这就是研究器的可能性我会改变这些我还有一些键盘键的键盘在这里你能看到这是有明显的因为我利用ES Lynch 键盘这些键盘自行取代有一些怪怪的行为因此这些键盘的键盘因为通常讯息的建议用途觉得 waste of invoices就可以让两个接触过于你进行讯息之后应该把这些讯息投给其他公司带给免费宝贝那还要等待在调书的凭掌这些讯息只要等待他们将还起来这样的话大部分的讯息互动的容讯是一个很实用的东西我需要销售到公司所以也许我可能需要監视所有的销售销售到一个很简单的功能因为现在我们看到销售到公司如果需要改变明天我们看到销售到一个标准需要销售到一个标准如果我现在的设计我需要改变所有的销售我需要改变所有的销售销售到一个标准需要改变所有的销售所以如果我能有一个重要的功能可以选择销售然后如果我真的想改变销售的销售我需要改变那一个销售有更多的研究所以我可以改变所有的销售销售到一个标准所以我可以改变工程之后还有一个功能叫做How Many Players如果您查看它是否使用的您可以看到它只使用在这个销售只使用在这个这个销售的功能如果它只使用在这个功能如果它只使用在这个功能然后我肯定不需要使用这个功能使用这个销售的功能OK,让我选择这个因为这个是非常有趣的ES5这个销售基本上是使用古代的销售那些销售的销售从ES6开始你肯定不会使用销售所以其他的功能我肯定会选择这个销售的销售但是它是一个非常有趣的销售我们肯定会选择是的然后有一个功能叫人接下来的问题我发现可能问题是这一个功能就是把第一个销售的销售然后我记得每个销售的销售每个销售的销售每个销售你只能把第一个销售的销售把第一个销售的销售那些人把同一个销售的销售把同一个销售的销售然后如果有一个销售是否能够完成销售的势力好的于这个销售的销售我们就注册我们就发现抓紫然后销售的销售我们就注册有数个销售的销售可以看到你帮笔上的销售你帮笔上的销售你帮笔上的销售然后你可以看到这里有点複计这几个轮子在这里我介绍的是这几个轮子所以轮子基本上就是複计这些複计在这里所以这些是我们能够改变的东西将它们移动到我们的複计然后再移动它们的複计在两个位置去取消複计所以我们有另外一个功能它们要查到 whether the user answered the question correctly or not其实在订阅我们的複计中我感觉它们的名字可能是错误的它们的功能不一定是回到複计的价值它们是回到複计的价值但是在订阅我们的複计中如果 user answered the question correctly那么在订阅我们的複计中要否移动 user to the new position or not这些複计不一定是正式的因为它们的名字是正式的所以这是我们能够订阅它然后再做一些改变在终于有另外一个功能它们要查到如果 user answered the question wrongly所以这是一个很简单的订阅现在你可能会发现这是一个很简单的订阅这些订阅中的订阅我非常惊讶原来的订阅者他可以写这些询阅但其实他是一个很好的订阅他写了这些询阅他用这些询阅来写一些询阅所以你能继续做迫性订阅这些订阅者他可以写这么多询阅在这么小的订阅中希望很多询阅的询阅在你的订阅中不太好好现在我们看看询阅中的询阅我们写了询阅我们有很好的订阅我们也有很多询阅的询阅接下来我们要做一些迫性订阅但之前我们做迫性订阅我们需要一些询阅所以在询阅中的询阅如果你得到询阅的询阅没有迫性订阅你必须做迫性订阅你必须做迫性订阅你必须做迫性订阅你必须做迫性订阅你必须做迫性订阅所以我可以给你一些例子在这段时间今天你可以用询阅的询阅我写的询阅但我努力去回顾去解释询阅的询阅如何所以我写了询阅的询阅我写了询阅的询阅这就是询阅的询阅询阅的询阅对不起我需要先介绍你如何在询阅的询阅记得询阅的询阅的询阅第一步是迫性订阅的询阅从订阅的询阅第二步是需要写一些询阅去写询阅的询阅询阅的询阅ya然后 写下询阅的询阅在新订阅的新篇然后 写下询阅的询阅用笔订阅的询阅这是应该写下询阅的询阅我的询阅这次我写的询阅在这里写下询阅的询阅将直接进入询阅然后 就将进入询阅的询阅然后 写下询阅的询阅如果每个人有可能的认识就会有一个认识的数据我用这些数据 as the golden master record所以我可以写出我的试试这里有些特别的东西要注意的是可能在开始这里有一个游戏游戏游戏游戏我认为游戏游戏需要使用个论变H arb论变H arb終よteok也要占糖O2O2Db15 going因为当年游戏者的行程中他们要移动这些软达的数字来调整一下帧数记住帧数当你移动帧数它的数字是软达的所以他们要移动帧数来调整一下帧数的数字它也要移动这个软达的数字来解决如果用了帧数就会对或不对所以这些是一种移动如果用了帧数就不可能回答问题这些游戏者来调整不同的图案 whether the user gets the answer correct or not这些图案是调整的by just calling this random function而根据结果there are some mysterious logic written here去判断 whether the userget the question right or wrong所以这些图案都要调整so this actually brings some challengeto the people who try to writethe golden master testbecause of this random functionyour program actually have some kind of a randomnesslet's see if you give a same input to this programbecause of this randomnessthe output or the behavior of the systemis actually different because it is randomizedso then one trick we used in this caseis I actually introduced a random parameterin this run game functionand this random functionactually can be supplied by me in my test caseand I will make some fake behavior therebasically I'm going to control this random behaviorI'm not going to let this programwhen I run my test casesI will supply a mocka fake implementation of this random number generatorso that I can control the random behaviorand so that I can controlone hour give a input to this programthe behavior of the system is fixedis not randomso this is a very tricky partand so later if you are going to implementthis random testI mean sorry this golden master testin another languageyou need to figure out how to do thisin your corresponding languagehow to fake a random number generatorinstead of using the original one used in your codeso let's go back to the one that I'm usingso this is the function I usein order to generate to theso-called golden master recordI firstly I need to write a fake implementationof that random functionso that given a particular numberit's called seedusually for a random number generatorthe first number in this number seriesis called a seed s-e-e-dand based on this seedand based on your random number generation functionit can determine all the subsequent numbersso basically that meansif you fix the seedif you fix this number generation functionthen you can control the whole sequenceof the numbers generatedin thisusing this number generatorand then that basically meansyou can control all the scenarioswhether you get the question right or wrongwhether he is getting out of the penalty boxall those things actually controlled by youin your test caseif you control the seed generationsorry the seed numberand as well as therandom number generation functionso in this caseI implementedmy ownrandom number generation functionand thenwhat I do is basicallysorry this one is just a helper functionso this is my placewhere I implementedthe sum of the helper functionbut the real oneis actually in this game runnersorry not game runnerprobably let me see where do I do itI should call it in thissorry okso this is the place I am usingso I wrote a functionwhich is to record the current system behaviorso you can see thatit takes into argumentsthe first argument is the seedand the second argument is the file nameso basically itfirstly deleteif this file is already thereif there just then delete this fileand thenredirect the consoleconsole log to that fileso rememberjust now I mentioned thatI would like to captureall the logs from the systeminto this fileso I need toI wrote a function herebasically to redirect the logI just overwritethe console.log variablethis is the kind of black magicyou can do in JavaScriptyou canbecause it is a global variableyou just reassign this global variableto another functionthen your systemwill start towhenever they call console.logactuallywill log it towhatever you supply herein this caseI supply a file nameconsole.logwill actually just log to that fileand you can easily do thisin other languages as wellso most of the languagesthere are some kind ofsimilar trickswhich allows youto overwriteredirect the logsto a new placeandthen let's go backto this functionso Ionce Iredirect the logsto thatlog fileand then I justneeds tooverwrite the seedSEEDin thisagain thismask.seedverbaland thenI just run this gameby supplyingmy fakeimplementationof the random number generatorso remember nowso basicallyusing the realrandom number generatorthe number seriesis actuallyunpredictableif the seed is 1the next numbercould be 2could be 4could be 68or 0.5so using a realnumber generatorI can'treally controlthe behaviorof theof the systembut using myfakednumber generatorI basicallyI controlthe starting pointwhich is the seedsorryso I'm controllingthe starting pointwhich is the seedand I'm also controllingtherandom number generatorfunctionthenbasically that meansI can controlthe second numberwhich couldaccording to myfunctionthis is the second numbermight be 100and thenthe third numberwould be 400all these thingsare kind of fixedor determinedbecause I supplymy ownrandom numbergeneration functionand that meansfor every scenarioI'm going to controlas long asI changethe seed numberI supplyto different seed numberand each seed numberin combinationwith myfakedrandom number generationit will controlthe whole sequenceof numbersand this wholesequence of numbersbasicallyis one particularscenariothe systemrealize onsuch as determinewhether the userget the questionright or wrongwhether the useris getting out ofthe systemiscontrolled bythose numbersand sinceI'm controllingthose numbersI'm actually controllingthe inputof this systemand thenI can possiblyrepeatthose scenarioslaterand to comparewhether mysystem behavioris the same asthe onethat I recordedin the in the in thegolden master recordso this partis a bittrickyso it willif Irelyingon thecodebaseI shareyou do notneed todigest this a lotnowprobably go homeandread about itbecauseduring therefactoringyou do notneed tomortifythis pieceof a codesobasicallyonthis pieceof a codewhat Idid isokayGolden Master RecordsIn my directoryIn my project codebaseI probably share you on theKithubYou can see thatI do have a directoryCalledGolden MasterIn thisGolden Master directoryI have a logic calledGolden Master Generatorwhich basically calls theand that function help me to generateright now I have ten log fileseach log file corresponding toone possible scenariothat I can control using my test caseand thateach log file is basicallysimilar to what you saw just nowwhen you run the code on the consoleand so I have nowI have this ten so calledGolden Master records under each scenarioand then I will write a test casebasically to call my systemusing those ten possiblescenariosand for each scenarioI get the latest outputI will compare with the correspondingGolden Master record in this filein this folderand if they look the samethat means my behaviorof the system behavioris the same as what I recordedbut if Imake some changes in the codeand that make the behavior changeagain by right the test casewould flag out oh something is changedthen the test case would failso this is howI wrote my test casecalledGolden Master testand this onebasically just callthe systemusing those seedand the seed numberwe are ranging from zero to noneand for each scenarioit will generate the newrecord againandfirstly if you load the master recordand then it will record the current behaviorand thenI have aexpect function herebasically I'm expecting mynew recordshould match with my master recordthis is basicallyso this is basically theGolden Master testjust to check whether your system behavioris the same asyour current behavior is the same aswhat you recordedso I can show you how this is workingso currentlyI'm already runningI'm already runningthis test case heremaybe it's better for me to show you in the terminalso I can justrun my yarnI'm using yarnas a toolfor running my test casesso you can see that it willautomaticallyrun my golden master testright now everything passbut if I just introduce some change in my codefor exampleso if Iintroduce some change in my codelike in this game.jslet's see if I'm going to changelet's see if I modifythis number 8if I change this tonumber 3then I'm introducing a change in my codeand nowif I'm going to run my test caseagain I'm expecting mygolden master recordgolden master testto capture this changelet's seeso it works nowso you can see that because I changedthe behavior of the systemthe outputis differentso given the same inputis differentthen based on this I know thatsomething is changedin the code that affect the behaviorof the systemand I should do this latercontinuouslywhenever I do refactorso basically while I'm running thewhile I'm going to do the refactoring of the codebaseI'm going to keep running this golden master testin the backgroundand each time if I modify somethingand then I will quickly checkis the test case still passed or notif the test case passedthat means the system behavior is not changedthat means my refactoringis goodif I introduce something that breaks the systemthen the test case will tell me right awayso this is howit worksat this point are there any questionsregardingthis golden master testso forwe will take more time laterat home you can read about howthis master records are generatedfor now we will just keep it runningin thebackendI will just keep this running in mybackendand whileI'm going to do some refactoringon the codebaselet me get some moreyesmy master recordtext foldertext fileshow do you get a 10 text filethose 10 test files are generatedusing my file calledgolden master generatorsoso there is athis file called master generatorthis is the one that is calling the functionI showed you just nowbasically there is a follow up hereusing the seednumber from 0 to 9and for each seedit basically called this functionget master recordfirstly it will generate the file namewhich contains this seed numberso that I can get a unique file namefor each scenarioand then it causesrecord current behaviorwhich takes the seed and takes the file nameand this one will basically run the programusing this random numberand then output will be loggedto this file namethis is how I generatedthe 10how I generated the 10 records hereso for that loop imagine thatif you just change thisthisif you just change this value herefrom 10 to 100or 1000then you can easily generate100 golden master recordor 1000 golden master recordsoyou will be comparing the code fileswith the new imagechange the variable factor of codeyou will compare what we have nowwith the text filesyesso this is the logic in thejust now I show you is in thegolden master testso this golden master test will bekeep runningI will keep running this one in the backgroundyou thought in the backgroundyou will continuously keepcontinuously running this test caseto check if I modify the codethen it will run all the10 scenariosand for each scenario it willcompare the outputit did the same as the recorded copyand to determine whether the system behavioris the same as recordedyou probably need to runyarn install firstand then run yarn testthat the test case should beall passing right nowmaybe let itpause for a whilemy code maybe lets pause for a whileand make sure everyone canget the test cases runningyou can use our yarn test watchor test watchyessoif you look atthe npmthe package.jsonyou can see that I wrotea task there calledtest watchif you do thisyarn test watchit should start runningthe test cases in the backgroundand keep running itwhenever you make changes to your codelet's pause for a whileand make sure everyone can getthe test cases runningoh sorryfor those you are not usingjavascriptactually there isactuallyI do have a few othersamplesfor those who are using other languagesI do have a few links herethat basically shows you how togo the master testin other languagesin case you are usingone of those languagesyou probably can get some of thesample as wellI have a few using javatwo using javaone using csharpone python one javascriptnpmanyone using java hereyou use javawhat do you useok so I do have a csharp solutionhere as wellso there is one csharp solutionand one java solutionso I will pasteI will paste thisin thein the churchPythonthe python one is actuallyyour youtube videoI do not have the codei can share the slidesyou can probably check out the videoit is not a repository right nowso I will just pastethis two links thereso this isthis is javaand thenlet us also get the one forit seems thatit seems the first time when you run itit tends to failit should run generatedshould run generatedbut you think yourif you check out my codebasegolden master records are already thereso you do not need to generate new onesyou should just runis itokis this the errorok just runjust run it againjust typemy code have youpast the recordingit is very positivethis one but I do not really understandok soso the seed part is calledmaybe give me 5 or 10 minutesI just give you some examplesand then I will give you timeyou can then do your own refactoringoknot this oneso you really want to do refactoringas I mentioned that we need to keepthe test case runningso that we can constantly checkdid we make any changes that break the test casesso in this caseeither you can run itin a separate terminalor sometimes I preferjust to run everything in my IDEso I am using the visual studio codewhich hasthe integrated testsorry integrated terminalso I could just start my terminalis it already runningI just need to run theYarntest watchNPM run test watchnow it is already runningI will then probably make somerefactoring to the codefor examplejust now I mentioned thatsome of the variablesdeclared as varI know that they should be replacedwith const or letso I will do the replacementso using the IDEthen the shortcuthow to do the replacein the most efficient mannerso for me I am a vim userso I actually installed a vim pluginfor my IDEand if I want to do the replacementI will just run thewith something is wrongit doesn'tsorry just a moment something is wrongwith my IDEoknow it ishandlingsorry for the technicalissue my IDE ishandlingI probably need to restartmy vscodeI just upgraded the vscodeto the latest version last nightand it seems that the latest buildthere are some issueswith the plugins I usesomehow my IDEjust keep handingno respondingno it is not moving at allokinterestingit was working this morningI just was using itmaybe I shouldn't have upgraded to the latest versionokmaybe anyway let me do theprobably just do the simple thingsfirst are usinglet me probably start with vimok I will run itinok soso where is itshould be in game.jssure okI just want to run thisok this is runninglet me also go to theok so I just want toshow you the typical refactoring workflowso as I mentionedmaybe you just get your test caserunning in the background so it keeps runningand thenjust do ourcheck of your git statusmake sure that you have the latest codecheck out from code repositoryand then you can start doing somesimple changes in your codebaseso I generally would encourage youto start from simplersimpler activities you can dosuch as renaming a variableto make it moreeasier to understandor some simple improvementslike changing all this arrayimplementation into simpler formator extracting thedeplicate the code into common functionsand all those things are very easy to doand you can get yourget more familiar with the workflowfirst and then once your codeinto a better shapethen you can possibly consider todo some changes such asextracting some of the logicinto our player classand where is a common placeholderis a placeholder for the logicstate that are specificto the players etcso those things will introducesome structural change to a programso typically you can leave thattowards the later part of the refactoringto startaways just deal with thesimple stuffso in this case for exampleit's just not necessaryi can just use this bracketinstead of a new arrayand soall this i will just replacethis new arrayand i thinkthis should workbut how do i know that they are workingi should just checkmy test caseso usually whenever youmake some changes to a codethose test cases will automatically runlike for example if i introducea syntax error herethen this one shouldautomatically runcome onso this one should automatically runand then show meall the errorssomehowwhyit doesn't see any errorsorry i didn't save itstupidso if i save itthen you can see that the test case will automatically runand if anything goes wrongit will capture the error for youso in this caseso in this casei just simplified thisthis few arrays i simplified them usingthe just array literaland then my test case will automatically runand you can see everything is green nowso i just finished a verysmall changein this caseactually i recommend youjust do a commit local commit right awayso for everythis baby stepsas long as you finish the changeas long as the test case passthen you can make a committhen move on to the next changeso this if you follow this habitthat basically means that whenever you do a refactoryou probably make some wrong changeshalfway and you know that your codebase is probably screwed upso basically just revert back to the lastgood commit that you knowand then continue from thereif you do not do thisyou might accumulate several changesand then there is no easy way for you to revertback to a state that is good enoughso in this case i will just docommitandlet's seelet's see refactoringsimplifiedsimplifiedimplementation of arraysand thenthat's one one step, so I am doneand then i probably noticethat there are some of the varsas i mentioned just nowI would like to replace themat the best const or letdepending on whether they are constant orverbalso in this casei know that for example playersand places使用不同的记忆和设备所以我现在应该把这些设备改变成康兽所以我会把这些设备改变成康兽其实我可能会做一个改变用一些Vim的设备或者IEDE的设备我可以做一个全球的改变这次我会尽量改变很多VIRUS的设备进入康兽用Vim的设备这就是Vim的设备让你做一些设备和改变但你也可以用任何设备在IEDE的设备所以我现在要改变VIRUS的康兽所以我首先要改变康兽第二康兽 第三康兽这一康兽也要改变康兽这些设备我只会用Yes to改变它但这些设备的设备我设备的设备是一个细节我不想改变它所以它应该是细节然后这一康兽是一个细节我会改变它这个设备的设备是一个细节它应该是一个细节这个设备是一个细节这是一个细节这是一个细节这是一个细节我觉得这些设备也应该是一个细节所以我完成改变一些设备的设备是细节然后接下来我会改变其他设备的设备是细节所以我会改变VIRUS的设备是细节然后再改变这个设备是细节这个设备是细节好所以不过在这个设备的设备没有更多的设备我会改变它设备的设备是细节我怎么知道如果我的设备好了我只要 check the test现在我的设备还在所以也许我设备的设备是细节然后我会走细节对不起我还没有过存我用了我的设备我已经继续补过设备的设备I already lost the habit of saving files manually.So now you can see that I saved the filesand on this test case still pass.And then I will be ready to just do a commit again.So in this case, I will just do the commitfor this particular change.So this is OK.So this is to what did I do?So this is to replace var with let and const.So then I'm back to step one.So I can make further changes in my code.So every time just repeat this.Make some simple change.And then check whether your test case still pass or not.And if yes, then do a local commit and then repeat.So each time then you are just making a small change in your code base.And if you continue to do this after one hour,perhaps 30 minutes, you will notice that your code base getting cleaner, cleaner, bit by bit.And after one or two hours, your code base will look very different from the current oneand looks much more cleaner.Yeah, do you have any questions?Is it OK to change the var array of six elements by cost, which you have not mentioned?OK.Yeah, so the question is just now I made a change.I replaced some of the arrays of six into that empty array.So the question is, is this change safe or not?Did it break the system behavior?So I made this change because I was reading code early on.I know that in this number six here, it's probably not necessary.Because in some other language like Java,array is fixed size.So if you declare array of sixand later you want to change the size,you probably need to declare another array, et cetera.But in JavaScript, array is very similar to the listin other language.It's dynamic.So in this case, six is here is rather just initial size.It doesn't matter.So each time later, I know that I can start with empty list or empty array.And each time I'm adding a new player, it will just append to this array.So basically based on that,this initial size six really doesn't matter.So that's my guess.But how do I know that this guess is correct or not?So I make the change and then I run the test case.So if all the test case pass,that basically means I didn't really change the behavior of the test case,sorry, the behavior of the system,then that basically means my guess is correct.So the underlying assumption here is thatyour test cases will be able to catchlike all these edge cases or corner cases.Because there might be some corner scenario wherefor example like this initialthe future of six is necessary.Yeah.So you're right.So basically I'm brave enough to do the changes nowbecause I'm protected by all those golden master tests.And actually the more golden master testsI generate,the more confident I am.So I could possibly generate 100 recordsor 1000 records.And with that amount of golden master records,I'm pretty sure that if I introduce any little changein the behavior,that would be caught by all those test cases.So just like the one I can,I'm guessing that removing the six doesn't matter.And if I'm wrong,then the test case would detect that.This is basically the value of creatingthose so-called golden master tests.Then now you can basicallystart changing the code any way you wishand doing some kind of operationor surgery on the code base.And then if you ever break the code,then you will be notified without any error.Then you can safely check in your changesto the code,to the repository.Okay.So then with this,I think less probably you guys can go aheadby yourself to do the refactoring exercise.If you're not sure what is refactoringor if you need some help with your hand,we can just probably help youto get started with some simplerrefactoring test,refactoring cases.Okay.Michael,I think we can pause for now.Okay.Time to get your hands dirty.


Presiden Interpol, Pn. Mariah Belastrazi, Pn. Gen. Gen. Interpol, Pn. Ronald Noble, Pn. Gen. Gen. Distinguished Colleagues, Ladies and Gentlemen, Good evening. Let me start by thanking His Serene Hainess, Prince Albert, and our host for your warm hospitality and the excellent arrangements at this year's Interpol General Assembly. I would also like to thank Interpol for this opportunity to speak at the Special Interpol Global Complex for Innovation Recognition Ceremony. With globalization and technology, the world has become more interconnected and interdependent. Mobile communications connect us anywhere, anytime. We can get to the other side of the world with one hop on a jetliner or glide between cities on high-speed trains. And those great canals, Panama and Suez, have been enlarged to take bigger ships and even more cargo. We see great transnational flows of people, trade, capital and ideas which have benefited our peoples and made their lives better. Companies operate on a multinational basis. However, criminals have also taken advantage of this interconnectedness to carry out more transnational crime and cybercrime. These developments make it even more important for governments to work together, not just among ourselves, but also with the private sector in order to effectively combat crime. I join in congratulating Interpol as it celebrates 100 years of international police cooperation this year. Building on the strong foundation of cooperation, the Interpol General Assembly unanimously endorsed in 2010 the proposal to set up the Interpol Global Complex for Innovation or the IGCI in Singapore. We in Singapore are honoured by the trust that Interpol members have placed on us. The IGCI will draw upon the knowledge and experience built up by Interpol at its headquarters in Leone. The IGCI will complement and help to spread the good work done at the mother campus in Leone to support policing efforts to tackle new and emerging crimes, not just in the Asia-Pacific region, but around the world. By working with the private sector, the IGCI can also develop innovative solutions to boost our policing capabilities. Trough the Digital Crime Centre, the IGCI will allow law enforcement agencies to share information, understand emerging trends, and forge strong partnerships to combat cybercrime at the global scale. It will provide tools and techniques for member countries to counter the latest trends and set global standards and protocols in investigation and forensics. Beside bringing together public agencies and officers, the Digital Crime Centre will also work with private sector partners and academia to strengthen our overall efforts against cybercrime. Singapore is honoured to host the IGCI. Located in a prime location, the IGCI building was handed over to Interpol on 30 September this year. I would like to thank Interpol and all member countries for your continued support and commitment to make the IGCI vision come to fruition. The opening ceremony of the IGCI will be held on 13 April 2015 next year. This will mark the commencement of full operations in the IGCI. Let me take this opportunity to invite our fellow Ministers to join us in Singapore to celebrate this milestone as we continue to work together to turn back crime and keep all our countries safe and secure. While you are in Singapore, we can also share experiences and renew friendships with colleagues at the Interpol World Dialogue and the Asian Regional Conference which will be held in Singapore during the same period. I look forward to the ministerial meeting tomorrow and I hope to welcome all of you in Singapore next April. Thank you very much.


Did the title get you? How I made 40k, I'm talking 40,000 big ones in two weeks selling final expense life insurance. It's because I have a system, I have leads, I know what I'm doing on the phone. It's really hard to make 40k in two weeks selling face to face. I'm not saying you can't do it, but my gosh, would that be hard. How many appointments would you have to run? Now I've got you thinking bigger. How many people, how many people do you think I spoke to in two weeks to sell 40k of final expense life insurance all over the phone? I had tons of leads, openers, appointments being set for me. I'm only talking, it's easier when I'm only talking to interested, qualified quality. I'm talking have a bank account prospects. When you're only talking about prospects that you need and want to be talking to and that want to talk to you and that are qualified, it makes it so much easier to put up bigger numbers. This is what I did and what you can do in your practice.  In our members area, we've got a 100 day challenge page. I'm talking recordings, numbers, all the details, everything that happened. I ended up over 65k in the four weeks total. This is how I did it. All the things I'm telling you, make sure you go to our site. If you like what we do, if you love what you're hearing and you want to hear every crazy, enthusiastic, jam-packed video that we do, click subscribe. If you're watching us on Facebook, give us a like, like our page. Show us how much you love us. We're going to continue to take care of you. All I'm asking for is you take care of us. We love what we do. We're passionate about it. We hope that it comes through. This is how you need to be on the phone when you're with prospects. I'm talking, get that energy level up. I promise you, it'll make a big difference when you're selling over the phone, when you're selling in person. You can, listening to me, seeing me right now, you can see how I would succeed selling over the phone because I'm bringing all this energy along the phone with the prospect. I smile. I use mirrors. They can physically feel if you're smiling when you're on 40K in two weeks. You can do it. You need leads. You need a system. You need openers. You need to know what you're doing. You want our script. You want to know what we say, when we say it in my call center. That's doing 120 apps by phone per month. Go to SecureHMittra.com. It's in our shop. Check us out. Tons of leads. Finally, it's an appointment setting. Everything you need to do exactly what we're talking about right now.