Getting a Pull Request Accepted

I like to receive pull requests, but I like some more than others. Here are a few hints on how to make me love your totally awesome pull request and merge it instantly.

With a bit more than a year as an open source maintainer I’ve received a few pull requests. Some have been good, some have had room for improvements and some have required extensive work by myself to clean up before merging.

An Awesome Pull Request

To write an awesome pull request is not that hard, but requires a bit of planning and reading up on tools.

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. Run any existing tests and make sure you didn’t break anything.
  6. Make sure your code meets the test coverage expected and coding standard in the project.
  7. 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.

The contributor

I will take care of your code by reviewing it, maintaining it and take responsibility for any bugs in it.

The maintainer accepting a pull request

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.

Bringing Agile to Politics with Trello

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:

  1. What things do we want to act on?
  2. 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.

SAML2 for Thinktecture IdentityServer 3 with Kentor.AuthServices

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.

Three Years of Passion for Coding

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.

Internal Classes and Members

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.

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.

Software Development is a Job – Coding is a Passion

I'm Anders Abel, a systems architect and developer working for Kentor in Stockholm, Sweden.

profile for Anders Abel at Stack Overflow, Q&A for professional and enthusiast programmers

The complete code for all posts is available on GitHub.

Popular Posts

Archives

Series

Powered by WordPress with the Passion for Coding theme.