Mark is the founder and CTO of RendleLabs, a software development consulting company. He works with new and emerging technologies, and shares his experience with teams and organisations looking to adopt those technologies for their projects. Currently Mark specializes in .NET Core and helps teams get up to speed with the wider ecosystem opened up by this cross-platform version of .NET; things like Linux, Docker, microservice architectures and so on. Mark also contributes to various open source projects, and speaks at conferences and user groups around the world. He is a Microsoft Azure MVP and a Docker Captain. In his spare time, he enjoys gaming, watching movies, and putting off writing his (probably best-selling) book.
/* | |
The IXmlSerializable interface assumes the mutability of the type the implements it. | |
Now we have readonly structs, that's not a valid assumption. Ideally, there'd be a static | |
method that returned a new instance of the type, but you can't have static methods on | |
interfaces, because reasons. | |
*/ | |
[Deprecated] | |
public interface IXmlSerializable |
export PS1='\n[\e[0;32m\u@\h\e[m \e[1;33m\w\e[m\e[0;31m$(__git_ps1 " (%s)")\e[m]\n\$ ' |
.NET Core finally brings a fully-supported, open-source version of the framework cross-platform, and with the 2.0 release due in Spring, it's really ready for prime-time. While C# and .NET are familiar, the new ecosystem in which whey find themselves is bigger and more open than ever before, and the design and architecture of the systems you can build is very different from the "ASP.NET hosted in IIS" model you're used to.
Join Mark as he shares some of what he's learned from working with ASP.NET Core since the very first preview release of Project K through to version 1.1, including:
Object Pilates outlines 9 completely arbitrary and hopelessly unrealistic rules to apply when performing the exercise:
- One primitive parameter per method.
- Don't use the subtract operator.
- Wrap all increment operations in static methods.
- Singly-linked lists.
- One underscore per file.
- Don't loop.
- Keep all solutions less than 529 lines.
- No methods with more than two callers.
I missed last night's ASP.NET Community Standup on account of being shattered after a long day and falling asleep. Then I checked Twitter on the train this morning and discovered that the .NET world had, apparently, been burned to the ground by marauding Microsofties (again). It seemed to have something to do with project files, JSON vs XML, and suchlike.
Finally, lunchtime happened and I could watch the recording of the standup, and I got to understand what everyone was on about. In case you've missed it:
- In the beginning, there was
make
, and Gates did not ownmake
, so Gates said "Let there be MSBuild" and there wasMSBuild
. - And
MSBuild
used the*.*proj
files from Visual Studio as its inputs, which were formed of terrible XML, and verily it was impossible to use without a Visual Studio license.
public class Whatever | |
{ | |
public async Task<int> Something() | |
{ | |
await Task.Delay(1).ConfigureAwait(false); | |
await Task.Delay(1).ConfigureAwait(true); | |
return 0; | |
} | |
} |
#! /usr/bin/env bash | |
WORKDIR='' | |
PROJECTDIR=$PWD | |
while [ ! -f "${PROJECTDIR}/global.json" ] ; do | |
WORKDIR="/$(basename $PROJECTDIR)${WORKDIR}" | |
PROJECTDIR=$(dirname $PROJECTDIR) | |
if [ $PROJECTDIR == '/' ] ; then | |
echo No global.json found in any parent directories. Aborting. | |
exit 1 |
"use strict"; | |
const gulp = require('gulp'), | |
mocha = require('gulp-mocha'), | |
minimist = require('minimist'); | |
const knownOptions = { | |
string: 'spec', | |
default: { spec: '*' } | |
}; |
public class ClaimsPrincipalBuilder | |
{ | |
public static ClaimsPrincipal FromDictionary(IDictionary<string, string> source) | |
{ | |
var claims = source.Select(pair => new Claim(pair.Key, pair.Value)); | |
var identity = new ClaimsIdentity(claims); | |
return new ClaimsPrincipal(identity); | |
} | |
} |