I'd like to go to Lisa Johnson now. Lisa tell us from your perspective what you make of the medical grounds of this appeal. Bill's absolutely right that it's a desperate attempt to discredit Copelman and I feel like you know yet again we're at a juncture where the US is really scraping the bottom of the barrel to try and prop up their non-existent case, prop up their groundless appeal whereas Bill said they were taking Copelman on the grounds that he sought to protect Stella and Julian's children from harm and at the most recent hearing where the grounds for appeal were broadened that was characterized as being a lapse as being biased. There are things called criminal procedure rules that you know get a lot of lawyer but I understand that was what was said to be violated and under those rules expert witnesses need to be impartial and objective so there's an argument that protecting Stella showed that he was partial and not objective should be thrown out and they said that Judge Baraitza downplayed that too much she said it was understandable human response for they're saying well you know that's not good enough but all of that is really a mischaracterization of what went on so you know it wasn't a lapse it wasn't biased and even to call it an understandable human response is it was more than that so in terms of being biased you know Copelman submitted two reports one was at the end of 2019 that was where he protected the identity of Stella and children then another one following year just before the September hearings then their identities were already known. During his first report you know to conceal the identities of Stella and their children worked against Julian's interests it worked against the defense case and it even worked against Copelman's own arguments because he was arguing extradition to the US poses a very high risk of suicide and he said to the extent that he I'm as certain as any psychiatrist can be that Julian Assange would suicide that's a very strong statement you don't often hear psychiatrists and psychologists say something with that much certainty around suicide and Copelman has decades of experience he's very senior he's former chair of about five psychological bodies on the editorial boards of a bunch of peer review journals he's right up there so why would he you know and the fact that Julian has young children and he's in an ongoing relationship with their partner and he speaks to them as often as he can in Belmarsh and that's one of the things it's a protective factor and that later came out as a key protective factor and one of the reasons that extradition would be such a risk is that Julian would be separated from his children and his family so why would Copelman suppress that when it was in Julian's interest and the fact that he did really is the opposite of bias it's the height of objectivity and you know that was more than a human response he was required to do that by his codes of ethics and professional practice psychologists and psychiatrists have code of ethics that they need to abide by so he was both an expert witness and he's also a psychologist and a psychiatrist so he had codes of ethics that he's bound by in each of those areas and as a psychologist and psychiatrist we're required to prevent harm and avoid acting in a way that can cause harm and being an expert witness doesn't change that and where children at risk psychologists and psychiatrists are required to the child welfare is paramount always so I'll just read the relevant sections of the ethical codes that Copelman was bound by so the Royal College of Psychiatrists with respect to responsibilities of psychiatrists who provide expert opinion to courts says there's a duty obviously to form an opinion fairly and honestly about matters relevant to the court however psychiatrists must still pay attention to their medical ethical duties they need to have regard to the person's welfare and to the prevention of harm albeit they are seeing the individual in a legal context so those ethical duties that that refers to so that's for expert witnesses the ethical duties of a psychologist and a psychiatrist under the codes of ethics that they're required to prevent serious harm occurring to another person they need to ensure the avoidance of harm in which quote the child's needs are paramount psychologists and psychiatrists should contribute to whatever actions are needed to safeguard children the needs or interests of adults should not be allowed to take precedence ahead of the needs of the child so that's what Copelman was bound by that's what he abided by and yes no doubt there was an understandable human response but he was also upholding his ethical responsibilities you know both as an expert witness and as a psychologist and a psychiatrist and as Bill talked about you know he knew at the time what the world knows now that Julian and his family were under threat threats of kidnapping and poisoning and any psychologist or psychiatrist worth their soul knows that an entity and that's essentially the prosecution and the prosecution is the US national security state that's the same entity that was talking about kidnapping and poisoning this Jordan's father and Stella said after the most recent hearing on the appeal that they've been enduring unpublicized threats and intimidation for years so these are things the public doesn't know about but now thanks to Yahoo a lot of even CNN reported on the kidnapping threats and so on Copelman knew that so any psychiatrist knows that any entity that's plotting to murder and kidnap a defendant is capable of anything so he had to protect those children he had no choice it wasn't biased it was ethical conduct so you know I feel that at this point the British judiciary is at a really critical juncture in terms of the credibility and integrity of the British legal system you know because on the one hand they can stand with the prosecution that's been plotting to kidnap and poison the defendant who's the key witness is a convicted fraudster with a history of child sex abuse they can stand there and seek to discredit a psychiatrist who's upholding his code of ethics and his responsibilities to protect child welfare or they can uphold an expert witnesses right and obligation to act ethically and I guess at this juncture it's no surprise that prosecution would be hostile to ethical conduct but you know hopefully that's not the case for the British judiciary so you know that's an important thing I think to be aware of in terms of Copelman's testimony and it's a bit rich also that the prosecution is seeking to discredit Copelman when Copelman was the only expert witness to assess Julian during the time when he was suffering from severe mental health difficulties when he was in the healthcare wing the other saw him after he'd been moved into general population and you know he was feeling better as a result Copelman saw him 17 times prosecution witness saw him a couple of times for a handful of hours the rates it was very sort of glowing in her description of Copelman's testimony because it was exemplary it was over around a year he reviewed the prison records extremely thoroughly which the prosecution witness Blackwood didn't got a lot of that wrong Copelman took great pains to research background material history previous visits with psychologists and so on Blackwood got into court and just like the first judge at the bail hearing called Julian a narcissist so the prosecution calling Copelman biased is really the pot calling the kettle black which has been something that the prosecution's done all the way through this I mean one more thing to be said about the most recent hearing the psychological evidence was also mischaracterized by the prosecution the prosecution said that the prosecution expert witnesses disagreed that Julian showed traits of being on the autism spectrum and that's not true they both said that he showed autism traits there was only one witness who had the expertise to diagnose autism spectrum disorder that was Dealey and he performed a structured interview as you should he has a long long background working with autism he heads up the national autism unit he's published papers on diagnosing autism including and high functioning people which is a very specialized very difficult area you require a lot of experience and expertise to be able to do that Dealey was the only one with that expertise so he's the one that made the diagnosis but the prosecution witnesses did say that Julian showed autism traits which is the material issue as far as suicide risk is concerned whether he shows those traits so essentially elaborating on what Bill said that this is really a desperate attempt scraping the bottom of the barrel to to attack rock solid medical evidence


My 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. I follow weight watchers and I count calories and macros. Happy Friday. It is Friday, friends. And when you're seeing this video, I am currently in San Diego, California, not only visiting my best friend, doing a little mini meetup with some of my subscribers and I'm doing a 5K hot chocolate run on Sunday. I will absolutely run for hot chocolate. So I am on a little getaway trip this weekend that was much needed after a pretty stressful last few weeks with Lola, with Diesel. If you saw the Diesel update in Wednesdays, what I eat in a day, he also was having some challenges as he's continuing to age. So I will link that what I eat in a day video for you in case you missed it, a little bit of news on Diesel. Updates on Lola. It's just been a stressful few weeks. So I am living my best life in San Diego. Speaking of San Diego, just a reminder that there will not be a video on Sunday, nor will there be a meal prep on Monday because I'm out of town, but I will be back with what I eat in a day this next Wednesday. So I will link the Wednesdays, what I eat in a day where I talked about Diesel as well as nutrition coaching, where I offer personalized 2U macros and calories, as well as one-on-one coaching, if you would like to chat with me directly, all of my favorite things, and of course my Facebook group, come and join us. I'll put all of that down in the description box for you. So let's go ahead and jump into how my week was, my weigh-in, and of course, this week's WW Workshop topic. Fantastic week. Overall, I had a really good week. It was a short week. I had a weigh-in a little bit early this week because I did head to San Diego Thursday afternoon, so I actually weighed in today Thursday rather than Friday when you're seeing today's video. And like I said, it's been pretty stressful as you know with my dogs, but I'm really proud of myself for not only staying on track with my food and really making that a priority because I have some goals, as you know, before I go for plastic surgery in May, I have some goals to kind of lean down and make sure my body is in the best shape that it can be before embarking on my plastic surgery journey, which is the next step in my healthy lifestyle, my weight loss journey. And with that, it means getting in my workouts as well. Being consistent with those, I have been super consistent as always with my workouts, and I have been super sore. The back of my thighs are so sore. I did hip thrusts and glaring and split squats on Sunday. And today, Thursday, I am still sore from those. It has been a very challenging week when it comes to being sore. I'm really grateful that I thought I had a little bit knowing that I'm sore pretty regularly from my workout. And you know that we use our Bob and Brad massage gun all the time. Well, I found out that Bob and Brad actually has another massage product that Troy and I have been loving. We've actually both been using this regularly. For me, this has been a staple this week with how sore I've been. And that is the Bob and Brad back massager with heat. This is actually a cordless Shiatsu massager for both the back, the neck, and the shoulders. It has 3D, a kneading massage pillow for muscle pain relief. Men, women can use it. It makes a great relaxation gift. And it is super, super affordable. I absolutely love that this is cordless. You can take it anywhere with you. This is a professional back and neck massager. It's about four inches longer than ordinary massage pillows. So it has a really great ergonomic design that perfectly molds to the neck and back to provide the most comfortable massage experience. You can use it everywhere. Take it from me. I've been using it on my legs, including your lower and upper back, shoulders, neck, calves, thighs, feet, arms, and even your waist. There's an adjustable strap so that you can actually affix the massager to your chair for optimal comfort. Like I said, I love that it's cordless. It can go anywhere with you and it runs on a powerful rechargeable battery. So you don't have to worry about tangled wires. It has a deep-needing 3D massage nodes with biodirectional movement. If you don't know who Brad and Bob are, they are on YouTube. They have a fantastic channel. I'll actually link their channel down below for you. I have their massage gun. I love it. We use it all the time. And then as soon as I saw that they had this massager, I knew that I had to have it. And what I love about the high-quality back massager is the price.  So I will link everything down below for you. You can actually buy this right off of Amazon and there's a special discount. So that'll all be in the description box. But I'm telling you, Bob and Brad have saved my life this week. It has been excellent to just give myself an at-home massage. And we know how expensive massages are. So if you can do it at home any time you want, it's definitely a game changer. And when your husband loves it as much as you do, it's proof that this Bob and Brad back massager is 10 out of 10. We have been loving it. And like I said, it has saved me from all the soreness this week. Because I've been consistently using this massager, the soreness has definitely went down, which is great because I'm actually planning a big hike while I'm in San Diego with my subscribers that we're meeting up, that I'm meeting up with. And then of course that 5K. So I knew my body to be in tip top shape. I also made the decision not to track my food while I'm in San Diego. I'm just going to enjoy my trip. Obviously not go off the rails, but I'm not going to worry about tracking my food. I am still going to be very mindful about getting in my protein because I know how important that is to fuel my body. And then of course help me recover after the activities, after all the activity that I'll be doing while on my trip. I am not filming my trip to San Diego. However, I will be sharing lots of updates both on my Instagram and my Facebook group. So if you're not part of those, I'll put them up here for you. Definitely follow me there for a little bit more kind of day to day life. Before we jump into my weigh-in prior to my vacation and then we'll see what happens with my weigh-in next week, let's chat about this week's WW workshop topic. And that is how to break through a weight plateau. I get asked all the time about this. How do I get over being in a plateau? So today we're going to chat about it. The scale doesn't budge for weeks and weeks and weeks. This is known as a plateau. Now if your scale doesn't budge for a few days, even a week or two weeks, that's not necessarily a plateau. It's when you stay exactly the same way for an extended period of time. You may just need to shift your focus a little bit to get those numbers moving again. So WW has some tips for us. Number one, list out what you can't control or change other than the scale. A lingering cold that's zapping your energy all the times you didn't track this last week or what you ate and drank this last weekend. And then number two, list things that you can control that will help support your journey. I can track consistently, move more, be easier on myself and celebrate my non-scale victories. And number three, choose one, then plan how you'll make it happen. I'll set a reminder to track my meals after dinner every night. I love that they mention NSVs or non-scale victories because that is where my heart is. I, like you know, don't care about the scale, but all the NSVs, they really bring me joy and that's what motivates me and propels me through my weight loss journey. NSVs are amazing. So definitely focus on those, especially when the scale's not budging. Plateaus are going to happen to everyone, especially if you're in a severe deficit. If you're not eating enough, you're going to be hitting a plateau rather quickly in your weight loss journey and it's very hard to break that plateau. So it's important to make sure number one that you're eating enough to try to avoid or limit the time that you are in a weight loss plateau. You can get frustrated and discouraged and sometimes give up on your weight loss journey altogether. So what can help is focusing your energy away from that number. Again, focus on those NSVs. Focus on how your clothes are fitting, how your body's feeling. Are you, is it easier for you to move around more? Can you climb stairs without getting out of breath? These are the things that you need to focus on when the scale is not your friend. This doesn't mean you have to overhaul everything. You just want to make a few tweaks. Number one, please make sure that you're eating enough.  And really the only way to know if you're truly eating enough for your body is to have your macros and calories done. So you know exactly what caloric goal you're shooting for and what macros, protein, fats and carbs you need every day for success. You know, I'm a weight loss and nutrition coach and I do offer this service on my website. I will link personalized macros and calories down below for you, invest in yourself. You will not be sorry and it can prevent you from being in a plateau altogether and it can definitely break that plateau. I have never hit a plateau in my weight loss journey, especially since focusing on making sure that I'm eating enough for sustainable, healthy weight loss. I also want to share three fast facts from Weight Watchers with you. Number one, a plateau is when you don't lose weight for a few weeks in a row. Not a week or two, but a few weeks. Number two, changes in eating or activity habits are two of the most common causes of a plateau. And number three, sometimes the reason for a plateau isn't absolutely clear. I will tell you the number one reason my clients go into a plateau or come to me in a plateau is because they're not eating enough. And again, that is what I recommend, eating your calories, getting in enough protein, choosing the right foods is essential for maybe avoiding a plateau altogether, but is required for breaking a plateau and getting back into weight loss mode. And while you're in a plateau, focus on things that have nothing to do with the scale. All those amazing NSVs, that's what you should be focusing on. So I actually really like this topic. I think it's important to talk about a plateau and why we get into a plateau in the first place and what we can focus on instead of the scale. You know the scale is not important to me. I prefer NSVs and just how I'm feeling overall versus the scale. Speaking of the scale, let's hop into my pre-vacation weigh-in. So last week I actually gained a little bit. I think it was 0.4, so really nothing. Basically, I consider that to be a maintenance. And this week I really focused on hitting my protein goal every day, moving my body and because I was pretty sore this week, the scale did a lot of moving around. I was up, I was down, I was up, I was down. That's very common. When we're sore, it's because we have broken down our muscles and when our muscles are broken down, which we want to do, that's how they rebuild and grow, they are inflamed and they retain fluid which can show up as a gain on the scale. Remember the scale only measures mass. It doesn't know the difference between fat, muscle, fluid. It just measures the overall mass. But when I stepped on the scale this morning before I head to the airport a little bit later today, I'm actually down 0.6. So I lost a little bit that I gained last week plus a little bit more and that is great news for me because I feel like I'm pretty close to where I want to be maintenance wise with my weight. So I do like to see whether or not this is where my body is happy or if I am able to shed a little bit more, get a little bit leaner before I head for plastic surgery in May. So I want you to see that the scale doesn't matter.  Those are the things that really matter, not the scale. Well, and of course all the NSVs, those definitely matter. So now I want to hear from you guys. Did you gain? Did you lose? How was your week? What do you think of weight loss plateaus? And if you have any tips or tricks on how you've broken through a weight loss plateau, definitely leave that down in the comments for us. We would love to hear it. Don't forget that I will link the Bob and Brad back and neck massager down in the description box along with nutrition coaching, links and discounts to my favorite things, and my Facebook group. Don't forget, follow me on Instagram, join my Facebook group. That's how you can keep up with me on my trip to San Diego and a little bit more day to day. And of course, if you enjoyed the video, give it a big thumbs up and subscribe. I'd love to have you here and turn your bell on so you never miss a video. I will see you in tomorrow's grocery haul and then I'll see you back next Wednesday for what I eat in a day. Happy Friday, happy weekend, and I'll see you next time. Bye.


In our experience, the difference between good and bad crisis management lies in preparation in terms of organization and perhaps even more importantly, mindset. We have therefore created a crisis simulation system which allows your executives or crisis management team to experience a realistic, erupting crisis scenario. You will be given the opportunity to stress test the readiness of your organization, your messages, your policies, and your manuals. The only way our simulations differ from an actual crisis is that ours are followed by an evaluation, feedback session, and an opportunity to update your knowledge capital without the risks associated with a real crisis. We have developed a crisis simulation system that allows your crisis management team to experience a realistic case and act just the way they would in a real crisis situation. Each simulation is tailored to your particular needs and circumstances. The simulation can be held either at your corporate center or at our offices. During the simulation, the crisis management team will be confronted with various tasks or events that they must react to. The simulation is managed from a central control room. We feed in news items, media reports, corporate events, legal documents, and other material that may be relevant for your particular situation. The crisis management team can follow all relevant news on a constantly updated news portal. They may also call or email whomever they want. We play the roles of the people they contact, whether it be the role of an employee, a politician, journalist, board member, shareholder, or other stakeholder, depending on the scenario. The simulation usually takes two to three hours and ends with a 30-minute feedback and discussion session. We have also conducted cross-border simulations by involving crisis management teams in different locations and on different levels in the company in the same crisis case. This has proven to be a great way to test the ability to communicate and cooperate at a distance and under extraordinary circumstances. All simulations have shown us the same thing. The more realistic the simulation, the more effective the training will be. The case is therefore scheduled and planned in minute detail. To achieve this, we need to work closely with the project manager from your organization. Together, we will ensure that all material used is realistic and in line with the case, regardless of whether it's TV broadcasts, newspaper articles, arrest warrants, or internal memos. Our crisis simulations allow you to gain the experience and build the knowledge capital normally gained through managing a crisis with none of the associated risks. So take advantage of this opportunity to go through a crisis on your terms.


President Mohamed Ibohari has stressed the need for the support of the United States and other important and strategic partners in combating the security challenges facing Nigeria. He said the support was necessary because the consequences of insecurity in Nigeria would affect all nations. According to a statement by a special advisor on media and publicity, Femi-Additional, the president made the call during a virtual meeting with the U.S. Secretary of State, Mr. Anthony Blinken. The security challenges in Nigeria remain of great concern to us and infected more negatively by existing complex negative pressures in the Sahel, Central Africa and West Africa, as well as the Lake Chad region. Compounded as the situation remains, Nigeria and her security forces remain resolutely committed to containing them and addressing their root causes. The support of important and strategic partners like the United States cannot be overstated as the consequences of insecurity will affect all nations, hence the imperative for consigned cooperation and collaboration of all nations to overcome these challenges. Our by-national commission between the United States and Nigeria gives us and gives our governments the chance to evaluate every year the progress that we've made to our joint goals, strengthening democratic institutions, promoting economic diversification and trade, expanding our security cooperation. We're very much looking forward to BNC later this year and the chance it offers to improve our cooperative efforts.


Hi, welcome to Visual Studio Toolbox. I'm your host Robert Green and we are having a special episode today. We are celebrating a number of milestones. Number one is the release of Visual Studio 2017, which launched on March 7th and is available. Two, it is the 20th birthday of Visual Studio. That's right. The first version of Visual Studio was Visual Studio 97. That was in 1997. So that was 20 years ago. Three, it's the 15th birthday of the.NET framework, which first appeared in 2002. That's when Visual Studio.NET appeared, not coincidentally. The fourth thing we're celebrating today, another milestone is this is episode 200 of this show. That's right. I've been doing this show since, let's go back and look, May 11th, 2011. We've made tremendous enhancements in the show. We've gotten better, particularly at picking the pictures that we use. Look at that. That is awful. So 200 episodes of the show, new version of Visual Studio, 20th birthday of Visual Studio, 15th birthday of.NET, a lot to celebrate. So I figured what I would do in this show is take you on a whirlwind tour of Visual Studio 2017 and show off some of the new features. Now, there's a lot of material out there on 2017. We did a two-day launch event. So there's keynotes, there were demos, and then there are a number of additional videos that are available there. So if you have watched all of those, and you've read all of the blog posts, then you probably won't see a lot new because that's where I got a lot of my demos from. But I'm assuming that you haven't necessarily watched all the videos or read all the blog posts. I'll link to them in the show notes. So if you haven't, then I think you'll see a lot of things in the latest version of Visual Studio that you'll like. So that's what we're going to do. We're going to do a tour of the product. We're actually going to start with installation, which is bizarre because when was the last time we started a, let's look at what's new in the product by launching setup. But we've made dramatic changes in the way that you install Visual Studio. We heard loud and clear that setup was a very long process and it was very difficult to identify which pieces of the product you wanted to install. I don't want to do C++ or I'm a web developer, why do I need to install WinForms or I don't do web stuff, why do I need to install that? So what we've done in the product is we've done a couple of things. One, we've made it a lot easier to install just the pieces you want. We've also enabled, for the first time ever, side-by-side installation. So you could have Enterprise and Community and Pro on the same machine at the same time if you have the disk space. I'll get to that in a moment. So let's say I wanted to install Visual Studio Community. I go to install and the first thing that shows up are the workloads and workloads or components that give you the ability to do certain types of development. So for example, I could choose to install the UWP development, Universal Windows Platform or here's ASP.NET and web development. Here's desktop development. So I'm going to check that. And then if I also want to do Node or Xamarin, that's mobile development with .NET or game development with Unity, we've broken things down into a number of workloads. Here's .NET Core, if you're doing .NET Core, ASP.NET Core, et cetera. So you can choose just the pieces you want. Then we'll show you what the install size is going to be. And then a couple of things you should look at are optional components because again, not everything is installed. You have the ability to then ask for additional things. So maybe I want F-sharp installed because that's not installed by default with the desktop development workload. Then what you can also do is go into individual components and then choose from a long list here. We don't have searching in here yet. Hopefully that'll show up fairly soon. So you can install additional things. For example, the GitHub extension for Visual Studio. So if you want GitHub integration inside Visual Studio, this does not get installed by default. So you'd probably want to install that. Then if you're going to have multiple versions of the product on your machine at the same time, you have the ability to give things an installation nickname, which I highly recommend. Because if I now installed Visual Studio Community Edition, then in the start menu I'd have Visual Studio 2017, which is my enterprise. And then I'd have Visual Studio 2017 parentheses two, which is my community edition. So you should give it an installation nickname of something like community so you can tell the difference on the start menu. Okay, so now you install that and where does everything go? Program files, x86, Microsoft Visual Studio 2017. And here's the directory for enterprise. There would also be a directory for community right next to that. And if we look inside here, we see it's pretty much everything. Here's common seven, IDE. Notice that the public assemblies are no longer installed in the GAC. They are laid down on the disk. This makes it really easy to have multiple versions side by side. And if you wanted to, you could update them on different cadences. The downside to this of course is it takes up additional disk space. So if you want multiple versions, be really good if you're book authoring or if you want to do a blog post and make sure that you don't include any of the enterprise features, you could have the additional versions in there or you can just stick to one version. In my case, I've got Visual Studio Enterprise installed. Okay, so now we launched the project and one of the first things we'll see is the new start page. We've got a redesigned start page where we make it a little bit easier for you to get started with your applications. There's a getting started section. Then of course there's the recent projects. We now have the ability to pin a project. So if you're going to be using a project over and over and over again, you can pin it and then it won't disappear. And then instead of just recent, here are the things I worked on today. Here are the things I worked on this week. I can pin this and escalate it up into the pinned. I can of course unpin. Of course, they have the ability to do a new project. Couple ways you can do a new project. You can of course control shift in or click new project and get the traditional dialogue where we show everything. And then if you want to find a particular project, you can go looking around or we'll show you the recent project templates you've used. So here's an MRU of project templates or you can go searching. So let's say I want to do an iOS watch template. I don't really know where that is. I just type watch and I can do a blank app watch iOS. And this calls up the new project dialogue goes straight there. So I also of course learn where this project is located. So that makes it a lot easier to start with a new project or of course use the recent project templates. I can open a project or a solution, a website. We now have the ability to open a folder. So that's a lot of people doing web applications do that. So I can directly open a folder and then I can open directly from source control whether it's Visual Studio Team Services or GitHub. Now this choice to open a GitHub repo will only be here if you installed the GitHub extension which is not necessarily installed by default. So again, go into the installation. So if we did something like that we'd go into the Visual Studio installer and then choose modify on enterprise which is the release I have. And then I can either locate it under individual components here or go into the individual components tab and go find it. Okay. So now when I have that I can connect directly to my GitHub repositories. It cracks me up that mine is always the last one that shows up. Here's Azure Readiness. Here's James Montemagno because I follow his stuff on GitHub. Here's a Microsoft repository that I belong to. And then if I wait long enough then my repos will eventually show up. Not 100% sure why it takes so long for mine to show up but there they are. And here are my GitHub repos so I could connect directly to one of these and clone. These are disabled because I already cloned them earlier when practicing but I could clone this right from here. That's pretty cool. Okay. So let's open up a solution. We'll do some demos. This is a solution. If you've seen me talk you've seen me use this project over and over and over again. It is a WPF application that talks to a WCF service that talks to a SQL Server database. So it's my canonical WPF internal line of business application project. Okay. So let's collapse some things. Let me show you this again. Let me close the solution. Let me open it. And then watch as each project loads initializing loading. Now this is a fairly small project. It's fairly small solution with only three projects. It didn't take that long but you could see that it was taking time for each project to open. Imagine that I had 27 projects in here or maybe it's a Xamarin project which has a Xamarin solution which has a Mac project which takes a while to load because it's checking to see if I have a Mac which I don't have or UWP which also takes time to load. It can take time for all of those projects to load so you can get started working on it. Well, there's something we can do about that. We can go into tools options. We can go to projects and solutions and we can turn on. There it is. Lightweight solution load for all solutions. Okay, and now let's close this. Reopen the solution, ready to go. Now none of the projects have loaded yet but I'm ready to go and open the project that I wanna work on and the other ones don't open. So the nice thing about lightweight solution load is the solution loads with nothing loaded, none of the projects loaded and then you can just load the ones you want as you work on them which could potentially save you a fair amount of time on solution load. Now there are a couple things. If there's something in Visual Studio that requires the project to be open, then we'll have to open the projects but things like renaming, refactoring, searching, we can just look through the files on the disk and we don't have to load the project to do those types of things. Okay, now the start page by the way has moved. It's now under file. So I can get it back by going to file start page. Used to be under view, now it's under file. Okay, so now let's look at some of the enhancements in Visual Studio that help you code. Every single version of Visual Studio ever released has provided a number of tools that make it better and more productive for you to do your coding. So we're gonna take a look at a few of the things that are in here now. So for that I need to open this project and I go to one of the view models. This is charges view model and I'm gonna come down to the constructor and let's look at IntelliSense filtering. So if I type this dot, there's a decent sized list here. There's a number of things here. I've got fields, I've got properties, I've got methods, I've got all kinds of things but maybe I just wanna be able to filter on those. So I'm gonna type this dot and notice these little icons down here. I can just look at the properties or I can also look at the events or just the events. I can look at the fields, I can look at the methods and there are keyboard shortcuts that do all of these. Alt-M, Alt-V, Alt-P, Alt-F, P, M, et cetera. So if I just wanna look at events, oops, I was aiming for the Alt key there. Alt-V will just scope that down to events. Now if I type this dot V, we go to the first V and you can see that the Vs are capitalized. We're doing some match highlighting here and what's really cool about this is if I type capital V, capital C, then we'll do camel case matching and get me directly down to view charge. So if you ever have something with a get and 27 get methods, you've got get employee, get charge, get report, et cetera, et cetera. You could type capital G, capital R or P or V or whatever and scope down to only those methods. So it makes it much faster to find things. That's pretty cool. We're also trying to get cleverer about what shows up in the IntelliSense. So if I say this dot C, notice that charges is now highlighted because it's obviously the first thing there. I type to C, there's one thing that starts with a C. So charges is highlighted, now I can press dot and continue on whereas before I would have to hit tab and then the dot. So that seems like a minor thing but you wind up doing that six or seven thousand times that's really gonna add up to be very, very cool. Okay. In 2015, Visual Studio 2015, we introduced a number of refactorings because remember, we rewrote the compilers that is the famous, yes I know, I'm in the studio. I love it when I get a notification for meeting them already at. Okay, so remember in Visual Studio 2015, we added a number of refactorings and things that are going on in the compiler. We rewrote the compilers, this is Project Roslin, so that the compiler is working in the background to give you tips. So for example here, we're getting one, I can remove the this qualifier because it's not needed. We had a bunch of refactorings in the previous version and we've added some additional ones. So let's take a look at those. So I'm going to go to a method called saveChargesAsync. And what I'm going to do is loop through all of the charges, create a new instance of the charge class, fill out a bunch of properties and then update the charges by passing that in. Now there's absolutely nothing wrong with this code. It's readable, it works perfectly, but you might be looking and saying, well, wait a minute, there's better ways to do that because you could write the code that looks like this, create a new charge and then instantiate that and fill in all the properties at the same time, you could save yourself some typing. So notice there's nothing wrong with this, we're not flashing error messages, there's no light bulbs showing up, but there is in here three dots under, well actually it's more than three, it's five dots under new because we're very subtly telling you, you know, there is something you can do here and so if I now click on that, you can simplify the object initialization by changing it to this. Okay, so I say, yeah, all right, let's do that, preview the changes, let's apply that and Visual Studio will change that code for me. So this is a perfect example of things that could be made better in your code, the way that you could improve your code, it's not worth putting a squiggly under there, it's not worth jumping in your face and flashing up a light bulb with all of these compiler things going on and the tool tips, we're trying to be very clever about when we get in your face, if you make an error, we should put a red squiggly there and get in your face. If it's just a tip or suggestion, you know, I don't necessarily want Visual Studio to constantly be interrupting me because I could make a minor improvement, but it is nice when Visual Studio alerts me that there's something that can be done there. So we added that very subtle thing in with the object initialization. We've also added one with some of the C-sharp features, C-sharp six features, excuse me. For example, convert to interpolated string. So I'm going to create a message and I'm going to pass in today. Again, nothing at all wrong with this, but I'm using string format and what we introduced in C-sharp six was the ability to do a string interpolation where all I have to do is put a dollar sign there and then I can directly stick in system.datetime.today instead of having to do the zero and then the argument that goes in and lose track of that. So again, there's nothing necessarily telling me but if I highlight over this then I get a tool tip and then the quick action is you can convert to interpolated string. So I'm going to do that, okay? So that's built in. All right, let's go to the data project here and in the models folder, let's add a new class and I'm going to call it person. So I want to add a person class. And then I immediately remember, oh wait, these things are supposed to be DB person. So I can come out to the solution explorer, right click on this and rename and I've always had the ability to change to DB person and then Visual Studio says, oh, you renamed the name of the file, would you like to rename the name of the class? And I say yes and it changes to DB person. What we have now added is let's say I changed my mind and I set that back to person. Now I get a tool tip that says, would you like to rename the file to person? And there I can say yes, of course I can keep them different but I can synchronize type names and file names both directions now instead of just unidirectionally. Okay, so we've got person in here. All right, so we looked earlier and this is a kind of a good example of code style. So the style here is that I'm using this or the style is that I'm using var. I don't have to use var. Me personally, I love var because I've never been a big fan of having to type a type name twice, right? Some giant class name that I don't really know how to use, thing equals new, some giant class name that I don't really know how to use yet, right? I like to be able to say var and I like to even better, I like to spell it right. Okay, so what can I do about this? What can I do to enforce my particular code style? Well, I'm going to go into the quick launch and I'm going to look for code styles and in the options, we list a number of code styles. For examples, do we have a preference for using this? What's our preference for using var? Under formatting, in general, how do you want to format indentations? Where do I want the braces, new lines? Do I want my opening brace on a new line for types or methods? There's a whole bunch of things that I can choose from here and in the bottom here, we show you exactly what it's going to look like, the default and if you change it. So let's go back to the general, this. I want to get serious. I don't want to use this ever but I don't want to be really bad about it so I'm just going to say this is a warning. I just want to be warned when I use this because I really want to force myself to clean that up and then for vars, I'm just going to get really hardcore about it and I'm going to say always need to use var and if you don't, it's an error. Now, I don't necessarily recommend that you do this in real life although it would make a pretty fun April Fool's prank. Okay, exit out of here, no changes yet because I have discovered that sometimes you have to close the file and then reopen it and now I'm getting warnings under every use of this and if I do something like this, let's see what happens if I do string message three equals hello, all right, yep. I can use var instead of an explicit type. I'm going to get an error there or if I say charge, charge two equals new charge, all right, I'm going to get an error there because I'm not making this a var. So you have the ability in the code styles to really get specific about things. Now, again, I'm just going to set this, I'm going to set this to a warning because I do want to train myself. I use var quite a bit but I just want this to tell me that things are warnings. I'll leave these things at warnings, okay. Now, if I build this, when does it go in effect? He asks. All right, so the compiler has now built this, the squigglies show up. So there is a bit of a lag sometimes between when things appear. I think if I left it there for a while, next time the compiler runs in the background it would update. So using the styles, you can control a large number of things particularly around in the use of these styles and these use of coding conventions. So you could decide for yourself or for your team, these are the way, this is the way we want to code. Now, these are set at the visual studio level at the moment. So what if I wanted to share those, literally share these types of things across multiple users or I wanted certain styles to work in some projects but not necessarily others. So there is a way you can do that and that's by using a .editor config file, .editor config it's an open source file format that helps you with formatting and code style conventions and we have support for it in visual studio. So let's look at an example. So right now, let's say we go into dbcharge for example and when I press tab, what am I getting? Well, let's see, let's go to tabs in C sharp and when I hit tab, I'm inserting spaces. Now there is a way to see this. I can look for white space. I guess I can't do it from there. I gotta do it from out here. White space, nope. Oh, I typed it in the wrong place. Duh, let's go into the quick launch. Type white space, nope. Where is white spaces? Oh, the problem is it's multiple words. White space, there we go. Okay, turn that on and I can see that when I press tab, I'm getting spaces. Well, I've decided that in this particular project, I wanna see tabs when I press tab. Now again, if I come up to the options dialog and set use tabs instead of spaces when I press tab, that's gonna be for all the Visual Studio. So in order to make this change only for this particular project, I can use a .edit config file, .editor config. So I'm gonna add to this project a new item. It's gonna be a text file. Where is text file? There we go, and I'm going to call it .editor config, okay. So I have not played around with .editor config a lot, so I'm going to do a very, very rudimentary version of this. There is documentation on it. I'll put a link for that in the show notes where we talk in much greater detail about the types of things you can do. And I'm going to say root equals true, and then I'm going to say for cs files, star.cs, yep, then indent tab, oops, indent style equals tab, okay. That's all I need to do. Save. All right, let's save all. Now I do believe you have to close and reopen the solution for this to take effect. So let's close this, let's reopen it. So now if I go into any of the files in this project and press tab, I'm gonna be using tabs. If I go into any of the files in the other projects and press tab, I get spaces. And because this is now part of the project, I can check that into source control and make sure that everybody uses it, okay. So that is dot editor config.  And why, why does that not show up? Edit, advanced, view white space. Maybe I'll just learn control R, control W and be done with it. Alrighty, let's look at navigation. We used to call this go to, but I'm sorry, used to be known as navigate to.  They don't necessarily navigate to places in their code. So control T will pop up the go to dialogue and in line of course. And I want to look for charges. So I type CHAR, let's magnify that so we can see what's going on. And I see all of the things in my solution that start with char. Now again, I want to be able to filter these. So maybe I just want to look for a particular line or particular files or the types or the members. And notice that when I select type, if I get a T here, member gives me an M, symbols gives me a pound. So if I, for example, wanted to do types, I could come in here directly and type CHAR. And then I would look at the types that start with the CHAR that automatically selects that. There are keyboard shortcuts for each of these.  Okay. Now, as I scroll through this, and let's get out of magnifying mode to see that, as I scroll through these, I'm either going to go to that line in that file or if it's in a different file, then that gets opened up in preview mode. Which is kind of cool. So I can see, of course, if I press enter, I'll go directly to it. And if I press the gear to show settings, I can center the window, show details. I can choose whether or not to use the preview tab. I can turn that on or off. Okay. Then, next thing I want to look at is find all references. So let's go to the DB Charge class. So I want to see everywhere where this is used, where to go, there it is. So I'm on that, I right click and, or shift F12 and I find all references. And notice that we've improved this quite a bit. We're now not only showing all of these, but also giving the ability to group by them. I can group by project, then definition. I can group by definition only. If I right click over here to the right, then I can show additional column. So I added a file, I believe. Oh, that was already in there. I can also, I'm sorry, I can change the groupings. So I can group by definition. I can group by file. Yes, and I added, yeah, pretty sure I added one of these, kind of forget. So project, then definition. There's multiple ways to group these, definition, then path. So we've dramatically expanded this. Now, if I wanna keep this around and then do another search, I can keep the results. Let's move this off to the side. And then let's do a find all references on employee ID. So I can find references for multiple things at the same time and kind of save those results. All right, that's good. All right, so now let's come back into here. Have you ever scrolled down in a method and you're looking at something and you don't remember where the various pieces are? Notice that we now have these dotted lines and this is called the structure visualizer. And if you hover over that, it will show you the structure of your code. So for example, what does this brace go to? This brace goes to the for each. And this brace then goes to the async. This brace goes to save charges async method. This one probably goes to the class, which means this one must be the namespace. So no longer do you have to scroll up and try and figure out where in your code you are you can turn on or of course you can turn them off. These structure visualizers. There is a option under text editor general to where is it? Text editor general. There it is. Show structure guidelines. So you can turn it off if you don't want it. All right, let's take a little look at debugging. So let's put, let's come up here and put a break point right here. And then let's run this. Okay, what it's going to do is it's going to spin up the WCF service and then it's going to open the WPF project and it should hit that break point. Of course not. All right, let's set a different break point. Okay, let's go into the main window view model and there is a method in here called show charges. Pretty sure this is the first code that runs. So I'll put a break point there. Now I'm pretty sure I'll hit the break point. There we go, perfect. Okay, so now let's say I want to come down to, for example, this line of code. Well, I've always had the ability to right click and then scroll down here and run to cursor or I could set next statement. I could also do keyboard shortcuts but that's potentially a bit of a context switch. I'm staring at my code here. I'm trying to think about what's going on and I would just want to come down to here without having to right click, roll my hand over, search through the menus. What I can do now is notice that next to every line there is this glyph and this is called run to click. So if I click this, then I immediately run to that point then I can click this and immediately run to that point. Again, this is one of those things that appears to be very minor but if you think about it as you're debugging over and over and over again and moving from line to line to line, how much easier is it to just click, especially if you're skipping over multiple lines and having to right click, hope you clicked on the right line and then locate run to cursor. So that's a relatively minor enhancement but one that's going to add up over time. Okay, so now let's look at another debugging tool. This one's the new exception helper. So I'm going to come up to where is it? The WCF service and get outstanding charges for employee. We look by employee ID. So what I'm going to do is purposefully break the code by entering an employee that doesn't exist. Okay, so now let's run this. Boom, blows up and it blows up because I told it to blow up. Okay, so here's the new exception helper. All right, so the entire line of code is highlighted. The pop-up is smaller, it is non-modal, it's less destructive. It shows the exception type and the error message and whether it was thrown or not thrown but there's additional information that I can see. I can click to view details and then I can set a watch on things. I can copy the details. I can go into the exception settings. All right, choose one this is thrown and I can also open the exception settings and decide what gets caught and what doesn't get caught. I can also edit the conditions from in here. So much more information, much better, giving it much better at giving you the ability to handle exceptions. And I got to remember in here to take out all of the code that I added that breaks this. Okay, so now let's take a look at a feature. I think this is probably my favorite feature. Certainly one of them and that's live unit testing. So I'm going to open up the live unit testing demo which is just a very, very simple console application. All right, it's gonna do some math. We're gonna add, we're gonna subtract, that's all. All right, so I put in the program. This would always help if I put this outside the class file. There we go. So I'm adding to this a class called My Math and something that we do all the time is inside a program we'll add multiple classes. And then of course at some point you might want to separate these out. So now when I click on this, I get a light bulb that says move type to mymath.cs. I'll say yes, thank you very much. Okay, all right, so now if I go to My Math. Okay, I can right click on My Math and let's create unit tests. Now I can choose the frameworks for what I'm going to do. I want to make sure I choose mstestsv2. I put it in a new project, otherwise I'll accept all the defaults. And then we're gonna create unit tests and in my add test method, I'm going to save our result equals My Math.add2 and 5. And then I'm going to assert.isTrue that seven is what this returns. Okay, so and good. And I'm gonna leave the subtest not filled out yet. All right, so build this. Great, now I've got this super-duper calculator. I've got this amazingly awesome unit test. I'm good to go. Now I can go to test windows and call up the test explorer and here are my tests and I can remember to run all my tests. I of course set up continuous integration and make sure that they get run automatically. But I'll just remember to run things from inside Visual Studio, add test work, subtest fails because I haven't done anything yet. All right, perfect. Now I go back to My Math and I make a change to this code. I've now broken my test, right? Of course, if I come into the test explorer and rerun my test, it will fail. But wouldn't it be nice if I could be told right now, hey dude, you have just written code that's going to break one of your tests. And the way we do that is through a feature called live unit testing. Now to have live unit testing, you have to add a couple Nougat packages. So I'm going to right click here and I'm going to manage Nougat packages and I am going to browse for MS test and I'm going to add MS test test framework and MS test dot test adapter, okay? Now I should say that live unit testing works not only with MS test, but also N unit and X unit. But I'm using MS test here. So I'm going to add the test framework, Nougat package. Then I'm going to add test adapter, okay? Worked, cool. Close that, all right? So far nothing works, but watch. If I go to test, live unit testing and I start, watch what happens. In the background, the compiler is running my unit test for me and it tells me right now that this test is going to fail. Notice if I look over in the test explorer, that test is now marked as having failed. So the compiler will run my unit test for me and it tells me that this code is not covered by a test because of course my test doesn't do anything yet. And also in the test shows me what tests failed. If I hover over this, I can see covered by one test. If I go into my math and hover over this, it says covered by one test. It says covered by zero tests. If I click on this, it tells me what test and then it shows me that it failed and it shows me the last time and the stack trace. Okay, so now if I change this back to code that will work, then it immediately, well, not immediately, then it relatively quickly in this very simple case turns back to the check mark and shows me that this passes. So this is awesome. Now you might be saying, oh, that's really cool but I could see where that might get in the way. For example, if the test takes a very long time to run or if you're making changes to a method that you know is gonna break the test because you haven't finished the code yet, there's a couple things you can do. You can right click and exclude this particular test from running or you could go to test live unit test and pause or just flat out stop live unit testing. So you can decide when you want it to happen. Do you always want it to be running or do you want to turn it on and off as needed? I suspect if you're starting to write a method or you're making major changes to a method, you're refactoring it, you're totally changing the logic, you don't necessarily want it to constantly be told that you broke the unit test. So that might be a case where you would turn it off and then turn it back on. Okay. So let's see what we're doing on time. That's been a fair amount at this point. So let's, of course I could go on for quite some time, but this is probably a good place to stop. I'll mention a couple things that are cool and that I like. One is we're going to tools extensions and updates and we look online. We can see that if you remember, the very first episode of this show is on the productivity power tools. This is back in the day when I was told to keep episodes 20 minutes or less, which is why I did a part one and a part two. That of course went out the window a long time ago. The productivity power tools 2017 are available, and you're going to have to wait till next week's episode to see those. Justin Clairbrute will be on the show and will show us the productivity power tools. Another one of my favorite features is in the Xamarin realm. If I go to cross-platform and I build a Xamarin application, I now have in the new project dialogue not only the ability to choose what UI technology forms are native, I want to share project or portable class libraries, but there's also now a master detailed template which writes a lot of boilerplate code for us automatically to do master detail. And then I also have the ability to check host in the cloud here and Visual Studio will spin up an Azure app service for me and wire it up to use in my Xamarin application. So that saves quite a bit of learning how to do those things, which I think is pretty cool. And then something you might want to check into, if we go to www.visualstudio.com forward slash VS forward slash preview, we've introduced early access to the Visual Studio preview. So sort of similarly to how you have the Windows Insider program where you can get interim builds of Windows, we're doing something similar with Visual Studio. So you can download the preview versions and be kind of on the preview cycle where you'll get additional updates before they are put into the product for real. Now, our intention here is not to cause lots of instability. I know with the Windows, there are builds like the fast ring where you're on the cutting edge and things probably break. We're not, we're trying not to do that with Visual Studio. So the stuff that makes it into preview is pretty close to being ready. You can kind of consider it RC-type quality. Our intention is not to be giving you stuff that's so early on that it breaks your Visual Studio. But that might be something to play around with if you always want to see the latest and greatest. So I hope you saw a lot of interesting things in Visual Studio. This is kind of a nice tour of some of the things that are in there. I highly recommend you go on channel nine to the Visual Studio 2017 launch event where you can relive the launch, the keynotes, as well as a number of studio sessions and then a large number of videos where we showcase all kinds of features including obviously a lot of the ones that we showed here. So the Visual Studio start page, three new debugging goodies, one of which was click to run. So a couple others. So you'll see where I got some of or a lot of my demos from but then you'll also see a whole bunch of things that I didn't cover here. So Visual Studio 2017 is available. Go ahead and download it whether it's one, two or all three editions play around with it. And we will see you next time on Visual Studio Toolbox as we head into our third, what's the word for a hundred episodes at a time, right? This is episode 200. So our next one's 201. So on we march to 300. Thanks.


Hey, hi folks, this is Abha Income here. I'm a software engineer at BigBinary and today I'm here to speak on Reward Back to Rest or Resume Graph Cure. So a bit of introduction about me. I love open source projects and I hope everyone here does love open source projects. I love to contribute to open source projects and on daily basis, like on regular basis, I try to contribute to Ruby on Rails recently, like just 5-10 minutes ago, my one P was moved to Rails. Also, I try to contribute to React, GraphQL and to Bookoff, which are also some open source packages, libraries, if you know. I write personal blogs on my website, which is abhaincom.me. You will find blogs which are mostly related to Rails, GraphQL and related subjects. Recently, I started learning TypeScript, so there's a fun story about it. I started learning TypeScript because I had some packages in my mind, which I wanted to build and I started this as a 100 days of coding challenge. So if you guys know, 100 days of coding challenge here, right? So basically what you do is you learn something on each day and you post the update on Twitter so that in this way, you're just publicly committing to people that, yeah, I'm learning something. Apart from the coding world, I love basketball. I love to play basketball and I'm a huge fan of Golden State Warriors, which is an NBA team. So there's a game coming up on Sunday where my best favorite player, Steph Curry, is going to be playing and he's been out for the entire whole year, I think. So let's get back to business, revert back to rest or resume GraphQL. The title of my presentation does not give the entire context, so let's get started from the beginning. So the presentation would be typically in format, like it has a movie. First, we'll start with the climax. Then what we'll do is we'll understand what happened previously and then we'll come to the present scenario. So I'm just going to reveal the climax for what we did. Did we revert it back to rest or not? And yeah, we did revert it back to rest. There's no gift here coming, but I think it's something related to the internet. Anyways, so there's an obvious question which comes to everyone's mind that why did we use GraphQL in the first place? And to understand that, we need to... So how many people here know GraphQL or been using GraphQL in their productions? I can see two, three hands, okay. So you guys are here in for a treat. So you'll be understanding a bit about GraphQL as well here and you'll be understanding how to look, whether to use GraphQL or not in your applications. So to understand the background scenario, why did we use GraphQL in first place? We need to have a bit of understanding about what application we were developing first. So I'll just introduce a bit about our application and that would help everyone have a bit of context about why GraphQL fits perfectly in it. So our application is called as Nitro Help, which is a contextual help management system in which we have three different applications. If you could see, we have a web application. We also have a widget, we have a chat application. So basically what happens here is, let's say you have e-commerce websites or there's some organizations who have e-commerce and all those things, they want to have end user or end customers to be able to interact with them if they face any issues. So if you face issues with your order, the placement or if you face issues with your payment and all those things, you want a way to interact with those. So that's where the web application comes into picture. Similarly, we have a widget application which can be loaded on your organization's website and people could easily interact with that widget and find out solutions easily. So if there are some FAQs and all those things, you could find it out. Also we have the chat application which helps the users to interact directly with the agents of the organization. So you could describe your problems and get the solution as soon as possible. So we have these two, three applications which work in parallel. And now we also have an Insights Engine and a lot of different applications and all these applications, when they work in parallel, you need to know how would these applications interact with each other, right? And so the very obvious answer for this question is using APIs and that's where GraphQL comes into picture. So basically what happens here is previously before GraphQL was born, REST was the de facto. We didn't have to worry about which tool or which framework to pick. So REST was default. Similarly now GraphQL comes into picture and now that's where we have to pick between whether to use GraphQL or whether to use REST. So before GraphQL and before REST, there was SOAP. So SOAP, REST replaced SOAP. Now people say GraphQL is going to be replacing REST. So there are a lot of articles or a lot of people who feel strongly about it and speak openly about it as well. So we'll look into it. Why GraphQL was a good thing for us and how could we be able to benefit using GraphQL in our application which is called Nitro Help. So I've listed down some of the advantages. So people who do not know GraphQL, these are the advantages plus there are many advantages which you get with GraphQL. So if you go out on the internet, you would be able to see them all. So the first advantage which we got was no overfetching of unwanted data. So I'll explain this with an example here. So what I mean to say here is in REST, what happens is let's imagine we have the user's details API endpoint which is API v1 users with the user's ID. And in that API endpoint, what we're doing is basically returning the user's first name, last name, email address, company, Twitter, Hunter, Lana, Avatar URL. So let's now imagine in the Nitro Help web application we're consuming this API. We're using this part of all the details from the server side which is coming. We're using all the things in a proper way. And that's a good thing, right? But now what happens is since Nitro Help uses the same, now the visit application also needs to use some details of users to be displayed on the visit. And it only needs the name of the user and the avatar. It does not need other details like what is the email address, what is the company name avatar URL on all the other things. And in that's why what happens is in the visit we are over fetching data. We are asking for unnecessary data which we are not going to use anyways. But GraphQL comes with the benefit of that. What GraphQL does is basically whatever data you ask for it only returns only those fields. It does not give you other details which you do not require. Like in case of visit we just wanted ID, name and avatar. We'll be asking for those things. We'll be getting those things. And similarly if you need same details on the web application you would be getting those things. So that's the first advantage you get using GraphQL. Second advantage which we get is you get many resource data in single request. So for this, this is a live screenshot which I've took it from our application. And here if you can see it, if you do not it's okay. There are four to five requests which are happening. So I'll just explain those requests. So first there is a request which is happening for default views. Second for agents and third for tickets. So basically what is happening is to load that page we're making multiple round trips to the server. So we're making multiple API requests to which the page load time may be slow and the user experience kind of maybe would be slow in a lot of cases. And we want to avoid those things in as much as possible. So if anybody of you are doing multiple round trips that's not a good thing. And you should try to avoid those things. But with GraphQL what you could do is you could make one API call and send all the query string for all the things you need. Like for tickets, agents and default views you could make one just one request and within that request everything would be resolved. At sometimes at different places you might have a requirement where you want tickets to be listed faster or agents to be listed faster and then the rest of the things to be coming up. So GraphQL comes with an advantage of directives and all those things where lazy loading happens. But it always updates your views but that's a different advantage. So this was the second advantage we were getting in NitroHEL if we were going to use GraphQL. The third thing is GraphQL is declarative. So let me just explain this with a scenario. So a lot of here are front-end engineers I think, right? I'm assuming a lot of people work on front-end side. So what happens is sometimes when you have big teams where front-end and back-end engineers work in different silos you, the back-end engineers are still developing the APIs and they could not communicate what the API endpoint is, what details would be returning and what is the verb and all those things. So in those cases if you're using GraphQL you could assume that in the user's endpoint you would be getting details in such a way. So if you see, if you're asking for these things you would be getting that in similar way in just the in the data namespace which is a plus point for you because you could start building your components as soon as possible and also it's coming in a declarative format so you don't have to worry about if somebody does any changes to the attributes which an API endpoint is supposed to return. So that was the third thing. Fourth, GraphQL is strongly typed and I think a lot of people should agree that strongly typed is a great advantage because you'll be able to catch a lot of bugs and a lot of issues at the development side which could happen mostly due to the data being ambiguous. So in large applications you do not have a local system being configured for to have large amount of data, right? So when it goes to production it starts to break and since if your language is strongly typed what happens is you are able to catch those kind of issues earlier and being able to work on those faster so your Friday night is saved. All right, also the last advantage which we could see in Nitroil is using the powerful developer tools like GraphQL and GraphQL Playground which these are some introspection tools what happens is with these tools we get couple of benefits. First is you do not need to you get all the documentations on the tools directly whereas in REST if you want to do documentation you have to either use the Agri API docs or some people maintain it in the Excel sheets or something but with GraphQL you are able to see all the documentations. Also, both front-end engines and back-end engines could play on the playgrounds easily because they would be able to know what is the input is expected by the API and what output JSON it would be returning. So these were a couple of advantages we could see right now due to which we thought GraphQL is going to be a very, very powerful tool to be used in Nitroil because we had four different applications and in four different applications we assume that when team sizes grow you would be able to see a lot of people being in trouble if you start using REST. And also, okay, yeah. So these were some of the advantages due to which we chose to use GraphQL and I think if people do not know GraphQL you should look for these advantages in your applications as well. So yeah, wow, amazing decision, isn't it? So what happened was after taking this decision and using GraphQL for a long time in our application our team was very small at that moment. We were doing this as an internal product for our company and not as a business. So since we are a service-based company we have to have a billable hours to have everybody a good salary, right? So our team started to grow, a lot of people started to be onboarded on this project and it started to increase from three to four engineers to like 10 to 15 engineers who were working on daily basis on this project. And that's when we started to see a lot of problem and that's when we were like, we were solving one problem but also we were burning at other places and what were the things which we were burning? And that's where we had to stop, we had to think whether, okay, are we doing the right thing or not? Are we using GraphQL in a proper way or should we stop it? And so that's where we retrospected our things and we had to understand, okay, that's funny, okay. So we did some analysis and based on that analysis, we came to our current situation, that is the climax which I talked about, we reverted back to rest. And the couple of reasons which we listed out which led us to take that decision, I'll just speak about those and try to get everyone have a good perspective about it. So first thing, learning new technologies costly. So I think everybody here should agree. So here, I think more than only two, three people have no GraphQL and you guys, if you want to implement GraphQL, you all would have to learn GraphQL and then start working on it. So like I said, in our case, the team size grew from three to four engineers to like 10, 15 engineers working on daily basis and all these engineers come with, so these engineers may be of different type. Some may be freshers, some may be experienced steps. For freshers, the company has to invest in learning, react, rails, GraphQL and all those things. Now, it becomes very costly and for experienced steps also, some might know GraphQL, some might not. And for those who do not, they have to invest in learning GraphQL. So which is not a good thing. And after learning the technology, there comes another set of challenges. You do not have the hands on experience on it, right? You know the syntax, you know how it works. You know where to debug the code and all those things. But what happens when the real life situation or where a problem statement comes to you in form of issues and those issues when you have to solve, the people who are newly learned have to invest in understanding what is the problem, have to do a bit of research, investigate and come up with a solution. And maybe that solution is not correct, maybe that solution is not trustworthy. So we saw this problem and we were able to see that. Another problem which we see and it's since we are a service-based company and I think a lot of people could relate to it. In service-based companies, you have a lot of different client projects. So what happens is not all the client projects would have GraphQL, right? And when a new fresher who has learned GraphQL has worked for like six to seven months on this project and they have a good amount of hands-on experience that they should be shifted to a client project, that's when they say, I do not know REST. How do I do REST? So that's a problem. Now people have to invest in learning REST as well. So we didn't want people to learn new technologies just because it's trending and it's very good. We also need to think about our company's motto. The second problem which we saw was maturity of server-side and client-side GraphQL technologies. So let me explain. For people who do not know, GraphQL is just an enabler. What happens in GraphQL is you're just sending a query string on the internet and expecting a JSON to be returned, right? But on the client-side or on the server-side, how GraphQL passes those queries and how does it return the JSON is completely up to the technology stack you're using. So in our case, if I'm using Rails, I have to use GraphQL Ruby on server-side. And on the front end, if you're using React, you could use Apollo, you could use Relay, which has been developed by Facebook. So in those cases, you have to figure out the solutions for those things. So I recently was at GraphQL Asia in Bangalore last week and I saw a lot of people having different opinions about this thing. A lot of people were saying GraphQL on client-side is very easy because you just have to consume the API, right? You do not have to do a lot of things and build the components. But a lot of people said GraphQL on server-side was difficult and some people had an opinion. It makes their code structured and all those things. But we look into it, why GraphQL on server-side and client-side both were difficult for us. Firstly, we started using Elm with GraphQL and Rails. And with Elm, we saw a lot of difficulties. We were not able to do very small, small and trivial things, which we could do easily with other technology stack on the front end, like if you have JavaScript or React. So that's why we had to eliminate Elm from our code and we had to migrate it to React first. And then we used React, GraphQL and Rails and then we moved, removed GraphQL as well. So that was the first part and we saw a lot of difficulties in using GraphQL with Elm and that was because Elm was not that mature when we were using it. And I hope a lot of people who are working on Elm with GraphQL are trying to make it better. The second thing was, yeah, GraphQL on server-side is difficult. So I can assure you that it is difficult because I've faced a lot of difficulties working in it. I've been working on it for more than two years now and I could see a lot of problems in it. So let me just explain this with one of the examples. So this is a live screenshot I took of our application where we're building themes, basically. So what happens is for different clients, we want them to have the ability to build a theme so that they could go and edit that template page. They could change whatever the way the page looks. Like if they want the header to be changed or the header footers to be changed, the page contents to be changed, that could be done. So in that, we wanted to have a file upload feature. So what file upload is doing is basically, it's updating the background image. The blue area you could see, that blue area would be updated. And to have file upload in REST is very easy, right? To do file upload in REST, you just have two methods. Either you do it via multi-part form request or you do it via base64 encoding. But doing multi-part form request using GraphQL is not that easy because like I said, GraphQL just sends the query string over the internet and expects the decent response. But in our case, we were not able to make multi-part request. So I did a lot of work, I did a lot of research on it. I tried to build something out of it. And I was able to make a multi-part request, but the problem arises on the server side. Like how would GraphQL pass a multi-part form request query string which has been coming? So you have to write a monkey patch on the server side to make it pass. And once you do that, all the things, and you expect, okay, now it should work. Now the image has been stored in your database as well as on your cloud. And we saw that the images are getting broken and it's not working. So all the work which I did for three weeks, all in vain. So we came up with a solution called as Direct Upload to Cloud, which is a well-known solution. What we are doing here is basically, we are just uploading, we're bringing the signed S3 URL first and uploading the image to the server associating it in the database. And when user clicks on save, we're just referencing the image back in the database. But to find out this solution, it took a lot of time. And maybe this solution might be a good thing, maybe not because your server already, or your cloud already has the image. What if the user does not click on save? The internet goes off or they click on cancel. Now you have to worry about removing those things from your clouds as well. And this is just one example, but you face a lot of difficulties in a lot of different ways when you start to use GraphQL on the server side as well. So that was the second thing. The third thing we noticed was performance. So why we were able to see a performance issue in GraphQL is because GraphQL does not over fetch data. And yeah, one of the advantages which is of GraphQL is not over fetching of data was leading to a performance issue on server side. So I'll explain that with an example. We have seen this n plus one queries here. So here what we are doing is we are making a query for post with a limit five. So we are just pulling five posts with title, author details, authors, post name and all. So here what happens is when the request comes for post, you will be able to see a select query being fired for fetching all the five posts with limit and all offset being set. But since GraphQL does not over fetch data, the title would be resolved easily because it's just the property of post but author is an association. So it could not preload those things because we do not know whether GraphQL is going to ask for author details or it is not going to ask. So due to which we saw that all the five posts, it made five requests due to which we saw this n plus one queries issue. To be honest, there are solutions to avoid this n plus one queries problem. There are some batching techniques which have been written by Facebook or data loaders which they have written. You could see that, you could use that as well. Query depth, I'll explain this later. Okay, processing error in GraphQL is very difficult. I've struggled a lot here as well. So what happens is in GraphQL, you have three different types of error. One is first is error while passing a GraphQL query. So let's say if you have not defined a query in your schema, in your GraphQL schema, it starts to throw an error and the error message looks something like this, message, line, column, theme. Now nobody understands anything from this and there's no way to make it in a human readable format or in a better way. The second error which we get is while type checking, so since GraphQL is strongly typed, if you're missing some types or if you're instead of passing in a string value where GraphQL is expecting an integer, you, oh, sorry, I said wrong. If you're expecting a string value and if you're passing an integer, it starts to fail and this is how the error looks. So you need to handle these kind of errors. Apart from that, you have execution errors to be handled which is the real-time scenarios which we face every day. You have authentication errors to be processed. You have validation errors on your database which are returned to make sure that user do not make ambiguous, or do not send ambiguous data and you want to avoid such kind of things. And this is just one validation I added for Titan which says, title can't be blank. But if there are multiple validation errors due to which the query is failing, processing that becomes a bit of difficult and there are a bit, that was not a good thing for us. So best practices, I think it's clear on the server side, client side, there are no best practices been defined. Like I said, even if you design a file upload solution in GraphQL, if it has been done using best practices or not, or if it is the correct or trustworthy solution or not, it's not known. And also we saw a lot of issues, like just skip this, but let's say if you're doing a user update in that user update query, you're expecting a user input where name is mandatory and immediate manager is. But you want to reuse this user input because for create also, create user, you also need the same thing. But what happens is in the visit app, you just want to update the name of the user. So in that case, the user input could not be used. So you need to have best practices to say that, okay, for update, you need to define another user input. Frequent updates, so the packages where, since GraphQL is still developing, if there are frequent updates on your packages or tools you are using on the server side, you have to keep on maintaining your code a lot. So which is not a good thing. So that's why we reverted back, I had to rest and are happy with what we have right now. So what are the key, some of the key takeaways from this entire session. So we saw what are the advantages of GraphQL or REST, we saw what are the disadvantages of GraphQL on client and server side. And now we know, there comes the question again, do we, what should we use? Should we use GraphQL or should we use REST? So we have some, I think this should, I think everybody should be able to relate to this. So if you're using, if you want to use GraphQL, you need to see if you are using it, you're working in big teams where your front end, back end team is working different. You have a lot of people working on the application and there are a lot of different applications to be built. And also you're handling a huge amount of data. So if you're handling huge amount of data and a lot of people are working on this application, also make sure if these APIs are not been exposed to external users like GitHub exposes their APIs or a lot of people have to make, like PayPal has, PayPal or Stripe has their APIs been exposed so that we could integrate Stripe, right? So if you are building applications, something like that where you do not know who is the external user and who would be consuming those APIs, in those cases GraphQL plays a very, very important role. And I think that's where you would love using GraphQL. Use REST when you're working in small teams and in a very controlled environment. So just summarize it. So use REST when you're working in small teams. If even if the data is large, it does not matter because REST has been very mature enough on a brief front. And see that if you're working in a controlled environment where you do not want to expose these APIs, it's better to go with REST than GraphQL. So I rest my case here. So thank you guys and thank you for your time. Thank you.


Hello and welcome to the session. Let us discuss the following question. It says if O be the origin and the coordinates of P be 1, 2, minus 3, then find the equation of the plane passing through P and perpendicular to O P. Now the equation of plane passing through the point x1, y1, z1 and perpendicular to the vector n given by n1i plus n2j plus n3k is given by x minus x1 into n1 plus y minus y1 into n2 plus z minus z1 into n3 is equal to 0. So this knowledge will work as key idea behind this question. Let us now move on to the solution. We are given that plane passes through the point given by 1, 2, minus 3 and we are given that the plane is perpendicular to O P and vector O P is given by position vector of P minus position vector of O. Now position vector of P is given by 1i cap plus 2j cap minus 3k cap and since O is the origin position vector of origin is given by 0i cap plus 0j cap plus 0k cap and vector O P is equal to 1i cap plus 2j cap minus 3k cap. Now the equation of plane passing through the point 1, 2, minus 3 and perpendicular to the vector 1i cap plus 2j cap minus 3k cap is given by using the key idea minus 1 into 1 plus y minus 2 into 2 plus z minus minus 3 into minus 3 is equal to 0 and this is equal to x minus 1 plus 2y minus 4 minus 3z minus 9 is equal to 0 and this is again equal to x plus 2y minus 3z minus 14 is equal to 0. Hence the required equation of plane is x plus 2y minus 3z minus 14 is equal to 0. So this completes the question. I for now take care and have a good day.