One Step At A Time
New writers these days are instantly awash in all kinds of advice (some even useful) but none is better, I humbly suggest, than that you don’t have to master everything all at once. This is true of writing craft, but it’s especially true of the business side of the game, from website development to marketing.
When I started writing professionally, I didn’t know much about the business, but I knew I needed to build a newsletter so that I’d have a list of people I could get news out to later when I had novels and such to sell.
At the Writers of the Future workshop, Mike Resnick gave me hell about not belonging to my local writer’s guild, and it was good advice. The Houston Writers Guild was at something of a zenith of activity at the time and I got invited to participate in a number of appearances from which I collected a tiny buy growing list of reader email addresses.
More important, I made friends with other local writers of various abilities and at various stages in their careers, and one (David Young) told me how he was attracting newsletter subscribers by giving out a free ebook containing a custom signature page. That seemED like a great idea, but by the time I attended my first big convention and brought home 110 sign-ups in one go, his manual method of compiling the ebooks seemed less than practical.
Soon after, I met Quincy Allen at Keven J. Anderson’s Superstars workshop and through him, learned about an ebook creation tool called Jutoh that haS a command line API and a scripting language. That is to say, just about all its functionality can be triggered from a good old fashioned DOS Batch file, i.e. the Windows command line. Now I was in business.
Within a year, signing up subscribers had become a rote process:
- Download subscriber information from a form on my website.
- Use a graphics program and tablet to sign signature plates and save them using a standard naming convention as image files.
- Run a job to weave all the signature images into ebooks and convert the books to the correct format with the correct filename as requested by each subscriber.
- Run a job to email each subscriber with their ebook attached.
Simple! Except….occasional updates would change the format of the data from my web form and changes in industry practice and security would break the email delivery script again…and again…and again…
I would manually run a batch file for each step in the process, checking for problems at each step. It was crude, but it worked, and when I needed to add location information (for example because Amazon has a different website in the UK, Canada, and the US or because I don’t want to pay to email (and annoy) subscribers in Brazil about an appearance across town) I just added another step to call a web service to look it up.
But things kept breaking and needing attention as all things computer do, and the batch files I was using were never meant to do such heavy lifting. Windows Batch language (really DOS Batch) has only the most primitive means of debugging and error handling, and is full of weird and counter-intuitive nonsense. And why not? It’s a 35-year old tool cobbled together from the ghosts of mainframe job control languages like EXEC which dates from 1966!
* The following code issues CMS commands to set the "blip" character to asterisk and request * the "short" format for system ready messages. &CONTROL OFF SET BLIP * SET RDYMSG SMSG
And that’s what batch language is for: little utility tasks like running jobs, setting flags, and moving files. It was never meant to proper-case people’s names, call web services, or branch and build a subscript to generate one of three formats of ebook.
DOS Batch was the wrong tool for much of what I was doing, and just as I had changed out my website host, email provider, newsletter software, and graphics editor over the years, I started re-writing my Batch files, first by recoding my email sender into VBScript, a proper programming language available to me for free, but with no more effective debugging tools than batch.
Then I got a new computer and had trouble with the job that converts the website download into a standard format, corrects name capitalization, and looks up subscriber location. By now I was deep into Java development, having spent much of the last year working on my Story Design Studio novel creation app. So in a few hours time, I converted this job into Java and debugged it will full support using the free, open source Eclipse design environment.
Now we’re talking. Now instead of three screenfulls of cryptic logic, my batch job reads almost entirely:
call fixfile rem Remove linefeeds and variation from website data. IF ERRORLEVEL 1 GOTO :EOF call createControl rem Sstandardize format, propercase names, lookup location IF ERRORLEVEL 1 GOTO :EOF call compile skip rem Create custom ebooks using Jutoh IF ERRORLEVEL 1 GOTO :EOF call sendmessages rem Send emails with attachments
Pretty simple. Each step is another similarly short and sweet batch file that displays input data for review and then goes on to the processing–in either VBSCript, Java, or more Batch. All future changes will by in Java because in the free Eclipse development environment, I have full access to a modern debugger, slashing the effort needed to make changes and fix problems. But right now, what I have is good enough, so it’s back to story land.
I could never have set this up back in 2014, just as I could never have created the high-quality cover I now bake into the ebook or the nifty author’s website that feeds it. One step at a time, I’ve gone from writerly newbie to seasoned pro, and whatever it is that you’re trying to build or do, you can do that same…one step at a time.