It seems weird to say that I'm almost painfully filled with gratitude for all the good shit in my life, and that that was what motivated me to start writing a free programming book, but that's the truth. Before I started writing Clojure for the Brave and True back in 2013, I had been deliberately trying to figure out what I could do to improve other people's lives even just a smidge. By that point I had been doing a gratitude practice (just spending a few minutes to think of three things I was grateful for) regularly for a year and a half, and felt that my life was so full with good shit that I felt almost obligated to do something for others so that they'd have more good shit in their lives. "Obligation" might seem strange here, and it's not 100% what I mean. It's hard to accurately put the feeling into words. Someday I'd like to take the time to do a good job writing about it, but for now - My life experiences have instilled in me a belief that kindness and generosity are obligations. To take just one experience: for years, I witnessed firsthand the kind of suffering that chronic illness can inflict on someone. That was just nature doing it's thang, cruel, impersonal, implacable. But it was compounded by the constant minor (and sometimes major) abuses delivered by people. Life is painful enough without humans heaping additional indignities on each other. Beyond this baseline of "don't be an asshole" (incidentally, that's the central tenet of my personal ethics), I think it's imperative to learn to live with kindness, love, and generosity. The bleak perspective on this is that the ship is going down for all of us, and the only thing we have to hold on to is each other. The not-bleak perspective is that we are social creatures, wired to find fulfillment in contributing to each others' happiness; that our greatest joys are found in human connection. Which is why I wrote a programming book featuring hobbit violence, man-eating trolls, and mopey teenage vampires! Really, though, programming is a huge part of why my life is so full of good shit. I grew up living in poverty, and now I make a very comfortable living doing an activity that I genuinely enjoy. I have great coworkers, good health insurance, I live in a good house and have a decent car, and I'm confident I can provide for my family. I even have enough free time for hobbies and friends. So, I wanted to provide something free to the world to help others improve their lives. Learning Clojure has personally made me a much better programmer, and I think others can benefit from it just as much. In learning Clojure, you learn a new way of thinking about programming. It's intellectually rewarding and it has immense practical value; it makes your life as a programmer a lot easier. Plus, there's something romantic about learning a language that carries on a 60-year legacy. Like you're engaging in a tradition that extends far beyond you. And it's fun! Clojure feels like something you'd want to use in your spare time, for fun, but what's better is that you can actually get paid to use it. The other main reason I wrote the book was that I needed some way to tell the world about the were-Simmons. The danger is real! Wake up, sheeple!
Clojure for the Brave and True is now available in print! You can use the coupon code ZOMBIEHUGS to get 30% off at No Starch (plus you'll get a free sticker), or buy it from Amazon. The web site has been updated, too! (Don't forget to force refresh.) One of the reasons I went with No Starch as a publisher was that they supported the idea of keeping the entire book available for free online. It makes me super happy to release the professionally-edited, even better book for free. I hope it makes you laugh, cry, and give up on object-oriented programming forever. Writing this book was one of the most ambitious projects of my life, and I appreciate all the support I've gotten from friends, family, and readers like you. Thank you from the bottom of my crusty heart! Is that it, then? Is the journey over? No! It's not! In fact, back in April I quit my job in part so that I'd have more time for writing. I have some new Clojure articles on reducers and transducers in the works, plus I plan to write about web development again and dive into fun libraries like core.logic, clara, and much more. There's just so much cool stuff to learn about! If you'd like me to let you know when they're published then follow me on twitter @nonrecursive or join the 1600+ member mailing list: Lastly, to celebrate the book release, my wife (the book's illustrator) put together a t-shirt and mug store! The gear features the dwarf and warpig combo on the book cover :) This run only lasts one week - future runs will feature other illustrations from the book or from new projects. The money from that will help me continue avoiding full-time employment so that I can keep creating fun, high-quality Clojure content! Thank you, and have fun Clojuring! [Update] I got asked for a list of the major differences. Here they are: Illustrations! Almost every chapter now has exercises The first macro chapter, Read and Eval, is massively improved. I'm hoping this will gives readers an excellent conceptual foundation for working with macros There's now a joke about melting faces There used to be two Emacs chapters (basic emacs and using Emacs for Clojure dev), now there's just one The concurrency chapter got split into two chapters Appendices on Leiningen and Boot were added The "Do Things" chapter is much friendlier I spend a lot more time explaining some of the more obscure topics, like lazy sequences. Many of the chapters got massive overhauls. The functional programming chapter, for example, was turned completely inside out, and the result is that it's much, much clearer Overall, everything should be clearer
A while back, Clojure community czar and all around good guy Alex Miller asked me to review a beta version of his nearly complete book Clojure Applied, co-authored with Ben Vandgrift. This was great news for me because I was planning on buying it, but this way I would get it for free. Delighted, I downloaded my free copy, added a "review book" item to my todo list, then merrily ignored it until a couple weeks ago when I saw Alex in person. "Sorry I haven't gotten around to reviewing your book. I'm super excited about it!" I gushed at him guiltily. "What's the final release date?" Very politely, he responded, "It's already released." It turns out, the resulting dose of healthy embarrassment was all I needed to actually get off my ass and read and review the book! And I am glad I did, because it's a good one. Clojure Applied is aimed at people who know Clojure basics and want to learn how to write idiomatic code and create production applications, and if this describes you, then you should get it. In case you need more convincing, the rest of this post goes on about how good the book is. What I like most about Clojure Applied is that it's concise and fast-paced. It doesn't hold your hand, blathering on about basic details that you learned months ago. At the same time, it's very approachable, using straightforward and brisk language. It even has a few fun moments (two words: spaghetti tacos). To use a cliche that offends my vegetarian sensibilities, it's all meat and no filler, which is perfect for programmers who are... uh... hungry for knowledge. The most valuable parts of the book are the sections on building a system and testing. Decomposing a your program into a system of interacting components that manage their own state isn't a topic covered by beginner books, and it's very helpful. It's easy to write programs whose architectures go against Clojure's grain of functional programming, immutability, and state management, but Clojure Applied shows you how to do it right. On the testing front, Clojure Applied is nice because it covers some of the latest additions to the testing ecosystem, like test.check. Another nice aspect of the book is that it introduces you to a cornucopia of useful standard library and Java functions and constructs, like the juxt function, the reduced function, persistent queues, thread pools with the executor service, etc etc etc. All in all, it's a good book. If you're looking for a good second book on Clojure, then Clojure Applied is an excellent choice!