• Collaborate at the Contractual Boundaries

    A team of engineers working together on the same project should divide up their work at the contractual boundaries. This avoids rework because choosing an arbitrary point to split up the work can be difficult to specify and more susceptible to breaking changes introduced by the other team members.

    A simple example is dividing work up by frontend and backend where the API serves as a contractual boundary. It’s simple to understand which work each person is responsible for and results in less rework. (It’s still important to specify the API contact, but you can be more hand-wavy about the rest).


  • Nazi Bar Theory

    The way to prevent a bar from turning into a Nazi bar is by nipping it in the bud. You need to ignore their reasonable sounding arguments in the moment because their end goals are so terrible. For example, the first Nazi in the bar who is nice to everyone who is getting kicked out might say, “Hey I’m not doing anything wrong!”. However, if you don’t do that, they bring their friends, and friends of friends, and eventually you end up being a Nazi bar.

    Online communities function similarlyβ€”the moment you let them in the sooner you become a bastion of hate.

    Read the Twitter thread.


  • Setting Up TypeScript and Eslint With Eglot

    Using TypeScript with eglot in Emacs is fiddly to set up. I also prefer using eslint as a plugin to typescript-language-server so no other setup is required. Together, this makes for an extremely portable setup with minimal fuss which is the whole point of the language server protocol to begin with.

    Install the typescript-language-server:

    npm install -g typescript-language-server
    

    Install the eslint plugin for typescript-language-server:

    npm install typescript-eslint-language-service -D
    

    Add the plugin to your config’s compilerOptions:

    {...
      "compilerOptions": {
         "plugins": [{
          "name": "typescript-eslint-language-service"
        }]
        ...
      }
     }
    

    In init.el, tell eglot how to locate your tsconfig.json (otherwise your TypeScript project configuration won’t be picked up and eslint won’t work):

    ;; I'm not sure why this is needed, but it throws an error if I remove it
    (cl-defmethod project-root ((project (head eglot-project)))
      (cdr project))
    
    (defun my-project-try-tsconfig-json (dir)
      (when-let* ((found (locate-dominating-file dir "tsconfig.json")))
        (cons 'eglot-project found)))
    
    (add-hook 'project-find-functions
              'my-project-try-tsconfig-json nil nil)
    
    (add-to-list 'eglot-server-programs
                 '((typescript-mode) "typescript-language-server" "--stdio"))
    

    See also:


  • Lockfiles Let You Deal With Breaking Changes on Your Own Terms

    Most package managers have some form of a lockfile which freezes the exact version of a installed libraries. This makes building the environment again reproducible (with some big caveats around system libraries) so you won’t suddenly encounter a breaking change from an upstream library or dependence changing from yesterday to today. Lockfiles don’t fix the problem of breaking changes, but it allows you to choose when you have to deal with it (at upgrade time).


  • Hapax Legomenon

    A hapax logomenon (“being said once” in Greek) is a word that only appears once in the written record of a language, author, or single text. This makes it difficult to determine it’s meaning and must be derived from context.

    Examples include “epiousios” which appears in The Lord’s Prayer and has come to mean “daily”, but is not known for sure.