Private Protected access likely comes back in C# 7.
My readers are likely familiar with the four access modifiers in C#: public, protected, internal, and private. Public access means accessible by any code. Protected access enables access for all derived classes. Internal access enables access from any code in the same assembly. Private access is limited to code in the same class. C# also supports “protected internal” access. Protected Internal access enables access from all code in the same assembly, and all derived classes.
What was missing was a more restrictive access: enable only code in the same assembly AND derived from this class to access those members. The CLR has supported this for some time, but it was not legal in C#. The team wanted to ad it in C# 6, using the keywords “private protected”. That generated a tremendous amount of feedback. While everyone liked the feature, there was a lot of negative feedback on the syntax. Well, after much discussion, thought, and experimentation, it’s back. It’s back with the same syntax.
Let’s explain some of the thinking behind this.
One overriding goal for the team was that this feature should not require a new keyword that could potentially break code. New keywords might be used in existing code as identifiers (variables, fields, methods, class names, and so on). In fact, the C# language design team has managed to avoid adding any new global keywords since C# 2.0. All the features for LINQ, dynamic, async and await, and more have been implemented using contextual keywords. Contextual keywords have special meaning only when used in a particular context. That enabled the language designers to add new features with less concern that they could be breaking existing code.
Using Contextual Keywords is very hard when you are talking about access modifiers. Remember that access modifiers are optional. Members of a class have a default access: private. Therefore, when the language parser looks at a method declaration, the first token may be an optional access modifier, ore it may be the return type. So, some new keyword for the new restrictive access would have the potential to break code: if some developer had created a type with the name of the proposed modifier, that code would break.
So, new keywords are out. That removes any suggestions like “protected or internal” and “protected and internal”. Those would be great suggestions, were it not for the breaking code problem.
However this feature was going to be implemented, it needed to use a combination of the current keywords. This new access is more restrictive than the current “protected internal” access. The modifier used should reflect that. The design question now becomes what combination of access modifier keywords would reflect a more restrictive access, and yet express that both internal and protected modifiers are in play?
Let’s reject out of hand the suggestion that the current ‘protected internal’ access should be repurposed for this feature, and a new combination of keywords used for the existing feature. That would break way too much code, and there’s no way for tools to know if you meant the old meaning, or the new meaning.
The other possible suggestion was to make “protected internal” have the current meaning, and make “internal protected” take on the new meaning. Well, that’s also a breaking change. In today’s world, you can type the ‘protected’ and ‘internal’ keywords in either order, and it has the same meaning. That fails the breaking change concern.
Of the possible combinations, “private protected” comes out best. Along with “private internal” it’s the only combination of 2 access modifiers that make sense, and isn’t already in use. One other option could be “private protected internal”, but that’s a lot of extra typing.
Overall, there are a lot of requests for adding the feature and enabling this accessibility. The proposed syntax is still the best way to express it. The language design team thought through alternatives, polled the community, and asked in public. This is still the best expression for this feature.
I’m glad it’s back.
I’ve been self-employed for quite some time. I’ve started three companies, including building one of them into a 2 time Inc. 5000 awardee. I’ve enjoyed all the time as an independent consultant, entrepreneur, and business owner.
At my core, though, I love software. I enjoy building software. I enjoy helping other developers learn new tools, and new skills. Since selling SRT Solutions, I’ve spent my time teaching developers to use .NET and C#. I’ve been teaching classes for corporate clients, bootcamps for people just learning to develop software, speaking at seminars and at conferences. That’s been great fun. It’s also been somewhat limiting. There’s only so many people I can reach as an independent consultant.
So it’s time to continue this mission as part of a larger organization.
This last week, I accepted a full time position with Microsoft on the .NET Core content team. I’ll be part of a team building learning resources for developers that are new to the .NET Core platform. One audience is experienced .NET developers that want to learn what’s different as they start working with .NET core. Another important audience is developers that are experienced with other platforms and want to investigate .NET Core.
One key reason why I accepted this position is the exciting future for the .NET platform. Running on Linux, MacOS, Android and iOS opens many new possibilities for the platform, the languages, and the framework. Seeing the rapid pace of innovation in the C# language now that the team is building on the Roslyn platform is equally exciting. I’m glad that I’ll now have a role as part of the team responsible for helping developers use these tools.
Equally important is the respect I have for the team members. Both the engineering team and the content team are filled with awesome, smart people. I’ve worked with many of them as an MVP and RD over the past several years, and I’ve got immense respect for the people that will be my co workers.
The final motivator is to continue creating content for all the different styles of learning that exist. Some people enjoy reading, some enjoy watching video based content, others want guided labs to help them explore. I’m excited that the .NET Core content team is exploring all of these ideas, and more different ways to help developers learn the platform, the libraries, and the languages.
I’m excited to work with a much larger audience to learn more about .NET and C#. It’s going to be fun.
I was honored to speak at NDC London last week. It’s an awesome event, with a very skilled set of developers attending the event.
I gave two talks at NDC London. The first was a preview of the features that are currently under discussion for C# 7. C# 7 marks a sea change in the evolution of the C# Language. It’s the first version where all the design discussions are taking place in the open, on the Roslyn GitHub Repository. If you are interested in the evolution of the C# language, you can participate in those discussions nnow.
Instead of posting the slides from that talk, I’ll be blogging about each of the features, with references to the issue on GitHub. I’ll cover the current thinking and some of the open issues relating to each of the features.
Watch for those posts coming over the next month. I’ll mix in a forward looking post along with language infomration you can use now.
My second talk was on building Roslyn based Analyzers and Code Fixes. You can find the slides, and demos here on my GitHub repository: https://github.com/BillWagner/NonVirtualEventAnalyzer
If you have any questions on the samples, the code, or concepts, please make an issue at the repository, and I’ll address it there.
This is the first of two posts on my thoughts for the coming year. This is a mixture of personal and global ideas. It’s my perspective, based on my experiences. In this post, I look back at the important trends and events I saw and experienced. (Part II will look at the year to come.)
I’m very happy with all that has happened with Humanitarian Toolbox in the past year. We’ve continued to work on two different applications: Crisis Checkin and AllReady. The .NET Developer Community has really come together to help us achieve important milestones.
Crisis Checkin is being enhanced to support Operation Dragon Fire which will provide better data sharing during crisis. Watch the Github repo for updates on new feature requests to support this effort.
While Crisis Checkin has been moving along at a reasonable pace, AllReady has been moving incredibly fast. I need to thank our friends and colleagues on the Microsoft Visual Studio team for the incredible contributions they’ve been making to your effort.
The Visual Studio team started development as a showcase for many of the new features that shipped with Visual Studio 2015. They recorded a series of videos that documented that initial effort. HTBox took over the code and open sourced it shortly thereafter. We continued to work with community members over the summer, at ThatConference, and remotely to add features. Fall came, and we worked with Microsoft after the MVP Summit to get the application ready for Beta. You can see some of the experience at that sprint here.
We successfully hit our beta milestones, and our next step has been a pilot with the Red Cross in Chicago. The pilot has been successful, and we’ve been generating new tasks and feature requests from the pilot.
The success we’ve had building software has also brought an increase in contributions. We’re by no means a large charity, but we’r past the bootstrap phase and well on our way to a successful startup venture.
We owe a lot to everyone that has contributed:
I’m confident that we’ll continue this momentum over the next year.
Earlier this year, we saw the release of Visual Studio 2015, and with it the 6.0 version of the C# language. This is the first release using the Roslyn Codebase. I’m super excited about the rejuvenation of the C# and .NET community as the team reached this important milestone.
We have the Roslyn APIs to create analyzers, code fixes, and refactorings.
We have numerous new language features to support modern development.
We have an IDE and compiler that share more code, and thereby use less memory and have better performance.
The code for the C# and VB.NET compilers are Open Source (Apache 2.0 license) and stored on Github. Want to learn more about how it works? Look in the source. Want to participate? Grab an up-for-grabs issue, submit your fix. Want to experiment? Grab the source and try it out.
It’s also very instructive to see just how many tests and gates there are for the source code in the compilers.
But it doesn’t stop there. In addition to the Rosly source, many other parts of the .NET framework are currently, or are planned to be, Open Source as well. The full list is quite long, view it here.
The model of Open Source development is becoming the norm. Apple even responded by making Swift Open Source, also with a permissive license.
I believe the Open Source model is one of the key reasons for the rejuvenation of the .NET ecosystem.
Which brings me to…
The .NET Foundation is an indepent organization to support Open Source development in the .NET ecosystem.
While it was announced in 2014, its growth really started in 2015. (I’m biased, as I’m on the .NET Foundation Advisory Board).
The foundation nw includes parts of the .NET Framework, with source originally from the Microsoft product teams. It now also includes projects that started in the community, and have been brought under the .NET Foundation umbrella.
And, this post was written with the newest .NET Foundation project: Open Live Writer.
In my next post, I’ll talk about the topics that I think will be key in 2016.
I’m teaching a second .NET bootcamp in Detroit this spring. It’s quite a rewarding experience. Like the previous cohort, these students are all adults that are motivated to make a career shift. I always think I learn as much as the students do when I teach one of these groups. I’ve got four important lessons for all my readers based on the first few weeks of the bootcamp experience.
My first surprise was the experience that some of the students have coming into the class. Everyone has been successful in different fields, from business to medicine to finance. And they all want to be developers. Developers are in serious demand everywhere. This may be an exaggeration, but I believe the unemployment rate among developers is approaching 0. Every growing company I work with wants to hire skilled developers. It’s become a barrier to their growth.
Investing in yourself by learning to code will pay off. It opens doors.
There’s a corollary to this lesson: Having other skills also pays off. As we’ve been discussing next steps, we discuss where everyone’s past experience will also pay off. Several of the students have very strong backgrounds in different vertical businesses. Those skills will help to set them apart from other entry level developers.
I’ve been really happy to see this result. There are too many people that have the world view that someone is “born with” the skills or the mindset necessary to be a developer. These classes, and the students that have attended, prove that’s bunk. Most of the students enter with no programming experience at all.
8 weeks later, they can develop code, and feel comfortable with the .NET framework.
Now, I don’t want to overstate this: they are all still beginners, and ready for entry level jobs as developers. They don’t yet have the experience many of my typical readers do. But, that’s a function of time, not innate ability. I was beginner once, as were all of you, dear readers. These students will continue to grow, as they keep coding.
Anyone can learn to code. It takes motivation, some help, and a path. If you know someone interested in learning, get them involved. Point them in the direction of learning resources. Encourage them to try and build something. We’ve all enjoyed developing software. There’s plenty of room for more. And, anyone can learn.
There’s a corollary here: I continue to be impressed by just how fast new folks pick up the core skills. There’s so much vocabulary and concepts that we work with. We have learned a lot and have a lot of experience behind us. I am truly impressed by how quickly I see these new developers learn and grow the skills we’ve already internalized. It does seem very frustrating for a day or two, until they get past that “Hello World” stage. Thankfully, within a week, they are building classes, understanding core concepts, and creating real code. It’s great to see.
This has been the most interesting piece to observe. There’s the famous quote from Joseph Joubert: “To teach is to learn twice”. I’m finding that students really go through four distinct phases of understanding: reading code, doing guided labs, working independently, and helping peers.
In that first phase, they can see code that I’ve written and begin to understand what it does. They don’t yet have the vocabulary, and they are kind of unsure exactly what they are reading. But, they certainly beginning to understand.
The second phase is where students can work with a guided lab, and understand what’s being added. They can follow the instructions, type in the code, and do the debugging and proofreading necessary to make a guided lab work.
The third phase is when they can create their own code and their own algorithms to build software that does something useful. It’s where a lot of entry level developers spend much of their time. Their code works, but they may not be able to completely understand and articulate how it works.
That fourth phase is the key to mastery: Once students get to the point where they can explain what they’ve built, how it works, and how it uses the underlying libraries, they have achieved a new level of mastery.
I’ve truly enjoyed working with new developers and helping them join this career. There are large numbers of people that want to write code. Can you help? It would be a great opportunity for you learn twice. Maybe it’s not beginners, maybe it’s mentoring junior developers in your organization.
I’m thrilled to have been nominated and accepted as a member of the .NET Foundation Advisory Board.
I’m very excited about the role we can play in growing the Open Source ecosystem around .NET. We’ve just gotten started, so there is not a lot of progress to report, but I’m excited by the potential. Our role is to provide a channel between the .NET Foundation Board of Directors and the .NET developer community. We will be helping to refine policies to accept new projects, grow and nurture the projects under the .NET Foundation, and overall, make .NET Open Source Development better and richer for everyone.
Shaun Walker is the chairman of the .NET Foundation Advisory Board, and his announcement here is a great description of the rationale and thought process that went into creating the advisory board.
I’m excited to participate in growing Open Source development around .NET and the great languages and frameworks that are coming from the developer teams. This is a large and important initiative. It covers everything from the Roslyn compiler projects, to the TypeScript compiler to ASP.NET vNext to the Core CLR and core .NET Framework releases. And that’s just the major projects from inside Microsoft. There are so many tremendous projects (like ScriptCS, just to name one) that are part of a growing .NET ecosystem.
We’ve got quite a bit of work to do. The Foundation is a new organization, and we need to advise the board on everything from what kinds of projects we’ll accept, to the process for accepting new projects, to the governance of the advisory board. It’s a lot of work, but it’s also a lot of fun.
It’s an exciting time to be a .NET developer. I’m glad to be in the middle of it.
I’m excited to announce that I’ve been renewed for the Microsoft Regional Director program.
It’s an exciting time in technology, and especially in the Microsoft space. Since the last RD renewal cycle several big innovations have happened:
It’s an amazing time. I’m excited that my continued involvement in the Regional Director program can help my customers navigate all these changes. I can’t wait to see what the next two years brings.
I’m also excited to welcome many new RDs to the program. This latest wave recognizes many changes in the global technology industry in recent years. As I look at the list of new RDs, I have a number of observations:
It’s been a great ride for my first 10 years in the program. I can’t wait to see what comes next.
I’m teaming up with Grand Circus to deliver another .NET developer bootcamp this Spring. This bootcamp will teach the core skills necessary to build modern web applications using ASP.NET and the core .NET framework.
For most of my regular readers, this bootcamp is probably too introductory for you. It does not assume that your have any prior knowledge of C#, or ASP.NET. We start at the beginning, and move as fast as possible to learn the core skills needed.
However, if any of you have friends or associates that are interested in making a career change and learning to be a developer, this is a great way to start. During the 8 weeks, students learn the core skills needed to make that transition. In addition, Grand Circus will be providing placement assistance to help students land that first developer position.
If anyone you know wants to become a developer, and be part of Detroit’s Renaissance, tell them to sign up here. We had great success with the first bootcamp (over 80% of those students have landed developer jobs), and I’m anticipating the same outcome this time.
I’m a bit late this year, but here are my thoughts on the Software industry as we move into 2015.
I’ve said it before: The talent war is over, and the talent won. Software developers are in high demand everywhere. My readers probably know this. You likely get as many recruiter emails as I do every week. I don’t see this changing. All the demographic and economic information available indicates that demand for software developers will continue to outpace the supply of people with those necessary skills.
But, like all shortages, economics will change this situation as well. More and more people are entering the software field because there is such high demand for developers.But, unlike a generation ago, you will need to compete against people everywhere in the world. If you want to stay in demand, you need to have more skills besides core software development.
There are many directions to go here in addition to the traditional advice of learning the business and adding soft skills. Are you good at explaining software development to others? Help mentor teams. Do you have some of the specific skills that are in high-demand? (Read on for my thoughts on what those might be.) Are there particular verticals you want to explore?
Whatever it is, become a multi-dimensional asset. One day, “folks that can code” will not be as in demand as they are now. But, high-quality software people will still be in demand.
And with that, on to some more technology based thoughts.
I’m lumping these together because Big Data analysis requires a lot of resources, and cloud computing puts those resources in the hands of many more organizations.
I’m amazed at the amount of information that can be discovered using big data analysis. While it’s not an area I work in extensively, the innovations there are amazing. I expect this trend to continue as more and more data is online for analysis and research.
If it hasn’t already, 2015 spells the time when Cloud Computing is mainstream. I’m firmly convinced that I will never buy a server again. Furthermore, I’m certain all my hosting will be at a cloud provider, not a traditional hosting service. My current choice is Azure, but this is an area of strong competition. I believe this trend will accelerate as companies need to retire and replace existing servers. That will drive more cloud adoption. Faced with the choice of buying a depreciating asset, or migrating to the cloud, the cloud will win.
To paraphrase Mark Twain, “The reports of .NET’s death have been greatly exaggerated.” The last year saw preview releases of the Roslyn compilers, Visual Studio 2015, ASP.NET vNext, and more. License and language changes, along with major investments from Xamarin make the .NET and C# ecosystems cross-platform.
There’s more interest in the C# language, including all the new features coming soon in C# 6. Now that the Roslyn codebase has gotten to the point where the existing C# features were supported, the language team is working hard to add new features to the language. It’s an incredibly powerful and expressive language, and getting more so every release.
An important driver or that resurgence is that the .NET ecosystem is becoming Open Source. The Roslyn compilers are on Github, along with the core .NET framework, ASP.NET vNext, Entity Framework, and more. The licenses governing these releases have been updated to address platform concerns. (Namely, the new licenses allow these projects to be used on non-Windows platforms; that had previously been disallowed).
At this time, C# and .NET provide a real cross-platform open source strategy for backend, mobile, web, and tablet applications.
That fact makes the .NET resurgence real, and important for all developers, not just those targeting Windows.
The web is programmable, and users, customers, and software decision makers expect modern applications to run in a browser.
It’s dangerous to make predictions, especially about the future. There’s one thing I’m confident in: No one is sure what the right mobile strategy is. There are just too many options. You can use browser based applications for everything. You can use a cross-platform web based framework like Cordoba. You can use a cross-platform native framework like Xamarin. You can also create separate apps for each platform. They all have different advantages and disadvantages. And, different teams have different existing skillsets, which means that the cost of each strategy is different.
Personally, I’ve created apps using the first three. I really don’t know which I prefer. I like the native feel of using the Xamarin tools. And yet, the web only versions do mean more portability.
It’s still going to take time for better answers to become clear.
I’ll close this with a brief look backward. Last year was a pretty big change, and I enjoyed every minute of work. I had the pleasure to teach developers in multiple countries, and different continents, and at different skill levels. I’m excited by the response so many people had learning new skills.
And, at Humanitarian Toolbox, we kept building software to support humanitarian efforts. We got official 501(c)(3) approval, and we are now ready to build more this year.
Today, November 12th, Microsoft made some major announcements about the .NET Ecosystem.
I’m going to concentrate on four points: Open Source, Cross Platform, Deployment, and Community Involvement.
The core .NET Framework is now Open Source. No longer will you choose “Microsoft or Open Source?” The entire Microsoft .NET Development stack is moving to Open Source. From the core CLR on up. I remember NDA meetings with a very small set of people many years ago starting to push for a moment like this. It has taken a long time, and this movement has slowly garnered more and more people. Before I go any further, thanks to those folks that worked at Microsoft back then and started this ball rolling.
It’s really Open Source: It’s being distributed under the MIT license, and the team has committed to accepting community contributions. You can grab the source, build it, use it, fork it, and do anything else allowed by the standard MIT license. It’s a great day.
By “do anything that’s allowed by the standard MIT License”, that includes running .NET on platforms other than Windows. That explicitly includes Linux and Mac platforms. In fact, to support these platforms, Microsoft will be releasing official distributions for both Linux and Windows.
Let me repeat this: Microsoft will be releasing official distributions of .NET for Linux and Mac, in addition to the traditional Windows platforms.
As part of the work to create Open Source and Cross-Platform .NET distributions, Microsoft is also breaking the link between the Windows OS updates and .NET. You no longer need to run your .NET applications using the framework in the Global Assembly Cache (GAC), on a machine wide basis.
Instead, you can deliver the .NET core framework (or just the parts you use) with your application. This means you can run .NET based server applications that use different versions of the framework on the same machine.
There’s a huge advantage for this: In a data center, you can upgrade individual application on individual machines without forcing the DevOps team to upgrade machines in the Data Center. You can even run different applications with different versions of the framework on the same machine.
It follows that you can run new versions of the framework in Azure before the team has rolled out new images with updated bits.
Just deploy your needed version of the framework locally with your application.
Finally, the big finish: Visual Studio 2015 Community Edition. This edition is similar to the previous Professional edition, and it’s now free for independent developers. (Enterprises must still license Visual Studio for commercial use). This is a much more useful edition than the previous Express editions: you can build web sites, mobile applications, and windows applications all with the same edition. You’re not limited to just one style of application. Also, this new community edition supports plug ins and extensions.
I’m excited about this as a great product for students I teach. Too often students were using the trial (time limited) trial, or the express versions. Those just weren’t great tools to keep learning and keep growing. This new version is.
This is a huge set of announcements, and it’s only the beginning. Microsoft just made a set of huge bets in cross-platform Open Source. I know I have some biases, but .NET is the most open, most viable cross-platform toolset available today.
When someone asks if you have a cross-platform, mobile, or Open Source strategy, you can answer: “Yes, it’s all in .NET.”
Yesterday, the .NET Framework team posted an item announcing service updates to .NET libraries released via NuGet. Please read the full post.
I think this is a very significant announcement because of what it means for Open Source in the .NET Ecosystem. It means you get the best of both worlds for these libraries: Open Source, and commercial security update and rollout. Microsoft has created a way to update vulnerable libraries that you include via NuGet and upgrade any of your customers’ machine if they are affected by a security vulnerability. You, as a developer, get the convenience of NuGet, regular updates, and you keep control over when you upgrade those libraries. But you also get deployment support in ways no other Open Source community manages. If one of the NuGet based libraries you are using is vulnerable, your customers’ machines (servers or clients) will receive the security updates via the normal Windows Update mechanism.
In and of itself, this is a super cool feature. It’s a brilliant innovation. But what it means for the .NET ecosystem is even bigger. Traditionally, the .NET Framework components were all released en masse, with the languages and the Visual Studio IDE. That many dependencies led to longer release cycles. Everyone had to be in sync. Microsoft moved to releasing more .NET Assemblies of band via NuGet. ASP.NET MVC, Entity Framework, SignalR, and WebAPI, to name a few. This does a lot to increase the velocity of releases. But what of the support? For a while, developers needed to watch for updates to any of the libraries they used, and rollout their own patches quickly in the case of any security vulnerabilities. Now, we can enjoy the increased velocity that comes with uncoupling individual components from major releases without incurring the increased risk of being responsible for downloading and applying security patches to every .NET component we use. And, especially, the cost associated with applying those patches to all your customers’ machines.
It’s a well thought out strategy that enables velocity and customer support.
I've always found that developers are very interested in contributing their skills and their time to help others.
I'm excited to be part of a new opportunity for developers to help others: The Humanitarian Toolbox.
The Humanitarian Toolbox is the brain child of Richard Campbell, of .NET Rocks fame. The concept is to have developers create Open Source software projects that solve real problems for disaster relief organizations. A group of people, including Richard and I, have been working with global relief organizations to determine what they need most. We've already got a list of more than a dozen application ideas.
It's time to start building. We've picked the first project: a relief worker check-in system. This system would enable relief workers and volunteers to check-in and check-out at a disaster site. The field coordinators would have better information about the skills and the availability of relief workers, enabling them to better deploy the people that have volunteered their time to help. Relief workers and volunteers would get assignments and locations directly on their smartphone. The end result will be that relief workers are more efficient while on site, and more lives are saved.
We need developers that want to build this app.
Humanitarian Toolbox is hosting a hack-a-thon at DevIntersections. I'm working to organize the event, and help organize developers (like you) interested in participating. We plan to create a small proof of concept for the relief worker check-in system during the hack-a-thon. After the initial hack-a-thon, we want to enlist the broader community to continue building the app.
What's our deadline? We'd like it in place before the next natural disaster happens. We don't know when that will be, so we'd like to keep building and have it ready as soon as we can.
If you're going to be a DevIntersections, join us. Contribute your talent and help relief workers save lives. If you're not going to DevIntersections, there's still plenty to do to help. Follow us on twitter: @htbox or the hash tag for the event: #HtBox. We'll have plenty more software to build after the hack-a-thon. For us to be successful, we'll need to keep building and enhancing software for relief workers to battle the next crisis.
Write some code, help the world. Contribute to Humanitarian Toolbox.
All of these projects are Open Source (using the Creative Commons license for content, and the MIT license for code). If you would like to contribute, visit our GitHub Repository. Or, if you have questions, comments, or ideas for improvement, please create an issue for us.