To write an awesome pull request is not that hard, but requires a bit of planning and reading up on tools.
Add an issue describing the feature before coding. It’s an opportunity to get feedback both on the suggested feature and on how to make it fit with the existing design/architecture.
Learn git. As a minimum you need to know how to fork the main repository, create feature branches and how to rebase them on a refreshed master pulled from the main repository. Check out the contribution guidelines from Nancy for details.
Limit each pull request to a single issue/feature. It’s much easier to review and discuss multiple small focused PRs than one large complex.
So you have Resharper and found a bunch of unused usings and other things that should be cleaned up? You’re welcome to submit those non-functional changes in a separate pull request.
Run any existing tests and make sure you didn’t break anything.
Make sure your code meets the test coverage expected and coding standard in the project.
Respect the architecture of the existing code. For example in AuthServices that supports both IIS and Owin hosting, it’s not acceptable to reference System.Web from most parts of the code.
A Gift to Who?
Finally I’d like to mention the view of pull requests as gifts. I totally agree with viewing pull requests as gifts. But not only a gift from the contributor (sending the PR) to the maintainer (receiving the PR), but also from the maintainer to the contributor.
I give you this code that I have written to improve your project.
I will take care of your code by reviewing it, maintaining it and take responsibility for any bugs in it.
This post was inspired by a similar post by Mark Seemann. It’s very good (although more lenghty than this), so I recommend reading it.
Is politics agile? Hardly. Can politics benefit from an agile mindset? I don’t know, but I’m running an experiment. Besides working as a developer and doing some open source coding (which is what I usually blog about) I’m also a part time politician (for the greens in the municipality assembly of Huddinge, in Stockholm county, Sweden). If anyone’s up for a political discussion, I’m into it, but this post is not about it. This post is about an effort I’m doing to bring some of the Agile mindset into politics.
In a municipality in Sweden, there is the municipality assembly, the municipality executive committee and a number of committees for various purposes such as school, preschool, social care etc. For all of these, there are MASSIVE amounts of decisions to be made, with even MORE MASSIVE amounts of background material. For a single meeting with the municipality assembly, the pile of paper to read is often about 10cm thick. In this massive pile of paper, there is often some interesting details that we in the green party would like to somehow act on. When we get the pile of paper, there are two questions that we need to answer:
What things do we want to act on?
How do we best act on those?
When we have got all the material, we have an internal preparatory meeting where we discuss those two questions. When I first joined those meetings, I found them quite inefficient. So I suggested that we tried another way of working – and brought Trello to help.
Using the Kentor.AuthServices SAML2 Service Provider with Thinktecture IdentityServer 3 bridges the gap between SAML2 and OAuth2/OpenID Connect. Thinktecture IdentityServer 3 support clients using the modern OAuth2 and OpenID Connect protocols. It can either have a local account database through e.g. ASP.NET Identity, or use external authentication services. By registering Kentor.AuthServices with IdentityServer, IdentityServer can authenticate to a SAML2 Idp.
I know that SAML2 is often regarded as legacy, but the truth is that there is still vast amounts of infrastructure out there that supports SAML2, but has not yet taken the leap to OpenID Connect. When the client applications prefer modern standards, a bridge between them is needed. With Kentor.AuthServices, Thinktecture IdentityServer can be that bridge.
Get It Running
To add SAML2 to IdentityServier, changes are needed in three places: Installing the Kentor.AuthServices.Owin package, alter the startup configuration method for IdentityServer and add two lines to the web/app.config file.
In November 2011, I decided to try blogging and created the Passion for Coding blog. Three years and 186 published posts later, my blog has grown into a resource for programmers from all over the world. I would like to thank you all for reading, commenting and sharing my posts. Without readers, blogging would be extremely boring.
When I first started the blog three years ago I had to be careful to filter out my own page views from the web server analytics, to not get confusing numbers. In fact, I could see from the web server statistics on what days I had written new posts, solely on the extra hits using the admin interface produced on the web server. That is no longer the case. I’ve so far had visits from 210 countries/territories, which is basically the entire world except a few countries in central Africa and the one exception in Asia: North Korea.
During this year I’ve gradually narrowed the focus on the blog to become more technical and less about the soft sides of software development. I’ve reduced the number of articles on methodology and focused on programming instead. At first I was a bit worried that I might loose quite a few of my readers. I probably did, but I’ve gained even more so I think it was the right decision. It is also in line with a general career decision I made, to focus more on the technical expertise and less on the soft sides. I want to focus more on coding and architecture and that means that I have to focus less on project management.
What’s the use for the internal access modifier in C#? It’s not as common to use as public, protected or private. It wasn’t until I started some serious stand alone library work that I fully started to appreciate and use internal.
All was fine and I was happy with my use of internal. Until I saw this tweet yesterday.
Objects should be encapsulated. If they're properly encapsulated, there's no need for classes to be internal.
That tweet by Mark sparked an interesting discussion, but as great as Twitter is for new ideas, I can’t fit my thoughts on this subject into the 160 chars limit. Actually that last sentence alone is too big for a tweet.
In one of my replies to Mark, I mentioned that I think that there’s a huge difference between using internal on an entire type and using it on specific members.
@ploeh That makes sense for members, although I think internal on the member level is a smell. I was thinking of making entire type internal