Skip to content

Instantly share code, notes, and snippets.

View terrajobst's full-sized avatar

Immo Landwerth terrajobst

View GitHub Profile
@terrajobst
terrajobst / RyuJIT-Instructions.md
Last active April 26, 2020 04:06
Some feedback

Try RyuJIT -- Your code runs faster on X64 Windows

How to enable RyuJIT

Download and install RyuJIT now.

RyuJIT only works on 64-bit editions of Windows 8.1 or Windows Server 2012 R2. It will support a larger set of Windows OSes at release

After installation, there are two ways to turn on RyuJIT. If you just want to enable RyuJIT for one application, set an environment variable:

@terrajobst
terrajobst / gist:2ed5fcaa97f533095d97
Last active September 29, 2015 15:30
System.CommandLine with commands

For simple commands, it's probably easiest to do a switch:

static class Program
{
    static void Main(string[] args)
    {
        var command = string.Empty;
        var fileName = string.Empty;
        var keepExisting = false;
@terrajobst
terrajobst / ConditionalCompilationSplitter.cs
Last active April 14, 2021 22:49
Split files by preprocessor
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
namespace ConditionalCompilationSplitter
{
class Program
  1. Convert to .NET Standard
  2. Ship
  3. Profit!
@terrajobst
terrajobst / reviewflow.md
Last active April 2, 2018 23:27
How I would like PRs to work

Desired PR workflow

This document captures how I'd like to pull requests to work. For context, I work on an open source project that has many repos and more importantly a lot of people working on it (in the hundreds). Also, I'm not a developer but a program manager so many of my PRs tend to be non-code, like blog posts and specifications.

However, I don't think my issues with GitHub's PR flow are a function of my role and mostly a function of the team size and thus the number of reviewers I

@terrajobst
terrajobst / SplitByNamespace.cs
Created July 10, 2018 23:36
Split files by namespace
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Text;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace NetStandardCleanup
@terrajobst
terrajobst / issue.md
Last active April 16, 2019 02:22
Setting read-only fields isn't reliable

Setting read-only fields isn't reliable

Analysis by @stephentoub


You can easily see that by running this code on .NET Framework today:

using System;

System.Text.Json Usability Study

We've performed a usability study on the new System.Text.Json APIs which will replace JSON.NET as the default JSON experience in .NET Core 3.0:

  • We focused on the primary "getting started" scenarios to validate that we picked the right type- and method names.
  • We simulated what we believe to be common error cases to validate that our exception messages are understandable and actionable.
  • Since we were short on time, we couldn't use the recruiting provided by the UX
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Reflection;
using System.Text;
namespace ConsoleApp52
{
internal static class Program
{
@terrajobst
terrajobst / process.md
Created August 18, 2022 19:47
api-review-process

API Review Process

This is a funnel of our API review process with links to issuesof.net:

graph TD
   S(<a href='https://issuesof.net/?q=is%3Aopen%20is%3Aissue%20label%3Aapi-suggestion'>Suggested</a><br>921) --> T{Triage}
   T -->R(<a href='https://issuesof.net/?q=is%3Aopen%20is%3Aissue%20label%3Aapi-ready-for-review'>Ready for Review</a><br>43)
   T -->C(<a href='https://issuesof.net/?q=is%3Aclosed%20is%3Aissue%20%28label%3Aapi-ready-for-review%20or%20label%3Aapi-needs-work%20or%20label%3Aapi-suggestion%29'>Closed</a><br>1,930)
 R --&gt; RM{Review Meeting}