The Haskell Blueprint

One year ago, with an off-by-one error, I published a retrospective of a book I did not finish.

Well, it's not true anymore; let me introduce you to The Haskell Blueprint.

The Haskell Blueprint cover

Many things have changed:

  • I have ditched any WYSIWYG editors (LibreOffice, OnlyOffice). I felt way more effective.
  • I have changed the focus of the book, previously called "Effective Functional Programming", not focused on Haskell.
  • I have completed it.
  • I have split parts and chapters.
  • I have self-published it.

My routine did not change much; every weekday, I was writing 2-4 hours. It took 5 weeks to complete the last original 3 chapters.

Once I was done, the produced PDF was 280 pages long. I was impressed as I thought I would only be able to write 200 pages.

Then came the proofreading. I did not approach confidently, as it was the most painful step of my previous attempt.

For the proofreading, I have relied on OpenCode in judgment mode. I was requesting reports, I was manually applying the fixes, and LanguageTool.

I did not request a "simple" proofreading; I have requested to enforce specific rules and structural analysis.

For example:

  • Enforcing every code snippet and figure to be introduced
  • Or avoiding chaining code snippets separated by one sentence
  • Ensure concepts are introduced before they are used

I have two comments on this:

  • Results are stunning; I don't think I would ever achieve this with a human proofreader. I had many suggestions regarding the order of my content, how to split chapters, etc.
  • It takes a huge amount of stubbornness; each report yields 20-25 items, which means that I had no idea of how far I was. I have generated 21 reports over three weeks, 6 only this Saturday.

Note: At some point, I wondered if it would have been a better idea to run proofreading along the way, but I think it was really relevant because the manuscript was "completed".

After this step, the PDF grew to 340 pages.

Among the feedback I had in my previous attempt was to always keep the introductory sentence on the same page as the following code snippet or figure.

To enforce this and generate things like a bibliography and the index, I have let OpenCode process it as some code to refactor.

Which led to a final 430-page book. I'm quite proud of me.

Beyond this, I'm perfectly aware that there are many books better at explaining how Haskell works, easier to grasp for beginners.

That being said, I wanted a book, example-driven (there are more than 800 code snippets), which enables going from no functional programming knowledge to a software engineering-based real-world application. I think I was successful with this.

I do not expect to have many readers, but I hope to sell at least 35-60 them to cover the tools expenses and get a ton of feedback.

My next steps:

  • Try to produce an EPUB from this (I had a shot, but it generated a 1123-pages file with broken code rendering).
  • Get back to the few other side projects, such as my work at the HSRT, as the workload is surging.
  • Start to work on an interactive online Haskell introduction website, which was my original idea.
  • Start a smaller book dedicated to strategic and tactical Haskell design.