Skip to content

Coding Practice

Little Git Tricks: Change the Author of a Commit

Git tracks the author of every commit. If you do not modify anything, the global settings will be used. That is great for the day-to-day use, but it may not be what you want in all situations.

If you do pair-programming, you may want to make the commits as a team. If you commit your code on the command line, you can use this option with your commit:

git commit --author="John Doe <[email protected]>"

Pen & Paper

An often-overlooked combination of tools to develop software are pen and paper. Don't panic, I do not propose to write a first draft of your code on paper and only use a computer for the final version. Some universities or companies in their hiring process may do that, but that is not what I mean.

Bringing dotCover Back to Life After a Failed Upgrade of ReSharper

Last week I did something stupid: While working in the train I decided now would be a good time to upgrade ReSharper to the newest version. It took far longer than expected and when the train reached my station, I had to put my laptop into the sleep mode. As I started it again in the next morning, the ReSharper installation finished and everything looked fine. Except it was not.

Legacy Code Rocks!

It is the time of the year where most new year's resolutions are already forgotten. Should you still want to learn new things I have a great podcast for your. It is not about the shiny new frameworks, instead it will help you to improve your existing applications.

The podcast Legacy Code Rocks! hosted by Andrea Goulet and M. Scott Ford is my favourite one. They know what they are talking about and find guests that have interesting insights to share. I am constantly surprised how much I can learn from every episode and how much of those things can be applied 1:1 to my applications – and that by just spending between 30 and 45 minutes per episode.

How to Test Your Internal Classes in C

One of the most important concepts of object-oriented design is encapsulation. You try to hide all the internal things of a class from the other developers and only offer them a subset of functionality to use. You can achieve this by setting an appropriate access modifier for your methods and classes:

  • public: The type or member can be accessed by any other code in the same assembly or another assembly that references it.
  • private: The type or member can be accessed only by code in the same class or struct.
  • protected: The type or member can be accessed only by code in the same class, or in a class that is derived from that class.
  • internal: The type or member can be accessed by any code in the same assembly, but not from another assembly.
  • protected internal: The type or member can be accessed by any code in the assembly in which it is declared, or from within a derived class in another assembly. (as in protected OR internal)
  • private protected: The type or member can be accessed only within its declaring assembly, by code in the same class or in a type that is derived from that class. (as in private OR protected)