Automate the Mundane

Nobody likes doing mun­dane tasks. Nobody. Not even the mots obses­sive-com­pul­sive per­son in the world enjoys mun­dane, bor­ing, triv­ial tasks, espe­cial­ly when they usu­al­ly don’t make a dif­fer­ence right now.

And then, like clock­work, they make a big dif­fer­ence. And you’re stuck doing all your mun­dane tasks at once, even though they suck. And you hate them. And they’re tedious, and bor­ing, and all lots of oth­er neg­a­tive adjec­tives. But they’ve got­ta get done.

Instead, fig­ure out what things you can auto­mate, so they’re hap­pen­ing even though you don’t do them.

For me, that’s spellchecking.

My edi­tor is designed for code, not prose, so spellcheck­ing isn’t easy. I mean it sor­ta does it, but there are lots of false pos­i­tives. Plus, since I write fan­ta­sy, there are made up words I have to add to a cus­tom dic­tio­nary, but I don’t nec­es­sar­i­ly want the same cus­tom words sued in all projects, so I actu­al­ly need dif­fer­ent dic­tio­nar­ies for every project. And I’m inde­ci­sive when it comes to names, so that means the dic­tio­nary gets churn. None of these things are impos­si­ble to solve, they’re just tedious and I don’t like to do them; I do a project-wide spellcheck once in a blue moon, not every time I’m done with a scene, chap­ter, or session.

The beau­ti­ful thing about tech­nol­o­gy though, is that soft­ware exists just to watch for changes and react to those. For me, that soft­ware is Jenk­ins.

It took some effort, and writ­ing more Groovy than I enjoy, but I’ve got jobs to auto­mat­i­cal­ly mon­i­tor each of my writ­ing projects, from the ones I’m active­ly work­ing on to the plot bun­nies that flut­ter in the dis­tance. Once an hour, Jenk­ins checks for a new com­mit and runs what­ev­er scripts I threw at it.

It even checks depen­den­cies, so the files that are com­mon across all my projects (e.g., title and copy­right pages, some type­set­ting con­fig­u­ra­tion) auto­mat­i­cal­ly trig­ger rebuilds of each of my projects when they change. Since I most­ly work with a man­u­script for­mats instead of type­set doc­u­ments, I nev­er build type­set ver­sions on my own, but I also nev­er run the com­mands to gen­er­ate lists of spe­cial char­ac­ters in my man­u­scripts; Jenk­ins runs these com­mands every time.

Which brings us back to those tedious spellcheck com­mands I nev­er run.

It’s not a big leap to switch from build­ing my doc­u­ments to run­ning the spellcheck com­mands too, while auto-adding all mis­spelled words, then just fail­ing the build (which noti­fies me) if the pro­jec­t’s cus­tom dic­tio­nary changed. Now I nev­er have to think about spellcheck­ing again, since a mis­spelled word fails my auto­mat­ed stuff and makes me jump on it.

An even more tedious task though is check­ing for fil­ter words; I wrote tools for this, but I nev­er use them. With automa­tion though, it’s no extra work to throw anoth­er job in Jenk­ins and run these tools on every com­mit, fail­ing the builds if the num­ber of fil­ter words increas­es. Or if my word count tool finds some word count went over a thresh­old (we all have our favorite words that sneak in). Or a mil­lion oth­er tasks that could eas­i­ly be run by a com­put­er, even if all the com­put­er can do is give it a thumbs or thumbs down; all the exam­ples I’ve giv­en so far fall into that camp.

Obvi­ous­ly a com­put­er can’t replace things we need humans for:  cre­at­ing inter­est­ing char­ac­ters and plots, then rip­ping my dreams to shreds when a beta read­er points out my writ­ing is deriv­a­tive and dull. But for the things a com­put­er is good at, let the com­put­er get to work.