The Four Commandments for Keeping Your Team Out of Integration Hell

“Michael: There’s nothing here to fear.
Lucifer: Well, there’s always the truth.”

-Mike Carey

Source control can be hard. Source control can be terrifying. And worst of all, source control can be a real Biblical hell.

For those beautiful souls fortunate enough to have never touched upon the issue, allow me to briefly explain:

Integration Hell refers to the point in production when members on a delivery team integrate their individual code.

In traditional software development environments, this integration process is rarely smooth and seamless, instead resulting in hours or perhaps days of fixing the code so that it can finally integrate.


By now, Git and Git-Flow (if you’re not using it, you undeniably deserve to burn) are probably the most popular source control tools on the planet. You’re likely at least familiar with them.

But tools and workflows can only be as good as the people using them.

And if it’s true that C can make it easy to shoot yourself in the foot, Git can sometimes make suicide seem like a more appealing proposition than your last three failed relationships.

So, in order to fulfill my divine duty and save you from the lake of fire, I bring you four commandments that will keep you and your team on the pathway to Heaven and good Fortune:

I. Commit Early, and Commit Often

Each developer should be able to break down his work into simple, logical chunks suited to a small commit; and should commit those changes as soon as possible.

II. If It’s Not Pushed, It’s Not Done

Each commit should be pushed into the remote repository.

Hard drives can fail, programs can crash, IT can be presumed to be incompetent, and mistakes will be made.

If your work hasn’t been pushed, it hasn’t been done. Period.

III. Use It or Lose It

Each unit of work should be defined as an individual feature branch diverging from a main development branch.

Your work should be integrated within the main development branch or branches in no longer than a certain time period. It is up to you and your team to determine that time period based on the scale of work that your repository usually handles.

But normally I’d recommend as frequently as each day and as infrequently as each week.

This means that each development task should be intelligently designed and broken down into many small features (branches) in order to keep the work continually integrated with the main codebase.

If one of the features needs to exceed this given amount of time, especially see the next commandment.

IV. Do the Pull, or Be a Fool

As a developer, it’s your responsibility to make sure your work not just works, but also plays nice with everyone else’s work.

That means that if your feature branch has been isolated from the main branches for longer than reasonable, you have to pull changes from the development branches via a merge or a rebase in order to make your branch usable.

Failing to do so can only guarantee that things will break down the line, and make using the codebase a foolish thing to do.

Don’t be that person.

The Lazy Developer’s Guide to Command Line Building with C#

For many C# developers, building and running a small project or even a single class file usually means having to launch Visual Studio and dealing with the overhead of an IDE and a large boilerplate of project code, making testing and exploration of the language and the .NET framework much less enjoyable than it should be.

But there’s another way. A lazier way. That way is called the command line and it has all the tools you need to make writing and testing your gists, snippets, and mounds of C# code easier than ever.

Developer Command Prompt for VS2015

Included with every installation of Visual Studio, this convenient development shell grants you access to the two following C# command-line utilities:

  • csi – An Interactive C# REPL


    If all you need is a refresher on how a feature of the language works or to confirm whether some code is valid C# or not, you don’t even need a compiler. You can use csi directly from the command line. It stands for “c sharp interactive” and it is a read-eval-print loop (REPL) program which is designed to facilitate understanding what your code does as you write it.

    Working with csi is pretty intuitive. To start the program, simply enter csi in the Developer Command Prompt.

    You can type an expression without a semi-colon to examine its value or write a block of statements so you can immediately use them.

    Referencing libraries (dlls) for testing is easy with the #r directive, just make sure it’s in your current working directory:

    #r "MyLibrary.dll"

    Speaking of directories, if you intend to use csi and csc frequently you will probably want to change the starting directory of the Developer Command Prompt.

    To do so on Windows, simply navigate to the directory that contains the shortcut for launching the Developer Command Prompt, right click on it, select “Properties”, and edit the “Start in:” field with whatever directory path you like.

    To learn more about how csi can make your time with C# more enjoyable and productive, read the official interactive walkthrough.

  • csc – The C# Compiler


    Microsoft’s very own C# compiler. It has about all that you could expect from a good compiler, and thanks to C#’s language design around namespaces and assemblies, compiling a few files and libraries across directories into one executable is not hard at all.

    Compiling a file into an executable:
    csc File.cs

    Compiling a file into a custom-named executable:
    csc /out:Named.exe

    Compiling multiple files (from the current directory and a sub-directory named “lib”) into one executable:
    csc File1.cs File2.cs lib\Library.cs

    Compiling all the files in the current directory (one class file must contain a Main method):
    csc *.cs

    Compiling a file into an executable using a library (dll) reference:
    csc /reference:library.dll File.cs

    Compiling a file into a dynamically linked library:
    csc /target:library File.cs

    Mixing and matching arguments:
    csc /target:library /out:MyLib.dll *.cs

    You can view a list of all csc options here.

Essential Windows Command Prompt Commands

While Window’s Command Prompt console is certainly not the most popular shell around, it is still quite handy to be able to know how to perform some basic user tasks with it. The following commands, along with a decent code editor, are about all you’ll need to work with csc and csi effectively:

  • cls – Clears the console window.
  • dir – Lists available directory files.
  • cd – Changes the current directory path.
  • mdMakes a new folder.
  • rdRemoves files and folders.
  • Ctrl + C – Exit out of the current process.
  • Up/Down keys – Iterate through previous commands.
  • Tab key – Press while typing to receive auto-complete suggestions.

Cross-Platform Building

  • Visual Studio Code with .NET Core


    Visual Studio Code (VSC) is an excellent and open-source lightweight alternative to Visual Studio that can be used across Windows, macOS, and Linux. It makes use of .NET Core, which is Microsoft’s open-source version of the .NET Framework. Which means that you can write, run, and share your C# projects with just about anyone.

    VSC offers support for Omnisharp, IntelliSense, NuGet, Git, and other programming languages – making it a great tool for all types of developers.

    The way your C# projects work in VSC is that they are folder-based and not file based. When you want to create a new project, you make a new directory or folder, and then through the Visual Studio Code terminal you can make use of the following commands:

    • Ctrl + ` – Opens the VSC Terminal.
    • dotnet new – Creates a new .NET Core C# project with your launchpoint being a class named Program.cs.
    • dotnet restore – Retrieves NuGet dependencies for your project.
    • dotnet run – Builds and runs your project.

    VSC also has a built-in debugger, which you can run with the F5 key.

    To learn more about how to use Visual Studio Code, watch this lively five-minute tour of the software.

  • Mono with mcs and mono


    Mono is an open-source and cross-platform implementation of the .NET Framework sponsored by Microsoft. Which means that you have full access to C# and most of the .NET libraries across Windows, macOS, and Linux (among many others).

    In the future you can expect most of the general-purpose code in Mono to be identical to that of the .NET Core Framework, but the result is largely the same: C# code across operating systems and platforms.

    The Mono compiler, mcs, works very similarly to csc:

    Compiling a file into an executable:
    mcs File.cs

    Compiling a file into a custom-named executable:
    mcs -out:Named.exe

    Compiling multiple files (from the current directory and a sub-directory named “lib”) into one executable:
    mcs File1.cs File2.cs lib/Library.cs

    Compiling all the files in the current directory (one class file must contain a Main method):
    mcs *.cs

    Compiling a file into an executable using a library (dll) reference:
    mcs -r:library.dll File.cs

    Compiling a file into a dynamically linked library:
    mcs -target:library File.cs

    Mixing and matching arguments:
    mcs -target:library -out:MyLib.dll *.cs

    Compiling using non-cross platform Windows dlls:
    mcs -out:winforms.exe -r:System.Windows.Forms.dll -r:System.Drawing.dll *.cs

    You can view a list of all mcs options here.

    To run the executable, use mono itself:

    mono File.exe

C# as a Scripting Language with scriptcs and csi


Not many people know this, but you can use C# as a perfectly legitimate scripting language using an open-source and cross-platform program called scriptcs, as well as Microsoft’s csi.

To make a new C# script, simply create a .csx file and directly start writing your code as if you were inside a method or an object.

scriptcs has support for NuGet packages, while csi does not. So the choice of either depends on whether you need to use NuGet or not and whether you’re on Windows or not.

To run a C# script, simply use the following commands:

  • With scriptcs – scriptcs File.csx
  • With csi – csi File.csx

And there you have it, a brand new way to use one of the better object-oriented languages, along with five different command-line tools for interacting with your C# code and making things a little easier.

A Good Time For A Welcome

Mian Labs is now officially an established brand. It is no longer an idea, but a living, breathing piece of technology with a hold on my brain that is uniquely its own. And it cares only for one thing: good software.

It exists to secure the future of better code. And I exist to aid it in that mission. Follow us along while we reach our initial goal of making the Android platform our home for inventive and memorable experiences; we all might just learn quite a lot.

I plan to welcome the coming of Mian Labs with its first software release, an Android application called Pkdx (pronounced “Pikadex”).


Pkdx will offer its users the chance to board a vessel in time back to the simpler, older days of the Pokémon franchise, where catching Pokémon was accompanied by a sense of childish wonder and amazement, delivered by a technology powered by only two AA batteries.

A place where the menus were cluttered and the text was cramped, and yet for all of our modern design today we still can’t quite feel the same endearment whenever we tap to accept another friend request or click to ‘like’ whatever sort of media bit popped up on our news feed.

I believe that these sorts of meaningful experiences, even more so than the code that powers them, is what Mian Labs is about. It is not only my brand, my label, and perhaps later on even something more, but it is also my humanity – put forth to you: the reader, the user, and the friend.

You will see more about it and the tech behind it as it is released.

Update: Pkdx has been released. You can get it here.