225 Articles


5 months Ago

C# 10 Features

Published by marco on

The article Introducing C# 10 by Ken Bonny discloses some incremental but very welcome changes to the C# language in the iteration that will be released with .NET 6 in November.

In no particular order:

  • field in property accesses to manipulate the backing property without having to define it. This is a welcome improvement that will clean up useless boilerplate for properties that need to do something with the value before storing it (e.g. field.Trim())
  • The required keyword for properties in any of the... [More]

Handling Dependencies in Functional Languages

Published by marco on

Out of curiosity, I looked up how dependency injection works in functional languages. I stumbled upon this amazing article series—Six approaches to dependency injection by Scott Wlaschin (F# for Fun and Profit)
—that presents five different techniques—from very simple and easily applicable to more complex, but potentially robust.

The article series applies various abstraction techniques to a program that reads input, processes it, and writes it out again. The reading and writing are impure operations and should be abstracted... [More]

6 months Ago

CSS and HTML Toolbox 2021

Published by marco on

Over the last four months, I’ve been collecting interesting HTML/CSS techniques and ideas.

  1. I’m planning a bit of a make-over of the earthli style and stylesheets to replace some older cruft with more modern, simpler implementations.
  2. I’m planning a new curriculum for the JavaScript class I’ll be teaching again this coming winter.

For both of these goals, I’m focusing on leveraging as much of the power of the browser—especially CSS/HTML—as possible without getting mired in too much... [More]

Configuring and using Jetbrains Rider ...021.1.1 and Visual Studio 2019 16.9.4

Published by marco on

Visual Studio with ReSharper has been my main development tool for many, many years. I first started using it in 2008 or 2009.

Over the last several years, I’ve used many other IDEs, like Visual Studio Code for documentation, advanced search, and JavaScript/TypeScript or PHPStorm for PHP, Android Studio for Java/Android, XCode for Swift/iOS, or WebStorm for TypeScript/JavaScript.

JetBrains Rider came on the scene several years ago and was not, at first, a viable alternative, but it has gotten... [More]

7 months Ago

Set a Git Tag on Azure

Published by marco on

As with installing a dotnet tool on Azure, there isn’t a standard task for setting a Git tag from a pipeline YAML configuration. The Pipeline UI has an option to easily do this, but that hasn’t translated to a task yet, nor does it look like it’s likely to, according to online discussions.

Setting a Git tag is relatively straightforward, but is complicated by permissions (as with installing a dotnet tool. To tag a build, you have to just execute the git commands in a script.

  − task:... [More]

Installing a dotnet tool on Azure

Published by marco on

I have a .NET solution (Quino) that contains a project that I publish as a `dotnet` tool. The tool calculates a version number based on the branch and version number found in the solution. I use it from Quino itself and also from other project pipelines.

In order to use it from any pipeline (including Quino itself), I need to install it from the Quino artifact feed. The original solution is a couple of years old: I’d had a secure file for NuGet.Config that included the PAT. This works fine,... [More]

A nice CSS demo that uses 350% CPU

Published by marco on

The article Getting the Mouse Position using CSS by Bramus talks about a neat trick that uses sibling elements to react to mouse events without using JavaScript. It also features some kick-ass translucency and animation effects with CSS transitions.

As you move the cursor around, the layer of “cells” change X and Y positions that the CSS text elements “watch”. This lets the central elements “follow” the mouse, transforming a stack of “CSS” texts in a nicely composed and layered stack. It looks like... [More]

8 months Ago

TIHI: SmartGit’s new “Discard to Stash” Feature

Published by marco on

This a quick note for anyone else who’s downloaded the latest version of SmartGit (20.2.3 #16150) and is seeing mysterious stashes that they know they haven’t created.

There’s a new feature called “discard to stash” that is enabled by default.

 Discard to Stash selected by default

What this does is to stash every time you press + Z to discard changes. I understand that this is a failsafe “just in case”, but I kept ended up with a dozen stashes I had no use for. On balance, I’d rather have the tiny risk of wanting changes... [More]

A breakdown of programming languages used in a week

Published by marco on

In one recent week, I realized I’d been working in many different areas and on many different projects, so I took an inventory.

For one project, I reconfigured a program with Delphi Pascal, using Delphi 7 (it’s a very old, legacy solution) to run on my local machine instead of in a VM that had swollen to 120GB. For that project, I also used SQL on SQL Server, running in a Docker container that I’d configured with YAML. The solution has several products, among which you can switch, so I wrote a ... [More]

9 months Ago

Software without Process

Published by marco on

 A software product with undocumented or poorly documented commits and a patchy issue-tracker is akin to a shipping pallet with 100 boxes haphazardly stacked on it, all wrapped up in shipping cellophane. You can see some of the labels and some of them you can’t and some of the boxes definitely don’t even have labels at all.

 If it looks like the pallet to the right, then you already know you can’t ship it. That’s an obvious train-wreck of a project that’s going to blow up in everyone’s face. But... [More]

Set up PHP With Docker, PHPStorm, and XDebug

Published by marco on

Until now, PHP debugging involved a fragile balance between the IDE, the server, and the debugger, each with overly verbose configuration. On top of that, using Docker introduced the wrinkle that you were technically debugging on a remote server rather than on the “real” localhost.

It’s been a long journey, but it’s finally a lot easier to set up PHP debugging with a server running in a Docker container. Once you use the most modern tools, everything works with a couple of lines of... [More]

1 year Ago

A dynamically generated Groovy foot-gun

Published by marco on

Groovy is a dynamically typed programming language that executes on the Java Runtime. It mixes its own highly dynamic syntax with islands of Java code. The Android ecosystem and its IDE use Gradle for its build scripts. Gradle uses the Groovy programming language.

The Problem Code

A large project I’m working on contains quite a bit of custom Gradle code for integrating framework libraries, making obfuscated builds, configuring publication, and, finally, creating signed builds.

The signed... [More]

C# 9: finally, covariant returns

Published by marco on

The article Welcome to C# 9.0 by Mads Torgersen (Microsoft Dev Blogs) (May 2020) introduces several nifty new features that I am really looking forward to using.

What about C# 8?

I still haven’t moved Quino to C# 8, as the only feature I’d love to have there is the non-nullable types, which ReSharper Annotations provide with earlier versions of C#. Not only that, but the nullabilities are properly propagated to users of Quino. It’s understood that recent versions of Visual Studio and runtimes and compilers also do this but, until... [More]

2 years Ago

W3C Web Animations

Published by marco on

The Web Animations Working Draft (W3C) was published in October of 2018. Can I use “Web Animations” (CanIUse) shows that the only browser that supports this API 100% is the latest technology preview on iOS and MacOS. Chromium-based browsers have had (very) basic support for quite some time, but Safari has thrown down the gauntlet with full support, which I learned about from Web Animations in Safari 13.1 by Antoine Quint (WebKit Blog).

This API is intended to replace many usages of CSS Animations and CSS Transitions, which are not only... [More]

PostgreSql Drawbacks

Published by marco on

Despite the title, from what I can gather from 10 Things I Hate About PostgreSQL by Rick Branson (Medium), the author is a big fan of PostgreSql. However, he has such vast experience with it that he can still list 10 things that don’t work as well as they could.

They seem to boil down to:

  • Default replication is still serialized and therefore not as reliable as the alternative async protocol that is much harder to configure and pretty much what every other major database offers.
  • Obsolete-data-handling requires... [More]

Getting started with D3.js

Published by marco on

 The programmable notebook Introduction to D3 by Arvind Satyanarayan (MIT Visualization Group) is part of a full course at MIT about Interactive Data Visualization.

The linked notebook uses D3.js, but previous classes in the course have dealt with Vega, which is,

“[…] a visualization grammar, a declarative language for creating, saving, and sharing interactive visualization designs. With Vega, you can describe the visual appearance and interactive behavior of a visualization in a JSON format, and generate web-based views using Canvas or SVG.... [More]”

Rust: from zero to pretty-well-versed in 30 minutes

Published by marco on

I found the article A half-hour to learn Rust by Amos to be extremely helpful in learning the syntax and mechanics of Rust.

It starts out with the absolute basics:

let introduces a variable binding […]”

then takes you through

  • Modules
  • Blocks
  • Conditionals
  • Matches
  • Options
  • mutables
  • Copy/clone semantics
  • Traits
  • Generic parameters
  • Constraints
  • Macros
  • Enums
  • Lifetimes and borrowing
  • Generic lifetimes
  • Statics vs. owned vs. referenced
  • Slices and range literals (Index and IndexMut)
  • Results
  • Errors, panic and unwrap... [More]

Quino 2020 Roadmap

Published by marco on

Now that Quino 8.x is out the door, we can look forward to Quino 9.

Quino 8 is a very solid and stable release that has already been test-integrated into many of our current products running on Quino. We don’t anticipate any more low-level API changes, though there will be follow-up bug-fix releases.

There are a few larger-scale changes improvements and enhancement, outlined below (and noted in the roadmap).

Ready for Change

With this release, we’ve got more coverage than ever. Excluding... [More]

Quino v8.0.0: ASP.NET Core, Web Client 2, Culture/Language improvements

Published by marco on

The summary below describes major new features, items of note and breaking changes.

The links above require a login.


When [NotNull] is null

Published by marco on

I prefer to be very explicit about nullability of references, wherever possible. Happily, most modern languages support this feature non-nullable references natively (e.g. TypeScript, Swift, Rust, Kotlin).

As of version 8, C# also supports non-nullable references, but we haven’t migrated to using that enforcement yet. Instead, we’ve used the JetBrains nullability annotations for years.[1]

Recently, I ended up with code that returned a null even though R# was convinced that the value could never... [More]

Configuring .NET Framework Assembly-binding Redirects

Published by marco on

After years of getting incrementally better at fixing binding redirects, I’ve finally taken the time to document my methodology for figuring out what to put into app.config or web.config files.

The method described below works: when you get an exception because the runtime gets an unexpected version of an assembly—e.g. “The located assembly’s manifest definition does not match the assembly reference”—this technique lets you formulate a binding-redirect that will fix it. You’ll then move on... [More]

Rebase Considered Essential

Published by marco on

Fossil is a distributed Source Control Manager that claims to offer the same power without the complexity of Git. The article Fossil: Rebase Considered Harmful by D. Richard Hipp (Fossil SCM) is part of the documentation for the tool.

One of the main selling points of Fossil is that it does not support rebase. In the article, the author lays out the many ways in which rebasing causes no end of woes for developers using Git.

I’d heard of Fossil before and I’d even skimmed this document before. This time around, though, I... [More]

Advanced CSS (blend modes and subgrids)

Published by marco on

The article Z’s Still Not Dead Baby, Z’s Still Not Dead by Andy Clarke (24 Ways) is well-written, very interesting and taught me a few new CSS tricks of which I was unaware.

Granted, my work usually doesn’t call for fancy effects like those you can achieve with something like background-blend-mode, but it can happen. There’s not only background-blend-mode, there’s also mix-blend-mode and filter, all of which apply high-quality effects dynamically.

In the late spring, I had a two-month project where I had to use a... [More]

Framework Design: Programming Paradigms and Idioms

Published by marco on

The discussion React in concurrent mode: 2000 state-connected comps re-rendered at 60FPS (YCombinator) is illuminating mostly in that it shows how ego can impede productivity.

Ego-driven design

Ego can also be that thing that drives a talented programmer to create something of use to the rest of us, but that’s honestly a very rare case. More often than not, the best case is that a developer improves their skills—and perhaps learns to be more humble instead of shooting of their mouth about how “easy” it... [More]

Thoughts on Atomic/Utility CSS

Published by root on

The article In Defense of Utility-First CSS by Sarah Dayan on January 15th, 2018 (Frontstuff) is very long[1], so I’ve summarized a bit with notes and thoughts.[2]

I don’t really care about being pedantic without first knowing some facts. What are the requirements?


  • Can I quickly make a precise change to a single component?
  • Can I make a global, thematic change?
  • How quickly can I make changes?
  • How maintainable is the result?

If atomic/utility CSS can deliver these things, then it’s probably a fine tool. But—spoiler alert—it... [More]

Azure Linked Accounts and SSH Keys

Published by marco on

Azure DevOps allows you to link multiple accounts.

Our concrete use case was:

  • User U1 was registered with an Azure DevOps organization O1
  • Microsoft did some internal management and gave our partner account a new organization O2, complete with new accounts for all users. Now I have user U2 as well, registered with O2.
  • U2 was unable to take tests to qualify for partner benefits, so I had to use U1 but link the accounts so that those test results accrued to O2 as well as O1.
  • We want to start... [More]

Using Git efficiently: SmartGit + BeyondCompare

Published by marco on

I’ve written about using SmartGit (SG) before[1][2] and I still strongly recommend that developers who manage projects use a UI for Git.

If you’re just developing a single issue at a time and can branch, commit changes and make pull requests with your IDE tools, then more power to you. For this kind of limited workflow, you can get away with a limited tool-set without too big of a safety or efficiency penalty.

However, if you need an overview or need to more management, then you’re going to... [More]

Visual Studio 2019 Survey

Published by marco on

Visual Studio 2019 (VS) asked me this morning if I was interested in taking a survey to convey my level of satisfaction with the IDE.

VS displays the survey in an embedded window using IE11.[1] I captured the screen of the first thing I saw when I agreed to take the survey.

 Visual Studio 2019 Survey error

I know it’s the SurveyMonkey script that’s failing, but it’s still not an auspicious start.

[1] I’d just upgraded to Windows 10 build 1903, which includes IE 11.418.18362.0. I can’t imagine that they didn’t test this... [More]

3 years Ago

Svelte vs. React (overselling a framework as a revolution)

Published by marco on

I’ve just read about a web framework called Svelte in the post Virtual DOM is pure overhead. I think the product itself sounds interesting, but that the author uses unnecessarily misleading arguments.

From what I gather, Svelte is a compile-time reconciliation generator for JSX/TSX components. This pre-calculated generator applies changes to the DOM without needing a virtual DOM and without real-time diffing or reconciliation. That is, instead of having real-time calculation, with possible... [More]

Why use an IOC? (hint: testing)

Published by marco on

Inversion of Control Pattern

The IOC pattern is the [I] in SOLID. It stands for “Inversion of Control”.

In order to make good use of this pattern, an application should adhere to the following rules:

  • Prefers composition over inheritance, exposing clear dependencies
  • Refers to dependencies via interface or protocol types with as small a surface area as possible Obtains dependencies through injection, preferably in the constructor

Components built in this manner are agnostic in their... [More]