codingsoul

Category: Code Quality

Do you start with the data or with the test?

I recently had some discussions about TDD. I personally never tried to accomplish the procedure seriously. So I wanted to invest a little time to understand if it does fit to my needs, especially if it is more effective in short and long term perspective. I wanted to use a simple example. Not too complex and […]

Read More

Logging with log4net and Windsor Castle in c#

Quite a while ago I had a good talk with an colleague about “to log or not to log – that is the question”. 😉 That was a longer discussion, and a lot of questions had been raised: Shall we do logging? What shall be logged out? Should we create a log library by ourselves to […]

Read More

How to do sensible logging in c#

In last post about Are Extensions the beauty or the beast? I added a screenshot that showed a class implementing the repository pattern. This actually also showed the implementation of our log strategy. I did get some questions why we do it like this and what are the benefits. Let’s have a look onto how we do it: […]

Read More

Coding principles: Are extensions the beauty or the beast?

The other day a collegue of mine came to me, being pretty enthusiastic. He was amazed about his latest changes to the code. As I am the responsible architect, it is my turn to have a look onto the changes. So we sat together and did so. Usually we create our code via straight rules and best practices. As […]

Read More

Coding principles: These assembly/ folder structures… suck.

We need to move people from time to  time between products. It can be tough when you move from SSIS/ Sql/ SAP stuff to job-based Excel automation. How can we make a hard task easy? The very first things that developer see are the assemblies and the folder structures. Let me first put some bad examples for assembly […]

Read More

What’s wrong with that: Do not only code the happy case

Last pull request I’ve opened was some kind of disappointing. When going through the code files, I detected a lot of… questions marks above my head. We do use pull requests for two reasons actually: The need for doing review sessions goes down dramatically The team learns to improve each other while not being upset when anthing […]

Read More

What’s wrong with that: I am not that good in naming classes

Quite a while ago I was sitting together with another programmer to review the brand new sources. It was created as a prototype, a proof of concept. The original product has been rewritten for several reasons: The UI shall be completely redesigned The codebase had to be replaced due to bad maintainability and bad performance Yes, certainly if there would […]

Read More

What’s wrong with that – robust and unquestionable code

I recently had a session about proper exception handling and, more intensively, defensive programming. As exception handling is one of the most important as well as one of the most unattented tasks of a developer, the session was based on real code from the code base of the products. Don’t get me wrong here: It is not […]

Read More