Releasing Databases in VSTS with Redgate SQL CI and Octopus Deploy

You can still do Database Lifecycle Management (DLM) workflows in the hosted version of Team foundation Server (TFS) in Visual Studio Team Services (VSTS) . If you are doing your database development in SSMS, you can use a mix of tools to set up the functionality in VSTS. Jason Crease demonstrates how to build and deploy a simple database into the test environment using SQL CI, SQL Source Control, Octopus Deploy, tSQLt, SQL Cop and SQL Release, all with the minimum of hassle and effort.… Read more

Database Continuous Integration with SQL CI and Jenkins

Continuous integration (CI) is the process of ensuring that all code and related resources in a development project are integrated regularly and tested by an automated build system. Code changes are checked into source control, triggering an automated build with unit tests and providing early feedback in the form of errors returned. Potential problems with … Read more

Writing Build vNext tasks for Visual Studio Online

Hosted TFS, now called Visual Studio Online (VSO), has a new way of writing build processes called Build vNext. Agent tasks are the building blocks of processes and you can supplement the built-in ones with custom build tasks defined in JSON that use targets written in node.js or PowerShell. Jason Crease shows how to develop custom build tasks for building, testing, publishing and synchronizing databases.… Read more

Integrating Database Lifecycle Management into Microsoft’s Application Delivery Process

In order to automate the delivery of an application together with its database, you probably just need the extra database tools that allow you to continue with your current source control system and release management system by integrating the database into it. If you're using the Microsoft stack, then Redgate's tools can help with some of the difficult database parts of the process, as Jason demonstrates.… Read more

Metrics – A little knowledge can be a dangerous thing (or ‘Why you’re not clever enough to interpret metrics data’)

At RedGate Software, I work on a .NET obfuscator called SmartAssembly. Various features of it use a database to store various things (exception reports, name-mappings, etc.) The user is given the option of using either a SQL-Server database (which requires them to have Microsoft SQL Server), or a Microsoft Access MDB file (which requires nothing). … Read more

SmartAssembly Error Reporting: with the bug-finding power of more than 20 testers

At Red Gate, we use the SmartAssembly automated-error reporting system in the applications we sell.  When an error or exception occurs ‘in-the-wild’, it is reported back to Red Gate HQ, along with details about the error (stack trace, deployment environment, local variables, and more). Using the ‘SmartAssembly Sync for JIRA’ system, these errors are then … Read more

Breaking through the class sealing

Do you understand ‘sealing’ in C#? Somewhat? Anyway, here’s the lowdown. I’ve done this article from a C# perspective, but I’ve occasionally referenced .NET when appropriate. What is sealing a class? By sealing a class in C#, you ensure that you ensure that no class can be derived from that class. You do this by … Read more

How big is a string in .NET?

How big is a string in .NET? Typically the size of an object is 8 bytes for the object header plus the sum of the fields.  Consider this simple object:     class ThreeFields    {        double d;        object o;        int i;    } The size of a ThreeFields object is 8 bytes (for header) + 8 bytes … Read more

Scrum: Keeping Kosher doesn't make you Jewish

Our development team has started using Scrum.  We’re only 4 weeks in, so it would be premature to make a judgement on whether it’s working for us.  I’ve investigated how it’s practised elsewhere, and there seems to be a worrying trend… Let’s say I want to become a Christian.  I could go to church on … Read more

Nullable Structs – An interesting ‘Gotcha’

One of the interesting new features in C# 2.0 was nullable valuetypes.  Using these, you can set valuetypes to a value, or null.  Their usage is entirely straightforward.  For instance, to use a nullable int simply declare a variable of type int?, and then set it to a value or null. Behind the scenes, nullable … Read more

Testing the speed of ANTS Profiler 4

Profiling and debugging code inevitably adds overhead, and I know that it can be really frustrating. The overhead can either be small, e.g. the Visual Studio debugger, or massive, as with most performance profilers. A developer may invest in a performance profiler to optimize an algorithm that takes 10 minutes to run, and finds that … Read more

A Quick .NET Puzzle

Just a quick .NET puzzle.  Does this application ever throw that ApplicationException?  If so, why? using System;using System.Threading; class Program{    static long Num = 0;     static void Main(string[] args)    {        Thread t1 = new Thread(ModifyNum);        t1.Start();        while (true)        {            long k = Num;            if (k != -1 && k != 0) throw new ApplicationException(                "k is not -1 or 0.  It is " + k.ToString());        }    }     static void ModifyNum()    {        while … Read more

ANTS Performance Profiler 4 = Sexy Software!?

I sit next to this guy called Stephen Chambers. He is the Usability Engineer working on our next version of our code profiler, ANTS Performance Profiler 4. He is completely revising the UI of ANTS Profiler, and spends most of his time phoning developers asking what they would like to see in the next version, … Read more

Order of Construction

  For me, inheritance is often a headache.  In particular, in what order is everything initialized?  Consider this short C# program.   It creates an instance of Dog, which derives from Animal.  Both Dog and Animal have an instance constructor, a class initializer (aka a static constructor), an instance variable, and a static variable.  There are … Read more