The Ki Editor
The Ki editor is a pretty great way to melt your brain.
I have been using and enjoying the Helix editor for some time. Helix is great for a number of reasons, among those are that it has a remarkable lack of need for configuration despite having IDE-like functionality. It was quite difficult for me to see any problems with it that might necessitate a change of editor. But on a lark I heard about Ki on lobste.rs and decided to give it a try and see what it’s about.
I think the following is how you are supposed to imagine life as an accomplished user of Ki. Your right hand is the steering controls, moving you through your project. Your left hand is changing the unit affected by the right hand: sometimes these are selection modes that have to do with how the file you’re working on is atomized (by lines, words, characters, subword units, paragraphs, syntax nodes) and sometimes these are conceptualizations of actions that let you operate in the same directional fashion on the buffer list, your movement history, or certain editing commands. Search results, Git changes and LSP errors or warnings can also become selection modes subject to the same navigation system.
Vi and Helix both have a plethora of single-letter commands that amount to an action with an embedded direction: for instance, i, a, o and I, A, O are all variations on “put me in insert mode,” either at the start or end of the selection, or at the start, end, above or below the current line. In Ki, there’s just the Open command on your left hand chorded with a direction on your right hand. With no direction chord, you get the effect of the c command that deletes the current selection and puts you in insert mode.
Paste is another one where we have two commands in Helix: p for after and P for before the current selection. Despite using it daily for like half a year, I still don’t have great memory for which to use when (I suspect this has to do with whether newlines are in the selection or not). But with Ki, you again just have a single command on the left hand, Paste, with a direction on the right, which covers both these cases and several more. And Ki simplifies this a bit because Helix also distinguishes between its keyboard and the system keyboard, you actually also have (in Helix) space-p and space-P, but because Ki only uses the system keyboard you get a simplification there with more power.
Cut, copy and paste all work in the same way. Ki generalizes some new actions: delete and eat, which have to do with whether the selection is kept or not, and copy generalizes to duplicate (copying the selection to other locations rather than just to the clipboard). And all of these systems are multiple-cursor aware so whatever actions you are doing, you are doing to all of the active selections simultaneously.
Inspiration to Ki appears to come, surprisingly, from Emacs, where everything is a buffer and every buffer works the same way. The most impressive example of this by far is the Explorer, which is your principal way of interacting with the filesystem. When you open the Explorer you get a buffer like any other, except it is your filesystem tree, presented as a YAML file. Edits you make to this YAML file are edits you make to the filesystem itself, much like dired mode in Emacs. This is the only way to find, add, edit or delete files. (Edit: the Kimmunity has explained that there is also a fuzzy file find mode accessible via pressing space, then Pick, then File.)
Another good idea from Emacs on display here is the built-in documentation. There’s a hotkey for showing the global keymap and whenever you press something that changes the keymap, it gets shown too.
There are a few displays of outright brassiness. The key for saving is just enter. Imagine! Meanwhile, it takes about three keypresses to exit the editor, and they are completely unique to Ki: press space, then Editor then either Quit or Quit Without Saving. The arrow keys mostly do not do anything. The dedication to iconoclasm is immense, and it feels like a completely new and refreshing way of thinking.
Ki is a pretty young project, started in 2023, it’s about 3 years younger than Helix, and it shows in some ways. The documentation is excellent, although you can find a few missing things (, the Kimmunity is very quick to fix things. A few nits are hard not to trip over: indents don’t happen automatically the way I would like, and I have managed to get the multi-cursor menu to show on top of itself. The git support is good, but it won’t go up a level looking for your .git folder; I probably won’t use this functionality much anyway due to Lazygit. There probably will never be multiple file buffers on one screen with horizontal or vertical splits; I’m not convinced that’s a deal-breaker but it might be for some. I still am not entirely sure how to do a global search, though I’ve somehow managed it a few times (Search This seems to have something to do with it) (Edit: The Kimmunity has explained that the n on qwerty is local search but space + d is global
search). I would like to see something like hx --health which makes it obvious whether your LSP integrations are available. (Edit: They have already merged a code change based on this blog post to add this function by running ki @ lsp health!) But it might be good enough to use as a daily driver already, if you can look past a few small issues.
If you’re interested in learning it, I would suggest you start by reading the documentation before firing it up. The documentation is very good but you want to understand selection modes and actions before you get in there. Memorize space+/ (qwerty) or equivalent for seeing the keyboard help, and then “z” for undo. Then you’re reading the documentation to understand what actions there are, and searching it to find where they are on the keyboard. Be patient, it’s like learning to fly a drone when you’re used to driving an RC car.
How to Resist
There’s been a recarpeting project at my work which has required everyone to box up the stuff in their offices while the contractors work on it. For the scientists this has been particularly onerous; one of them remarked to me the other day that we software engineers have it easy because we have so much less stuff. I said “yes, but twenty years after I retire, there will be no evidence that I ever worked at all.”
Maybe I’m in a dark mood because of all the AI discussion. I might agree with Ed Zitron that “the ‘wow, Claude Code!’ articles are mostly from captured boosters and people that do not actually build software being amazed that it can burp up its training data and make an impression of software engineering.” But I am not immune to the hype; there are other software engineers at my work who have used AI to some advantage. I have used it myself usefully in the not terribly distant past to fix Nix problems I would otherwise struggle with.
The main problem with these attempts, as far as I can tell, is a twist of that old chestnut, the Gell-Mann Amnesia effect, that I don’t generally ask the AI to do things for me I already know how to do, I ask it to do things for me I wouldn’t want to do myself or know how to do. “The first principle is that you must not fool yourself, and you are the easiest person to fool.” — Richard Feynmann. If I were better at Nix, I wouldn’t need the AI to fix a simple problem, but with AI, I can at least get solutions, and if I’m smart, I can learn why they work. In one case, I was using the wrong primitive with a name similar to the one I should have used. In another case, the package I was trying to wrap was wrongly constructed and it had to be patched.
I see some value in using these AIs to point me to resources I haven’t heard of before; I learned about PocketBase from them, for instance. Of course, in the context I was asking it to make me a simple web application to see just what all this agentic stuff is about, and I wanted to see what HTMX is like. The irony is that PocketBase tells you not to use it with HTMX because it’s the wrong tool for the job. A fact I only learned because after using the agent to write the code, I got curious and decided to learn a bit more about the tools it recommended. It also says:
If you don’t have the time to at least skim through the documentation and you plan to solely rely on some AI tool, then please do NOT use PocketBase! — https://pocketbase.io/faq/
This sort of jibes well with my general impression of AI, and people who make heavy use of it. Though AI appears to be superb at generating plausible-looking text at first blush, it is actually illiterate, and the people who make the heaviest use of it seem (no offense, or, well, maybe only some offense) also to be illiterate, or at least not particularly moved by the idea that reading is important.
This seems to me to be the continuation of the general trend established in the early days of Facebook and the rise of NoSQL that what was important wasn’t quality exactly but shipping quickly. “Move fast and break stuff” and “write slop quickly” seem reinforcing to me rather than orthogonal or contradictory. Same with the MongoDB concept of “let us return bad results quickly” being better and more important waiting for right answers or even (God forbid) not returning answers at all due to unavailability or downtime. The idea that most of the text in your life should be summarized for you by an AI, so that you can get the gist of it, only to turn around to an AI and speak your response, ask for it to be inflated, so you can send more puffed up text in response, and then perhaps plug it into your agentic LLM to generate some puffed up code as quickly as possible all sounds deeply dystopian to me. Moreover, there is an obvious continuity between the LLM attitude towards truth and correctness and societal plagues like “alternate facts.”
If all we wanted to was generate as much code as possible as quickly as possible then we would have every right to be terrified of AI. But actually we are trying to solve problems, and that will continue to require thinking. I attempted to reassure a coworker that when you analyze the amount of work he has put into coaxing an agentic system into producing a valuable output, he still had to have his engineering knowledge in order to guide it to an acceptable solution. The kind of pain this produces in us programmers is almost spiritual: if we had wanted to be managers or specification authors, we would not have become software engineers. The ones that felt like code was a burden rather than an expression might prefer this outcome, but the rest of us are getting an additional unwanted midlife crisis and writing long-ass blog articles.
If you’ll permit me, existential problems require existential solutions. The one OpenAI and Anthropic would like you to accept is the nihilistic one: if nothing means anything, please consider a $30/month subscription until enough of your team has been body-snatched and you can convince your management to pay $300/seat/month. You’re probably not working on anything important anyway, so let us help you generate trash faster than ever. If it breaks, that’s probably OK; you were already serving it on a platform you don’t control to an audience of losers you probably were somehow parasiting, blah blah advertising revenue stream. We would like this to happen as soon as possible because we cannot make money until the majority of our customers are paying at this price point, so please become sufficiently addicted that you cannot work at all without us in the very near future. We plan to burn the planet down to generate enough electricity to support all of you very soon, and we are hoping that we don’t get litigated “for real” until the thought of not having our technology is unthinkable.
As Ed Zitron likes to point out, these companies have the cash to create a tremendous amount of content to make you feel both like A) this is happening all around you, so you should get used to it and, in fact, get involved now before you are left behind forever and become unemployable, and also B) this is all inevitable, so there is no point to trying to resist this by (say) continuing to learn how to do your job and doing it at a human rate. Thus, there is no alternative course of history. Certainly not a future in which Dario Amodei and Sam Altman share a cell across from Elizabeth Holmes for committing essentially the same kind of fraud.
There are other ways of looking at this. For instance: maybe agentic AI is more like a sledgehammer that can break you through a small problem, assuming you don’t mind that it kicks up rocks you’ll have to clear away yourself. Maybe we should regard using it as particularly expensive and detrimental to the environment, to open source, to time spent by others trying to help or at least publishing their work, since it is these things. Maybe we should assume that it will only be available in its current, highly-subsidized form for a little while longer and we should ensure that we are learning from our uses of it so that when it disappears, our skills have grown rather than atrophied.
Perhaps using it to write code without reading it as fast as possible it is to unmask the lie behind some definitions of “maintainability.” If this is a fine outcome, maintainability was never really about writing code so that other programmers could continue it. It was really about ensuring your replaceability as a programmer, and now that we (supposedly) have machines that can do it, your replaceability is assured and the code doesn’t matter at all. This leads to an obvious question for me: instead of agentic AI, maybe we should consider allowing our programmers to use the powerful high-level languages a few of them know. What’s the difference between a bunch of Python code no human has or will read and a bunch of Haskell code nobody except Bob has read?
But from a higher perspective, when I look back at my career I can point to several moments where something truly wonderful was created:
- The only web framework I ever made: Voltaire (with Michael Herrick at Matterform Media), which was a fast and flexible content management kind of sort of system. It was performant and easy to work with in 2005, and it was still being used in 2018, maybe still today
- My first significant web application at NRAO which I wrote the majority of, the stupidly-named Proposal Handling Tool
- The Workspaces project
- The data fetcher and delivery applications for the Archive
In all of these cases, it was thinking about the problem deeply over time that led to new ideas about how to solve a problem. Writing good and clear code that is at least somewhat properly factored was a big part of it too, but the ideas were far more important, and that is precisely what I do not believe agentic AI can do.
- With Voltaire, the key ideas were regions and cascades: you could define a template at any level or in any region, and the path to the page (the URL) could be used to override any content in any region
- With the PHT, the idea was more prosaic: to create a single clearinghouse application to tie together a bunch of disparate scripts and algorithms to make them accessible in context rather than relying on institutional knowledge and documentation about when and how they should be run
- With Workspaces, I spent months designing the system with an actual architect, and we came up with a comprehensive plan for how to represent processing and products, and modeled it in SysML (and a touch of Haskell) before ever starting to write the actual application code
- The data fetcher and delivery applications both started not from a large pile of requirements, because we had tried that before and gotten spaghetti, but rather from a model I developed in terms of what elements of these programs I expected to change and which to stay the same, something I could only have figured out from experience with the predecessors
For a long time I have semiseriously joked that the main difference between scientists and programmers in terms of code is that to a scientist, code is basically a speed bump they have to get past in order to process their data and do their science, whereas to a programmer, code has a lot of other dimensions. Is it maintainable, clear, performant, secure, documented, intuitive, etc.? Something I learned from software architecture is that there is not one right answer for all situations. There are always tradeoffs: the most performant code is never the most flexible code, because flexibility demands late binding and genericity, whereas performance demands knowing exact types and having as few branches as possible. Therefore, you cannot escape from making decisions about your priorities. We would all like to have the fastest, most flexible code possible, but in fact, you have to decide which it is more important.
A key finding of software architecture is that if you do not prioritize quality attributes explicitly, your developers will implicitly, based on their own preferences. So, pray tell, what will happen to your code if your developers do not have preferences either, because they have been delegated to an AI agent? The truth is that no one really knows, but if I had to guess, you will probably get whatever is best-represented in the training corpus. It is perfectly possible to write code without thinking about quality attributes at all or talking about them at all. A great deal of the corpus of code on the internet is explanatory code or draft code that does not pay much heed to any of this. Let us think about what we can expect to see happen as a result of vibe engineering with this corpus as the input.
On two occasions I have been asked, ‘Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?’ I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. — Charles Babbage
To poorly paraphrase Timothy Snyder’s introduction to Václav Havel’s essay “The Power of the Powerless,” in a totalitarian regime like Czechoslovakia in 1970 or whatever you might like to call the American “system” of today, we are constantly but unconsciously made to choose apathy through what Havel calls “normalization,” which is a process that inclines things to their most predictable state of affairs. He gives a prosaic but personal example of beer brewing; the state brewery predictably made bad beer, because the average beer made by average people who do not care will of course tend to be bad. And so it is with all things; a variation of the Pareto principle that most things are average or below average, most people are average or below average, and thus, most projects are average or worse and are executed by people who are average or worse. The power of the powerless, as I understand Havel, is to know your truth and act on it. The brewer who decides to make good beer because it can be made well and others should not have to suffer bad beer, is someone who is acting in pursuit of truth. In neither an entirely public nor private way, but also not in an ideological way. In a personal way that intersects the public life.
Rejecting normalization gives us a way to think about what we might otherwise call “fighting entropy,” as well as fighting apathy. In many cases, fighting entropy is for the good in an obvious way: picking up trash, cleaning up, repairing things. But it’s not quite enough as a moral compass: there are plenty of “ordered” states that are inherently evil; oligarchy comes readily to mind for some reason. Basing it on your own search for and discovery of your own truth gives it a moral direction.
I cannot think of a better representation of “normalization” and the consequent regression to the mean than large language models and the hope that they will do all sorts of work for us. Since most content is drab and banal, let us use software to create it for us faster than ever. Now we can all drown in the drab and banal. Let us accept the inevitability of it and even invest heavily in the development of it, in the hope that it might be. A literary machine for the illiterate, it reads without reading and writes without thinking for people who wouldn’t read anyway.
Havel is telling us the way to fight this, which is not by labeling monsters and developing or accepting formal ideologies to oppose them with. It is simply to live your truth.
Some thoughts on leaving IntelliJ for Helix, Lazygit and Kitty.
Back in January, Jetbrains brought out an “AI addon” for $100/year. I bought this around then because the AI talk-talk was just warming up and my coworkers and I were all pretty fired up about it. I did the trial for a week and I noticed a significant improvement in my productivity. Specifically, I noticed that I got “stuck” less. This was because when I was stuck, I could ask the agent to give me some crap, and then I would be upset at the crap it made, and I would find myself in the “Editor” mode rather than “Creator” mode, and I can always make progress in “Editor” mode.
After a month or so of this, the AI started to lose its lustre for me. I was noticing I didn’t especially enjoy fixing typos I would not have made. So I stopped using the big “generate a thing” AI mode. I tried Junie, their “agentic” plugin, once or twice, but each time it seemed to hit an impasse with our large project almost immediately, and would just spin and spin. So I backed down to the “full line completion” setting in IntelliJ. And this I used until about October.
As the year has gone on, I have gone from unimpressed by AI to more of an active hater. I’ve also lost my project configuration a few times this year, a problem that frequently affected my coworkers during the Eclipse era of the early 2010s and nudged me towards NetBeans and then IntelliJ itself. My distaste was growing but I wasn’t quite sure what to do about it. I had a positive sense about Helix but still felt like I didn’t understand it well enough to switch. Then I saw that my coworker Sam has been effectively using Helix as his daily driver for a year or more, stole his configuration, and spent the last two months daily driving it.
The first week, there were a few times I wanted to quit. I decided I would let myself use IntelliJ half the day, but I had to start with Helix. I opened IntelliJ on the Monday by around lunch time. On Tuesday, I opened it around 4 PM because I was just tired and needed to poke around looking at something. I haven’t opened it since then, except to update it a few times and verify a configuration setting for a coworker.
Surprises
Editing in the Small
The first thing I noticed was that editing in the small in Helix is a much nicer affair. I’m not a huge “modal editor” proponent; I haven’t used a vi clone in probably 20 years. The last editor I was deeply involved with was Emacs. But I can see now why the modal people are as loud as they are. If you want to make small edits on this line, Helix is kind of unbeatable. And the deep integration of multiple cursors makes a lot of things that used to be difficult much easier. It’s very easy to select a bunch of lines, remove a few exceptions, and then do the same edits on that line. To get a feel for the kind of neat stuff you can do, you might want to look at Helix Golf—I especially like this example of inverting a dictionary since this is the kind of thing that’s really tedious to do in any other editor.
A funny thing I noticed was how much I was relying on IntelliJ’s refactoring support for basic edits. I usually don’t need to, say, select a whole method, select all instances of varname, and then change varname in IntelliJ, because there is a hotkey for doing a variable rename and I would just use that. (By the way, if you’re using IntelliJ, I strongly recommend the mnemonic keymap, which makes way more sense to me than any of the built-in keymaps).
Unfortunately, with Sam’s setup, I only have rename variable. I don’t have things like extract variable from selection, create method from selection, etc. and I used those a lot. I think this is the kind of thing that might get better with time. But for now, I do it manually, and it’s only slightly annoying.
Repetitive Code is Intolerable
Another surprise. The “whole line completion” mode made me tolerant of egregious piles of code that shouldn’t be permitted to exist. I find it much harder to tolerate this kind of code when I have to write a significant amount of it by hand. This has, at least based on my own non-scientific impressions, lead me to write somewhat cleaner, more abstracted code, simply because I don’t have a little goblin “helping” me generate copy/paste-flavored code that assuredly smells like it needs a refactoring.
IntelliJ is Bad at Python Types
I was surprised to learn that IntelliJ’s Python hinting is based on a homegrown parser, not pyright or anything out in public. This means that the first time I open a Python file I haven’t been in yet, the screen is awash in red squiggles that IntelliJ does not consider to be problems. It seems to benefit from having the issues fixed, in terms of completion accuracy, but it doesn’t seem to care if there are problems.
This surprised me greatly.
Non-integrated Tools are a Mixed Bag
It is a truth universally acknowledged, that a single developer in possession of a good editor, must be in want of a debugger, database interface, file browser and git integration. The IntelliJ user is perpetually on the back foot with the editor and hopes that their gains in the integrated tools leave them ahead overall, and IntelliJ provides more than adequate coverage on these ones specifically as well as many more.
I was deeply surprised to find how much more pleasant using lazygit is for doing git operations. I never fully bought-in on IntelliJ’s git integration, I was always still using the command line for some things. Lazygit has managed to eat up the majority of cases where I would do things by hand as well. The shortcuts are very simple, mostly single-character affairs. It generally absorbs several routine git commands into one; I don’t have to separately switch branches and pull, because it’s passively fetching most of the time. It’s a significant improvement over IntelliJ’s, such that I would actually recommend it to people still using IntelliJ.
Helix does show where lines are changed with respect to the current commit, but there is no integrated support for doing things like showing what it was before or rolling back a change. Lazygit does this pretty easily though.
Debugging is a different story. I expect this to be integrated better with the editor. Helix, for its part, has some sort of early support for “DAP,” the debug adapter protocol, and it will let you click in the margin to make lines a breakpoint. Somewhere in the tool chain it breaks down right now, so you have to basically write breakpoint() in your code where you want a breakpoint, and then you’ll land in the debugger.
There is a default Python debugger, but it’s not very fun to use. I would recommend instead using Pudb, and make sure you customize the colors because the defaults are nigh-unreadable.
Much like lazygit, I find that the speed of getting around with pudb is actually an improvement over IntelliJ, although it’s somewhat uglier and harder to use for more complex scenarios like deeply nested structures. It gets the job done, and it’s pretty good.
As for file browsing, I have been trying out Yazi. I have never been a big “Midnight Commander” guy and when I do use a file manager it’s mostly graphically. This is something I kind of miss from IntelliJ, being able to get a nice overview of a project and also see the code and whatnot, but getting more conversant with Yazi may be a great solution, I just don’t have the time invested yet.
For SQL, since I only use Postgres, I have been using pgcli, which is just kind of a nice improvement on psql. I don’t have the nice SQL integration with the editor that IntelliJ has, but in truth, I have not used that much in the last few years since we have been getting better about pervasively using ORMs instead.
Your Terminal is Your Integrator
Now you have a cool half-dozen tools replacing your IDE. You’re going to want a way to combine them into a sensible environment.
I tried using Zellij for this, because it honestly looks awesome, but it eats a lot of hotkeys that Helix needs. So I kind of gave up on it. I was about to learn more about tmux, but then I read the author of Kitty’s argument against tmux/zellij and it kind of resonated with me. The terminal should be the multiplexer, not a program running inside the terminal, because, as he points out, you’re then parsing everything twice, and that’s how you get errors.
Consequently, I have been trying to learn the hotkeys for Kitty. The nice thing about Kitty is, it’s available on every platform, it has tabs and splits and whatnot, and it works about the same and looks about the same everywhere, so it’s easy to configure once. I don’t need shaders (they are cool though) or the highest possible performance; so I don’t need to use other contenders like ghostty, alacritty, or foot, all of which have some cool stuff and some missing stuff.
Configuration
Apart from stealing Sam’s configuration, which I encourage you to also consider doing, I am not a huge fan of configuring a billion things a billion ways to my liking. Pretty soon you have a big morass of configuration, it’s hard to upgrade to newer versions of things, and it’s a lot to maintain for small benefit.
That said, I think it’s important to spend some time configuring your themes and fonts. I am currently using Berkeley Mono after using Pragmata Pro for about 15 years(!). I do think that these two fonts are worth the money. At work, I have been using the Nord theme and at home, Rosé Pine. If you’re going to spend all day in the terminal, make sure it looks nice, you know? And set up matching themes for Helix etc. Most of these tools are supported by home-manager and Stylix, although I don’t really trust Stylix right now.
And now?
I am pretty content with this setup. I have made myself a little faster at some of the “trivial” coding things that people now are starting to depend on LLMs for, and I have become less complacent about copy-paste stuff. I don’t see a major urge to change back to IntelliJ coming down the line, unless I need to write Java all of a sudden. I believe the Java language server support is still pretty bad in general, but I could be mistaken. I cancelled my auto-renewal. We’ll see if I make it past it without renewing!
Anyway, the experiment has been a positive experience. My 44-year-old brain still has a little suppleness in it, somewhere!
Against Learned Helplessness
Everyone knows that debugging is twice as hard as writing a program in the first place. So if you’re as clever as you can be when you write it, how will you ever debug it? — Brian Kernighan, The Elements of Programming Style
I’d have to say this syntactic sugar might rot your project’s teeth. This would not make a
Python: the good partsbook. — boatcoder, on thefor-elsePython construct
Always code as if the person who ends up maintaining your code is a violent psychopath who knows where you live. — CodeForTheMaintainer on C2
There has always been a mild anti-intellectual sentiment in programming. Perhaps we all feel a bit like imposters. We feel better when we stick to the “core” of the language we use. We prefer to outsource risk to our dependencies: a library that will generate the HTML and ensure it is valid and sanitizes user text, a library that will generate the SQL for us. So much of our coding winds up being glue; we glue together our dependencies, glue our data definitions to our REST APIs. We schlep the data around without doing much to it.
Into this environment of tedium we suddenly inject AI. Now we can outsource the glue-writing itself; let the AI generate that tedious code. Some people are so happy and free now, because they really did not like writing all that tedious code. Others are upset. Some don’t write all that much tedious code; some of them are getting pressure to use AI to write it faster anyway. Some found a lot of meaning in life from writing tedious code.
The more hand-assembled your stack is, the less well AI is going to work. This is part of why a recent success story with AI came out admitting that there is no ORM. The argument is that AI is very good at writing SQL. I believe this, because SQL is old and there is a tremendous corpus of material online to learn from.
You develop skill at what you practice. Most of us have not honed our skills at using our language of choice, but rather at quickly assembling a cadre of dependencies and gluing those dependencies together. Most of us have not spent much time thinking about insourcing the responsibilities of those dependencies. We have spent a lot of time creating taxonomies and ontologies for models of our problems. We have not spent a lot of time thinking about the solutions to those problems.
Part of what is so refreshing about using an array language like APL or J is that you are forced to choose a simple encoding for your problem, and then you discover that you have a lot of tools at your disposal to solve it. You are immediately back in the business of writing code to directly solve a concrete problem. In that context, it takes almost no code; the effort is spent learning how to use the power tools, how to frame the computation so it happens all at once. And the efficiency is incredible.
Then you go back to your day job creating REST APIs for databases and doing data schlepping, and it all feels a bit tedious.
We all have these muggle tendencies. The ORM wants me to make my databases like so and my classes like so, so that’s what I’ll do. I’ll go get another library to solve this part of the problem. The AI works for me, because I went with the popular choice on everything; or, the AI doesn’t work for me because I made a weird combination of unpopular libraries, or I want to use some new thing it doesn’t have in the training set. I don’t want to think very hard about what the ORM is doing, I just want it to work. I don’t want to know how asyncio works in Python, or how HTTP works, I just want to get the job done. And you wind up with a nicely organized, orderly hierarchy of classes and modules, and it’s 150,000 lines of code, but it can’t really be less than that, and if the project fails, you can’t be blamed, because you did what you were supposed to do, just like Mark Dominus said. All of it is industry-standard, documented, of apparently high quality, unit-tested, and written for the maintainer. And yet somehow it just deeply, profoundly sucks.
I have complained in the past that there is a fundamental flaw in ORMs, and that is that the relational model is higher-level (more expressive, more powerful, more flexible) than the object-oriented model. You can’t take a declarative, set-oriented, mathematical approach to a problem and wrap it in a procedural, row-oriented language and have everything be beautiful. The relational database model is just better. But it sucks to write INSERT statements, so we use it. I’m writing a program today to try and figure out which of the three ways that seem to cause an object to get added to the session in SQL Alchemy works without producing warnings because my coworkers have used all three and I can’t tell from the documentation which ones are right and which ones are wrong but work. Is this a good tradeoff of time? Probably not, but if you’re a muggle these are your alternatives.
Perhaps we should consider another approach. Maybe we should learn our tools really well, and have fewer of them. Maybe it would be OK to insist that if your day job is Python programming, you should understand decorators and for/else and asyncio. Maybe we should not expect that you can learn a language completely in a matter of days or months, if you’re going to use it daily for decades. Maybe we should think about whether we want to take on a large dependency, or whether we can solve the problem well enough with a smaller abstraction right here. Maybe we should assume that the maintainer is as good as we are and we can hold them to a particular standard of knowledge. Maybe we should write code in such a way that we don’t feel tempted to use AI because we don’t have that much boring code to write anyway.
Maybe we should remember that we are wizards.
Why Didn’t I Ever Become Christian?
My wife and I made a trade last month: I would listen to a book of her choosing and in exchange she would listen to one of mine. I decided to make her listen to God Speaks Again in exchange for listening to Buy What You Love Without Going Broke, and this is just a fabulous comparison of where our heads are at generally. However, she enjoyed God Speaks Again enough that she suggested I listen to it too, so I have been, and then in our conversations about it, she said “it’s just funny to me that you like leapfrogged right over Christianity.”
Why didn’t I ever become a Christian?
The short answer is that it was easier for me to become Jewish and then to become Bahá’i, and then as a Bahá’i, to accept Mohammad and then Jesus as Manifestations of God, than it was for me to go in historical order. And I can accept Jesus as a Manifestation on the basis of His words, through the Bahá’i lens, but I don’t think I could in the same way as a Catholic or a Baptist. The rest of this is the long version.
There are limits to what I can explain rationally. For example, I can rationally explain why I became Bahá’i in terms of what was going on my life, but my experience of being Bahá’i is not a rational one so when I do make such explanations they feel very flat and like they are missing the point. I like bird watching, but I can’t give a rational reason why I enjoy it; I could try, and it might “make sense” but it would totally fail to convey the point of it.
There were two categories of causes for my becoming Jewish. The first was a series of coincidences which seemed to me to be God’s hand in my life. The second was a set of beliefs and rational arguments. The first is basically personal experiences that will have no meaning for other people. The second, because it is somewhat rational, can be conveyed and appears susceptible to counterargument, though I wouldn’t accept it.
I have always believed in the oneness of God and the existence of some kind of afterlife. I always felt like the unity of God contradicted the idea of Jesus being God or the Son of God or part of some kind of trinity of God. I was already looking elsewhere, and I had dozens of smaller objections but that was the main one.
I feel like I should make a few things clear. For one, I was literally shopping for a religion when I was young—I really liked the Sikh religion, but decided it wasn’t workable because there was no nearby gurdwara (except for the one in Española that was at best a sect and probably actually a cult). It was important to me when I became Jewish that I could still entertain other beliefs, like Taoism or whatever. I knew of several Jewish Buddhists. Later I became aware of Tenrikyo and found a great deal to admire in Ofudesaki. It was always important to me that Judaism did not portray itself as having the only path to God. I said at the time that I felt like it was a good “broth” that I could mix other ingredients into to make a soup.
I wasn’t shopping for a religion when I became a Bahá’i, I just happened upon it during a time when I was growing more and more disaffected by my faith and my relationship with God. The character of my discovery of the Bahá’i Faith was a confrontation with one whole entity, rather than a winnowing down of a large set of possibilities. I would not have been open at that time to the possibility of becoming, say, Catholic, because my prejudices against it were still in place. And moreover, it was the Bahá’i ideas themselves that convinced me something interesting was going on there and it was worth a deeper look.
If you’re wondering about those ideas, the basic one is probably unity. It is not insignificant to me that the other Abrahamic faiths have adherents passionately trying to kill each other, in obvious contrast to their teachings. A unique fact about the Baha’i Faith is that it is the only one that has a distinct vision of kind of future world we should be building, and how to do it without violence or compelling anyone to do anything they do not want to do. It doesn’t rely on everyone becoming Bahá’i, or upon some kind of future supernatural or eschatological event. In my opinion, most other faiths of today are stuck between a fantasy foundational era and a fantastical dream for the future. They are either trying to recreate some bygone culture in which all the obviously outdated rules can be implemented (and ignoring the groaning of all the nearby nonbelievers), or they are twisting themselves into knots trying to find a way to repurpose their ancient books to suit the modern day, struggling to figure out which parts are baby and which parts are bathwater. Both sides are engaged in a kind of active waiting, hoping for a messiah to literally descend from the clouds and put all the pieces back together into something coherent.
…
I tried to return to daily Jewish prayer after learning about the Baha’i Faith. It’s difficult to ascertain exactly what daily Jewish prayer should be like, which is interesting, but in any event there is a moment in the Amidah where you pray for the temple and its service to be restored. I realized I could not actually pray for this, because it would mean replacing prayer with sacrificing animals. I’m no longer clear on why I was alright with praying for this before, either, but probably it was because I wasn’t doing daily prayer.
I don’t know if it was right before or right after this that I tried saying the Bahá’i daily prayers. I think I tried before and then stopped, because it was causing too much upheaval at home, and then I resumed. The hard part was different there and I realized it had something to do another area where Judaism had enabled me to persist in a certain bias, and that was my discomfort with the idea that God speaks to humanity through certain people.
Noah, Abraham, Jacob and Moses are all extremely ancient, so there isn’t anything like concrete archaeological evidence for them. This makes them practically mythic characters, and I could suspend my disbelief because the dust of age covered it all up. Nobody really knew what happened, nobody had anything like proof. I was comfortable with that, because it enabled the Rabbinic process of evolving the religion. But it also meant accepting that nobody has had anything like direct contact with God in 3000 years or more. Or that everybody has had direct contact with God, nevermind the contradictions.
In my notes from this moment in my investigation of the Bahá’i Faith, I can see my own struggle with the idea that Bahá’u’lláh is a Manifestation of God. Looking back on it now, it’s clear to me that this was a fight with my own ego, on three fronts: 1) if He were a Manifestation, it wouldn’t leave any room for me to disagree or find rationalizations for things that I didn’t agree with, and 2) it would mean that I would have to reconcile myself to the validity of Jesus, and thus, 3) my conception of the validity of Judaism would be undermined.
Point one took some time. There were a few things I disagreed with. But I came to understand them. I think this is a common experience for adults who become Bahá’i.
Point 2 is likely a problem for other American Jews. You have sunk a lot of time, effort, and identity into resisting the general cultural pull. You have to undo that, but you are undoing it for the sake of growing closer to God and your fellow man. It is probably the same, coming into the Faith as a non-Jew in Israel, or coming to terms with Mohammad as a non-Muslim in any predominantly Muslim country. Everyone who becomes Bahá’i has to set aside their prejudices and biases with respect to race, religion, gender, nationality, etc; this one was just harder for me than I expected.
Regarding point 3, it actually wasn’t that big of an issue. Although Shoghi Effendi later rescinded this instruction, ’Abdu’l-Bahá had told the Bahá’is not to abandon their former religious communities. Since the Faith confirms all the other Faiths, I did not feel like I was resigning being Jewish. In fact I still feel Jewish, although it’s a bit awkward for me because I converted to Judaism for the sake of the religion, and now I am Bahá’i. I do not feel like I am no longer Jewish, I just feel like it is no longer a central pillar of my identity, and certainly no longer a quality upon which I could base decisions about who to associate with or who I would find it easier to relate to or whatever.
…
To return to the original question, why didn’t I ever become Christian? The answer is that I did become a Christian, when I became Bahá’i. A profoundly ignorant Christian though; I have only read the gospel of Matthew. I don’t know as much as I should, but Bahá’u’lláh confirms Christianity, so it is true, at least in its core, and He would not want anyone to spend much time disputing with believers about which parts are which.
I no longer feel excluded from any faith. The whole idea of choosing a Faith seems deeply strange to me now. I think is partly because Bahá’u’lláh completes them all. Perhaps the deeper reason is that making distinctions between religions is fundamentally about excluding people: grouping people together to create tribes and thus infighting between tribes, and that now seems so obviously contrary to what God desires for us.
The Purpose of Design Patterns
This is kind of a response to “If I hear”design pattern” one more time, I’ll go mad”, but I confess I did not read the original deeply.
The purpose of Design Patterns (as I understand the book and the concept) is not to provide you with a bunch of ready-made and formulaic solutions to unthinkingly apply. It is to show you examples of how to approach problem-solving in an object-oriented manner, in the hopes that you will internalize the process of discovering abstractions. In almost every case, a pattern is not a certain object or interface. It is a style of interaction between two or more objects that the pattern embodies.
Let’s take the command pattern. If your commands are also mementos, you can use it to implement an event-sourced database, or write-ahead log. If your commands have an undo method, you can implement an undo/redo stack. Commands are reified; perhaps they can be passed around the network or stored, perhaps they can be added to queues to be executed in batch or in threads. The question is, what else do you need the command to do, besides be executable? If there isn’t anything, then a command really is no better than a function, and obviously you get no benefit from creating the abstraction.
Similarly, a singleton can be an improvement over global state because at least access to that state is mediated by the methods of the singleton itself. If I had some element in my system that was not threadsafe, but the rest of the program was organized using threads, I might make it a singleton just to ensure that locking and unlocking happen correctly. I don’t usually find I have to use singletons, but again, the pattern exists not to be blindly copied, but to help you think about how to approach a problem in an object-oriented fashion. And also, it is the interaction between other systems and the singleton that might provide the real value; for instance, being able to mock the singleton in testing is probably easier than mocking a tremendous amount of global state.
About abstract factories, I would say, much like monads and monoids and elements from category theory, it’s much easier to understand in terms of a few worked examples. Just because something is hard to understand in its abstract form doesn’t mean that it is hard to understand. But also, maybe more to the deeper problem, sometimes things that are hard to understand are still good and worth understanding.