October 21, 2010

Readings digest. September 2010

Some time ago I got an idea, that it could be useful to write reviews on books, that I read. Although I'm using GoodReads and Shelfari, but reviews on these sites are pretty short. I selected month as time frame — this allows me to read 2-4 books, that are worth to mention in reviews :-)

The Joy of Clojure: Thinking the Clojure Way

I bought The Joy of Clojure: Thinking the Clojure Way (by Michael Fogus and Chris Houser) right after as it was announced by Manning, and got updates to it from time to time. But at start of September I got full version of the book (but in draft quality), and decided to read it from cover to cover. This book has separate site where you can find additional information on book, including info on existing discounts on preliminary version (MEAP).
I need to say, that this isn't introduction into Clojure language, and, although this book includes separate chapter with short description of the language, but it's better to read one of existing Clojure books first: Practical Clojure, or Programming Clojure, or not released yet, but available through MEAP, Clojure in Action.
This book tries to explain how to program in Clojure "in right way" — from functional programming and Clojure language perspectives. This includes use of "lazy" data structures, when you can and should use macros, how to organize recursive execution of the code, how different data structures are implemented, when each of them should be used, etc.
There is also pretty detailed description of performance-related questions — which data structures is better to use in concrete situations, how you can improve performance with type hinting, how to use transient data structures, bulk sequences, and memoization.
Book also includes description of concurrent-related topics together with discussion of usage of mutable data in your programs. These topics are discussed in 11th chapter, where you can find description of mutable data structures (refs/atoms/agents), when they could be used, etc. There is also description of parallel programming features in Clojure (futures, promises, locks, etc.).
Besides this, this book describes multimethods, protocols and data types, introduced in Clojure 1.2, together with topics on interoperability with JVM and Java. But these topics aren't described so detailed as other.
Conclusion: this book is recommended for all, who already read something about language, but wants to get more details on some topics, and/or wants to learn to "properly" program in Clojure. I personally found pretty much interesting data in it, and started to use this knowledge in my projects.

Lucene in Action, 2nd edition

I wanted to look onto Lucene for a long time. I wanted to use it for my projects, and knew that there is a book Lucene in Action, but in Internet were many complains, that this book is very old, and doesn't match current version. But second edition of Lucene in Action solves this problem.
This books begins (chapter 1) with short review of Lucene — from which parts it consists, and also describes main parts of search lifecycle — document's collection, text extraction, indexing, and search itself. Besides this, in 1st chapter there are small, but complete examples of how you can index documents and perform search in built index.
The first part of book (chapters 2-6) is dedicated to description of Lucene itself. The Chapter 2 describes indexing — which indexing options are available, their influence on Lucene's work (including performance), how you can index numeric and temporal data, how can you optimize and debug indexing process.
The chapter 3 provides description of base search facilities. This chapter starts with simple application, that is used as a base for all other examples. First, the IndexSearch is described, and in later sections, the other types of queries implemented in Lucene are reviewed, together with QueryParser.
Chapters from 4 to 6 are dedicated to "advanced" topics, and you can skip them on first read, especially if you want to use only standard Lucene's features. In the 4th chapter different text analyzers are described. Besides description of analyzers, implemented in Lucene and Nutch, this chapter provides information on how you can create new analyzers, or extend existing. 5th chapter is dedicated to extended search features — search on several fields and/or indexes, work with term vectors, results sorting, etc. And the 6th chapter is dedicated to description of custom collectors and sorting routines.
Second part of book (chapters 7-11) provides description of the Tika library (chapter 7), which Lucene extensions are exist (chapters 8-9), how you can use Lucene with languages, other than Java (chapter 10), and 11th chapter provides information on Lucene's administration, including performance-related questions.
Third part of the book is dedicated to description of success stories — how Lucene is used in real projects (Kruge, SIREn, LinkedIn). For each of projects, there is description of which Lucene's features are used, how indexing and searching is performed, which extensions were added to perform these tasks.
Conclusion: Big number of examples, and detailed descriptions, are making this book very useful for peoples, who are starting to work with Lucene. And after you'll finish reading, you can still return to it to get answers on questions, not covered in official documentation.

Introduction to Algorithms

I already read this book many years ago, but this was a russian translation of 1st edition. And some time ago I decided to re-read this book to refresh some theoretical topics. I acquired the 2nd edition of this book, but next month after I got it, the 3rd edition of Introduction to Algorithms was releases, that contains some new topics, not covered in 2nd edition.
I can't write too much details about this book, or this review will several hundred pages long ;-) Table of contents can give much better overview of covered topics.
This is classical book on algorithms and analysis of them. Book begins with basic information on algorithm's analysis, and after some examples, started to provide description of different algorithms and data structures (lists, trees, hash maps, heaps, etc.) For each of covered topic, the complexity analysis is provided, the different approaches to implementation are reviewed, etc. Pretty much place is dedicated to algorithms on graphs. Besides of "base" data structures, more "advanced" data structures and algorithms are covered — binominal heaps, b-trees, etc. Almost hundred of pages are dedicated for appendixes, that provide all theoretical information (math, probability theory, set theory, etc), that is needed to read this book.
I need to mention, that there also video-lectures for this course, that was read in MIT (they are also available from iTunesU).
Conclusion: every software developer should read this book at least once — you can use this book as reference, but reading of first chapters is necessary for all.

1 comment:

Zmitro Lapcjonak said...

s/2-e издание/2nd edition/ :)