Ladies and gentlemen, welcome to our session, Making Better, The Future of Manufacturing by 2030. I'm Vijay Vaidiswaran. I'm a senior editor at The Economist Magazine and host of our brand new podcast on climate resilience called To A Lesser Degree. It's my great honor to be with you today to talk about this vital topic to the future of the global economy. That is the extraordinary transformation that the manufacturing world is undergoing today. From fully circular production to bio manufacturing, the level of innovation achieved during the pandemic has started to take the world of manufacturing into an astonishing future. As new partnerships emerge to better society and the planet, what will that future of manufacturing look like by 2030? To help us figure this out, I'm delighted to say we have some expert innovators at the forefront of the manufacturing world as well as a senior government figure who'll be joining us shortly. Let me first introduce my CEO leaders, Rick Fulop, Chief Executive Officer and Co-Founder of Desktop Metal, joining us from the United States, and Dipali Goenka, CEO and Joint Managing Director of WellSpun India, joining us from the subcontinent. Welcome to you both. I want to set the frame a little bit. We're going to ask for the audience to participate. There will be a poll using the Slido technology. You should all find this accessible on your top link screen. Please do participate. We'll ask our guests to comment and pick up on the themes that you bring to us, as well as to pick up on your questions in the course of our conversation, this panel. So we appreciate your interactivity. Why don't we kick off with some opening comments and provocations. Dipali, I'll start with you. How do you see manufacturing from where you sit and from the kinds of technologies that are relevant in your industry? How do you see this advancing from the pandemic era we're in today? We hope we'll be in a post-pandemic era soon, but nevertheless, looking to the next 10 years, what do you see as one or two of the most important drivers of change from your point of view? You know, the whole thing, Vijay, that happened was digitization. I mean, you saw that in the e-commerce and hence. I mean, we saw that in the whole manufacturing world as well. The whole sense of sustainability, the whole consciousness about DEI and the other sustainability frameworks also came into play. So when I talk about the 2030 kind of a manufacturing, it's all going to be AI, IoT and tech enabled because it's all going to be a digital world. So it's going to be about analytics and what triggers at the shelf triggers backwards from your manufacturing end. So the speed to market, to turn around times faster, the blockchains, the connectivities are going to be the way forward.  You know, my last book that I wrote was on the future of innovation. I spent a lot of time with the Elon Musk and their pages of the world. This is a kind of thing that they like to talk about.  You're in the textiles industry. It seems pretty far removed from all of these GWIS kind of software things that a couple of guys in a garage are coming up with in Bangalore or in Menlo Park. So help us understand what is the transformation that's going on from your very traditional historic industry to this kind of new digital future that you're telling us about. How is old meeting new, and how easily does the culture clash work there? I'll just take two minutes of your time, Vijay. Imagine farmer in the fields of cotton fields. He has an AI. He looks at it to see whether the soil is right, whether rainfall that is going to be predicted is right for his crop. Then people like our factories, we have a blockchain. We have a QR code. We can trace back to the last bale of cotton from where the cotton is coming in from. Then at our factories, whether it is going to be spinning or weaving or processing or cut and sue, you have it on the platform. You can link and react. If there's kind of a maintenance issue, where there's a kind of a machine failure, it all starts box up. It is a failure of production. It all comes in real time. You're reacting to the speed very fast. And at the cut and sue, you have a QR code where you can actually trace back to the last bale of cotton from where the cotton has come in from. And then it is at the shelf space. A consumer can get a product which can tell a story on its own. Imagine that. And then when you're selling it on e-commerce, you can really have a predictive analytics to Google or the other things and see that how you can, what is the demand that the consumer is looking at? Whether that basket size or the ticket size or the product that she's going to buy, we'll have your product by the end of the day. So Dipali, I love this vision of visibility and transparency across the value chain. How much of this is what you're already doing now versus how much of it is the 2030 vision that I asked you about? Give us a sense of what's real versus how much more work we need to do to make the technology practical, to make it affordable, to make sure that it's not adopted only by the 1% of top companies like yours but across the industry. You know, Vijay, we are doing most of it right now because it's a vision, because it's a next two to three. COVID just changed everything for us. For me, WellTrack, where I can trace it back to the last veil of cotton, started three years back from 2016. Now I am working on blockchain. Where I'll be working with my vendor communities so I can trace back and have a complete transparent world where the vendors and the manufacturers co-exist together. So that's already on the move. And I think fundamentally, Vijay, for me, and I think I would ask Rick also to step in, is that when you talk about technology, it's not about just technology, it's a culture change. For me, I'm upskilling my management teams to the new era of digitization. I have people who have formatted their own programs because I've trained them to do that. I mean, there's kind of these training personalities that I've already had and my blue collar associates, textiles. Everybody has this vision of these blue collar associates, but imagine they'll be working on it. They'll be trained on industry 4.0. So we'll come back to the workforce question in a moment, but you're absolutely right. It's a fascinating part of this question. Rick, we've heard from Dipali who has a global audience, a global set of customers in the sense as part of a global supply chain. It was ever thus in her industry. But we've also seen a radical change in how supply chains are managed, where companies source, how they make. Can you help us understand how the dramatic advances in additive manufacturing might lead to a future of manufacturing that would be hyper localized, that we might very well see production cited closer to customers, allowing for rapid innovation loops and faster response cycles, maybe even more resilient kinds of supply chains as a result. Can you give us your vision of the future and where are you in that journey to 2030? Absolutely, Vijay. I mean, I think additive manufacturing has been a technology that's been in development for a significant amount of time and the industry today is probably 15 times the size that it was at the end of the 2000s decade. And a lot of the growth has been in end-use part production. So adapting a technology that initially was used for printing tooling to now actually produce the actual end-use part. When you go into this journey, you really change the economics of the products and the global trade dynamics of a product. After the previous industrial revolution, we had set up locations with economies of scale and people started shipping goods all over the world that led to tariffs and our current, in our current, with this new technology, you could produce locally with the same efficiency that you would have produced products in all the parts of the world. And you could mass customize and you could modify your designs and hyper-localize them like you're suggesting. And you end up with a borderless production world. I think the ability to qualify a product and know that you can now make it in any of your 60 plants, if you're a large company and they say you have 60 plants. Traditionally, your plant has a different type of product. Now with this type of capability, any plant can produce any product. You can have inventory of one. You don't have to have spare parts stored in a warehouse for a decade, just because you did a production run when something was involved in production. So... Well, Rick, let me stop you there. You've laid out the vision and given us a sensor where we could go. Well, we'll come back to this in a moment, but we're very fortunate to have our distinguished visitor here joining us just now. So let's take advantage of that. His Excellency, Mr. Mustafa Varak, Mr. Minister, thank you for joining us. We're very much forward to your comments. Thank you so much. Sorry for interrupting, but we are not on the program. We eagerly await... Not to worry, Sarah. We're eager to hear your words of wisdom. I will turn the microphone over to you. Please give us your thoughts on what you think is important on the digital transformation for manufacturing. Yes, thank you so much. Distinguished participants, it's a great pleasure for me to address you at the Sustainable Development Impact Summit. I would like to take this opportunity to extend my warmest greetings to all of you from Turkey. The World Economic Forum creates its distinct atmosphere by bringing all parties together to discuss critical global challenges. Thanks to this summit, we can discuss novel actions needed to build an equitable, inclusive, and sustainable global recovery from the pandemic. While we are all seeking a way out from the pandemic, we witness the importance of emerging technologies, transforming the production, enabling more efficient processes, and creating new value for industry, society, and of course for the environment. We need coordinated and comprehensive plans to ensure inclusive digital transformation which will spread evenly across and within industries and societies. In this regard, we launch our industry and technology strategy to encourage companies to drive inclusive, responsible, and sustainable digital transformation. Although manufacturing accounts for about 22% of global employment, the majority of manufacturers still lack a clear strategy on how best to equip their workforce. Hereby, we participate in WEF's Closing the Skills Gap Accelerators Program for the upskilling and re-skilling of the workforce. We also actively participate in worldwide initiatives on creating necessary regulations and ethical norms governing AI development based on the human-centric AI principles set by WEF, G20, OECD, UNESCO, and EU. We design our national AI strategy. In particular, we will focus on improving the human capital and how to increase their employment while supporting research, entrepreneurship, and innovation. Distinguished participants, along with the pandemic, the international supply chain system is experiencing a disruption arising from emerging technologies, growing economic nationalism, and sustainability problems. Turkish manufacturers have shown a successful performance in fulfilling their domestic and international commitments in this period. We have also witnessed very positive developments in our startup ecosystem. Turkish startups received nearly 1.3 billion US dollars of investment in the first half of the year. Today, many multinationals such as Ford, Toyota, Samsung, Nestle, GE, Huawei, prefer Turkey as an R&D and manufacturing hub in the region. We have further reinforced this competitive position with the reform process conducted uninterruptedly for the last two decades. As a result, Turkey jumped 10 places and ranked for the first in this year's Global Innovation Index. We continuously simplify and update our regulatory framework and incentive programs in line with the change in needs and global trends. For instance, we are designing a new incentive package to support transformation of the sectors for their compliance with the European Green Deal. We have started a project with the name Opportunities in Global Supply Chains for the Turkish manufacturing industry after COVID-19. This is the project which aims to assess the opportunities in global supply chains and to define concrete steps for technological transformation and upgrading of Turkish industries. We are also living in a more complicated and fast-changing world with interconnected problems and challenges. Businesses, governments and civil societies are undertaking initiatives to define these problems, search for solutions and take actions. International cooperation is the key to reap the benefits of digital transformation. In this regard, we joined WEEF's Center for Fourth Industrial Revolution Network to harness and to disseminate the technologies for the future. Next, the walls, I think the largest digital transformation and capacity building center supports our industry and workforce with tailored and comprehensive programs with more than 130 use cases. As you well know, companies face some challenges during the digital transformation. In this regard, we have launched the Smart Industry Readiness Index, which is one of the most effective digital maturity assessment programs on a global scale. Regardless of a scale or industry, we provide production-oriented methodology instead of generic digital transformation applications. A applicable roadmap and personalized consultancy instead of superficial suggestions. Comparative sectoral performance with the world's largest company pool instead of just individual performances. We also work in partnership with the platforms in the WEEF, like shaping the future of advanced manufacturing and value chains platform and global lighthouse network. These platforms enable our companies to obtain first-hand perspectives from advanced manufacturers. Distinguished guests, another important issue is sustainability. Countries are unable to align their supplier base and business environment with sustainable development goals face the risk of being out of the game. A rising number of multinational companies have already worked only with suppliers that adhere to their social and environmental standards. We are conducting studies to boost the compliance of the business climate and the regulatory framework with sustainable development goals and European Green Deal. The European Green Deal, in particular, carbon border adjustment mechanism, will have an enormous impact on global value chains in many sectors. To eliminate possible negative effects of the deal and to turn the obligations into opportunities, we prepared a national Green Deal action plan. With this action plan, our industry will sustain a stronger position in the global value chains both by protecting their economic integration with the EU and by providing lower carbon content products. Recently, we have also prepared the Sustainable Development Goals investor map in partnership with United Nations Development Program, UNDP. The inclusiveness and sustainability of investments are as important as the magnitude of the investments. The map will enable to mobilize sustainable development goal-oriented investments and accelerate SDG progress in Turkey. Dear participants, I know I talk a lot, but I am coming to the end of my talk. The last point is ensuring the world rebounds stronger from the pandemic will only be possible if we revitalize economies with new tools and policies needed global cooperation. We will continue to work together with all partners to achieve the scale and create good practices that will set an example for the world. Let me conclude my words by thanking all of you for your participation and leave the floor to distinguished participants and distinguished panelists for sharing their valuable experiences. Thank you so much and take care. Thank you, Minister. We appreciate your intervention. Very good. So, Rick Bipali, we've heard some powerful words from the minister on how Turkey is preparing for a changing world, a rapidly changing world. I want to hear what our participants have said from the audience. Why don't we take this opportunity to put up the results of the Slido poll? I think we have a word cloud that could be giving us a bit of an impression of the audience. Oh, good heavens. Okay, there we go. The elephant in the room is fairly innovation. Hopefully, we'll ride that elephant successfully. And almost everything else is of comparable size. So, Rick, let me turn to your first this time. Here we go. Okay. Now, we're seeing slight changes as we go along. Can you comment on what you're seeing? Give us a sense of how we link it back to some of the themes of the day. Absolutely. I mean, look, one of the really great things about this new technology is to manufacture products like active manufacturing and processes that are too less is that they have a lot less waste that's associated with making the products. You don't have to ship them all over the world and increase your CO2 footprint. When you do that, you can produce them locally and you can customize them to the markets that those products are going to be targeted towards. So, it has definitely a significant implication for global growth and the ability for people to be able to really democratize the capabilities of producing products. There's a movement as we get polymers and metal products able to produce through this kind of technology on the textile space there's companies like Cornit that enable very rapid on-demand textile production. Companies like Amazon are adopting that at scale. I think Amazon went from 10 to 150 to 450 to they'll do over a billion dollars in textile production this year fully on demand with no factories and well, there's a factory but the factory can print anything digitally based on what's needed. So, this move of digitizing the production definitely has significant environmental and sustainability benefits. Deepali, you wanna weigh in on what we're hearing from our audience? Yeah, interesting. I mean, innovation, sustainable and collaboration. I think those are the key things that I saw. Innovation will be the root ahead for everybody and I think that sustainability, they go hand in hand. I think I'll give you a little glimpse into what we do. We start a story from a scrapyard from the plastic or the rags that are generated in the factory at the scrapyard. The rags get broken up into fiber and then spun into yarn and get back into the fabric. The plastic gets broken up into a chip again and comes back into the packaging. So, I think the important aspect is how sustainable and how, when we talk about farm to, we used to talk about farm to shelves. Now we have to talk about farm to cradle. So, the world's been talking about the landfills and I think that's where we need to go back to. So, the last mile. So, we used to have an RFID chip in a product. So, imagine if you can trace it back to the last consumer usage and traces it back to how it is used back into manufacturing so that it comes back into the fold. I think that's where the world is moving towards. So, sustainability will be ruling the roost. I mean, so why- Let me press on this. You raised the sort of a vision that a lot of climate activists want to see that is a world of circular economy, right? This is quite the buzzword. Now, I can remember 20 years ago at Davos in Switzerland, maybe 10 years ago at Summer Davos in China, moderating sessions on the circular economy and what a great idea it would be and everyone was very much cheerleading. We haven't seen a whole lot of progress. The latest figures they see is something like maybe 8% of the world's manufacturing could be reasonably considered to be circular. If it were really to take off in earnest, one way or the other through mandates or industry practice or technology enablement of consumer pressure, wouldn't that actually be bad for your business? Doesn't your industry depend on people loving fashion and clothes and wanting to buy more? How do you square this with your own requirements to deliver returns to your shareholders to your own financial fiduciary duties? You know, Vijay, one aspect you spoke about could be about slow fashion, but I'm talking about you spoke about circularity. Circularity is about going the full circle where your product is broken back and coming back into creating a new product. And it is something that we can really add a lot of value even to the extent of supply chain, the extent of fashion and also appealing to the millennials and the Gen Z. And I think that's becoming trend. And I think for us, it's a part of innovation and that's what we do. So it doesn't- Can you give an example? Is there something you can point to as a concrete example? Yeah, I can. So we have these rags. I'll give you two examples. So one is about the rags that are generated out of our sheets. They find a way out where we pick up, take these rags and we have communities around the factories. There are these community centers where women, they are very articulate in the terms of what they do in craftmanship. So they wear beautiful rugs and cushions out of it and it is sold as beautiful products globally. What it does is that there's circularity, you are cycling that much of rags. You're also giving livelihoods to those many people. So the children go to school. So that's one aspect of fun impact that you're doing. The other aspect is that when you have these rags that are generated out of your factory, you break them up. You break them up into fabric, fabric into fiber, fiber and spin it into yarn and use it back into your product, into your virgin product. So 30% of it, if it mixes back, I think that can create a far more sustainable supply chain for us. Another thing is Vijay at Wells Fund at our factories, we use 30, we actually use 30 million liters of water. Textile is water-guzzler and we don't even use a drop of fresh water and that water is used for the farmers for irrigation and for the communities for portable drinking water. So I think that's where there's a lot of impact that happens. The biofuel, there's a slush that is generated out of our processing machines is used as a biofuel and that is used in a canteens for a people at the factory. So it is interesting. I mean, it's about, there's a whole lot of things that can be added on to the value chain. I could see that. And you've been able to do this augmenting your business model as it were. Although in some cases, I think to be fair, the people will have to find new business models in some industries. We're getting some questions in from the audience. Let me turn to those as I had promised. And maybe Ian, you can take a stab at this first, although I welcome comments from both of you. How do you create circularity and value chains that are not vertically integrated? Where is collaboration required? Will everyone benefit? So in a sense, this is, I guess, an ecosystem's question. Greg, how do you think about this? Yeah, I mean, we have a product that's circular that allows you to print wood. And we basically use the reverse of the process to make paper. When you look at wood, it's made of cellulose and lignin. And when you make paper, you split the lignin from the cellulose and then you take the cellulose converted to pulp. Here, we have a process where we use sawdust as the starting point and then ink jet lignin to reform wood and then you can decorate it and make it virtual and make it look like any piece of wood or a class of wood and make furniture out of it. And you're essentially using waste upscaling it so that you could make and use products that prevents you from taking trees down. And again, you've got the ability to do great things when you look at reusing the waste streams and then you have to start to make a circular product. You have to start from scratch and then think about how can you reimagine the production process to end up with something that can really be cradle to cradle. It's harder when you've got an investment in factories and people that are trained and they do it one way but you can start component by component in that network and then find uses for all the scrap materials to be able to reuse them and minimize waste. So Rick, we have a question for you on whether these sorts of technologies are applicable across all industries. For example, could you make textiles and either sell your machines to Deepali or start a company to compete against? Sir. We are an elastomers, wood, metal and polymers. We make the world's fastest mass production systems in those segments. There is a company called Cornete that does 3D printers for textiles and you can buy products on Amazon that there was no inventory. After the purchase is made, the product is created.  They make it right after you click buy and it's on demand and you get it two days later. So Deepali, what do you think about this? Is this something that's going to augment your business or disrupt? You know, Rick has a point and I think a couple of things when you talk about 3D and the digital printing, we would use it for products which are far more expensive, where there's a value. So when I talk about a $4 towel or a $3 towel or a $20, $30 sheet, it doesn't work. That's where the value, and that's your sweet price point, right? So for a value like a rug that is sold for maybe $99, $100 could be made on shore and that can be a real, just in time. So I think it's all about the value, but we are going to be moving towards digital printing and I think the world is moving towards that, but it'll be the products that can be really of real value, which really could be something that the consumer is having kind of... You are actually manufacturing like hundreds and hundreds and thousands of meters and meters of fabric, which you can't do in digital printing at all. Sure. Now, we have a tough skeptical question from one of our audience members, asking how do you really decide which technologies to invest in? Is sustainability impact truly a real factor in deciding? And just to amplify this, I had looked at the question of automation in factories during the pandemic and the data showed that there was a significant increase in the pace of automation in factories around the world during the pandemic, but a lot of it had to do with, for example, labor shortages, people wanting to perhaps introduce pandemic safety, right? Because of the COVID restrictions and try to avoid COVID related shutdowns. If you have an automated factory or mostly automated factory, you can keep running more likely than if you have thousands of people coming in and out every day as in the old days. And so CAPEX spending that might have been delayed was spent during the pandemic or automation that was in the pipeline was advanced. That's really nothing to do with sustainability per se. So with that in mind, how do you, both of you answer the skeptic that says these sorts of decisions are made, not really based on sustainability, but on other factors. Rick, why you want to take that up? Then I'll call it. It's a combination.  On the world of, how do you accelerate? All I can tell you is we've seen incredible acceleration in demand for these classes of products and the ability to have flexibility since the pandemic started. And I think it's going to be a huge acceleration just like you saw the roaring twenties after the Spanish flu. I think we're going to see a decade of innovation in production technology because of the supply chain constraints that we've had now people in the, we've had, just look at the spot price of containers coming from major to the States. There are 10x increase in the price point, which basically is going to drive the world towards a distributed production model. We could try to save many things, but it's just the way it's going. So I think companies that are in the business today, they're probably going to leverage their customer base and invest in technology and build capabilities closer to their customers and be able to provide a more mass customized world. But it's clear you're a believer in the digitization of manufacturing. That's an ongoing trend well documented, but another question comes in from a different participant that's also a little bit skeptical. It says, look, if it's really true that digitization of manufacturing is sustainable question mark. How do you move in further in that direction? And that raises the question, aren't these wonderful tools of advanced manufacturing that we've discussed and that you both have advocated, isn't it true that they're like any multipurpose technology, like artificial intelligence? It can be used for good or it can be used for evil. And so in that sense, they're not particularly sustainable or resource sparing in and of themselves. And you could have loads and loads of local manufacturing, but if we all become hyper consumers and buy 10 times as much because things are readily available, then we will end up not circular, not sustainable simply in a workplace on sustainability. That is, it's agnostic, it's sustainability agnostic. Is it possible that that's true or do you disagree with that premise? I think that's really where the first question was coming from is the argument that digitization is in fact more sustainable than the traditional asset heavy, sorry, a labor heavy way of doing things, the traditional way of doing this. Maybe Deepali, you wanna jump in there. You know, digitization is going to be the way forward and it is going to be sustainable. And I think there was a thing about collaboration.  And if you're integrating them through technology, you're also collaborating, you're looking at your carbon footprints, you're also looking at just in time, kind of an inventory. Your turn and on becomes faster. So Vijay, I think everything will work hand in hand. I think for manufacturing, where, you know, the costs are getting prohibitive, there are a lot of other challenges. And I think for a world where there's dynamism, there's challenges in the terms of fuel, everything. I mean, you're seeing what containers, you know, there's kind of a chaos that's happening. You will have to have technology. I mean, we are looking at tracking our containers by a thing called device called Shubsi, which can tell you where it is coming in and where it is. I mean, you will have to do everything. You will have to have blockchains so that you can integrate the whole supply chain together. And I know Rick spoke about on-shoring, but I think it's going to be a kind of, a reactive kind of, you know, it's going to be completely strategic way of looking at how the world will work. For me, I will have my warehouses in the United States of America, where I'll do a D2C kind of delivery to my customers. I might have just in time kind of inventory that'll be there in America or in UK or in Europe, if I have to say. But my mega base could be in manufacturing in India because here I employ around 15,000 people. It's kind of, that's kind of an employment generation. But looking at how we can look at, you know, growing cotton sustainably, you know, looking at farmers, their whole supply chain, I think there's a whole lot of things that goes beyond. And I think digitization is going to work hand in hand, collaboratively with the world that we're talking about. Let me ask a different question. This picks up one of the comments the minister made in his intervention. And that is the role of national policy. We're seeing that in the, we're increasingly seeing a borders up kind of world. It's not the era of unfettered globalization that we lived through for a few decades. The era of cheap China and sort of open borders. We've seen not only the tariff wars under Trump, but more generally now, nationalism in economic policy. See it in Europe, in parts of Asia, under President Biden. There are bi-local kind of initiatives with different parts of his economic policies. How much do you think about or worry or take pleasure in if it's going to help your business model? The idea that countries may source more locally in part because of economic nationalism and government policy. Rick, is this something that could actually help your business model? Because again, you're empowering local manufacturing. I mean, we are totally agnostic to this part of the model. Our products are used in everything from consumer electronics to automotive. And sometimes the capital investment that already exists in the rest of production chain dictates that the equipment is put in different parts of the world. And we're in 65 countries today. So we live in a global world. Nothing's going to sort of move that backwards. I do see a huge opportunity to then over time digitize plants and make them more distributed. But the reality is we have a really long arc. I think there's a, in this decade, our particular industry is going from 12 billion at the end of 2019 to 150 billion by the end of this decade, depending on which analysts you talk to. But it is a long arc because we have 12 trillion dollars worth of goods that are made every year and there's installed capacity for that 12 trillion. So it's a little bit like the digitization of transportation with electric vehicles. It takes a long time to turn over the fleet because the product lasts 12 years on the road. And so- You have a legacy assets question, but it sounds like if you're in dozens of countries, you're well hedged that economic policy. We're in 65 countries and we, there's definitely some protectionism is going on. I think it's unfortunate because it hampers economic growth globally, but what I think is really exciting is the fact that this technology is going to enable people to do more things in more places. Dipali, how do you think about that question? And we're running out of time. So if you could even turn it around to say, what would you like to see that would be helpful to the future of manufacturing from governments? I'll give both of you a minute to answer that. What's the helpful policy or what support would you like to see? No, but I think Vijay, one thing is that, I don't, I will go by what Rick said. We are looking at a world that's agnostic and technology and e-commerce has shown us that. I think it's going to be one place and technology is going to enable you to do that. For us in India, government is promoting exports. Government is opening up the borders. I think and the world will open up also. There will be a few countries with protectionism, but I think overall we are looking at a world which is going to be united by e-commerce and digitization. And it's going to be the way forward, Vijay. Okay, so supporting openness is what you'd like to see from government. Rick, a last word from you? Yeah, likewise, I think less regulation and easier to do business globally, easier to get your products to the right places on demand is really the future. Great, no great shock here. Business leaders support less intervention and less regulation from government than more open borders. But I think as a editor at The Economist, which was founded 185 years ago to defend free trade and argue for the benefits of openness, I certainly am with you on this one. We know historically, periods of economic nationalism and protectionism have led to less consumer welfare, to industrial harm, to lower levels of innovation. And so we hope that the future will not prove to be one of de-globalization, but one at the moment we're in what we call globalization. But we hope we can return to a period of more openness and interconnectivity. So on that optimistic note, let me draw our session to a close. I want to thank my wonderful panelists. Thank you for sharing your wisdom and for giving us some hard truths from the front lines where you are, as well as to our minister who joined us with his intervention, we thank him as well. And I ask my audience, we appreciate your many comments. It really means a lot to us that you were interactive and engaged. Please continue to share your reflections on social media channels as well as on top link. And you could find further programming on the top link platform as well. Thank you all very much and goodbye.


Hand in hand with being a Marine, I've always wanted to be a police officer. I am extremely fortunate that I can give something back to the community that gave so much to me. I am a product of Long Beach and I'm just ungrateful to be able to serve Long Beach. My name is Officer Paul Del Rosario. I've been in the Marine Corps for just about four and a half years and I've been with Long Beach Police Department for just under three years. Once you understand that the mission comes first, it's easy to understand that your community comes first. You go to a call and you're expected to handle it and that's what you have to do. You run the show.  And that's a lot of responsibility. You're not representing yourself, you're representing your department, then you're representing your city and inevitably you're going to be representing all of law enforcement across the country. I think being a police officer has given me a different set of life experience. Understanding that things aren't just, they're not one-sided, they're a variety and multitude of solutions to a problem. It's kind of opened my eyes and the way I handle problems with junior Marines and completing tasks has changed drastically. I chose the Marine Corps for the pride of belonging. When I enlisted I had an image of myself being an 80-year-old man sitting in my rocking chair and looking back and being able to tell my kids, my grandkids that, yeah, I'm a Marine. Being documented in the Marine Corps, we all learned three core values, honor, courage, commitment. And being a police officer in Long Beach, we exercised those core values on a daily basis.


So anyway, let's go on, I have three parts. It's the introduction, the case study and the results. So there was this URL and you could visit that URL and get some data, but don't try it out right now because it doesn't work. We have refactored the URL since, but at that time it was four years ago. If you visited the URL, it was giving you some data and this was the code that was running behind the scenes and it would give you the data. So for some time this worked until eventually one day a user got an internal server error and Django emailed me the trace back and the error message and it indicated that the problem was on this line. So who can tell me what the problem was? Hey, it's an easy one, no volunteers? Yeah? It can't be converted to an integer. Yeah, okay, that's a good try and this is also what I would have said, but that was not the error. But okay, I'm making it difficult for you because Django emailed me the trace back and the error message. So and the error message was time series does not exist.  Yeah, what is funny? Anyway. The solution for the decaying. Yeah, so that issue that you found it would have caused a value error and I don't know why we don't check for this here. Either it has been already checked elsewhere by the time we reached this point or we didn't notice it, but this code is absolutely anyway. So the thing is that it was a very easy fix. It took possibly less than five minutes. Then we had to test it because we have the rule that we pretty much always write tests for our fixes. And so we wrote this test and that's an easy one. But if you have done this, you probably know the frustration when you're writing main code and then you need to write a test, you need to context switch your brain and you need to figure out the details. So which file is the test going to be in and is it going to be a new test case or is it going to be in an existing test case? And do you need test data and how are you going to create it or if does it already exist? Where are you going to import it from? So even this test has some tricky parts. It had a decorator that I have removed for this presentation. And it's also an unusually easy case which I gave as a first assignment to a programmer who had no experience writing tests. And now some people will tell me that we should write the test first and verify it fails and then write the fix and verify that the test passes. And I agree with that. The point is that whether you do it before or whether you do it afterwards, you have a trivial fix that takes you five minutes and maybe you need 30 minutes or one hour to write the test for it. So for some years I have been wondering am I spending too much time writing tests and how much is it? Is it maybe two times for the main code am I writing twice as much in order to write tests or only as much? So am I worth doing it? Am I too slow because of this? And so I measured it and actually when I submitted the application for this talk, I hadn't measured it yet. And I didn't know what the results would be and I can tell you I was surprised by several things. And one of the surprises had to do with this example, this particular example because trying to find such a simple example I searched and searched and I searched and I found a repository history of several pieces of software and I thought I would find many examples of a trivial fix requiring difficult tests and I ended up showing you some obsolete code because this doesn't happen nearly as often as I thought. It just stays in your memory because it's very vivid. And except for that, even trivial fixes often need some refactoring if you want to keep the code clean. So even for this, which is as trivial as it gets, some people will tell you that you should refactor this function because it starts getting too complicated. It's more than five lines. Some people say no more than five lines in the function. And so although diagnosing and fixing took maybe less than five minutes, if you want to refactor the code it is going to be another 10 perhaps. And so the testing as a percentage of the total time is going to decrease if you take refactoring into account. And of course you practically cannot refactor the code without good tests. So now I'll show you the case study. We have this software which is called anydris and it's free software and all the code I'll show you is available here. And there are meteorological stations on the map and you can go to the detail page for a station and you can see the variables it measures. And if you click on a variable you can also find out what the measurements are and you can download them. And so it's that simple to begin with. As usual, the devil is in the details so you can't rewrite it overnight. So the problem we had in this particular case is how to update the data. You have the meteorological stations. They have sensors, they measure. You have to somehow get these measurements into the database. And meteorological stations are often installed in remote areas. They have no connection to the power network or to the fixed telephone network. And they are usually powered with a battery and a solar panel. They also have some means of communication and at the other end of this communication there's usually a computer which usually runs Windows and runs some kind of software that is provided by the manufacturer of the meteorological station and it downloads the data. It stores it in files usually. So what we've done is we have written some accompanying command line software and we run it with Windows scheduler or sometimes this computer is Linux so we run it with Chrome. In one case it is a Raspberry. So we write a configuration file for it and this configuration file tells it, it's in an e-file format. I don't know if you can read it because I made it quite small but it doesn't really matter. It tells you which is the URL to which the data has to be uploaded, the credentials and which file contains the data and what is the correspondence of the columns in that file to the time series IDs in the database and some details about how exactly the file is formatted. So that's how it's done. Now this way of communication has been changing in the last few years and more and more often the data is made available with an API. So in some setups there's a specialized computer which has the size of the ADSL router you probably have at home and this downloads the data and makes it available with an API. In some other cases it's very similar to how it used to be except that the software that the manufacturer runs on this Windows computer is automatically uploaded to a service which in turn makes the data available with an API and so it's going to be more reliable and simpler for users if we just give them a form where they can configure API access and have any trace which is our software occasionally connect to the API and pull the data and this would be much simpler than having software that must be installed elsewhere and push the data to any trace and actually another problem is that you know this INE configuration file it's not rocket science to write it but the people who deal with the meteorological status and all that they are usually less brain damaged than you and me and so they have some trouble with these configuration files. So last November I decided to add this feature to any trace and this shows you how it ended up. So a station administrators or managers if you prefer got this little button which they click and then they get a form and because different manufacturers have different APIs the first question they get is what is the API? So far I've implemented only one and it's MeteorView2 that's its name and this form also asks some details about the time zone of the data or how often it should fetch the data and after that you get forms that are different from each API so this is going to ask you for the credentials in order to log on to that API and then it logs on, it finds out what data is available and it asks you to it asks you to tell it which time series on the database corresponds to which time series on the API. So I don't know if you understand this clearly it doesn't really matter if you understand this clearly or not because the point in the end is that I had a specific problem to solve, I had a specific functionality to develop and I also had to write tests for this new functionality. So are we going to use test-driven development or not? Who thinks you would use test-driven development for this? You would, okay, I'm very glad about it, you're smarter than I am. So test-driven development, I'll go through it very quickly. It has three rules. The first rule is that you may not write a main code before you have written a failing test. You write a test, it fails. The second rule says that this test that you're writing must be the simplest possible and should test just a single thing. And the third rule says that you should not write any more main code than is necessary to make the test pass. So it's really hard to grasp the implications of these three rules until you actually follow them. So try doing this for a week and see how different the way you develop becomes. And so as you can understand, I think that it is a good idea and I often try it whenever I can, but the problem is that it works when I have a clear idea of what code I'm going to write. But very often I don't really know how I'm going to approach the problem and I experiment a lot. So in this case, for example, I needed to develop a system that supports many different APIs and I use the word driver for this functionality. And so I didn't know how this would work. So would the driver be a subclass of some base class and what would the base class be like? Or maybe would the driver be a file that offers an entry point or maybe it would be a module so there are all these details that I couldn't figure out. What I did is I made some design and I wrote it down. So this is part of the finished documentation. It's not what I initially wrote. It's the finished one because I wrote something which was similar to this but as soon as I wrote three lines of code, maybe four, maybe two, then I realized it's not going to work. So I changed this immediately and then I changed it again and again and again and as I was writing the code, it was changing again and again. So I can't imagine how I could have done test-driven development in such a heavily experimental process. If you can, I expect you to tell me in the next break. Thank you. So what I did is I didn't write any tests at all. I wrote the base stuff. I wrote the first driver at the same time and when I finished and it was working, I hadn't yet written the unit tests and then I wanted to submit a talk for this conference and I thought let me submit this one. And it was a very good trick because actually I didn't have any deadlines for this or I didn't have any other pressure. So the fact that I had this talk to give made me sit down and actually write these tests. I wouldn't have written them yet. So as I told you, the results surprised me. I spent about a third of my time testing and all the other two thirds were all the rest together. Coding, designing, redesigning, documenting, everything. So I thought that testing would be more than the rest or maybe as much as the rest but it was only half as much and I think that this is a real bargain. And testing was pretty much exhaustive. The coverage is 100% and I did the next best thing to test the driven development. So what I did was I commented out all my code and then I followed the three rules of the poor man's test driven development which are exactly the same as the test driven development except that I changed two words. They were right and I made them uncomment. It's not as good as the real thing but it's better than nothing. Now there are some provisors, not provisors there. Who is a native English speaker? Native English speaker? There must be one. So how did you pronounce this word? Is it caveat? Yeah. Yeah, C-A-V-E-A-T. Caveat. Caveat. Thank you, okay. And another word I have trouble with is is it integer or integer? Integer. Integer, okay. I've been wondering for this for 40 years. I vast again but I forgot. So next year I ask you again, it's certain. So, there are some caveats and the first one is that every case is different. So this was the test writing cost for this particular case and I won't be surprised if it's very different in other cases. And the second caveat has to do with how experienced the programmers are. So I think I'm experienced enough but some programmers are relatively inexperienced in testing, they might write the main code faster and the tests slower. And I also have an example for myself. I used to have some difficulty with mocking so I understood the concepts of mocking quite well but somehow when I was writing mocks for my code they weren't working and I was trying again and again to make them work. I was re-reading the documentation for hours and the worst thing is that years passed by and it wasn't becoming any better.  But, and this is the third surprise. My mocks worked reasonably easy. I did get some error messages and I said, okay, this mock needs a comma there and this mock needs a fix there and then they worked. But my 2019 self would have had much more trouble. I would create the mock, it wouldn't work. I would re-read all the mocking documentation. I would insert breakpoints trying to find out why it doesn't do what I expected to do. Then it would get on my nerves then I would start breaking things, the usual stuff. But it seems maybe at last time becoming better at mocking just after I had lost hope. But mocking is yet another thing the programmer has to learn. So I expect this result, this result, I expect it to vary not only depending on the case but also on the abilities and the experience of each programmer. But, what is the alternative? So can we do without tests? I mean, we had this function and it became like this. And you know that soon afterwards it's going to become like that. And this is a real function in that code in the new telemetry code. There is this function, it's the worst of all. And now that I have the tests, I'm going to refactor this. In fact, I started refactoring it already and I found out that, okay, now it's readable. It's something like seven or eight functions. But then I thought that seven or eight methods is too much and maybe it's going to become a different class because you see this patch of this patch, other step. If there's the first step and the next steps. So this dispatches the next steps, all steps except for the first one. And then I realized that this wants to become a class that is going to be called step or something. Or other step, I don't know. And even this is readable, it's not too bad. If you read it carefully, you will understand it. But if you don't refactor it, eventually it will become impossible to change anything in it. Thank you. So I have a few hours of work in order to refactor this and two other functions. And this has been enabled by the 20 or so hours I spent writing those tests. So my conclusion is, let me show you the last. Okay, so my conclusion is, write tests, it's a bargain. Thanks a lot. Thank you very much for your talk. Is there anyone who has a question to answer? There you go, just line up and go ahead. Well, hi, that was a pretty fascinating talk. Which testing library do you prefer to use, like unit testing or high test or anything else? Yeah, okay. You know, we have this kind of contact here that says that we should respect others and be nice. So I think it's a very good idea as long as the other people don't use by test. So once we murder these people, I'm okay. Anyway, okay, of course I'm joking. So I use unit test. I think by test is very smart. And I think it's too smart. So my opinion is that if these tools like PEP8 or I don't know how we call the other one that checks the quality of our code. Sorry? Yeah, by Lint. So if it understood what by test is doing, it would throw a mess of warnings. So I don't like the magic of by test. I think it's too much magic. But other people like it. It's okay. I use unit test. My experience software development comes, really gets fun if you have a test coverage about 90, 95% what is your take on it? My take on... Yeah, when does software development get fun? High test coverage or if you just... Yeah, yeah, that's a very difficult question.  It says master, do you know it? Unfortunately, we don't have enough time for me to say it. But I'll tell, so I'll go straight to the result. The thing is, I read a very good book. I think it's called Testing or Test Driven Development or something like that in Vue.js. So the author there says that the purpose of testing is to make software cheaper, to make it faster. So sometimes when I fix, it takes me one minute to fix because there's just a comma missing and I need two hours or so to test because I can't see it. Okay, this is a very hard thing to fix, to test. And I don't think that this is going to cause any problem in the future or that it is very unlikely for that bug to go back in there. Then sometimes I don't test. So my experience is that most of my code has between 95 and 100% of coverage and usually it doesn't go beyond that. It's a matter of experience, however. Other people might be doing it differently. Hello and thank you for the talk. And I had a relatively short question. Do you consider testing the mocks and counting coverage for them as well? How do you know that mocks do what they're supposed to do actually? Thanks. So have you practiced test-driven development? So if you do test-driven development, I think that everything you do just works because of the sequence of how you do things. But as you refactor code and then you refactor tests, so the code, some things fall behind and the things that fall behind in the main code if you test them, but the things that fall behind in the testing code, maybe there's some obsolete stuff there that is not being used or maybe there are some tests that don't work. They just always reply, okay. That's your question. Very good question. I have no idea how, I wonder the same thing myself. I think that testing is a relatively new thing. Very people knew it 20 years ago and I started testing about 10, 12 years ago. So it's relatively new. Even the books are new. You can't find enough books and most say you should do this thing, the others. So we are still learning. I think we are collectively learning how to do this correctly. Okay, thank you very much. Antonis for the talk was very interesting. I enjoyed it a lot. It was fun listening to you. I think we've joked a lot. So thank you and give him a round of applause. Thank you.