Building an Online Store with Platform UI and Hugo
With the release of our CSS Framework, Platform UI, it might be fun to actually build something with it! At RitterIM, we have an interna...
CSS Frameworks Static SitesWith the release of our CSS Framework, Platform UI, it might be fun to actually build something with it! At RitterIM, we have an interna...
CSS Frameworks Static SitesIt’s been a few years, several great people, an awesome company, and a cool thing we made 😀 Once upon a time, we had a mixed bag of fram...
CSS Frameworks RIMdevI’m a huge fan of animation on the web, especially when it comes to user interaction. A simple way to include such a thing on webpages is...
CSS SCSS JavaScript UI/UX frontendI dedicate this blog post to all the QA testers that expose all the flaws in my code. For a few years now I thought I had it all figured...
CSS SCSS Mobile UX UI/UX frontendOne of the perks being with Ritter, and on the dev team, is you can choose the hardware that makes you happy and productive! Team members...
macOS RIMdevAs a technical writer, I create software documentation. But many times, I find myself looking at in-product copy and wondering about cont...
Documentation Technical writing UX writing Content designDocs and contextual help We recently started a push towards integrating Docs content into our software platform. The goal is to pull in...
Documentation Hugo XML RSSHave you ever wanted to change the value of a Sass variable based on screen size, a state, or for any other reason that might require cha...
css SassEver been confused about naming a branch with Git? Looking for a good naming convention? Well, I might have an answer for you. I’m not sa...
GitHubWe often use GitHub to create a compare view, and list pull requests (PRs) for releases. However, GitHub limits the number of commits you...
Documentation GitHub GitUsing our Hugo-based documentation site, we typically publish release notes once per week. My usual process includes the following: M...
Documentation Hugo ArchetypesAs someone who basically gets by when it comes to writing Javascript, I tend to look at things from a “I bet I could do this with CSS” st...
CSS SCSS Mobile UX UI/UX frontendThis is an updated post of the original here. Whether you’re new to the frontend at RIMdev or looking for more about our Frontend team...
Team RIMdev FrontendIf you’ve ever worked in Azure Data Studio, you may find tab colors very useful. They allow you to visually separate different connectio...
Documentation Azure Data StudioIf you’re not familiar with Platform UI, it’s a utility rich CSS framework we created. As we look to migrate all of our apps and static ...
UI UX CSS SassGet ready to celebrate because, as of Friday, September 18, 2020, Evan You, creator of Vue.js, announced Vue 3 is officially released. He...
vue3 frontend developmentTypically with ASP.NET Core 3.1 when no specific authorization requirements are set all endpoints are publicly accessible. When you’re wo...
asp.net coreIf you have used slots in Vue, you know that it provides a clean way to vary content that is displayed in child components. For example, ...
VueJS Slots Scoped Slots JavaScriptWe’ve been using Swagger via Swashbuckle for some time with our ASP.NET Full Framework applications. As we’re moving toward ASP.NET Core ...
asp.net coreWe’ve spotted some strange behavior before with ASP.NET Core and JSON serialization/deserialization, and I eventually made it back to try...
asp.net coreI never thought ordering of relational static fields and properties in C# mattered. And, then, I started getting NREs on a property I know was set to a static-instance…
public static void Main()
{
Console.WriteLine(Person.Empty == null); // prints 'True'
}
public class Person
{
public static readonly Person Empty = empty;
private static readonly EmptyPerson empty = new EmptyPerson();
}
public sealed class EmptyPerson : Person { }
If you were to step-through the code, the first-time Person.Empty
is called, empty
is null
and gets returned as-is. Then, empty
is initialized. But, it’s too late since Empty
is static and will only get “initialized” once. But, if we swap the ordering…
public class Person
{
private static readonly EmptyPerson empty = new EmptyPerson();
public static readonly Person Empty = empty;
}
Now, empty
is an instance of EmptyPerson
when Empty
is called and everything is good.
The problem above is only a problem for static
fields/properties. If either were to be an expression-member, then ordering doesn’t matter:
public class Person
{
public static readonly Person Empty => empty;
private static readonly EmptyPerson empty = new EmptyPerson();
}
// This variation also works...
public class Person
{
public static readonly Person Empty = empty;
private static readonly EmptyPerson empty => new EmptyPerson();
}
public class Person
{
public static readonly Person Empty = new EmptyPerson();
}
But, I opted to use the private
member in several other spots within my code…
Just as a final warning, don’t do this because while you have a getter
-only (i.e. readonly), you’ll also create a new instance of EmptyPerson
every time Empty
is called. 🤯
public class Person
{
// Don't do this!
public static Person Empty => new EmptyPerson();
}