Postsharp 6.4 Documentation

Total Page:16

File Type:pdf, Size:1020Kb

Postsharp 6.4 Documentation PostSharp 6.4 User Manual Copyright SharpCrafters s.r.o. 2020. All rights reserved. 2 Table of Contents Introduction 7 Quick Examples 9 Why Use PostSharp 13 Which Problems Does PostSharp Solve 13 Benefits of Pattern-Aware Compiler Extensions 14 Benefits of PostSharp vs Alternatives 15 How Does PostSharp Work 19 Key Technologies 19 How to Learn PostSharp 23 Architecture Role: Selecting and Creating Aspects 23 Deployment Role: Installing and Deploying PostSharp 25 Developer Role: Using Aspects 25 What's New 27 What's New in PostSharp 6.4 27 What's New in PostSharp 6.3 29 What's New in PostSharp 6.2 30 What's New in PostSharp 6.1 31 What's New in PostSharp 6.0 33 What's New in PostSharp 5.0 35 What's New in PostSharp 4.3 38 What's New in PostSharp 4.2 39 What's New in PostSharp 4.1 42 What's New in PostSharp 4.0 42 What's New in PostSharp 3.1 44 What's New in PostSharp 3.0 45 What's New in PostSharp 2.1 46 What's New in PostSharp 2.0 47 What's New in PostSharp 1.5 49 Deployment and Configuration 51 Deployment 53 Requirements and Compatibility 53 PostSharp Components 57 Installing PostSharp Tools for Visual Studio 59 Installing PostSharp Tools for Visual Studio Silently 59 Installing PostSharp Into a Project 60 Installing PostSharp without NuGet 61 Using PostSharp on a Build Server 62 Upgrading from a Previous Version of PostSharp 65 Uninstalling PostSharp 67 Deploying PostSharp to End-User Devices 73 Licensing 75 Deploying License Keys 75 License Audit 79 Limitations of PostSharp Essentials 79 Sharing Source Code With Unlicensed Teams 80 Installing and Servicing PostSharp License Server 81 Using PostSharp License Server 85 Configuration 91 Configuring Projects in Visual Studio 91 Configuring Projects Using MSBuild 93 Working with PostSharp Configuration Files 97 Accessing Configuration from Source Code 103 Working with Errors, Warnings, and Messages 104 3 Table of Contents Resolution of assembly binding redirections 106 Adding Aspects to Code 109 Adding Aspects Declaratively Using Attributes 111 Adding Aspects to a Single Declaration 112 Adding Aspects to Multiple Declarations 112 Adding Aspects to Derived Classes and Methods 117 Overriding and Removing Aspect Instances 123 Reflecting Aspect Instances at Runtime 126 Adding Aspects Using XML 129 Adding Aspects Programmatically using IAspectProvider 131 Logging 133 Adding Detailed Logging to your Solution 135 Configuring Specific Logging Frameworks 139 Logging to the System Console 140 Logging to log4net 140 Logging to NLog 141 Logging to Serilog 142 Logging to ETW 144 Logging to Common.Logging 144 Logging to Loupe 145 Customizing the Appearance of Log Records 147 Adding Custom Log Records Manually 151 Writing Custom Messages 151 Working with Custom Activities 155 Adding Properties to Messages and Activities 158 Enabling and Disabling Logging At Run Time 161 Implementing Logging for a Distributed System 163 Choosing Which Requests to Log 169 Implementing a Custom Formatter 171 Adding Audit to your Solution 173 Implementing an Adapter to a Custom Logging Framework 177 Handling Faults in the Logging Component 183 Licensing of PostSharp Logging 185 Upgrading Logging from an Earlier Version 187 Contracts 189 Adding Contracts to Code 191 Creating Custom Contracts 195 Localizing Contract Error Messages 197 Customizing Contract Exceptions 201 INotifyPropertyChanged 203 Implementing INotifyPropertyChanged 205 Working with Properties that Depend on Other Objects 207 Implementing INotifyPropertyChanging 209 Handling Corner Cases 211 Integrating with UI Frameworks 215 Caliburn.Micro 215 MVVM Light 217 Understanding the NotifyPropertyChanged Aspect 219 Suppressing False Positives 223 Weak Event 225 XAML 227 Command 229 Dependency Property 233 4 Attached Property 237 Parent/Child, Visitor and Disposable 239 Annotating an Object Model for Parent/Child Relationships (Aggregatable) 241 Rule-Based Annotation 243 Enumerating Child Objects (Visitor) 245 Automatically Disposing Children Objects (Disposable) 247 Working With Child Collections 249 Undo/Redo 255 Making Your Model Recordable 257 Adding Undo/Redo to the User Interface 259 Customizing Undo/Redo Operation Names 261 Assigning Recorders Manually 265 Adding Callbacks on Undo and Redo 267 Understanding the Recordable Aspect 269 Caching 273 Caching Method Return Values 275 Removing Items From the Cache 279 Working with Cache Dependencies 283 Customizing Cache Keys 289 Caching Back-Ends 293 Using In-Memory Cache 293 Using Redis Cache 293 Synchronizing Local In-Memory Caches for Multiple Servers 297 Caching Special Types with Value Adapters 299 Preventing Concurrent Execution of Cached Methods 303 Troubleshooting Caching 305 Multithreading 307 Writing Thread-Safe Code with Threading Models 309 Immutable Threading Model 310 Freezable Threading Model 314 Thread Affine Threading Model 316 Synchronized Threading Model 317 Reader/Writer Synchronized Threading Model 319 Actor Threading Model 325 Thread-Unsafe Threading Model 328 Making a Whole Project or Solution Thread Safe 329 Opting In and Out From Thread Safety 331 Compatibility of Threading Models 332 Enabling and Disabling Runtime Verification 333 Run-Time Performance of Threading Model 336 Dispatching a Method to Background 339 Dispatching a Method to the UI Thread 341 Detecting Deadlocks at Runtime 343 Developing Custom Aspects 349 Developing Simple Aspects 351 Injecting Behaviors Before and After Method Execution 351 Handling Exceptions 359 Intercepting Methods 364 Intercepting Properties and Fields 368 Intercepting Events 374 Introducing Custom Attributes 377 Introducing Managed Resources 381 Semantic Advising of Iterator and Async Methods 382 Understanding Aspect Lifetime and Scope 389 5 Table of Contents Initializing Aspects 391 Coping with Custom Object Serializers 391 Validating Aspect Usage 393 Developing Composite Aspects 397 Adding Behaviors to Existing Members 398 Introducing Interfaces, Methods, Properties and Events 402 Accessing Members of the Target Class 406 Adding Aspects Dynamically 408 Coping with Several Aspects on the Same Target 409 Ordering Advices 412 Understanding Aspect Serialization 413 Aspect Configuration 415 Customizing Aspect Appearance in Visual Studio 417 Customizing Aspect Description in Tooltips 417 Estimating Code Savings 418 Pushing Information to PostSharp Tools Programmatically 419 Consuming Dependencies from an Aspect 421 Using a Global Composition Container 421 Using a Global Service Locator 424 Using Dynamic Dependency Resolution 426 Using Contextual Dependency Resolution 429 Importing Dependencies from the Target Object 432 Validating Architecture 435 Restricting Interface Implementation 437 Controlling Component Visibility Beyond Private and Internal 441 Developing Custom Architectural Constraints 451 Testing and Debugging 459 Debugging Run-Time Logic 461 Debugging Build-Time Logic 465 Testing that an Aspect has been Applied 467 Testing Run-Time Logic 469 Testing Build-Time Logic 471 Hacking 473 Executing Code Just After the Assembly is Loaded 475 6 PART 1 Introduction CHAPTER 1 Quick Examples This section shows a few examples to demonstrate what PostSharp is about: • Standard patterns on page 9 • Thread safety patterns on page 10 • Implementation of custom patterns on page 11 • Validation of custom patterns on page 11 Standard patterns PostSharp provides implementations of some of the patterns that are the most commonly found in .NET code bases: • INotifyPropertyChanged: see INotifyPropertyChanged on page 203. • Parent/child relationships: see Parent/Child, Visitor and Disposable on page 239. • Undo/redo: see Undo/Redo on page 255. • Code contracts: see Contracts on page 189. • Logging: see Logging on page 133. Example The following code snippet illustrates an object model where INotifyPropertyChanged, undo/redo, code contracts, aggregation and code contracts are all implemented using PostSharp ready-made attributes. [NotifyPropertyChanged] publicclass CustomerViewModel { [Required] public Customer Customer { get; set; } publicstring FullName { get { returnthis.Customer.FirstName + " " + this.Customer.LastName; } } } [NotifyPropertyChanged] [Recordable] publicclass Customer { publicstring FirstName { get; set; } publicstring LastName { get; set; } [Child] public AdvisableCollection<Address> Addresses { get; set; } [Url] publicstring HomePage { get; set; } [Log] publicvoid Save(DbConnection connection) { // ... } } [NotifyPropertyChanged] 9 Quick Examples [Recordable] publicclass Address { [Parent] public Customer Parent { get; privateset; } publicstring Line1 { get; set; } } Thread safety patterns Multithreading is a great demonstration of the limitations of conventional object-oriented programming. Thread synchronization is traditionally addressed at an absurdly low level of abstraction, resulting in excessive complexity and defects. Yet, several design patterns exist to bring down the complexity of multithreading. New programming languages have been designed around these patterns: for instance Erlang over the Actor pattern and functional programming over the Immutable pattern. PostSharp gives you the benefits of threading design patterns without leaving C# or VB. PostSharp supports the following threading models and features: • Immutable: see Immutable Threading Model on page 310. • Freezable: see Freezable Threading Model on page 314. • Actor: see Actor Threading Model on page 325. • Reader/Writer Synchronized: see Reader/Writer Synchronized Threading Model on page 319. • Synchronized: see Synchronized Threading Model on page 317. • Thread
Recommended publications
  • IJIRT | Volume 2 Issue 6 | ISSN: 2349-6002
    © November 2015 | IJIRT | Volume 2 Issue 6 | ISSN: 2349-6002 .Net Surbhi Bhardwaj Dronacharya College of Engineering Khentawas, Haryana INTRODUCTION as smartphones. Additionally, .NET Micro .NET Framework (pronounced dot net) is Framework is targeted at severely resource- a software framework developed by Microsoft that constrained devices. runs primarily on Microsoft Windows. It includes a large class library known as Framework Class Library (FCL) and provides language WHAT IS THE .NET FRAMEWORK? interoperability(each language can use code written The .NET Framework is a new and revolutionary in other languages) across several programming platform created by Microsoft for languages. Programs written for .NET Framework developingapplications. execute in a software environment (as contrasted to hardware environment), known as Common It is a platform for application developers. Language Runtime (CLR), an application virtual It is a Framework that supports Multiple machine that provides services such as Language and Cross language integration. security, memory management, and exception handling. FCL and CLR together constitute .NET IT has IDE (Integrated Development Framework. Environment). FCL provides user interface, data access, database Framework is a set of utilities or can say connectivity, cryptography, web building blocks of your application system. application development, numeric algorithms, .NET Framework provides GUI in a GUI and network communications. Programmers manner. produce software by combining their own source code with .NET Framework and other libraries. .NET is a platform independent but with .NET Framework is intended to be used by most new help of Mono Compilation System (MCS). applications created for the Windows platform. MCS is a middle level interface. Microsoft also produces an integrated development .NET Framework provides interoperability environment largely for .NET software called Visual between languages i.e.
    [Show full text]
  • Game Developers’ Census, the Big Three at E3, and More
    >>PRODUCT REVIEWS PHOTOSHOP CS3 EXTENDED * SPACENAVIGATOR AUGUST 2007 THE LEADING GAME INDUSTRY MAGAZINE >>CASE FOR THE TECH ARTIST >>CODERS MOUTH OFF >>THE INNER PRODUCT HOW AND WHY STUDIOS EXCLUSIVE ROUNDTABLE PAINTING WITH DOMAIN NEED THESE OXYMORONS WITH FIVE PROGRAMMERS SPECIFIC LANGUAGES Using Autodeskodesk® HumanIK® middle-middle- Autodesk® ware, Ubisoftoft MotionBuilder™ grounded ththee software enabled assassin inn his In Assassin’s Creed, th the assassin to 12 centuryy boots Ubisoft used and his run-time-time ® ® fl uidly jump Autodesk 3ds Max environment.nt. software to create from rooftops to a hero character so cobblestone real you can almost streets with ease. feel the coarseness of his tunic. HOW UBISOFT GAVE AN ASSASSIN HIS SOUL. autodesk.com/Games IImmagge cocouru tteesyy of Ubiisofft Autodesk, MotionBuilder, HumanIK and 3ds Max are registered trademarks of Autodesk, Inc., in the USA and/or other countries. All other brand names, product names, or trademarks belong to their respective holders. © 2007 Autodesk, Inc. All rights reserved. []CONTENTS AUGUST 2007 VOLUME 14, NUMBER 7 FEATURES 7 PROGRAMMERS’ ROUNDTABLE In this exclusive roundtable interview, five top technophiles discuss what’s right and wrong with game programming these days, from in-house procedures to multi-processor systems to code reuse. With Brad Bulkley, Stuart Denman, Chris Hecker, Clinton Keith, and Bruce Rogers 17 THE CODE/ART DIVIDE: 7 HOW TECHNICAL ARTISTS BRIDGE THE GAP Game studio Volition (THE PUNISHER, SAINTS ROW) makes a case for hiring a few technical artists, their value 22 ranging from time savings to smoother in-house communication. As linchpins, technical artists keep programmers and artists bonded in their mutual POSTMORTEM cause, helping to ensure that each department gets what it needs from the 22 FINAL FANTASY XII other—and within reason according to The twelfth installment in Square Enix’s wildly popular series was developed the project’s schedule.
    [Show full text]
  • Interface Evolution Via Virtual Extension Methods Brian Goetz Fourth Draft, June 2011
    Interface evolution via virtual extension methods Brian Goetz Fourth draft, June 2011 1. Problem statement Once published, it is impossible to add methods to an interface without breaking existing implementations. (Specifically, adding a method to an interface is not a source- compatible change.) The longer the time since a library has been published, the more likely it is that this restriction will cause grief for its maintainers. The addition of closures to the Java language in JDK 7 place additional stress on the aging Collection interfaces; one of the most significant benefits of closures is that it enables the development of more powerful libraries. It would be disappointing to add a language feature that enables better libraries while at the same time not extending the core libraries to take advantage of that feature1. V1 of the Lambda Strawman proposed C#-style static extension methods as a means of creating the illusion of adding methods to existing classes and interfaces, but they have significant limitations – for example, they cannot be overridden by classes that implement the interface being extended, so implementations are stuck with the “one size fits all” implementation provided as an extension2, and they are not reflectively discoverable. 2. Virtual extension methods3 In this document, we outline a mechanism for adding new methods to existing interfaces, which we call virtual extension methods. Existing interfaces can be augmented without compromising backward compatibility4 by adding extension methods to the interface, whose declaration would contain instructions for finding the default implementation in the event that implementers do not provide a method body.
    [Show full text]
  • Comparative Studies of Programming Languages; Course Lecture Notes
    Comparative Studies of Programming Languages, COMP6411 Lecture Notes, Revision 1.9 Joey Paquet Serguei A. Mokhov (Eds.) August 5, 2010 arXiv:1007.2123v6 [cs.PL] 4 Aug 2010 2 Preface Lecture notes for the Comparative Studies of Programming Languages course, COMP6411, taught at the Department of Computer Science and Software Engineering, Faculty of Engineering and Computer Science, Concordia University, Montreal, QC, Canada. These notes include a compiled book of primarily related articles from the Wikipedia, the Free Encyclopedia [24], as well as Comparative Programming Languages book [7] and other resources, including our own. The original notes were compiled by Dr. Paquet [14] 3 4 Contents 1 Brief History and Genealogy of Programming Languages 7 1.1 Introduction . 7 1.1.1 Subreferences . 7 1.2 History . 7 1.2.1 Pre-computer era . 7 1.2.2 Subreferences . 8 1.2.3 Early computer era . 8 1.2.4 Subreferences . 8 1.2.5 Modern/Structured programming languages . 9 1.3 References . 19 2 Programming Paradigms 21 2.1 Introduction . 21 2.2 History . 21 2.2.1 Low-level: binary, assembly . 21 2.2.2 Procedural programming . 22 2.2.3 Object-oriented programming . 23 2.2.4 Declarative programming . 27 3 Program Evaluation 33 3.1 Program analysis and translation phases . 33 3.1.1 Front end . 33 3.1.2 Back end . 34 3.2 Compilation vs. interpretation . 34 3.2.1 Compilation . 34 3.2.2 Interpretation . 36 3.2.3 Subreferences . 37 3.3 Type System . 38 3.3.1 Type checking . 38 3.4 Memory management .
    [Show full text]
  • Identitymodel Documentation
    IdentityModel Documentation Dominick Baier and Brock Allen May 11, 2021 IdentityModel 1 IdentityModel 3 2 IdentityModel.AspNetCore 5 3 IdentityModel.AspNetCore.OAuth2Introspection7 4 IdentityModel.OidcClient 9 5 oidc-client.js 11 5.1 Overview................................................. 11 5.2 Discovery Endpoint........................................... 12 5.3 Token Endpoint.............................................. 14 5.4 Token Introspection Endpoint...................................... 17 5.5 Token Revocation Endpoint....................................... 17 5.6 UserInfo Endpoint............................................ 18 5.7 Dynamic Client Registration....................................... 18 5.8 Device Authorization Endpoint..................................... 19 5.9 Protocol and Claim Type Constants................................... 19 5.10 Creating Request URLs (e.g. for Authorize and EndSession endpoints)................ 20 5.11 Fluent API for the X.509 Certificate Store................................ 22 5.12 Base64 URL Encoding.......................................... 22 5.13 Epoch Time Conversion......................................... 22 5.14 Time-Constant String Comparison.................................... 22 5.15 Overview................................................. 23 5.16 Worker Applications........................................... 23 5.17 Web Applications............................................ 25 5.18 Extensibility............................................... 27 5.19 Overview................................................
    [Show full text]
  • Appendix a and Appendix B
    This PDF contains 2 Appendices: Appendix A and Appendix B. Appendix A Answers to the Test Your Knowledge Questions This appendix has the answers to the questions in the Test Your Knowledge section at the end of each chapter. Chapter 1 – Hello, C#! Welcome, .NET! 1. Why can a programmer use different languages, for example, C# and F#, to write applications that run on .NET? Answer: Multiple languages are supported on .NET because each one has a compiler that translates the source code into intermediate language (IL) code. This IL code is then compiled to native CPU instructions at runtime by the CLR. 2. What do you type at the prompt to create a console app? Answer: You enter dotnet new console. 3. What do you type at the prompt to build and execute C# source code? Answer: In a folder with a ProjectName.csproj file, you enter dotnet run. 4. What is the Visual Studio Code keyboard shortcut to view Terminal? Answer: Ctrl + ` (back tick). Answers to the Test Your Knowledge Questions 5. Is Visual Studio 2019 better than Visual Studio Code? Answer: No. Each is optimized for different tasks. Visual Studio 2019 is large, heavy- weight, and can create applications with graphical user interfaces, for example, Windows Forms, WPF, UWP, and Xamarin.Forms mobile apps, but it is only available on Windows. Visual Studio Code is smaller, lighter-weight, code-focused, supports many more languages, and is available cross-platform. In 2021, with the release of .NET 6 and .NET Multi-platform App User Interface (MAUI), Visual Studio Code will get an extension that enables building user interfaces for desktop and mobile apps.
    [Show full text]
  • Diffsharp an AD Library for .NET Languages
    DiffSharp An AD Library for .NET Languages Atılım Güneş Baydin1 Barak A. Pearlmutter2 Jeffrey Mark Siskind3 1University of Oxford [email protected] 2Maynooth University [email protected] 3Purdue University [email protected] http://www.robots.ox.ac.uk/~gunes/ AD2016, September 13, 2016 The .NET “ecosystem” Languages The main .NET languages: C#, F#, VB, C++/CLI Around 30 other (somewhat obscure) languages: F*, Eiffel, A#, ClojureCLR, IronPython, Nemerle, ... https://en.wikipedia.org/wiki/List_of_CLI_languages 1/18 C# Stack Overflow Developer Survey 2015 TIOBE Index, September 2016 http://stackoverflow.com/research/developer-survey-2015 http://www.tiobe.com/tiobe-index/ 2/18 F# An OCaml-based, strongly-typed, functional language, used in computational finance, machine learning Allows us to expose AD as a higher-order API accept first class functions as arguments return derivative functions, which can be arbitrarily nested //A scalar-to-scalar function let f x = sin (sqrt x) //2nd derivative off let f’’ = diff (diff f) // Evaluatef’’ at2 let d = f’’ 2. 3/18 Runtimes Previously: .NET Framework (Windows) and Mono (Linux, Mac OS) Since 27 June 2016: .NET Core 1.0 https://dotnet.github.io/ Open-source (MIT License) Cross-platform (Linux, Mac OS, Windows) 4/18 DiffSharp DiffSharp http://diffsharp.github.io/DiffSharp Deeply-embedded, higher-order, forward and reverse AD Support for nesting, currying High-performance matrix operations (using BLAS/LAPACK/CUDA) Implemented in F#, usable by all .NET languages (helper interface for C# and other procedural
    [Show full text]
  • Nested Class Modularity in Squeak/Smalltalk
    Springer, Nested Class Modularity in Squeak/Smalltalk Nested Class Modularity in Squeak/Smalltalk Modularität mit geschachtelten Klassen in Squeak/Smalltalk by Matthias Springer A thesis submitted to the Hasso Plattner Institute at the University of Potsdam, Germany in partial fulfillment of the requirements for the degree of Master of Science in ITSystems Engineering Supervisor Prof. Dr. Robert Hirschfeld Software Architecture Group Hasso Plattner Institute University of Potsdam, Germany August 17, 2015 Abstract We present the concept, the implementation, and an evaluation of Matriona, a module system for and written in Squeak/Smalltalk. Matriona is inspired by Newspeak and based on class nesting: classes are members of other classes, similarly to class instance variables. Top-level classes (modules) are globals and nested classes can be accessed using message sends to the corresponding enclosing class. Class nesting effec- tively establishes a global and hierarchical namespace, and allows for modular decomposition, resulting in better understandability, if applied properly. Classes can be parameterized, allowing for external configuration of classes, a form of dependency management. Furthermore, parameterized classes go hand in hand with mixin modularity. Mixins are a form of inter-class code reuse and based on single inheritance. We show how Matriona can be used to solve the problem of duplicate classes in different modules, to provide a versioning and dependency management mech- anism, and to improve understandability through hierarchical decomposition. v Zusammenfassung Diese Arbeit beschreibt das Konzept, die Implementierung und die Evaluierung von Matriona, einem Modulsystem für und entwickelt in Squeak/Smalltalk. Ma- triona ist an Newspeak angelehnt und basiert auf geschachtelten Klassen: Klassen, die, wie zum Beispiel auch klassenseitige Instanzvariablen, zu anderen Klassen gehören.
    [Show full text]
  • Installing the Klocwork Server Package
    Installation and Upgrade Klocwork Insight 10.0 SR6 Document version 1.6 Klocwork Installation and Upgrade Version 10.0 PDF generated using the open source mwlib toolkit. See http://code.pediapress.com/ for more information. PDF generated at: Tue, 12 Aug 2014 15:19:51 EST Contents Articles Before you install 1 System requirements 1 Release Notes 11 About the Klocwork packages and components 24 Upgrading from a previous version 26 Upgrading from a previous version 26 Import your existing projects into a new projects root 27 Migrate your projects root directory 31 Installing the Klocwork Server package on Windows -- Upgrade only 36 Installing the Klocwork Server package on Unix -- Upgrade only 37 Installing the Klocwork Server package on Mac -- Upgrade only 40 Get a license 42 Getting a license 42 Installing the Server package 45 Installing Klocwork Insight 45 Installing the Klocwork Server package on Windows 46 Installing the Klocwork Server package on Unix 49 Installing the Klocwork Server package on Mac 52 Viewing and changing Klocwork server settings 54 Downloading and deploying the desktop analysis plug-ins 56 kwupdate 57 Installing a desktop analysis plug-in or command line utility 59 Installing a desktop analysis plug-in 59 Installing the Klocwork plug-in from the Eclipse update site 62 Running a custom installation for new or upgraded IDEs 63 Installing the Distributed Analysis package 64 Installing the Distributed Analysis package 64 Configuring and starting the Klocwork servers 67 Viewing and changing Klocwork server settings 67
    [Show full text]
  • Q1 Where Do You Use C++? (Select All That Apply)
    2021 Annual C++ Developer Survey "Lite" Q1 Where do you use C++? (select all that apply) Answered: 1,870 Skipped: 3 At work At school In personal time, for ho... 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% ANSWER CHOICES RESPONSES At work 88.29% 1,651 At school 9.79% 183 In personal time, for hobby projects or to try new things 73.74% 1,379 Total Respondents: 1,870 1 / 35 2021 Annual C++ Developer Survey "Lite" Q2 How many years of programming experience do you have in C++ specifically? Answered: 1,869 Skipped: 4 1-2 years 3-5 years 6-10 years 10-20 years >20 years 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% ANSWER CHOICES RESPONSES 1-2 years 7.60% 142 3-5 years 20.60% 385 6-10 years 20.71% 387 10-20 years 30.02% 561 >20 years 21.08% 394 TOTAL 1,869 2 / 35 2021 Annual C++ Developer Survey "Lite" Q3 How many years of programming experience do you have overall (all languages)? Answered: 1,865 Skipped: 8 1-2 years 3-5 years 6-10 years 10-20 years >20 years 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% ANSWER CHOICES RESPONSES 1-2 years 1.02% 19 3-5 years 12.17% 227 6-10 years 22.68% 423 10-20 years 29.71% 554 >20 years 34.42% 642 TOTAL 1,865 3 / 35 2021 Annual C++ Developer Survey "Lite" Q4 What types of projects do you work on? (select all that apply) Answered: 1,861 Skipped: 12 Gaming (e.g., console and..
    [Show full text]
  • Visual C++ Team Is at Cppcon 2016 Take the Survey, Attend a Talk, and Drop by Our Booth to Say Hello
    Visual C++ Team is at CppCon 2016 Take the survey, attend a talk, and drop by our booth to say hello. Talks by Microsoft (https://blogs.msdn.microsoft.com/vcblog) Tuple: What's New, And How It Works An Introduction to C++ Coroutines C++ Modules: The State of The Union Iterator Haiku (Range-v3) C++ Coroutines: Under the covers The Guideline Support Library: One Year Later Putting Coroutines to Work with C++ for the Latest and greatest from the Visual Studio family Windows Runtime for C++ developers Visual C++ Compiler Toolset (http://aka.ms/cppbuildtools) Improved C++11/14/17 feature support, targeting C++ 11/14 Standards complete in early 2017 Faster builds with improved linking; Free IncrediBuild extension with tools to find bottlenecks New expression optimizer; CFG improvements; Real World Code daily runs for additional reliability Visual Studio Code and the C/C++ Extension (http://aka.ms/cppvscode) Editor: Free, cross-platform, lightweight, keyboard focused Great code-editing experience with code-formatting, auto-completion, go-to-definition, peek definition Powerful debugging with call stack, breakpoints, expression evaluation, conditional breakpoints and more Integration to source-control with Git commands built-in Extensible to easily allow for building, testing, and running external tasks Visual Studio “15” (http://aka.ms/cppvsnext) Minimal C++-only Visual Studio workload installs in minutes through the new setup experience Performance improvements in startup time, project load time, and IntelliSense New predictive IntelliSense mode that provides C++ type matching based on context Enhanced refactoring with rename, extract function, move definition, and change signature Debugger improvements: edit-and-continue, natvis, memory profiler and access violation information Built-in support for CMake – no more round-tripping between your CMakeLists.txt and VS projects Large ecosystem of Visual Studio extensions, e.g.
    [Show full text]
  • Introduction to .NET, C#, and Visual Studio
    Introduction to .NET, C#, and Visual Studio C# Programming January 8 Part I Administrivia Administrivia • When: Wednesdays 10–11am (and a few Mondays as needed) • Where: Moore 100B • This lab has Windows machines, but feel free to bring laptops • Office Hours: to be announced • Course webpage: http://www.seas.upenn.edu/~cse39905 Course Structure • No quizzes, no exams • Roughly 6 projects • Roughly 2 weeks per project • The final project will be slightly longer and more open-ended • Projects will be due at midnight on the night of the deadline • All assignments should be submitted through the Blackboard Digital Dropbox • Late policy: 15% off each day, up to 3 days late Final Project • Your chance to choose your own project • Brainstorming and planning will begin after spring break • Top projects will be entered into the Xtreme.NET Challenge – hopefully there will be 20 top projects :-) • First prize: Xbox 360! • Judges will include someone from Microsoft recruiting, maybe someone from the C# team • More details to come at http://www.seas.upenn.edu/~cse39905/xtreme Part II What is .NET? The Microsoft .NET Framework • .NET is a development platform that launched in 2000 • Goals include language independence, language integration, web services • Technologies to promote rapid development of secure, connected applications • .NET components include: • Languages (C#, VB, Visual C++, Visual J#, ...) • Common Language Runtime (CLR) • Framework Class Library (FCL) Common Language Runtime • A single runtime environment to execute programs written in any .NET language • Includes a virtual machine • Activates objects, manages memory, performs security checks, collects garbage • To run on the CLR, a language must adhere to a Common Language Specification (CLS) • A language must also build upon base types specified in the Common Type System (CTS) Languages • Language compilers translate source into Microsoft Intermediate Language (MSIL).
    [Show full text]