Skip to main content

Makefiles

· One min read
  • use (ref)bash:unofficial-strict-mode
  • The most important variables are:
    • $@ - the name of the target
    • @< - the name of the first prerequisite
    • $^ - the name of all prerequisites, separated by spaces
    • $* - the stem that was matched when using % patterns
    • $(@D) - the directory part of the target

Preamble

SHELL := bash
.ONESHELL:
.SHELLFLAGS := -eu -o pipefail -c
.DELETE_ON_ERROR:
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules

ifeq ($(origin .RECIPEPREFIX), undefined)
$(error This Make does not support .RECIPEPREFIX. Please use GNU Make 4.0 or later)
endif
.RECIPEPREFIX = >

References

Monad

· One min read
  • subclass of Applicative

Functions

class Monad m where
(>>=) :: m a -> ( a -> m b) -> m b
(>>) :: m a -> m b -> m b
return :: a -> m a

Operators

  • (>>=) is infix form of bind

Laws

return a >>= k                  =  k a
m >>= return = m
m >>= (\x -> k x >>= h) = (m >>= k) >>= h

References

  • Monad on the HaskellWiki.

Unix

· One min read

Philosophy

  • modular vs. monolithic
  • do one thing and do it well
  • composable
  • output of one program becomes input to another
  • avoid scope creep - keep it small, and make a new tool

Predefined Environment variables

:::(envvar) EDITOR

  • Value must be an editor application that can be used from the command line :::

:::(envvar) PATH :::

Z-Score

· One min read

:a.k.a.: Standard Score

  • a way to compare two stats together
  • a z-score is not interpretable without context
  • equal to the number of standard deviations of difference between a data point and the mean

:::INFO see also

Formula

$$
Z = \frac{x-\mu}{\sigma}
$$
  • $Z$ = standard score
  • $x$ = observed value
  • $\mu$ = mean of the sample
  • $\sigma$ = standard deviation of the sample

Construction of a User Story

· 4 min read
info

The example in this post is a real ticket at $DAYJOB, for an application used for running small, in-person collectable card game competitions. I have edited it to remove proprietary and/or extraneous information, but it is otherwise unchanged.

Diplomacy

· One min read

A coworker relayed this definition of diplomacy:

Diplomacy is the art of of telling people to go to hell in such a way that they ask for directions

This is a variation of a common quote, typically misattributed to Winston Churchill.1

The earliest version was posted anonymously to the "St. Louis Star-Times" in 1937.2

A diplomat is a person who can tell you to go to hell in such a tactful way that you’ll look forward with pleasure to making the trip.

Footnotes

  1. https://quoteinvestigator.com/2018/04/03/diplomat/

  2. ibid.