Book covers

With my previous books, I’ve made covers myself with Canva. Canva is nice to use to whip up some graphics quickly, but let’s face it, my graphics skills are somewhat limited. So, I decided to get help for The Joys of Hashing.

I had heard about Fiverr before, so that is where I went. Fiverr is a place where you can buy stuff like graphic design or editing and such relatively cheap and straightforward. The book covers usually start around $5, and you can pay with PayPal, so there is little hassle involved.

To have something to choose from, I ordered a book cover from two different designers. For both, I had to pick stock photos from DepositPhotos. I paid extra for that, although I am not entirely sure if one was included in the price at the first designer — I can’t quite work that out from the description — but I got two from her, so maybe.

Anyway, both designers charged $5 $5 for design and stock photo, and then Fiverr charged $1. So I’m down $22 for these designs — pretty cheap compared to the time it would have taken myself to make the covers.

Anyway, the first designer, lauria, made me two covers — I paid for one and got two, sweet.

Of these, the first makes me think of a dark fantasy novel rather than a tech book — great if that is what I am writing, but it is not — but the second one I really like and the one I have chosen to use.

The second designer, alerrandre made this cover:

It’s not too bad, but not by far as good as the one I chose to go with.

Lean publishing

I liked publishing chapter by chapter when writing my first books. I could get feedback while writing and that was very motivating. Leanpub is set up for this, and it was an enjoyable experience. Easy to set up a new project and easy to update books — but since they started charging $99 per book ($125 for me with VAT), I can’t use them. I am not sure I will make the money back; I just do not sell that many books.

So, when I wrote Functional Data Structures in R, I instead used Gumroad. I’m not sure it is really geared for lean publishing, though — there isn’t much support making updates compared to Leanpub. I made $14.40 on that book on Gumroad, so you can see that paying $125 for hosting a project is not cost-effective.

Well, I say I made $14.40, but I have never actually received the money. They are supposed to pay out each week if the balance is above $10, but it has never happened to me — still, hope springs eternal.

Are there any Leanpub-like sites out there where one can publish without upfront payment? Everyone takes percentages, of course, and there is nothing wrong with that — I’m just not too keen on upfront payment.

Functional Data Structures in R is out

My new book, Functional Data Structures in R, was supposed to get out early next year, then it was moved to the end of December, but yesterday I saw that it was already available at Amazon and today I received my courtesy copies.

It is a lot thicker than the last three books, but do not let that fool you. It is a bit longer in word count, about 50% longer than the others, and it just looks larger because they have used a larger font. That is really for the better, though, ’cause the previous three were really printed with too small a font for my liking. I need to use my glasses to read them.

Of the five R books I’ve written so far, this was the most fun. Beginning Data Science covers pretty basic stuff I used when teaching a data science class. Functional Programming and Object-oriented Programming got into some more advanced topics, but nothing really exciting if you are already a serious R programmer. So I didn’t learn so much myself from writing them. With Meta-programming I had more fun with experimenting with different things, but it is still just putting down the groundworks before I can do write something more exciting.

With Functional Data Structures I had an excuse to experiment with different data structures, and algorithmic programming has always been a passion of mine, so that was wonderful. These days I’m actually spending all my time implementing various string algorithms for a new class that runs in the spring, so I have the same kind of feeling about that as I had about writing this book.

Because I’m busy with the string algorithms—and a chapter I’m contributing to a book—I am not writing much these days.  I have planned out half of my next book, though, which will be on domain-specific languages in R. That is not in any sense of the word algorithmic programming, but it does let me use some advanced features, and I am having fun with thinking up good examples for that book. I expect that I will get serious about writing it early in the new year when I have the string algorithm class planned in detail, but I am not entirely sure yet. I have two other classes I also need to plan and prepare material for, and there might be some writing there that could turn into books, and if so, they will have a higher priority since I have deadlines for classes but not for R books.

Anyway, I had a lot of fun writing Functional Data Structures in R, and I hope people will find it useful. If you read it and enjoy it, please leave a review on Amazon. It really helps me selling the books if there are positive reviews.

Thinking more about Domain Specific Languages in R

I got started on a new book, on domain-specific languages in R, a little while back and also got started on the first proper chapter. Then I had to leave it for a bit to work on another project, but while it’s been simmering I’ve started to have second thoughts about its structure.

What I had in mind when I started was another short book where I would explain a little bit of meta-programming and a little bit about operator overloading and show how you could combine this to write small embedded languages in R. However, I’m now halfway through the first chapter that was supposed to be about how to use classes and operator overloading to do a bit of this, and it turned out to be all about proper language parsing and syntax tree manipulation, so now I’m thinking that I might as well do a proper job of it.

I’m not entirely sure how to structure the book, now, but I think I want some of the easy stuff in there still. Maybe start out with a chapter that shows this. I have a small example where I use delayed evaluation and some rewriting to optimise matrix multiplication and I could use that as a motivating example. Then the next chapter could go into some theory about parsing and evaluating expressions such to motivate the rest of the book.

I had a mental distinction in mind where I would distinguish between standard evaluation and non-standard evaluation, but I’m not sure that is the right way to split the book now. Instead, if I am going to treat books properly, I will make the distinction between parsing an embedded language and evaluating it. The evaluation part can then have some (simpler) standard evaluation parts and some (perhaps harder) non-standard evaluation parts.

I’ll be sitting on a train for an hour and a half today, so I have time to think about that.

Functional Data Structures in R is getting closer to publication

Over the weekend I finished updating the manuscript for Functional Data Structures in R after the tech reviews and proof-reading from a friend of mine. It is now being processed by Apress and I should get the proofs shortly. After that, it goes to print. I was happy to see that there is already a cover done, and you can pre-order it on Amazon. Probably a good idea if you are interested in it, because the pre-order cost is lower than my other (and shorter) Advanced Statistical Programming books price tags.

The only thing I worry about a bit is the description on Amazon. It says that the book covers implementing data structures in C/C and how to wrap those.

It doesn’t. I do write that this is an option, and a valid one, if you want to write really efficient R packages, but the point I am trying to make in the book is that you can get most of the performance gains you need by using appropriate data structures rather than micro-optimisations, and all the data structures I present are implemented in pure R.

The publisher and I are fixing the description. It is a pure R book, and mostly about purely functional data structures, although there are some data structures using environments to modify states.