Skip to content

Instantly share code, notes, and snippets.

Mark Rendle markrendle

Block or report user

Report or block markrendle

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@markrendle
markrendle / Program.cs
Created Jul 24, 2019
IndentedTextWriter Async Fail
View Program.cs
using System.CodeDom.Compiler;
using System.IO;
using System.Text;
using System.Threading.Tasks;
namespace IndentFail
{
class Program
{
static async Task Main(string[] args)
@markrendle
markrendle / Client.cs
Last active Jun 7, 2019
.NET Core 3.0 gRPC code
View Client.cs
using Greet;
using Grpc.Core;
namespace ClientApp
{
class Program
{
static async Task Main(string[] args)
{
var channel = new Channel("localhost:50051",
@markrendle
markrendle / ChannelsQueue.cs
Last active Apr 29, 2019
Better implementation of ChannelsQueue
View ChannelsQueue.cs
public class ChannelsQueue : IJobQueue<Action>
{
private ChannelWriter<Action> _writer;
public ChannelsQueue()
{
var channel = Channel.CreateUnbounded<Action>();
var reader = channel.Reader;
_writer = channel.Writer;
View Squares.cs
public static class Squares
{
public static int Square(int i) => i * i;
public static int SumOfSquares(int i) => Enumerable.Range(1, i).Select(Square).Sum();
}
@markrendle
markrendle / IXmlSerializable.cs
Last active Mar 2, 2018
SXmlSerializable shape for fixing Jon Skeet's problems in C# 9.0
View IXmlSerializable.cs
/*
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
View PS1.sh
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\$ '
@markrendle
markrendle / bio.md
Created Apr 4, 2017
Mark's Bio for conferences and such
View bio.md

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.

@markrendle
markrendle / abstract.md
Created Feb 2, 2017
.NET Core, The Universe, and Everything
View abstract.md

.NET Core, The Universe and Everything

.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:

@markrendle
markrendle / Pilates.md
Last active Dec 19, 2016
The 9 Arbitrary Rules Of Object Pilates
View Pilates.md

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.
View msbuild.md

Thoughts on project files

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:

The TL;DR history

  1. In the beginning, there was make, and Gates did not own make, so Gates said "Let there be MSBuild" and there was MSBuild.
  2. 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.
You can’t perform that action at this time.