231 Articles


3 weeks Ago

Accessibility is important

Published by marco on

 I recently read through the a11y myths. They’re quite interesting and should be required reading for managers running projects that develop web sites.

From it, I learned about the evils of overlays (see the Overlay Fact Sheet) and that there are really good resources out there, like Understanding Conformance (W3C) with WCAG 2.0 (Web Content Accessibility Guidelines).

“All WCAG 2.0 Success Criteria are written as testable criteria for objectively determining if content satisfies them. Testing the... [More]”

1 month Ago

TIL CSS border-radius lets you define ellipses

Published by marco on

I hadn’t ever really thought about it because I don’t use the API very much, but it turns out that the border-radius property is not only a shorthand for setting all four corners at once, but also sets the horizontal and vertical lengths simultaneously. To set them individually, use a / between two values.

The corner radii are then calculated using ellipses as shown in the following visualization,

 Border-Radius with ellipses

The article CSS Border-Radius Can Do That? by Nils Binder on October 9, 2018 (9 elements) has many more examples. It also introduces a Fancy-Border-Radius... [More]

Real Hacks are not easy

Published by marco on

Most of us know “hackers” from the media—either the news media, television shows like Mr. Robot, or movies like Swordfish. But the fast and easy way of hacking presented in the media actually does a disservice to how incredibly clever these hacks really are.

Less-complex techniques—like guessing or brute-forcing passwords—still work super-well. And you’ve always got social engineering hacks, like just asking someone for their credentials in an official-sounding way. But real, technical... [More]

State of CSS 2021

Published by marco on

I just finished reading through the State of CSS 2021. It’s a well-presented[1] summary of a developer survey about CSS.

I liked the following sections:

the sub-sections have a pretty fine-grained listing of CSS features, usage, caniuse and MDN links, if you’re interested in finding out what you might be missing…or want to be smug about all of the CSS features you know about and use.
The rankings in the sub-sections are broken down by “Satisfaction”, “Interest”, “Usage”,... [More]

2 months Ago

CSS sub-grids (and grids) with Kevin Powell

Published by marco on

I’ve been using CSS Grids for a while now. I’ve found many instances where I had used flexbox, where grids turn out to be much more appropriate. That is, the grid layout algorithm lets me specify what I want without fiddling about with flex-base and flex-grow, etc. Flexbox definitely has its place, but I think we all ended up abusing it a bit in our rush to leave tables-for-layout behind.

But that’s all in the past because now we have CSS grids available everywhere and all is well with the... [More]

3 months Ago

Why can’t identifiers start with a number?

Published by marco on

The video I’m not sure how much longer I can wait! by Kevin Powell is an excellent introduction to sub-grids in CSS. But I was more interested in the fact that he told his viewers that,

“you can use numbers in classes, but if you have a class or id that starts with a number, it’s invalid. […] It’s one of those weird things in CSS that sometimes trips people up.”

I immediately thought to myself, “it’s not weird. Every programming language is like that.”

Then, I thought, “I bet this guy only knows CSS, so he... [More]

8 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]

9 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]

10 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]

11 months Ago

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]

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]

1 year 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]

2 years 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]

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]