Lecture notes on Computational Thinking

I am working on some lecture notes that should become a book at some point. It is for a class on “Computational Thinking”, which I guess is just a fancy term for algorithms and data structures. I am only teaching a third of the class, so I need four topics for the autumn term. Those will be

  1. Introduction to algorithms — invariants and termination and such.
  2. Algorithmic efficiency — big-Oh notation and how to reason about running times.
  3. Searching and sorting — linear and binary search plus some quadratic time sorting algorithms. Maybe bucket sort as well.
  4. Recursion and divide-and-conquer — pretty self explanatory. Will include some log-linear sorting algorithms here.

I managed to get a lot written the last two days, and today I finished the chapter on algorithmic efficiency. The plan is to get the non-red chapters in my progress-spreadsheet done by August and then work on the other chapters over the next year.

Here, the yellow chapters are where I have complete drafts (but haven’t proofread or edited them yet) while the orange chapters are those that I have started on, but haven’t completed the draft of.

I know it is notoriously easy to get some details wrong, so if there are any algorithmic-inclined people out there, I would love some feedback. I will also be very greatful if you could suggest some exercises for these topics; those are very important but I find it hard to think of good ones.

You can get the current draft, containing the yellow chapters, on Leanpub, Gumroad and Payhip.

Update on the joys of hashing

I got an offer from Apress for The Joys of Hashing and I’ve signed the contract. Because of my current condition, I asked for a very late deadline, so I don’t have to finish the book until December 1st. I only need to finish two chapters and then do some editing, so that should be doable without any problems.

If it was just writing, I could have it done in a few weeks, but I need to implement and test a lot, so it will take a bit of time. Especially because I really have to limit how much time I do every day. I haven’t been able to work on the book for a few weeks, because of that, but I plan to look a little at it today.

Because I have now sold the book, I will soon have to pull it from the places where you can currently get it, Leanpub, Payhip, and Gumroad. What I plan to do, is to finish the hash function chapter and leave it for a little bit after that, and then pull it. The last chapter, on more advanced hash tables, will only appear in the Apress version.

Books update

Hi guys, it’s been a long time since I updated the blog. Part of the reason for this is that I’ve been a bit busy with my books.

First, an update on Domain Specific Languages in R. It is currently set to be released on August 14th, but I should get the proofs next week, and last I heard, they will try to get the book out already in June. I will update you when I know more. If you want to make sure you get it as soon as possible, you can already pre-order it now.

Then there is The Joys of Hashing. I am working on the last two chapters, but I have gotten an offer on it from Apress, so I might only include one of those in the self-published versions and leave the last chapter for the Apress version. I don’t know exactly when I will pull the book from the self-publishing sites yet—it will be shortly after I agree with the contract for selling it, but I haven’t done that, and I don’t want to have a deadline for delivering it before I’m done with the actual writing. It will be some time over the summer, though. So if you want the book, you might as well get it now. You can download it for free, but I’d appreciate any donation. You can get it several places:

Speaking of “several” places, The Beginner’s Guide to Todoist is no longer fixed to Kindle Select, so it isn’t tied to Amazon. You can get it—again, for free or any price you wish to pay—on several sites:

Since this book is actually completed, you can also get it on iTunes.

My two other “Beginner’s Guides” will be out of Kindle Select over the summer, and you can preorder them now on the sites that allow me to put them up without also releasing them. I have made new covers for them, that I hope you like.

These, I have set a minimum price for. I need to recoup enough on my writing to pay for software subscriptions I use for my writing.

The Beginner’s Guide to GitHub:

The Beginner’s Guide to Markdown and Pandoc

Writing progress template

I haven’t written here in a while. I have blogged a bit on my R blog, but not really a lot there recently either. For various reasons, not least that I haven’t had much to write about.

I have finished my Domain Specific Languages in R book a little while ago and am still waiting for the proofs. I don’t know the correct release date yet, but it is usually shortly after I have gotten the proofs. I’ll let you know when I know more myself.

Besides that, I’ve had a few programming projects I’ve played around with, and I have been writing on a book about hash tables, The Joys of Hashing. A draft is available on Gumroad and Payhip. The latter is something I’m trying out.

I will move some of my other books there as well; those that do not belong to Apress. I just have to wait for the Kindle Select terms to finish. You can preorder them there, though, if you want. I will also put them up on iTunes when I can. They are already uploaded, so should be available for preorder soon. Payhip doesn’t support preorders, so that has to wait a bit.

Speaking of writing, though, and those update figures shown above, people often ask me where I get those. If I have a fancy editor that keeps track of progress. I don’t. I think the next version if iA Writer might have some progress measurement, but I’m not sure. I simply use a spreadsheet.

I have made a Numbers template for it, and you can download it here. Feel free to use it any way you like, you just have to update the cover image, chapter names, and goals, and you should be good to go.

I don’t have Excel, so I can’t make a template for that. If you can port the template, it would be great if you could send it to me, and I can update this post with it.

Who we are and how we got here

If you are, at all, interestd in human pre-history, then you should read this book. David Reich, Who we are and how we got here.

(Full disclosure, David is a friend of mine and I did a sabbatical in his lab a few years ago, but I am not just recommending it because of that — or because I’m mentioned in it, which I am :) — no, it really is amazingly good).

If you are worried about catching racism from reading it, don’t be. The only racism you can read into what David writes is stuff you bring yourself. He is very careful about distinguishing between classical racism and what we in genetics could call ancestry. He has a whole chapter on it. And he writes, and I agree completely:

“The right way to deal with the inevitable discovery of substantial differences across populations is to realize that their existence should not affect the way we conduct ourselves. As a society we should commit to according everyone equal rights despite the differences that exist among individuals”

No, no racism in this text — and if you know David you would know that. What is in there is a very exciting description of what ancient DNA has told us over the last decade about human prehistory. So you should read it. Really. Now.

(If you are still in doubt, check some highlights I made while reading it here).