|
|||||||||||||||||||||||||||||||||||
|
21 Reviews
|
Average Customer Review
Share your thoughts with other customers
Create your own review
|
|
Most Helpful First | Newest First
|
|
10 of 10 people found the following review helpful:
5.0 out of 5 stars
Good book with the right perspective and plenty of examples,
By Zen Micro User (CA United States) - See all my reviews
This review is from: Code Generation in Action (Paperback)
The writing is precise and clear with annotated examples everywhere. Positioning and justification of various techniques is very compelling.The author's classification of various forms of active code generation clearly elucidates the potential of Code Generation. Usage of templates for code generation is an excellent suggestion. Explanations on various code snippets and regex macros are simply second to none. Chapters 3, 4, 5 and 10 are a must read for every developer. Having implemented a large-scale database conversion from IDMS to DB2 (schema, data dictionary, run time and programs) using home grown automated generators in the past, I really enjoyed reading Chapter 10. I completely agree with the assertions made there and I am impressed by the way the author addresses common concerns. This chapter documents a practical approach to ease the burden of writing repetitive code for code heavy frameworks. Schema Oriented Code Generation is a practical approach to code generation. I also find various references in this Chapter and others extremely valuable. The author has shown that with sufficient metadata about a system, a significant portion of the repetitive coding tasks relating to data access, user interface, test and documentation can be automated in a consistent manner using custom code generators. It is refreshing to see code snippets in Ruby. The author's selection of Ruby becomes self evident after reading the various code snippets. I find this to be a very compelling book and a must have for architects and seasoned developers!
10 of 12 people found the following review helpful:
5.0 out of 5 stars
Finally a dedicated book on the subject,
By
Amazon Verified Purchase(What's this?)
This review is from: Code Generation in Action (Paperback)
I embraced code generators long time ago, so I was more than happy to finally found a dedicated book on the subject, since this is almost unexplored topic. The author clearly has a solid understanding of the topic, and manages to deliver a compelling book, with an excellent flow, where each chapter builds on previous concepts and ideas.All the code snippets and regular expression samples are explained in a very clean, detailed way. I was pleased to see that many examples were non-trivial, covering concrete, real world, implementations. Herrington uses Ruby as an implementation language; you may like it or not, but what really matters here are the concepts, not the syntax and even if you don't know Ruby (like me), you will find the code pretty easy to follow.
8 of 10 people found the following review helpful:
4.0 out of 5 stars
Great introductory material on code generation,
By
This review is from: Code Generation in Action (Paperback)
The introduction and motivation are quite compelling, though a bit more detail on the dismissal of passive code generators (i.e. wizards) and focus on active code generators would be nice. The examples are also quite practical and seem high quality, though the use of Ruby is going to be a barrier to some.There was one guest-written chapter that might as well have been elided, or should at least have been more edited to integrate cleanly. It repeated a lot of what had been said earlier, and could've just jumped straight to the point instead. Finally, the code samples were a little repetitive in places. I would've preferred the book were shorter, with more info at the level between high-level and code (i.e. what does it make sense to paramaterize, and how should your generator work) rather than focusing either at the high level of 'architecture' or the low-level of 'how a single variable replacement works'. Still, an excellent book, and quite a good introduction for those who don't use code generators already.
8 of 10 people found the following review helpful:
4.0 out of 5 stars
A good introduction to meta-programming.,
By Mike (CA) - See all my reviews
This review is from: Code Generation in Action (Paperback)
I had already written a few code generators when I saw this book and was hoping to find some insights into improving and extending what I had already done. The introduction gives a really nice overview of the designs patterns you can use. But this book is not about programming and the author assume you have the skills to implement the program you want to meta-program already.
The author illustrates his approach using a language I had never heard of before, Ruby, which is an OO scripting language that is quite compact and powerful and included is some basic tutorial info in the appendices to help you follow the examples. Overall a good book that I am glad I own and have read. I get the feeling I am going to go back to it many times.
36 of 50 people found the following review helpful:
1.0 out of 5 stars
Poor choice of tools; code not very useful,
By
Amazon Verified Purchase(What's this?)
This review is from: Code Generation in Action (Paperback)
I have been doing language parsing and generation in C for several years: English, French, Japanese, Chinese, Korean. Still, I hoped to learn something new from CGIA for Java. I was disappointed. I think the book misdirects the reader away from more effective solutions into less productive paths.
The book suffers from two problems. (1) the regular expression technology proposed is inappropriate (2) the exercises provided are not rich enough to be useful. I have no objection to scripting languages. I have happily used bash, gawk, python/Jpython and php. I avoided perl because I was struck by its lack of readability and writability. Ruby is no better and no worse than many scripting languages, but the documentation and error messages leave very much to be desired. CGIA offers almost nothing in the way of real help with the language. It took me some time to figure out how to install the libraries properly and debugging was a nightmare! Ruby's regular expression language is yet another variation in the regex language Babel. This is not something I would foist on developers in my organization. Especially when there are much better alternatives. For years I have been using lex (flex actually) in C for code generation and human language processing. (I have never had much use for YACC/Bison.) When I switched to Java, I found an excellent flex equivalent called JFlex (http://jflex.de/). JFlex.jar is around 240K. The regular expression language for JFlex is extremely close to that of lex and gawk. It is much more readable and modular than that of ruby, perl, etc. Your Java programmers and maintainers need not learn a new language or download/install/configure an additional 28 MB of libraries. Even better, they can use JFlex in runtime production code, since it produces compiled FSA's which are orders of magnitude faster than an interpreted regex processor like ruby. Additionally, you can get with lex/flex/JFlex full grammars for C++ and Java, not the superficial variable reader that came with CGIA. And the debugging mode, while not perfect, is quite usable. (There are commercial visual tools for debugging flex grammars, if you need and can afford them.) From the code point of view, I found nothing usable in CGIA. In my judgment most of the examples were more suited to the classroom than to work, and the solutions presented were often not competitive with alternatives. On the theory/fundamentals side the book does not contribute much to the the understanding of language parsing or generation issues. The arguments for using code generation are cogent. But if you want to use a more useful, popular, constantly evolving (but equally poorly documented) code generation system, go for XDoclet. My recommendation: skip CGIA. Spend your time and money learning flex/JFlex for parsing and XDoclet for generating and you will be much better off. If you want theory, sink your teeth into something like the "Dragon" classic (Aho & Ullman).
10 of 13 people found the following review helpful:
5.0 out of 5 stars
Reader with another perspective,
By Dan Conroy (Tacoma, WA USA) - See all my reviews
This review is from: Code Generation in Action (Paperback)
Prospective buyers that are discouraged by some of the negative reviews may be encouraged by a perspective I have gained from writing code that writes code:
--I find it usually does not matter as much how fast a code generation tool performs, but rather that the code it generates has good performance (with exceptions of course). --Since I'm writing a tool to save time, and often for "internal" use, I tend to prefer using one or more simple, expressive languages for the job, and Ruby is one such language. --Whether the book's examples suit real life situations is arguable and I don't care so much either way, but if you instead view the book as an opportunity to see more creative approaches to solving problems by writing tools to solve your problems, I find that mindset to be valuable.
2 of 2 people found the following review helpful:
5.0 out of 5 stars
Necessary book,
By William Pyritz (Naperville, IL USA) - See all my reviews
This review is from: Code Generation in Action (Paperback)
This is an excellent book for those interested in learning practical applications and techniques of code generation. You'll find a comprehensive introduction to all the various aspects and types of code generation along with a good mix of high-level explanation and rationale backed up with detailed concrete examples. In fact, it was a pleasant surprise to find non-trivial examples packed with useful insights. As a long time user of code generation, I came away with new ideas that will help me on future projects. In more than one case, I was humbled to find that I had overlooked what now seems like an obvious approach to some common problems I had worked on in the past. In some ways this book reminds me of the Design Patterns book in that although many of the ideas were out there in people's heads no where was it documented, explained, and demonstrated so that the wheel doesn't need to be constantly re-invented. For this reason I believe that this book is necessary. It has the potential of making you a better programmer.
4 of 5 people found the following review helpful:
5.0 out of 5 stars
Take your productivity and quality to a whole new level!,
By John Wallace (Pickering, Ontario, Canada) - See all my reviews
This review is from: Code Generation in Action (Paperback)
I purchased Code Generation in Action a few weeks ago and just couldn't put it down!I have been a developer for 20 years now and encountered code generation for the first time back when I was writing Clipper applications for DOS. At that time I purchased a pretty good code generator package for Clipper / dBase (unfortunately I don't recall the name of it). The scripts that were supplied with the product were not very useful for my work, so I threw them out and wrote my own that suited the applications that I was responsible for producing. I still remember my boss's reaction when I was able to produce complete working apps in a week while my peers were taking a month or two to accomplish the same work. And as the scripts I used matured, I was able to produce more robust applications with more features and more consistent interfaces. The great experience I had caused me to become a huge fan of code generation. Anyway, the day came when I began developing C and C++ applications in Windows, and because of a lack of tools, ended up resorting to hand coding everything again. It was such a pleasure to find this book and learn about the great tools available for scripting today. I really appreciate how the author described so many instances where code generation can be applied and gave great ideas regarding how to construct generators for each case. This is an outstanding book that I highly recommend.
4 of 5 people found the following review helpful:
5.0 out of 5 stars
Finally, a good book on Code Generation!,
By Phil Tomson (Aloha, OR USA) - See all my reviews
This review is from: Code Generation in Action (Paperback)
Most of us (software engineers) have been using or creating code generators for years now, but there has never been much published about the practice. Jack Harrington's 'Code Generation in Action' changes that.The first part of the book is reminiscent of the Design Patterns book. The author identifies several code generation 'patterns' or types of code generators. The second part of the book takes more of a 'cookbook' approach. Each of the generator types introduced in Part 1 is implemented with practical examples (mostly web-related). The examples implemented are not trivial 'toy' examples either. Some might find the choice of Ruby as an implementation language problematic, however I found it quite appropriate. The Ruby example code is very readable, clear and there are line-by-line descrtiptions of what's going on in the code. As a side benefit you can learn Ruby in a practical context - Ruby has been generating a lot of buzz in the last couple of years and this book offers some good reasons why. Bottom line: If you haven't been doing code generation, this book will be a great introduction to the practice. If you have been doing code generation this book will offer you a lot of new ideas to ponder.
20 of 30 people found the following review helpful:
3.0 out of 5 stars
Ultimately Disappointing,
By R. Williams "code slubber" (Los Angeles, CA United States) - See all my reviews (VINE VOICE) (REAL NAME)
Amazon Verified Purchase(What's this?)
This review is from: Code Generation in Action (Paperback)
There are things I like about this book, and the topic is certainly timely, but this falls down the same rabbit hole many books do: the examples are just paltry and do not add up to a book-length treatment. Little is done to convince the reader that the code generation option in each case was the best solution. For instance, in the case of SQL statements, there are countless other options. What makes this approach superior? One gets the feeling that the answer is the author just needed another example to paper his undertaking with. Some of the sections are downright preposterous in their brevity. There's a section on generating Swing dialog boxes. It contains almost nothing but a silly diagram that looks like a data flow. A good book on this subject would have used a real object oriented language to implement the generators, and would have showed the abundant design patterns that would apply to this problem (Builder, Bridge, etc.). One imagines that there could be many reuse opportunities in the generation framework. Code generation in some of the proto-MDA tools (like Eclipse's EMF, for instance) or the JET project show a lot more promise. |
|
Most Helpful First | Newest First
|
|
Code Generation in Action by Jack D. Herrington (Paperback - July 1, 2003)
Used & New from: $9.18
| ||