• Org-Roam-Ui Helps You Peer Into Your Brain

    The org-roam-ui is a visualization and exploration companion to org-roam. The force-directed graph of notes (nodes) and links (edges) shows how concepts fit together and relate. I thought it was primarily eye candy, it’s useful for 1) spotting connections you haven’t already made and 2) identifying orphaned notes that could be linked to other notes.

    By looking at a subgraph and increasing the number of neighbor nodes rendered you can see Nth degree connections to a note. This is handy for linking related notes together or simply to think about the through-line that brings seemingly disparate ideas together.

    By looking at the edges of the overall graph, it’s easy to spot orphaned notes that don’t connect to anything. These are worth revisiting and linking them or maybe deleting.

    See also:


  • 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).