10 tips on how to prevent business value risk
One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.
The content has been bookmarked!
There was an error bookmarking this content! Please retry.
Posted by Charlie Martin on Jan 29, 2009
The Well Grounded Rubyist is a new and rewritten version of the popular Ruby for Rails. Today InfoQ publishes a review and excerpts Chapter 15.
Download: Chapter 15. Callbacks, hooks, and runtime introspection (PDF)
David A. Black’s Ruby for Rails was one of the early and popular Ruby texts. Now, Manning is publishing an extensive revision, The Well Grounded Rubyist, to be in the bookstores in March.
The Ruby language has grown in the intervening years, substantially in features and available libraries, and dramatically in acceptance and popular use. So it is certainly time for a new version. The Well Grounded Rubyist is intended to introduce the reader to Ruby, but isn’t really intended for a beginning programmer; the target audience is more the experienced programmer transitioning to Ruby. It begins with a one-chapter concise introduction to Ruby syntax including files and how classes and modules are laid out, the basics of the Ruby installation on a user system, the use of the Ruby interpreter irb, and some of the basic tools, particularly gem and rake. The first chapter (which is also available for download at the Manning site) would serve in itself to allow an experienced programmer to read and understand most Ruby code.
The book is broken into three sections. The rest of the first section, on Ruby Foundations, extends the introduction in the first chapter by covering, in separate chapters:
The next section is on the various built in classes and modules available with Ruby, including chapters on:
The third section is on the dynamics of Ruby. These chapters are particularly interesting because Ruby, as a dynamic language, draws much of its advantages from the powerful facilities it has for taking advantage of interpreter-time information to simplify things that can be difficult in compiled languages like C, C++, or Java. The third section contains three chapters:
The chapter on Callbacks, hooks, and runtime introspection is available for download directly from InfoQ, and is one of the most interesting chapters. Ruby is a descendent, in one way or another, of most of the object-oriented languages, but arguably draws the most from Smalltalk and Lisp, even though the syntax is distinctly more like a block-structured language. But the influence of Smalltalk is strongly felt in the openness of classes, allowing new code to be added at runtime to any class already available to the system, as Smalltalk does; the influence of Lisp shows in the use of code blocks and closures, and in the extensive use of continuations (“call/cc” in scheme, available through the yield keyword in Ruby.)
The runtime introspection and reflection facilities, allow a lot of things to be done simply in Ruby that are difficult in other languages. If an unknown method is called on a class, defining a missing_method method in the class allows that method call to be intercepted, and dealt with by user code instead of simply causing a run-time error or exception. Internals of the Class object in Ruby can be examined and extended, and the calling stack is available at run time, so user code can examine and its own state in a number of useful ways. The chapter concludes with an implementation of a very basic unit testing framework similar to the unit test frameworks provided with Ruby.
All in all, The Well-Grounded Rubyist is a strong introduction to Ruby for any experienced programmer, and will provide useful information to all but the absolutely most experienced and expert Rubyist.
Note
This excerpt is from The Well-Grounded Rubyist, to be published March 2009. It is being reproduced here by permission from Manning Publications. Manning early access books and ebooks are sold exclusively through Manning. Visit the book's page for more information.
Agile Practices to Improve Project Management Organization (PMO) Effectiveness
SCM best practices for multiple processes, releases & distributed teams
A Guide to Branching and Merging Patterns
One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.
InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.
Alex Papadimoulis discusses ugly code, where it comes from, how to avoid it, and how to get rid of it.
John Davies examines Visa’s architecture and shows how enterprises have architected complex integrations incorporating Hadoop, memcached, Ruby on Rails, and others to deliver innovative solutions.
Sean Comerford unveils ESPN.com’s architecture, what components are used and why, and the current changes the website goes through.
Are there repeated patterns of failure on Enterprise Agile Enablement efforts? Sanjiv and Arlen discuss Seven Deadly Sins to avoid when adopting Agile in an enterprise.
Erik Dörnenburg answers: What is Enterprise and Evolutionary Architecture?, discussing 4 issues: Turning strategy into execution, Ensuring conformance, Where do the architects sit? Buying or building?
Sean Cribbs explains what Map-Reduce and Riak are, why and how to use Map-Reduce with Riak, and how to convert SQL queries into their Map-Reduce equivalents.
No comments
Watch Thread Reply