Quantcast
Channel: Software Development – The Blog of Colin Mackay
Browsing all 34 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Node.js with Express – Getting form data

Now that view engines are wired up and working on this application, the next area to look at is getting data back from the browser. By default Express doesn’t do anything with form data in the request...

View Article


Image may be NSFW.
Clik here to view.

Node.js with Express – Come to the dark side. We have cookies!

So far, so good. At the point the application displays a list of languages and will display the language that the user picked. However, for the flashcards to work, that selection will have to be...

View Article


Image may be NSFW.
Clik here to view.

Deploying a Node.js with Express application on Azure

By the end of the last post, there was enough of an application to deploy it, so let’s deploy it. Prerequisites An FTP client to get at the files on Azure. A GitHub account (or other source control,...

View Article

Image may be NSFW.
Clik here to view.

Previewing Config Transforms

Curiously, I didn’t know about this until recently and it is such a useful thing too. You can preview the results of your configuration transformation from within Visual Studio. First of all, right...

View Article

Image may be NSFW.
Clik here to view.

Code Review: Making a drop down list out of an enum

I’ve come across code like this a couple of times and it is rather odd: IEnumerable<CalendarViewEnum> _calendarViewEnums = Enum.GetValues(typeof(CalendarViewEnum)).Cast<CalendarViewEnum>();...

View Article


Image may be NSFW.
Clik here to view.

Setting up Code Coverage in Team City

The project that I’m working on has a rather spotted history for unit tests until now. There would be periods of people actually writing them, but then come unstuck when a random test failed and...

View Article

Image may be NSFW.
Clik here to view.

The difference between & and && operators

Here is a bit of code that was failing: if (product!=null & !string.IsNullOrEmpty(product.ProductNotes)) If you look closely you can see it uses just the single ampersand operator, not the usual...

View Article

Image may be NSFW.
Clik here to view.

Changing the default Assembly/Namespace on an MVC appliction

TL;DR When getting an error message like this: Compiler Error Message: CS0246: The type or namespace name 'UI' could not be found (are you missing a using directive or an assembly reference?) when...

View Article


Image may be NSFW.
Clik here to view.

Custom routing to support multi-tenancy applications

The company I currently work for has many brands so they are looking for a website that can be restyled for each brand. They also want the styling information to be managed through an admin area rather...

View Article


Image may be NSFW.
Clik here to view.

Two Factor Authentication with GitHub and Visual Studio 2013

New job, new tools, new processes. In my new job we’re using GitHub for source control, and because the data is sensitive we’re also using two factor authentication. Because I develop with Visual...

View Article

Image may be NSFW.
Clik here to view.

Debugging a process that cannot be invoked through Visual Studio.

Sometimes it is rather difficult to debug through Visual Studio directly even although the project is right there in front of you. In my case I have an assembly that is invoked from a wrapper that is...

View Article

Image may be NSFW.
Clik here to view.

Using GitHub Two Factor Authentication (2FA) with TeamCity

If you have two factor authentication (2FA) set up in GitHub and you also want to use TeamCity, the easiest way to set this up is to set up SSH keys to access the GitHub repository. The first step is...

View Article

Image may be NSFW.
Clik here to view.

Setting up Ubuntu for .NET Development

First up, at the time of writing only Ubuntu 14.04LTS is supported. I’ve read that it will work on 15.04, but I know it won’t work on 15.10 because of a binary incompatibility on a library that .net...

View Article


Image may be NSFW.
Clik here to view.

Application configuration in .NET Core – Part 1

.NET Core has a new way of working with configuration that is much more flexible than the way that previous versions of .NET have. It allows you to: Pull configuration from multiple sources and bring...

View Article

Image may be NSFW.
Clik here to view.

Application Configuration in .NET Core – Part 2

In the first part we got started by pulling in configuration data from multiple source in .NET Core, in this part we’ll look at mapping the configuration onto a set of classes so that is becomes easier...

View Article


Image may be NSFW.
Clik here to view.

Overusing the Null-Conditional Operator

The null-conditional operator is the the ?. between object and field/property/method. It simply says that if the thing on the left hand side is null then the thing on the right hand side is not...

View Article

Image may be NSFW.
Clik here to view.

But why is the iterator operating in multiple-threads

Background Recently, I had a bit of a problem with NHibernate when I was converting some code into parallel tasks. (If you have no interest in NHibernate, then don’t worry – it is just background to...

View Article


Image may be NSFW.
Clik here to view.

Aggregate of columns, not rows

In SQL Server it is very easy to aggregate a value across many rows. You simply just write something like this: SELECT MAX(SomeColumn) FROM SomeTable This will return one row with the aggregate value...

View Article

Image may be NSFW.
Clik here to view.

Join Null Check with Assignment

I recently wrote some code and asked ReSharper to add a null check for me, which it did. Then it suggested that I could simplify the null check by joining it to the assignment. Intrigued, I let it....

View Article

Paramore Brighter: Using .NET Core’s Dependency Injection

This is the first in a series of posts on Paramore.Brighter. I’m writing this as a series of recipes, with the aim of you picking up a point quickly and getting going with it. The code for this post is...

View Article
Browsing all 34 articles
Browse latest View live