So, you may have noticed that author Michael W. Lucas has been releasing regular books in his “Mastery” series, focusing on various tools. I like linking to his work because he writes inclusively about BSD, even when it isn’t the topic of the book.
He’s on his 13th Mastery book, and it’s April 1st, April Fools Day. Anyone who knows his sense of humor might suspect he would take advantage of this confluence of minor events. He did: he wrote “ed Mastery“.
ed(1), for those unfamiliar, is a text editor that doesn’t show you what you are working on – it was written more than 4 decades ago when you didn’t have a computer screen – just a printer. It’s a limitation that is positively difficult to duplicate today.
It was present in the very first release of UNIX from AT&T – the operating system was written using it! This does, at first, seem like a bit of a joke – people usually only claim to use ed when they want to show how they triumphed over adversity.
This being a book in the Mastery series, however, means that Lucas explores how to use the tool in-depth. His tongue is firmly planted in cheek, meaning he is taking this seriously and not seriously at the same time. The odd thing is that since this is the proto-editor that stands behind sed, vi, nvi, vim, and sorta emacs, a lot of the movement and control commands apply to everything. The regular expressions here are the model all the following editors stick to, by and large.
It’s humor, and the book knows it’s humorous both in topic and content. But it actually works as an explanation of how to work through ed to accomplish goals. I can’t imagine it’s easy to get into a situation where ed would be your only option… but I can see how the tools for shifting data around or automating text changes come right out of these processes.
It’s available now, through the usual sources and DRM-free from the author.
(Obligatory disclosure: Lucas sent me an electronic copy of the book and asked me to talk about it on April Fool’s Day, if I wanted to. I am bad at payola.)