Our first steps with SonarQube could be done without much thought on security, reliability and how we can protect it. If you want to use SonarQube beyond your pet projects, you should start making some changes to your installation.
There are a few rules in SonarQube I find a bit special. I understand their reasoning but believe that the resulting errors aren’t correct or helpful. Should you reach the same conclusion you can follow along to create your own custom set of rules.
Lines of Code (short LOC) are an often used metric to compare projects by their size. All you need to do is to count the lines of source code to figure out if project A is bigger than project B. However, that is only true when they use the same programming language. Only then can you do the same work in a line of code. If you compare Ruby with C or Assembler your LOC metric may differ by many orders of magnitude to get the same things done.
The SonarQube scanner is a simple way to start gathering data on your project. However, the scanner doesn’t know much about project structures and conventions for programming languages. Those things are all included in the build integration, which will be the topic of a later post.
As soon as your SonarQube installation is working, you are ready for the next step. To analyse code with SonarQube is simple, but again you need to know where you have to start.
The installation of SonarQube is well documented and easy to follow. However, SQL Server Express brings its own challenges. There are some configuration changes you must make or SonarQube will not work. This installation walkthrough will address those issues and help you to overcome them.
The "Given, When, Then" syntax of behaviour-driven development (short BDD) is a great way to get the business involved in the software development process. SpecFlow allows you to use this kind of example based specification with your .Net projects. Unfortunately, there are two obstacles that make the installation of SpecFlow and its commercial extension SpecFlow+ a challenge. This post will guide you through the installation process and help you to overcome those obstacles.
A common requirement for applications is to display a list – that can range from products to search results. While showing all entries works for small lists, it is not that useful for lists with hundreds of entries. In this case you should use paging and only show 10 or 20 entries at a time. The user sees the first part of entries and then can switch to the next page of the list to get more entries. This approach is faster, reduces the workload on your systems and the user isn’t drowning in data. Let’s look how you can implement paging in applications that use SQL Server.
A common task for developers is to store application specific configuration. There are many ways you can take to get that functionality. If you use .Net / C# you can use the simple, built-in way to work with configuration files. Let’s look how this works.