Jorge Tavares weblog

Posts Tagged ‘Book review

Book review: The Tangled Web

leave a comment »

For the past couple of months I’ve been reading The Tangled Web: A Guide to Securing Modern Web Applications by Michael Zalewski. The book was published by no starch press and they were kind enough to provide me a copy for review. I enjoy reading about topics outside my main field and interests. It’s a way to keep myself informed and learn new things and this book fits exactly into this category.

The Tangled Web is mostly about web technologies and how insecure they are by nature. The book is a very engaging narrative, full of details and impressive war stories. It focuses on the practical issues of web technologies and not on the theory of security. The book can be very useful for web developers and those interested in security. For example, at the end of each chapter we can find a “Security Engineering Cheat Sheet”, which presents us a summary of things to consider/do. These sheets alone make the book worthwhile having. The book is organized in three main parts. In the first one, the author tells us the story of the inception of the web until today and discusses all the important technologies, protocols, etc. The second part focuses on the browser security and the third part on “the things to come”. Although the book is not very thick (around 300 pages) it addresses too many important issues to completely absorb them in a single reading.

To conclude, the Tangled Web is a solid book, full of interesting and useful information. For web developers and security experts it should be a must read book. For the rest of us it is an enjoyable reading.

Written by Jorge Tavares

February 16, 2012 at 17:43

Posted in Programming

Tagged with , ,

Some thoughts on The Book of Ruby

leave a comment »

Disclaimer: No Starch Press provided me a free copy for review.

Ruby is a programming language that I always liked and somehow prefer it to Python. I used Ruby for some prototyping but when you have Common Lisp, it becomes hard to use any other language. When No Starch Press offered me the opportunity to review The Book of Ruby I was curious because the two previous books I’ve read from them were simply excellent. I already have four books on Ruby so I was wondering how this one could compare to those but most important, if would follow the same style as Land of Lisp and Learn You a Haskell for Great Good!. After reading the book, unfortunately, my feelings are mixed. Let’s see.

The book is well-written, with a good structure, covering beginner topics to advanced ones. It contains 20 chapters (without the introduction) and 4 appendixes. The initial chapters focus on the basics of the Ruby language. The later ones focus on more advanced parts of Ruby and more specific topics, for example, debugging and Ruby on Rails. This is a positive aspect of the book since for someone starting with Ruby can have in a single source access to several important topics. The chapters also have a Digging Deeper section at the end, presenting interesting discussions of the topic at hand. Also a nice read was the last chapter since it deals with the dynamic aspects of the language (use of eval, etc).

However, the book has some issues. The most important one is about the coding style, or the lack of it. The book is not consistent, does not follow Ruby conventions and it shows quite easily. I believe this is bad for a novice programmer in the language since it makes examples harder to understand, not to mention other things. Second, the book does not have the same fun style as the other No Starch Press books. This is a not problem per se but since the book subtitle is A hands-on guide for the adventurous, the reader is more or less mislead to think it follows the other books fun style. Third, the examples are too contrived and a few project ideas are missing. Ruby is a very nice language and with it you can do lots of things without writing lots of lines. So, it is a little disappointing that a book that aims itself for someone that wants to learn the language (but not programming from scratch) is not offered with some pointers in how to expand what is learning.

To conclude, the book is nice but probably is not the best book for a complete novice and not the best ruby book.

Written by Jorge Tavares

September 26, 2011 at 17:58

Posted in Programming

Tagged with ,

Review: Learn You a Haskell for Great Good!

with 4 comments

Some weeks ago I was contacted by No Starch Press asking if I would like to review one of their latest books: Learn You a Haskell for Great Good! by Miran Lipovača. I accepted it because I was already interested in reading the book and it would be the perfect opportunity to learn Haskell more properly since my adventures with it were limited. Basically just scratching the tip of the tip of the iceberg. And so, after getting the book I started to read it and solving some Project Euler problems as training exercises.

First, I must say I learned a lot and had some real fun while doing it! The book is very well written and presents a lot of material aimed to true beginners. Although it should be noted that it’s not a text for beginners in programming, only for those who don’t know Haskell. And the text really focuses on the language and skips unnecessary stuff, which is quite good because you start working with Haskell immediately. Another good thing of the book is the actual pace. The information comes at the right speed! You never feel it’s going to fast or too slow, or that suddenly things become too complicated. It builds your knowledge of Haskell in the right amount, especially if you take some time to do some coding of your own (in this regard, implementing some problems in Project Euler is great). Only the last chapters of the book start to become more hard to grasp at a first reading because it deals with advanced concepts that will need more training from a beginner.

As I said before, the book is very well written and I enjoyed the style a lot. It’s not the same kind as Land of Lisp but has some common points. The author has a sense of humor while not filling the text with lots of jokes or provocative humor; it just feels natural. The cartoons that populate the book are not comics and just have a figurative role. I must confess that sometimes they just fill space but others they help making the reading more nice. Again, no cartoons or comics in the style of “Land of Lisp” (I guess that is a real unique book). My only complain with the book is the lack of coding exercises, or mini-projects suggestions, at the end of each chapter. This wouldn’t be a complain if the book was more structured around mini-projects that would force you to code something larger than small functions. They exist, e.g., the task list, the calculator, but more would be a nice addition.

Did I learn Haskell with the book? Definitely yes! And it was fun :-) Naturally I’m still at a beginner’s level but if I keep coding a little more in Haskell, for example, re-implementing some of my current projects, I believe I can consolidate what I’ve learned and be ready to pass to a more intermediate level. I have not read other Haskell books but if you want to learn the language, have a good grasp of its capabilities and what you can do with it, this is a good book to achieve it and I recommend it without a doubt!

Finally, a word about No Starch Press. It is great that a publisher like them is investing in books and authors of more unconventional languages. I wish more will be published in the future :-)

Written by Jorge Tavares

June 8, 2011 at 12:43

Posted in Programming

Tagged with ,

The Lisp Alien arrived: a “Land of Lisp” review/opinion

with 7 comments

I finished reading Land of Lisp (LoL) from cover to cover some days ago. I bought the print+pdf pack the day it was released, because I simply couldn’t resist. The video and the comic available on the website convinced me that, even if it was the worst book in the world (which it obviously isn’t), I needed to have it. I read the first three chapters of the pdf just to check it and then I decided to wait for the real thing. Surprisingly, it arrived sooner than expected. I started again from the beginning and only stopped at the very end. So, how was the book? The short version: very good. The long version: well, keep reading this post :-)

Land of Lisp became one of my favorite Lisp, and programming, books. The main reason is how different the book is. The cartoons and the jokes are a major part of that but what really makes the book great, is how Conrad Barski connects the fun side to the actual content. And in this aspect, teaching and presenting Lisp through simple games is a key to that link. The pieces just fall into place. And the selection of games, characters, etc, is for the most part well done making you feel that you are in a conversation with the Wizard himself. That’s perhaps the best description of what it feels like reading the book: you’re the apprentice that is next to the Wizard and he just shows you, step by step, all those wonderful spells in a very convincing way.

What about the content itself? How is the book and how does it relate to other Lisp books, specifically the ones aiming for beginners? What does it present? Well, I think a lot can be said about all that. In my opinion, the introduction is one of the best chapters in the book. The history section is one of the most original texts I’ve read in a computer-related book. The first steps with Lisp are also well accomplished since I think it will be very easy for a beginner to surpass all those initial non-issues (which Lisp? what implementation, etc.) and at the same time understand why things are the way they are. Although I don’t use CLisp, I don’t think it was a bad decision to use it as the implementation for the book. It’s more than fine for learning and allows the book to explore certain areas that otherwise would not be possible in an agnostic manner (e.g., sockets). Unless libraries were used, but I don’t think that would be good in an entry-level book like this.

The approach to teach Lisp in LoL is mostly a functional one. From the first chapters the concepts are presented with the functional style always in mind. To be honest, I don’t think this is a bad approach but it has some drawbacks. It’s easy to show a lot of things and explain others but fails in showing how Common Lisp really excels. Chapter 5, building a text-based game, is a good example of how a functional style works well. However, this does not mean the more imperative, non-functional aspects, are “hidden” or held-back. It’s quite the opposite. The initial chapters, and specifically chapter 2, show how to declare variables and assign values. It also shows a lot of “with effects” stuff. The genius of the author is precisely in how he puts all these concepts together. In the end, the user feels the advantages of the functional aspects and at the same time sees lots of familiar stuff.

Along the way we find some gems. One is chapter 6.5, about lambda. Another is the “Periodic Table of the Loop Macro” in pages 200 and 201. This is the most innovate way I’ve seen to clearly present loop. I wish a poster would be made out of those two pages. I never liked Chemistry so much but I love this periodic table. The very last gem is surely the last cartoon explaining the main Lisp features (this cartoon is available at the website). Conrad Barski is able to present the main topics of Common Lisp. On top of that, he leaves the comfort zone and shows how to use Lisp for “real stuff”, more practical, even in the form of a game. You get to see how to produce graphviz files, how to do web development, play with SVG files among other things. I also liked very much how macros are used to introduce Lazy evaluation and how a faster version of the Dice of Doom game is developed.

However, just because LoL is now one of my favorite Lisp books, it does not imply that I think it is the best. And the reason is very simple: it does not show well the multiparadigm language Common Lisp is. It feels that the second part of the book is missing. And that becomes more clear when you finish the book and read the last comic. For instance, where is CLOS? Why was the condition system left “in half”? The book is strong in presenting things from a functional point of view but fails for the others, mainly in how mixing paradigms is better than going for just one. It’s not easy to write a book and choices must be made but a beginner will finish the book with the view that Common Lisp is more functional programming and, in my opinion, that can be misleading. The real power of Common Lisp is that it is the only language that accomplishes better multiparadigm programming. The Lisp way is adapting to the problem at hand and not the other way around (like most languages do). Still, this does not make the book any less good. But a second part would be nice, like “The Lisp Aliens Strike Back” or something along those lines :-)

This is definitely a beginners book, a first book for someone who wants to learn Common Lisp and knows already how to program. But, which kind of beginner? This is an important point. Different persons with different backgrounds will surely react and learn in their own way. I remember the beginning of “Successful Lisp” defining several types of beginners. For me, and taken into account my experience in teaching a subset of CL to undergraduates in an Artificial Intelligence course, this book benefits more young programmers with a curious mind (in terms of how to learn the language). The game-learning model fits very well and the style of the book will keep people interested until the end. If you booked a trip to the moon and you can only carry two books, Land of Lisp and Seibel’s excellent “Practical Common Lisp” (PCL) are the ones you should take to learn CL. After LoL, PCL is the perfect follow-up. Why not the other way around, since PCL is much more comprehensive, complete and focused on how to use CL for practical stuff, etc? Because I still believe PCL is the right book for someone who already knows/has some/little experience in CL or, is a mature programmer (by mature I mean someone who didn’t start programming just a few months ago, regardless of age). Or, in Seibel’s own words,If you’re a hard-nosed pragmatist who wants to know what advantages Common Lisp has. I admit, my opinion is biased because of my experience in trying to teach CL (not an easy task I must add, especially if you’re constrained like I was, but that’s a different story). During that time, I always wished for a book that could introduce CL in the right way. Although myself never quite pictured what would be “the right way”. When PCL came out it got close but I think that LoL in this particular aspect is better. A very good first contact with the world of Lisp! And for all the Lispers out there, this is surely the most fun book to read :-)

Written by Jorge Tavares

December 26, 2010 at 18:03

Posted in Programming

Tagged with ,

Follow

Get every new post delivered to your Inbox.