By the end of last year, I found myself wishing I'd have more time dedicated to writing.

Writing usually gives me a great feeling of creating something, of building something from a blank page. It's a great feeling, even if it's just writing for myself.

I wanted to dedicate more time to it, even just in small increments, but get myself in the habit of writing.

It can be anything, documentation, blog post, something personal, an essay for an upcoming talk. The goal is to write things that I can publish in one way or the other, but it doesn't have to be the case for every written piece.

Nathan Barry has been a great inspiration for me in this regard. He committed himself to writing 1000 words every day. Just so he can measure it, he also built a neat little app called Commit for iOS.

1000 words a day sounds like a lot. I came across a blog post that suggested committing to 250 words. Every day.

That sounded doable, so I started writing, a few days before New Year's Eve.

The biggest challenge so far has been to keep a list of things to write about. It's ever growing, or at least it's keeping up with new content. The beauty of writing is that you find more inspiration for writing. Writing begets more writing.

The beauty about 250 words is that you can crank them out in 15-20 minutes, assuming you have a topic in mind.

Even with my goal in mind, I find myself writing 1000 words or more in a single session.

My goal for this year is to turn it into a habit. Yes, there may be days when I will not, under any circumstances, be able to write something. But it better be for a really good reason.

Turning it into a habit means that, with the right cue, sitting down and focussing on writing for half an hour or so comes automatically.

The Setup

I never was into big and fancy tools for writing.

There's nothing for me that compares to the simple blank slate of an empty text editor window.

I've been using nvALT for a while now to collect notes, but I've now cranked it up. And while it's great for collecting notes, I found typing longer texts in it a bit lacking.

So I added a simpler tool to write: Byword.

Turns out, you can combine both into a successful writing team. Byword serves as my external editor for nvALT's notes. When starting a new text, I create a new note in nvALT and switch over to Byword in full screen mode for focused writing.

On top of that, Byword for iOS works nicely with the notes structure that nvALT leaves in my Dropbox folder.

Both versions nicely show you the word count for a document whilst typing, which is neat. Same for nvALT.

I'm using Commit to track the daily goal. I quickly added more than just writing 250 words per day. It's a handy tool to help you turn activities into habits.

What's the secret?

The only secret is to actively commit yourself to writing, every day, even on weekends.

250 words is an attainable goal, even on weekends. It takes 15-20 minutes, maybe longer, of your time to write something.

If you don't have any idea what to write about, brainstorm. Come up with a list of things that interest you, or that you think others might find interesting.

I used this technique when working on the Riak Handbook already. Back then I wanted to write 1000 words a day and managed to do so most days. Time was needed for other things to prepare for the book, code examples, trying out and verifying content, as is usually the case with technical content.

If you have a bigger goal in mind, like writing a book, even better.

Buffer has a great list of things to get you in the spirit of writing, even when you feel the writer's block.

Now go and write, every day.

Tags: writing

Update: Added paragraph on the e-commerce platform I'm using.

Several people have asked me about the publishing tool chain I'm using for the Riak Handbook and the NoSQL Handbook. As Avdi just published his, now's as good a good time as any to throw in mine too. After all, it's always nice to know all the options you have.

All text is written in Markdown. I started out with Textile, but just didn't like Textile's way of breaking down single lines into separate paragraphs, so I switched to Markdown later on. Not a painless process, but sufficiently easy thanks to Pandoc.

The Markdown files, one per chapter, are bundled together into a big file and then fed into GitHub's Redcarpet library. I use Albino and Pygments for syntax highlighting, embedded into a custom renderer for Redcarpet. See the Redcarpet README for an example. Redcarpet also has some MultiMarkdown extensions for tables and other things, so that comes in pretty handy.

To generate the PDF I'm using Prince, a neat little tool that takes HTML and a bunch of CSS and generates a nice PDF. It's a commercial tool, and costs some $500 for a single license. That was what threw me off a tiny bit, but luckily there's a handy service called DocRaptor which is basically a pretty API around Prince, but much much cheaper.

You can use Prince locally to generate infinite test PDFs, and then use DocRaptor to generate the final result. Which is what I do. Before generating the PDF through DocRaptor I upload the generated HTML, which includes all the CSS, to S3, to avoid some issues I've had with Unicode characters in the HTML, and tell DocRaptor to fetch it from a URL instead.

You can use web fonts easily, I went for fonts from Google Web Fonts, which are easily embeddable with Prince and DocRaptor. Prince also allows you to do some customizations specific, stuff like page titles, page numbers, custom settings for left and right pages, footnotes, and the like. See the documentation for a full list.

For ePub generation I generate a stripped-down version of the HTML, not including syntax highlighting, because iBooks doesn't like custom-styled pre or code elements, if you style them iBooks chooses to ignore any font setting and use the default font, which is usually not monospaced.

The HTML then goes through Calibre to generate the ePub file, and then I use kindlegen to generate a Kindle file from that. Calibre has a pretty ugly user interface, but it comes with a set of command line tools you can use to automatically convert ebooks from one format to another.

All of the above is wrapped into a Rakefile and some small Ruby classes. I'll be sure to put it up for your perusal soon, but this list should get you started.

To make the book available for purchase I'm using FastSpring. They're not my favorite choice, as they make things like customizing your shop fairly hard, but I chose them because their way of payout (monthly or bi-monthly), and the fact that they take care of VAT, were both reasons important to me, especially being in Europe, where tax laws throw a lot of stones at you for wanting to try and sell things internationally. Unfortunately FastSpring doesn't have any means of updating products and allowing and notifying users of the updates being available, so I built a small Sinatra app to capture orders and take care of sending out the updates. Not pretty, but it's a small sacrifice compared to the tax hassle I'd have with any other fulfillment provider.

Curious about the result? You should buy the book!