[{"data":1,"prerenderedAt":421},["ShallowReactive",2],{"article-product-review-ndepend-part-1":3},{"article":4,"tags":114,"previous":129,"next":375},{"id":5,"title":6,"author":7,"body":8,"createdAt":103,"description":104,"extension":105,"img":50,"meta":106,"navigation":107,"path":108,"seo":109,"stem":110,"tags":111,"updatedAt":103,"__hash__":113},"articles\u002Farticles\u002Fproduct-review-ndepend-part-1.md","Product Review NDepend Part 1",null,{"type":9,"value":10,"toc":99},"minimark",[11,23,33,40,54,57,67,70,80,83,93],[12,13,14,15],"p",{},"Today, I tried a code review extension for Visual Studio.  The product ",[16,17,22],"a",{"href":18,"target":19,"rel":20},"https:\u002F\u002Fwww.ndepend.com\u002F","_blank",[21],"noopener","NDepend",[24,25,26,30],"ul",{},[27,28,29],"li",{},"As it was as an extension, the installation process was simple and quick and painless",[27,31,32],{},"Setting up the product to review\u002Fanalyze my solution (including many projects) was also very easy!",[12,34,35,36,39],{},"Very quickly (within minutes) the extension was able to analyze my code against many best practices, standards and coding techniques.  There are so many features within this product it is hard to adequately evaluate all features in one go.  I will document initial findings and feelings about this product, and hope to provide future reviews as I discover each of the features.",[37,38],"br",{},"\nThe immediate first thing I see is overview\u002Fdashboard of current solution\u002Fstatus, including 75 427 lines of code with a 5.5% debt ratio.",[12,41,42],{},[16,43,45],{"href":44},"\u002Farticles\u002Fimages\u002Fimage_636986200288720521.png",[46,47],"img",{"style":48,"title":49,"src":50,"alt":49,"width":51,"height":52,"border":53},"border: 0px currentcolor; display: inline; background-image: none;","image","\u002Farticles\u002Fimages\u002Fimage_thumb_636986200289974139.png",454,303,0,[12,55,56],{},"Of particular interest to me was the debt and issues identified.  The system includes 100+ code rules that can detect a wide range of code smells including complex methods, dead-code, bad object orientated usage etc..",[12,58,59],{},[16,60,62],{"href":61},"\u002Farticles\u002Fimages\u002Fimage_636986200291159252.png",[46,63],{"style":48,"title":49,"src":64,"alt":49,"width":65,"height":66,"border":53},"\u002Farticles\u002Fimages\u002Fimage_thumb_636986200292423409.png",457,202,[12,68,69],{},"Changing the sorting of issue, shows code related to each (in this case 70 rules)",[12,71,72],{},[16,73,75],{"href":74},"\u002Farticles\u002Fimages\u002Fimage_636986200294068991.png",[46,76],{"style":48,"title":49,"src":77,"alt":49,"width":78,"height":79,"border":53},"\u002Farticles\u002Fimages\u002Fimage_thumb_636986200295573812.png",208,470,[12,81,82],{},"Drilling into a few rules (by double clicking on any) you can see how this can be a very good tool to very quickly identify and put plans in place to resolve\u002Fcleanup and generally improve the code quality.  Rules can be edited, categorized and prioritized to meet your group\u002Fcompany standards.  Clicking on particular rules\u002Fwarnings allows you to drill directly to the code\u002Fproblem identified.  There is no hunting-pecking and trying to figure out what it thinks is incorrect.",[12,84,85],{},[16,86,88],{"href":87},"\u002Farticles\u002Fimages\u002Fimage_636986200296582570.png",[46,89],{"style":48,"title":49,"src":90,"alt":49,"width":91,"height":92,"border":53},"\u002Farticles\u002Fimages\u002Fimage_thumb_636986200298017103.png",453,236,[12,94,95,96,98],{},"Honestly, it is addictive to review the issues found and try to wipe them out.  Using this tool alongside Reharper R#\u002FCodeRush it is quite easy to generally clean up the solution.  Fixing issues, re-running the analysis just to find fewer identified issues is very satisfying.",[37,97],{},"\nI have not mentioned anything about the product’s ability to evaluate\u002Fwatch trends around code changes.  I hope to use this capability in the near future.  To be continued.",{"title":100,"searchDepth":101,"depth":101,"links":102},"",2,[],"2019-07-13T13:07:09.892Z","NDepend static code analysis tool that empowers .NET architects and developers to make informed decisions.  The tool estimates the Technical Debt evolution since the baseline.","md",{},true,"\u002Farticles\u002Fproduct-review-ndepend-part-1",{"title":6,"description":104},"articles\u002Fproduct-review-ndepend-part-1",[112],"productreview","BJhDIovWrZxHjaHDGCQMsFdAZ4ogTimaF_mfyhNkV9I",[115],{"id":116,"title":117,"body":118,"description":122,"extension":105,"img":123,"meta":124,"name":112,"navigation":107,"path":125,"seo":126,"stem":127,"__hash__":128},"tags\u002Ftags\u002Fproductreview.md","Productreview",{"type":9,"value":119,"toc":120},[],{"title":100,"searchDepth":101,"depth":101,"links":121},[],"You can trust our in-depth technology reviews to help you buy the best product for your needs.","https:\u002F\u002Fimages.unsplash.com\u002Fphoto-1598313183973-4effcded8d5e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=675&q=80",{},"\u002Ftags\u002Fproductreview",{"description":122},"tags\u002Fproductreview","QWuQ6OCE-GPj2FsnBT3Y0ZrbPceqOMsVbPLMErNCgz0",{"id":130,"title":131,"author":7,"body":132,"createdAt":367,"description":7,"extension":105,"img":159,"meta":368,"navigation":107,"path":369,"seo":370,"stem":371,"tags":372,"updatedAt":367,"__hash__":374},"articles\u002Farticles\u002Fvisual-studio-how-to-target-differentlatest-c-version-net-core-3-and-c-8.md","Visual Studio How to target different\u002Flatest c# version (.NET Core 3 and C# 8)",{"type":9,"value":133,"toc":365},[134,137,151,167,178,185,267,269,280,300,306,313,319,322,343,346,351,354,361],[12,135,136],{},"Know which version of c# you were actually using or wanting to try latest c# 8 features?  How to check?",[24,138,139,142,145,148],{},[27,140,141],{},"Open the project properties window (right click on project, select properties)",[27,143,144],{},"Select ‘Build’ from the left hand side options",[27,146,147],{},"Scroll down to the Advanced options",[27,149,150],{},"Select the desired version of c#, click ok   Wanting c# 8 selection? (released with .NET Core 3, and available as part of Visual Studio 2019 (latest release)     * For me, open Visual Studio select Help – Check for Updates (and download the latest release of VS.NET)",[12,152,153,162,163],{},[16,154,156],{"href":155},"\u002Farticles\u002Fimages\u002Fimage_637062268790299787.png",[46,157],{"title":49,"style":158,"border":53,"alt":49,"src":159,"width":160,"height":161},"border: 0px currentcolor; border-image: none; display: inline; background-image: none;","\u002Farticles\u002Fimages\u002Fimage_thumb_637062268791269872.png",393,100,"   After the update, open VS.NET revisit project properties and c# 8 should be available in the ‘Language Version’ selection list….but wait it is not there (the selection list is disabled and they gave me a clue…",[16,164,166],{"href":165,"target":19},"https:\u002F\u002Fdocs.microsoft.com\u002Fen-us\u002Fdotnet\u002Fcsharp\u002Flanguage-reference\u002Fconfigure-language-version","Why can’t I select a different c# version?",[12,168,169],{},[16,170,172],{"href":171},"\u002Farticles\u002Fimages\u002Fimage_637062268792583127.png",[46,173],{"title":49,"style":174,"border":53,"alt":49,"src":175,"width":176,"height":177},"margin: 0px; border: 0px currentcolor; border-image: none; display: inline; background-image: none;","\u002Farticles\u002Fimages\u002Fimage_thumb_637062268793729110.png",489,269,[12,179,180,184],{},[181,182,183],"em",{},"”The latest C# compiler determines a default language version based on your project's target framework or frameworks. This is because the C# language may have features that rely on types or runtime components that are not available in every .NET implementation. This also ensures that for whatever target your project is built against, you get the highest compatible language version by default.”","  Ok, so now the c# version is not selectable, it is based on the projects target framework. Here is the conversion chart…    ",[186,187,188,204],"table",{},[189,190,191],"thead",{},[192,193,194,198,201],"tr",{},[195,196,197],"th",{},"Target framework",[195,199,200],{},"version",[195,202,203],{},"C# language version default",[205,206,207,219,229,239,248,257],"tbody",{},[192,208,209,213,216],{},[210,211,212],"td",{},".NET Core",[210,214,215],{},"3.x",[210,217,218],{},"C# 8.0",[192,220,221,223,226],{},[210,222,212],{},[210,224,225],{},"2.x",[210,227,228],{},"C# 7.3",[192,230,231,234,237],{},[210,232,233],{},".NET Standard",[210,235,236],{},"2.1",[210,238,218],{},[192,240,241,243,246],{},[210,242,233],{},[210,244,245],{},"2.0",[210,247,228],{},[192,249,250,252,255],{},[210,251,233],{},[210,253,254],{},"1.x",[210,256,228],{},[192,258,259,262,265],{},[210,260,261],{},".NET Framework",[210,263,264],{},"all",[210,266,228],{},[37,268],{},[12,270,271,272],{},"Finally, that was my answer.  ",[16,273,275],{"href":274},"\u002Farticles\u002Fimages\u002Fimage_637062268794831916.png",[46,276],{"title":49,"style":158,"border":53,"alt":49,"src":277,"width":278,"height":279},"\u002Farticles\u002Fimages\u002Fimage_thumb_637062268796116567.png",499,293,[12,281,282,283,287,288,292,293,297,299],{},"References    ",[16,284,286],{"href":285,"target":19},"https:\u002F\u002Fdotnet.microsoft.com\u002Fdownload\u002Fdotnet-core\u002F3.0","Download .NET Core 3 Direct"," option Released 2019-09-23    ",[16,289,291],{"href":290,"target":19},"https:\u002F\u002Fwww.dotnetcurry.com\u002Fcsharp\u002F1489\u002Fcsharp-8-visual-studio-2019","New C# 8 Features","    ",[294,295,296],"strong",{},"One of the more important features…",[37,298],{},"\nNullable reference types (this is good addition)",[12,301,302,303,305],{},"The core idea is to allow variable type definitions to specify whether they can have null value assigned to them or not:     Weapon? canBeNull;",[37,304],{},"\nIWeapon cantBeNull;",[12,307,308,309,312],{},"Assigning a null value or a potential null value to a non-nullable variable results in a compiler warning\n(",[294,310,311],{},"the developer can configure the build to fail in case of such warnings, to be extra safe","):",[12,314,315,316,318],{},"canBeNull = null\n\u002F\u002F no warning",[37,317],{},"\ncantBeNull = null\n\u002F\u002F warning",[12,320,321],{},"cantBeNull = canBeNull;\n\u002F\u002F warning",[12,323,324,325,327,328,330,331,333,334,336,337,339,340,342],{},"Similarly, warnings are generated when dereferencing a nullable variable without checking it for null value first:",[37,326],{},"\ncanBeNull.Repair();\n\u002F\u002F warning",[37,329],{},"\ncantBeNull.Repair();\n\u002F\u002F no warning",[37,332],{},"\nif (canBeNull != null)",[37,335],{},"\n{",[37,338],{},"\ncanBeNull.Repair();\n\u002F\u002F no warning",[37,341],{},"\n}",[12,344,345],{},"The problem with such a change is that it breaks existing code:\nthe feature assumes that all variables from before the change are non-nullable.\nTo cope with that, static analysis for null-safety can be enabled selectively with a compiler switch at the project level.",[12,347,348],{},[294,349,350],{},"Developers can opt-in for nullability checking when they are ready to deal with the resulting warnings.",[12,352,353],{},"Still, this should be in their own best interest, as the warnings might reveal potential bugs in their code.",[12,355,356,357,360],{},"The switch is persisted as a property in the project file. There’s no user interface in Visual Studio 2019 yet for changing its value.\nTherefore, the following line must be ",[294,358,359],{},"added manually to the first PropertyGroup element of the project file to enable\nthe feature for the project",":",[362,363,364],"nullable-context-options",{},"\nenable\n",{"title":100,"searchDepth":101,"depth":101,"links":366},[],"2019-10-09T14:07:59.731Z",{},"\u002Farticles\u002Fvisual-studio-how-to-target-differentlatest-c-version-net-core-3-and-c-8",{"title":131,"description":7},"articles\u002Fvisual-studio-how-to-target-differentlatest-c-version-net-core-3-and-c-8",[373],"visualstudio","ypmVFhZTDDNRkorn4dMwIhgjCKVDrMBz-yfEqjhwNtM",{"id":376,"title":377,"author":7,"body":378,"createdAt":413,"description":414,"extension":105,"img":408,"meta":415,"navigation":107,"path":416,"seo":417,"stem":418,"tags":419,"updatedAt":413,"__hash__":420},"articles\u002Farticles\u002Fvisual-studio-themes.md","Visual Studio Themes",{"type":9,"value":379,"toc":411},[380,397,400],[12,381,382,383,386,390,391,394],{},"I have not been a fan historically of dark mode however recently I found this site ",[16,384],{"href":385},"https:\u002F\u002Fgithub.com\u002Frainglow\u002Fvs",[16,387,385],{"href":385,"rel":388},[389],"nofollow"," which has 320+ Visual Studio (Not Vs Code @Code) .  You can preview themes here ",[16,392],{"href":393},"http:\u002F\u002Fdaylerees.github.io\u002F",[16,395,393],{"href":393,"rel":396},[389],[12,398,399],{},"I am using one that looks like... and liking it very much (bit easier than vs.net oob dark mode)",[12,401,402],{},[16,403,405],{"href":404},"\u002Farticles\u002Fimages\u002Fimage_636961497088613233.png",[46,406],{"style":407,"title":49,"src":408,"alt":49,"width":409,"height":410,"border":53},"display: inline; background-image: none;","\u002Farticles\u002Fimages\u002Fimage_thumb_636961497090137940.png",642,304,{"title":100,"searchDepth":101,"depth":101,"links":412},[],"2019-06-14T22:55:09.108Z","Make Visual Studio yours, use themes to change the look and feel to meet your desires",{},"\u002Farticles\u002Fvisual-studio-themes",{"title":377,"description":414},"articles\u002Fvisual-studio-themes",[373],"dXCAujKbTq5VbZD6mK7Cqb-0s_3y_nnjAU-TyuojtsA",1781574766215]