Developers need to be able to do 2 jobs: theirs and the one they’re automating.
Do I know or did I just take a decision
A little while ago, my teamlead spoke to me about my performance on the team. He (and the rest of the team) is happy with the work I do. There was a case he pointed out where I took a decision where it wasn’t my call to make. Now that I think back on it, he was right. I took a decision to implement an object in a certain way that later confronted a colleague with a small bug. When the classes are used independently they are technically correct, but due to the interaction between them, a bug arose.
This confronted me with the subtle difference between knowing something and deciding something. It happens in a fraction of a second inside my brain, but it can have consequences to the rest of the team, without me giving it some thought. I have to be a little more mindful of when I take a decision, compared to when I know something with a 100% certainty.
For the project I’m working on, I have to grant users access to pages. Pretty standard, ThinkTecture solved this problem long ago. Since this is a government project, they don’t understand the benefit of using a lot of outside packages. So, based off of a blog post from Dominick Baier on using claims based authorization in MVC, I build the following method: