Justin Self inherited an internal build tool. Rome may not have been built in a day, but this tool was. It “simplifies” provisioning development environments, claiming machines in the environment for certain tasks, and so on.
(e.BuildStatus == null ?
(e.Branch == null ? "" : ($"\nBranch: <{e.BranchUrl}|{e.Branch}>")) :
($"\n{(e.BuildStatus == "Building" ? "Building" : e.BuildStatus == "Success" ?
$"Built" : "Build failed")}: <{(e.BuildStatus == "Success" ?
e.BuildReleaseUrl : e.BuildUrl)}|{e.BuildRelease}>") +
$"{GetCardUrl(e.Branch)}") +
$"\n{(e.DeployStatus == "Deploying" ?
"Deploying" : e.DeployStatus == "Success" ?
"Deployed" : "Deploy failed")}:
<{e.DeployUrl}|{e.DeployRelease}>{GetCardUrl(e.DeployRelease)}"
Unfortunately, this ternary is one of twenty in a row. Justin writes:
I wanted to make a change to it but… after the 4th ternary, I could no longer remember what I was doing and had trouble picturing my children’s faces.