Skip to main content

Posts

Showing posts from July, 2016

Not or Bang versus Equals False

I generally write code in C#. There are 2 mains ways that I have seen to check if a Boolean expression returns in the negative.

Using a bang to symbolize "Not" before the expression

!(expression)

And checking if the expression equals false

(expression) == false

I have gone back and forth between using both never really having a strong feeling as to which I prefer.

Today I have decided that I believe one is better than the other.

I came to this conclusion by really thinking about the Principle of least surprise. The principle when applied to coding is that you want your code to not surprise the next developer. What can you do to make your code easy to follow and understand?

Viewing these 2 options under the lens of the Principle of least surprise, I think one is clearly more surprising than the other. I think that using the bang before an expression is much more surprising than equating the expression to false. The little exclamation point can get lost while reading code, especial…

Team Sharing

I work for a company that has multiple developments teams all working on different projects. Some teams work closer together towards a large goal, while others can be somewhat isolated. One team may work large on a web project while another is focused on mobile and another still could be just back-end services. There is collaboration between teams when it makes sense or one team depends on another, but I wonder if there aren't more opportunities to share knowledge and get teams to learn from each another.

My idea is to have 1 week where a developer from each team would join another team. The developer that changes teams would join their new team as if they were a new hire of that team. They would get great exposure to how that team works and would also get to work on something different than their normal project. With every team sharing a developer, each team would get fresh ideas and views of how they work. After the week was over, the returning developer would have new knowledge…