Learn You Some Erlang, a Year in
In recent [insignificant] history
Oh well. It's been about a year since I put the 3 first chapters of Learn You Some Erlang for great good online. It's a bit more fuzzy than that though. I started working on the book back in May 2009. Back then it was just vague idea after being motivated seeing Miran Lipovaca's Learn You a Haskell for great good, but nothing really serious. In fact, all I had done at that point was the drawing of the squid with a bunch of computers on the home page.
It took me a few more months to start a private repo on bitbucket, create the website (and get it designed by my girlfriend), write the first three chapters and then finally get them all reviewed and read by lots of helpful people from the Erlang community.
The site went public on August 17 2009 and instantly got a lot of visits from many retweets, a top post on proggit and Hacker News. A few days later, I was contacted by No Starch Press about a book deal. I didn't really accept their offer (more details below), but the first days good reception was enough for me to lock myself into my longest standing personal project so far in my life.
In modern times
I'm about what I think should be between a third and halfway in the book. I've covered the sequential subset of the language, I'm starting the concurrent part, slowly heading towards covering OTP behaviors. After that, I'll have the choice between going either for OTP applications and releases, or distributed Erlang. Last of all should be a few chapters on different subjects such as debugging (TypEr, Dialyzer, Eunit, Common Test, cover tools, tracing, profiling, EDoc, etc.) or Mnesia databases and ETS tables. I'm not quite sure where I'm headed for these.
To be quite honest, I had expected to have done more after a year. I was always pretty bad with estimates at work, so it comes at no surprise I'm not especially good for them on my side projects. My attention was shared across LYSE, work, studies, a few video games, Chut, friends, computer repairs and a bunch more stuff, but I expected more anyway. I would be annoyed to have to wait this long if I were a reader.
Anyway, I'm going my own speed and so far the reception is good enough: I have a bunch of followers on twitter who likely track me just for this; my RSS feed is the page with the most hits; I get a bunch of submissions to social sites which always land me a bunch of new readers. Lately, the Hitchhiker's Guide to Concurrency had lots of links going for it. So far so good, so I'll certainly keep going.
Did someone say 'Statistics?'
I thought I'd give some stats about LYSE's site. I average between 400 and 600 unique readers a day, with some outliers going up to 3,000 uniques. In general this generates between 10,000 and 18,000 visits a month, or between 30,000 and 50,000 page views for the same time span. It's likely more than whatever I'd get with paper copies, so I'm happy with it.
Most of the people who read the book come from the US. Then Germany, Great Britain, Spain, Canada, Australia and Poland follow behind. Nearly all of these come from bookmarks, a direct URL in the browser, a feed reader or whatever, and only a small percentage come from Google and Yahoo!. I have to thank the community for the word of mouth going on, because the book would certainly not be as known as it is without it.
Oh and last but not least, browser and OS stats. About 40% of people visiting LYSE are using Firefox, 24% use Chrome and 10% Safari. IE (all versions) and Opera are at a tie with roughly 4% of the visits. As for operating systems, 33% of people use Windows, 30% use Linux, 26% use Mac OSX and there was one guy with RISC OS. This shows how technical audiences are different from your common user group.
For those who are curious, LYSE is very simple PHP code hosted at nearlyfreespeech.net. They cost nearly nothing (pay for what you use) and managed to survive simultaneous hammering from Hacker News without slowing down too much.
Why did I turn down publishing?
Lies. I didn't really turn it down rather than delay it. The guy who contacted me from No Starch Press was real nice and the offer really tempting. They would have allowed me to keep a free version online as a draft (not having this is a deal breaker for me), although they'd have kept rights to a second edition. Fine with me. The only point that annoyed me is that they would have wanted the book done in 8-10 months, something I knew was over my capacity as a full-time worker and part-time student. The 'negotiations' died down and I haven't heard from them for about 10 months now.
I still hope for a publisher when I'm done. It's something that just looks nifty on a resume. Otherwise, I've pondered self-publishing ebooks. I like the 'pay-what-you-want' model and thought about using it, although I'd likely keep ebook versions of LYSE free while I'm writing it.
Otherwise I think of writing LYSE as a winning experience even though I am losing money doing it. I'm much better at writing English than I was a year ago, thanks to all my reviewers who pick up my ugly sentences and turn them into readable text. I learned a whole lot about Erlang's history and validated/deepened much of the knowledge I had. It also got me a few job offers here and there and I got to talk with pretty interesting people. I believe I also helped solve a problem (as minor as it is), and it feels good.
I would definitely recommend writing a book if you want to validate your knowledge and push yourself to learn more. Maybe a blog instead, mainly because it doesn't feel as restrictive in its format and people can leave feedback whenever they want. Getting your stuff reviewed by people who know their shit and writing tests for the code you publish is definitely a must if you do it as a way to learn.
Aim for quality. You can't afford to give wrong information to people out there. It's neither ethical as a practice or fair for the readers who might have to give an additional effort to erase misinformation from their brain. It's shorter for you to fix your crap than for readers to do it as a group. Be scared of mistakes. I know I am. It makes me slow, but it's still worth it.
Oh and if you feel curious, you can see a list of people who helped me in the book's FAQ. They're still helping me reviewing the chapter I should publish in the next few days. I owe them much.