Simplify on the Second Take

Programmers know the cliché that you need to write a solution twice. Once to make it work, then one more time to make it good.

In your first attempt, you will find out more about the problem. You’ll uncover (some) “known unknowns”, and “unknown unknowns”, and in the process turn them into “known knowns” for the next try. The first try is for learning.

We don’t always have the luxury or leisure to spend a day on a solution, then another to rewrite it from scratch.

So instead, we patch things up. But the first attempt, being there, in code, creates its own pull. It forces it own reality onto the programmmer: “I exist, therefore you need to acknowledge me.”

The power existing code has over the mind of a programmer is quite real. Code is only text; but code is also the way we express intent. You will know about the force of code when you remember the last time you tried to understand, untangle, and change nested loops with conditionals that span multiple pages on your screen. Code isn’t just glanced at, understood, and replaced. Especially crappy code can be quite hard to understand at all as a ‘white box’ (where you see how it’s implemented) and often needs to be treated as a ‘black box’ instead (where you probe the functionality with a test harness, but give up on reading the actual stuff).

It’s the same with hackable text editors like vim, NeoVim, to some extend VS Code, and of course: Emacs. You don’t know how the solution feels until you’ve done a couple of test drives with it. Then you tweak and tweak, until you’re happy. Then you discover your configuration is a mess of intertwined dependencies.

My Emacs configuration as of 2025-06-30 has 184 (use-package ...) statements. Some are from a time where I thought multiple use-package calls with the emacs package to configure built-in behavior would be a good idea, so it’s actually 152 unique lines.

Most of these packages actually make me quite happy. I’ve iterated

(use-package logos)
(use-package pulsar)
(use-package ace-window)
(use-package adaptive-wrap)
(use-package all-the-icons)
(use-package all-the-icons-completion)
(use-package all-the-icons-dired)
(use-package all-the-icons-ibuffer)
(use-package async)
(use-package auctex)
(use-package auto-dim-other-buffers)
(use-package avy)
(use-package breadcrumb)
(use-package bufferfile)
(use-package cape)
(use-package casual)
(use-package centered-cursor-mode)
(use-package circe)
(use-package claude-code)
(use-package combobulate)
(use-package command-log-mode)
(use-package company)
(use-package compile-multi)
(use-package consult)
(use-package consult-dir)
(use-package consult-eglot)
(use-package consult-flycheck)
(use-package consult-todo)
(use-package corfu)
(use-package dabbrev)
(use-package dape)
(use-package deadgrep)
(use-package define-word)
(use-package delight)
(use-package denote)
(use-package denote-journal)
(use-package denote-journal-capture)
(use-package diff-hl)
(use-package diranged)
(use-package dired-auto-readme)
(use-package dired-hist)
(use-package dired-subtree)
(use-package discover)
(use-package dwim-shell-command)
(use-package ediff)
(use-package edit-server)
(use-package eglot)
(use-package eldoc)
(use-package eldoc-box)
(use-package emacs)
(use-package embark)
(use-package embark-consult)
(use-package emmet-mode)
(use-package erc)
(use-package exec-path-from-shell)
(use-package expand-region)
(use-package flycheck)
(use-package flycheck-eglot)
(use-package flycheck-overlay)
(use-package flymake-languagetool)
(use-package focus)
(use-package foo-bar)
(use-package forge)
(use-package form-feed)
(use-package goto-last-change)
(use-package gptel)
(use-package haskell-mode))
(use-package hideshow)
(use-package highlight-indent-guides)
(use-package highlight-thing)
(use-package hl-todo)
(use-package ibuffer)
(use-package iedit)
(use-package js-comint)
(use-package js2-mode))
(use-package kagi)
(use-package kill-with-intelligence)
(use-package lin)
(use-package lua-mode))
(use-package magit)
(use-package magit-delta)
(use-package magit-todos)
(use-package marginalia)
(use-package markdown-mode)
(use-package mastodon)
(use-package mcp)
(use-package mlscroll)
(use-package modus-themes)
(use-package neotree)
(use-package nvm)
(use-package ob-markdown)
(use-package ob-restclient)
(use-package ol-notmuch)
(use-package olivetti)
(use-package orderless)
(use-package org-appear)
(use-package org-auto-tangle)
(use-package org-autolist)
(use-package org-block-capf)
(use-package org-contrib)
(use-package org-menu)
(use-package org-tree-slide)
(use-package org-view-mode)
(use-package pdf-tools)
(use-package php-mode)
(use-package phps-mode)
(use-package pico8-mode)
(use-package plantuml-mode)
(use-package projection)
(use-package projection-multi)
(use-package projection-multi-embark)
(use-package re-builder)
(use-package real-auto-save)
(use-package redacted)
(use-package restclient)
(use-package revbufs)
(use-package reveal-in-osx-finder)
(use-package rg)
(use-package robe)
(use-package rotate)
(use-package ruby-electric)
(use-package savehist)
(use-package sideline)
(use-package sideline-eglot)
(use-package sideline-flycheck)
(use-package sideline-flymake)
(use-package smartparens)
(use-package snap-indent)
(use-package spacious-padding)
(use-package sqlite-mode)
(use-package sqlite-mode-extras)
(use-package sudo-edit)
(use-package swift-ts-mode)
(use-package tex-mode)
(use-package titlecase)
(use-package topspace)
(use-package treemacs)
(use-package treemacs-all-the-icons)
(use-package treesit-auto)
(use-package try :ensure t))
(use-package undo-fu)
(use-package unfill)
(use-package vertico)
(use-package wdired)
(use-package web-mode)
(use-package wgrep)
(use-package wgrep-deadgrep)
(use-package which-key)
(use-package xah-fly-keys)
(use-package xwidget)
(use-package yasnippet)
(use-package yasnippet-capf)

This post is for Emacs Carnival June 2025, “Take Two”.