Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror

Submission Summary: 0 pending, 8 declined, 11 accepted (19 total, 57.89% accepted)

Software

Submission + - Book Review: Elemental Design Patterns (pearsonhighered.com)

jkauzlar writes: "Believe it or not, it's been 18 years since Design Patterns by Gamma, et al, first began to hit the desks of programmers world-wide. This was a work of undeniable influence and usefulness, but there is criticism however that pattern-abuse has lead to over-architected software. This failure is perhaps due to wide-spread use of patterns as templates instead of understanding their underlying 'grammar' of this language such that it may be applied gracefully to the problem at hand. What's been missing until now is a sufficiently authoritative study of design patterns at this 'grammatical' level of abstraction. Jason McC. Smith, through a surprisingly captivating series of analytic twists and turns, has developed a theory of Elemental Design Patterns that may yet rejuvenate this aging topic.

Much as developing a large taxonomy of star-types in astronomy lead to and enabled theories of star formation, or a classification of organic life lead to studies of genetics, it makes sense that the large volumes of collected object-oriented design patterns should somehow lead to a generic understanding of them. Smith actually approached this in an attempt to solve a very practical problem: given the variety of ways a particular pattern can be implemented, how can one be recognized programmatically with a degree of certainty?

What's most fascinating about Elemental Design Patterns is the analysis performed in working out a solution to the question of how a pattern may be defined in a way that's language-agnostic and flexible to differing implementations. This was a success: his resulting pattern recognition tool even found unintentional usages of well-known design patterns in a large legacy code base, which could then be refactored from the ugly 'accidental usage' to transform apparent chaos into maintainable order.

The basic idea is that every pattern is composed of elemental patterns. For example, the 'Factory Method' pattern may be decomposed into four EDPs (elemental design patterns): 'Create Object', 'Fulfill Method', 'Conglomeration' and 'Retrieve'. The 'Pattern Instance Notation', introduced in this book, and which serves as an extension to UML, helps visualize the relationships between the four sub-patterns and the larger pattern. No doubt readers will find the notation useful in their own work.

This premise's success or failure hinges on two questions: are the set of patterns really elemental? and can the set of patterns be complete? Oddly, the patterns listed in the book are NOT complete: "this book touches on only one-quarter, at best, of the possible EDPs that exist" (p. 107). The fact that this book (which defines 16 patterns in depth) is only the beginning of a project is not well-communicated. Those who might benefit from a complete listing of EDPs (i.e. analysis tool makers) might be puzzled at how to immediately put this book to use if it's not complete. After all, Smith insists in the Preface that "this book is meant to be used." To me, this implies it should serve as more than a basis for research or design-skills edification.

As for them being elemental, in the sense that all possible 'macro-patterns' may be built from them, Smith backs up this claim with the help of a mathematical formal system called rho-calculus, which is introduced in some depth in the appendix, but avoided in the body of the text for readability's sake. Readers wanting a full mathematical treatment are referred to Smith's Ph.D thesis.

What makes the book worth reading and re-reading is in the methods employed to analytically derive EDPs. As dull as I probably make it sound, Smith gives the entertaining first half of the book an almost 'novelistic', first-person quality in which the reader is engaged to experience Smith's insights first-hand. In a sense, the EDPs are 'unfolded' from simple concepts like the degrees of method or object similarity in a method-call relationship.

Understanding this point is important to understanding EDPs: a method call is not just a method call from a 'micro-patterns' perspective. Calling a very different method on the same object is semantically distinct from calling a very similar method on a very different object. The first is described by the EDP 'Conglomeration' (breaking larger tasks into subtasks); the second, by the EDP 'Redirection' (redirecting a process to another object). Of course, the terms 'similar' and 'different' are fuzzy qualifiers to programmers and there's bound to be some debate on how these terms are applied. Smith, in order to make this distinction, puts faith in the developer's ability to name classes and methods. But anyway, such 'semantic' relationships are the real building-blocks of the higher-level patterns. Once other object-oriented principles are considered, like inheritence, the EDP list grows.

The importance of Elemental Design Patterns from a designer's perspective should now be more clear. I kept stressing the word 'semantic' in the last paragraph because what this book strives to do is provide a *language* for describing object-oriented structure that, first of all, doesn't rely on the OO language itself (C++, Smalltalk, Java, Javascript, etc), and more notably, which takes into account the designer's purpose for employing simple devices like method calls and class extension. As I said earlier, a method call is not just a method call. There may be a dozen or so 'structural' reasons to call a method, and each reason is given it's own 'word' (i.e. EDP) in Smith's language. It stands to reason that a designer with a firmer grasp on his own intentions is a more effective designer."

Books

Submission + - Book Review: Java Performance (informit.com)

jkauzlar writes: "The standard Oracle JVM has about sixty 'developer' (-XX) options which are directly related to performance monitoring or tuning. With names such as 'UseMPSS' or 'AllocatePrefetchStyle', it's clear that Joe Schmo Code Monkey was not meant to be touching them, at least until he/she learned how the forbidding inner recesses of the JVM work, particularly the garbage collectors and 'just-in-time' compiler. This dense, 600-page book will not only explain these developer options and the underlying JVM technology, but discusses performance, profiling, benchmarking and related tools in surprising breadth and detail. Not all developers will gain from this knowledge and a few will surrender to the book's side-effect of being an insomnia treatment, but for those responsible for maintaining production software, this will be essential reading and a useful long-term reference.

In my experience, performance tuning is not something that is given much consideration until a production program blows up and everyone is running around in circles with sirens blaring and red lights flashing. You shouldn't need a crisis however before worrying about slow responsiveness or long pauses while the JVM collects garbage at inconvenient times. If there's an opportunity to make something better, if only by five percent, you should take it, and the first step is to be aware of what those opportunities might be.

First off, here's a summary of the different themes covered:

The JVM technology: Chapter 3 in particular is dedicated to explaining, in gory detail, the internal design of the JVM, including the Just-In-Time Compiler and garbage collectors. Being requisite knowledge for anyone hoping to make any use of the rest of the book, especially the JVM tuning options, a reader would hope for this to be explained well, and it is.

JVM Tuning: Now that you know something about compilation and garbage collection, it's time to learn what control you actually have over these internals. As mentioned earlier, there are sixty developer options, as well as several standard options, at your disposal. The authors describe these throughout sections of the book, but summarize each in the first appendix.

Tools: The authors discuss tools useful for monitoring the JVM process at the OS level, tools for monitoring the internals of the JVM, profiling, and heap-dump analysis. When discussing OS tools, they're good about being vendor-neutral and cover Linux as well as Solaris and Windows. When discussing Java-specific tools, they tend to have bias toward Oracle products, opting, for example, to describe NetBean's profiler without mentioning Eclipse's. This is a minor complaint.

Benchmarking: But what good would knowledge of tuning and tools be without being able to set appropriate performance expectations. A good chunk of the text is devoted to lessons on the art of writing benchmarks for the JVM and for an assortment of application types.

Written by two engineers for Oracle's Java performance team (one former and one current), this book is as close to being the de facto document on the topic as you can get and there's not likely to be any detail related to JVM performance that these two men don't already know about.

Unlike most computer books, there's a lot of actual discussion in Java Performance, as opposed to just documentation of features. In other words, there are pages upon pages of imposing text, indicating that you actually need to sit down and read it instead of casually flipping to the parts you need at the moment. The subject matter is dry, and the authors thankfully don't try to disguise this with bad humor or speak down to the reader. In fact, it can be a difficult read at times, but intermediate to advanced developers will pick up on it quickly.

What are the book's shortcomings?

Lack of real-world case studies: Contrived examples are provided here and there, but I'm really, seriously curious to know what the authors, with probably two decades between them consulting on Java performance issues, have accomplished with the outlined techniques. Benchmarking and performance testing can be expensive processes and the main question I'm left with is whether it's actually worth it. The alternatives to performance tuning, which I'm more comfortable with, are rewriting the code or making environmental changes (usually hardware).

3rd Party tool recommendations: The authors have evidently made the decision not to try to wade through the copious choices we have for performance monitoring, profiling, etc, with few exceptions. That's understandable, because 1) they need to keep the number of pages within reasonable limits, and 2) there's a good chance they'll leave out a worthwhile product and have to apologize, or that better products will come along. From my point of view, however, these are still choices I have to make as a developer and it'd be nice to have the information with the text as I'm reading.

As you can see, the problems I have with the book are what is missing from it and not with what's already in there. It's really a fantastic resource and I can't say much more than that the material is extremely important and that if you're looking to improve your understanding of the material, this is the book to get."

Submission + - Scientists to Breed the Auroch from Extinction (telegraph.co.uk) 1

ImNotARealPerson writes: Scientists in Italy are hoping to breed back from extinction the mighty auroch, a bovine species which has been extinct since 1627. The auroch weighed 2,200 pounds (1000kg) and its shoulders stood at 6'6". The beasts once roamed most of Asia and northern Africa. The animal was depicted in cave paintings and Julius Caesar described it as being a little less in size than an elephant. A member of the Consortium for Experimental Biotechnology suggests that 99% of the auroch's DNA can be recreated from genetic material found in surviving bone material. Wikipedia mentions that researchers in Poland are working on the same problem.
Programming

Submission + - The Definitive ANTLR Reference

Joe Kauzlarich writes: "Finally, someone has done us all the great service of publishing a book about the second most well-known compiler compiler, Terence Parr's Antlr, and it was written, moreover, by Parr himself and published as part of the somewhat-usually-reliable Pragmatic Bookshelf series. Take note, while it requires a JVM to run, Antlr is not just for Java developers; it generates compilers in Python, Ruby, C, C++, C# and Objective-C. Also note that this book is more than just an elaborated man-page; it is also an excellent introduction to the concepts of compiler and parser design.

First off, I have no preference between Yacc-style parsers, JavaCC and Antlr; I've never used Yacc, have used JavaCC in college and have since played with Antlr and am just as ignorant in the use of them all. The fundamental difference is that Antlr is a top-down LL(*) (simply-put, variable-lookahead) parser generator while Yacc is a bottom-up LR parser generator. JavaCC is also top-down, but employs a different parsing strategy. The book describes the meanings of these terms in simple detail.

I happen to have learned in my experience that good documentation for any of these products is hard to come by and difficult to follow, simply because the subject matter is obtuse and few, until now, have ventured to write expository literature to explain the myriad concepts to the non-academician. Of the three mentioned above, Antlr appears to be the more 'modern' and can also generate lexers from within the same grammar definition file, so the notions are integrated. Antlr also has a useful IDE called AntlrWorks with visualization features, causing grammar construction to be far simpler for a beginner.

That said, I don't wish to use this review to push Antlr over its alternatives, but only to press the point that this book serves not only to introduce Antlr to the average programmer, but the concepts of parser design as well. The concepts become necessary to understand while writing and debugging grammars, as not everything written in Backus-Naur Form will produce a working parser, and this holds true for any parser generator. Learning what works and what doesn't, as well as what workarounds are available, is key to becoming proficient in Antlr, Yacc or JavaCC. Once proficiency is acheived, you'll have the valuable skill of producing domain-specific languages on demand.

Terence Parr, as mentioned before, is not only the author and maintainer of Antlr, but he wrote the book as well. Antlr is on its long-awaited third version and has been maintained by Parr throughout the project's lifetime. He is a university professor and himself developed the path-breaking LL(*) parsing strategy employed by Antlr.

Parr begins with a one chapter background in computer language design before diving into a simple example of a parser for basic integer expressions. Part II is the meat of the book, describing various aspects of writing grammars for Antlr. Generally speaking, he covers the basic semantics of grammar writing, the many optimization, supplementary and 'workaround' options provided by Antlr, grammar actions and attributes, syntax trees, error reporting and related practical topics.

The third part, Understanding Predicated LL(*) Grammars, is the valuable 'textbook' portion of the book. It gives readers a short and comprehensible introduction to exactly what predicated-LL(*) means as well as a look at how competing parser generators work in contrast.

Both of the second and third parts are scattered with theoretical tidbits to help language designers better understand why grammars must work as they do. Those who can't pick their nose without a rudimentary theoretical overview of the subject can enjoy a few casual browsings through the book before even sitting in front of a computer. It works *almost* that well as a textbook, though it still doesn't approach such classics as Aho, et al's, Compilers: Principles, Techniques, and Tools (if you want to get seriously involved in compiler design). Take it for what it is though, as a chance to learn a tool of possible value without having to dig through old mailing lists and last-minute README's on the one hand, as was much the case a year ago, and on the other hand, devoting pain-staking class and study time to a lot of theory you won't find of practical value.

So I'll recommend this book on the basis that there's nothing else like it available; and don't wait until a project comes along that requires knowledge of compiler design, because there's a heck of a learning curve (I'm still on the very low end and I wrote a compiler in college). If you think compiler or parser design is interesting or may conceivably write a domain-specific language for your workplace, the Definitive Antlr Reference is not only a good place to start, but one of the only places to start short of signing up for a university course."
Programming

Submission + - Programming Collective Intelligence

Joe Kauzlarich writes: "In 2006, the on-line movie rental store Netflix proposed a $1 million prize to whomever could write a movie recommendation algorithm that offered a ten percent improvement over their own. As of this writing, the intriguingly-named Gravity and Dinosaurs team holds first place by a slim margin of .07 percent over BellKor, their algorithm an 8.82 percent improvement on the Netflix benchmark. So, the question remains, how do they write these so-called recommendation algorithms? A new O'Reilly book gives us a thorough introduction to the basics of this and similar lucrative sciences.

Among the chief ideological mandates of the Church of Web 2.0 is that users need not click around to locate information when that information can be brought to the users. This is achieved by leveraging 'collective intelligence,' that is, in terms of recommendations systems, by computationally analyzing statistical patterns of past users to make as-accurate-as-possible guesses about the desires of present users. Amazon, Google and certianly many other organizations, in addition to Netflix, have successfully edged out more traditional competitors on this basis, the latter failing to pay attention to the shopping patterns of users and forcing customers to locate products in a trial and error manner as they would in, say, a Costco. As a further illustration, if I go to the movie shelf at Best Buy, and look under 'R' for Rambo, no one's going to come up to me and say that the Die Hard Trilogy now has a special-edition release on DVD and is on sale. I'd have to accidently pass the 'D' section and be looking in that direction in order to notice it. Amazon would immediately tell me, without bothering to mention that Gone With The Wind has a new special edition.

Programming Collective Intelligence is far more than a guide to building recommendation systems. Author Toby Segaran is not a commercial product vendor, but a director of software development for a computational biology firm, doing data-mining and algorithm design (so apparently there is more to these 'algorithms' than just their usefulness in recommending movies?). Segaran takes us on a friendly and detailed tour through the field's toolchest, covering the following topics in some depth:
  • Recommendation Systems
  • Discovering Groups
  • Searching and Ranking
  • Document Filtering
  • Decision Trees
  • Price Models
  • Genetic Programming
  • ... and a lot more


As you can see, the subject matter stretches into the higher levels of mathematics and academia, but Segaran successfully keeps the book intelligible to most software developers and examples are written in the easy-to-follow Python language. Further chapters cover more advanced topics, like optimization techniques and many of the more complex algorithms are deferred to the appendix.

The third chapter of the book, 'Discovering Groups,' deserves some explanation and may enlighten you as to how the book may be of some use in day-to-day software designs. Suppose you have a collection of data that is interrelated by a 'JOIN' in two sets of data. For example, certain customers may spend more time browsing certain subsets of movies. 'Discovering Groups' refers to the computational process of recognizing these patterns and sectioning data into groups. In terms of music or movies, these groups would represent genres. The marketing team may thus become aware that jazz enthusiasts buy more music at sale prices than do listeners of contemporary rock, or that listeners of late-60's jazz also listen to 70's prog, or similar such trends.

Certainly the applications of such tools as Programming Collective Intelligence provides us are broader than my imagination can handle. Insurance companies, airlines and banks are all part of massive industries that rely on precise knowledge of consumer trends and can certainly make use of the data-mining knowledge introduced in this book.

I have no major complaints about the book, particularly because it fills a gap in popular knowledge with no precursor of which I'm aware. Presentation-wise, even though Python is easy to read, pseudo-code is more timeless and even easier to read. You can't cut & paste from a paper book into a Python interpreter anyway. It may've been more appropriate to use pseudo-code in print and keep the example code on the website (I'm sure it's there anyway).

If you ever find yourself browsing or referencing your algorithms text from college or even seriously studying algorithms for fun or profit, then I would highly recommend this book depending on your background in mathematics and computer science. That is, if you have a strong background in the academic study of related research, then you might look elsewhere, but this book, certainly suitable as an undergraduate text, is probably the best one for relative beginners that is going to be available for a long time."
Books

Submission + - The Design of Sites, Second Edition

Joe Kauzlarich writes: The 'pattern' book has become a familiar genre for frequent readers of technical manuals. The idea is to sift through mountains of architectural or design schemes and then to categorize and catalogue the most frequent ideas and present their strengths and weaknesses. This type of book has been a success in software engineering, but can it translate to website design, where designers have everyday and frequent access to other designs? At worst, these books provide a common industry vocabulary (assuming it was read by everyone in the industry). How many people knew what a factory method referred to before Erich Gamma's Design Patterns was released? At best, as in the case of that 'original' software design patterns book, mountains of complex ideas are archived into a single reference and will sit within arm's reach for the rest of your life. So, is the web design discipline full of patterns that evade common sense?

Initially, I was amazed by the sheer scope and the amount of work that must've been put into this book. Almost 1000 pages — and not just a bunch of screenshots either. Most of the book is well-organized text. The screenshots are full-color, as is everything else in the book. Each section has a different-colored bleed, making it easy to locate the chapter you're looking for. Furthermore, the patterns are extensively cross-referenced throughout the book, and references appear in colored marginal bullets. Even the table of contents has descriptive section headings and a small summary of each section. The design of the book itself gets an eleven out of ten. The book itself is a living catalogue of technical reference design patterns. Kudos to the book's designer on this one.

As far as content, the book describes 117 distinct patterns in 13 categories. This includes patterns related to marginal topics such as mobile devices, accessibility and content creation (i.e. copywriting 101). Like most pattern books, it's a good idea to initially browse the book before using it as a reference so that you'll know what to look for when you need to pick it up again. On my initial browsing, it seemed to contain nothing particularly surprising — this has been the case with many great pattern books such as Martin Fowler's Refactoring or another of his books, Patterns of Enterprise Application Architecture, so I was not going to discredit it on this basis alone: a pattern book's true value shows itself when you're stuck on a problem and turn to it for a moment of shining clarity. Let's see if The Design of Sites lives up to this promise...

Is the book as invaluable as it aims to be?

Trial #1: a business website that is not e-commerce, but a 'glorified yellow pages' type of site. I have a lot of information that needs to be accessed not only in its heirarchical organization, which can go to three levels deep, but should also guide the reader on what should be read next: a separate 'linked-list' that 'jumps' branches in the original hierarchy.

Given this amount of content and this double-organization, we wanted each page to present access to the site's information without overwhelming the reader. I open up the book to Part A, 'Site Genres', to locate the particular genre of website I'm working on. I find it: 'Valuable Company Sites.' I read some good information on layout. I see a paragraph titled 'other patterns to consider,' which points me to pattern B1, 'Multiple Ways to Navigate.' A-ha! The book's exceptional design allows me to locate pattern B1 in 3 seconds flat. It is hear I realize the true value of the book: there are no 'right' answers in design, only guidelines:

...we have identified two things that drive customers to action: intention and impulse (these can be thought of as goal and trigger, or need and desire). Neither intentional nor impulsive behavior is inherently good or bad, but a site that omits intention-based navigation might feel shallow and quirky, and one that omits impulse-based navigation might seem boring.


Good advice. Though I already have a hierarchical organization (intentional browsing) and recommended organization (impulse browsing), which gives users options on what to read next, I now have an idea of what sort of balance I want in the areas of navigation.

This was not exactly a mind-blowing discovery, but it did give me some confidence in the choices I eventually made and, furthermore, gave me valid reasons for making those choices, in case the client or a team-member were to question those choices later on.

Trial #2: Working on a website for a freelance graphic designer, I encounter a problem whereby each image in the portfolio can be categorized either by project/campaign or by design-type. For example, a logo, a business card, poster and website are all part of a single campaign, but we also want the ability to list all logos from separate campaigns. Again we have an organizational dilemma, but this time for a different type of site and a fundamentally different type of dilemma.

Again, I turn to the first section 'Site Genres' to locate the type of site I'm working on. It's not exactly a business site, but more of an on-line portfolio. The closest seems to be pattern A9, 'Stimulating Arts and Entertainment.' When I turn to it, I discover I was correct: the authors discuss the 'art gallery' site, though it doesn't exactly cover the aspect that I'm looking for. So I've encountered the book's first notable omission: nothing along the lines of an 'online portfolio' or 'interactive resume' genre of site design, which would encompass all creative freelancer sites as well as the usual rock band websites, etc. They differ from the 'Valuable Company Website' in that personal expression and design creativity take center stage. These sites have a general similarity in aesthetic in that they purposely avoid the business-like design. You won't see many pull-down or left-side navigation menus on a standard band website. The menus are typically integrated into a central graphic of some sort and this puts heavy constraints on the web designer while trying to effectively organize information without sacrificing the expressive purposes of the site.

What this book lacks

The book offers no obvious guidelines for dealing with this sort of problem and here's why: it doesn't take into account the various constraints imposed by the client nor does it attempt to offer reconciliations between the design and the underlying organization of the data.

In my trial #2 we had the thumbnail images organized in two ways, either by design-type (poster, logo, business card) or by campaign ("Going Out of Business Sale", "Grand Opening", "Johnson's Automotive Website"), both organization-types having fairly equal weight. How do we allow the user to switch between organization types and keep the site consistent? The book doesn't touch these types of questions in a direct way.

What the book offers
  • A comprehensive aggregate of guidelines for user-interface patterns.
  • User-centered, 'psychological' perspectives.
  • Covers most of the bases: content creation, page layout, organization of component elements, web application design, hints of 'Web 2.0' patterns, and ideas for functional pages such as searching, content submission, and quite a bit more.
  • 'Marginal' topics like localization and accessibility that you may not want to buy a separate book for but, nonetheless, need to know about.
  • A great overall design, easy to use as a reference and easy on the eyes.
  • A long and detailed exposition on the utility of polling and seeking advice from your target audience, including sample forms to present them with.
  • Overall, very well-written and hardly a sentence wasted.


Should you purchase this book?

While 99% of the patterns themselves are common knowledge to most users of the internet and to most decent web designers, it is the expository text that forms the real meat of the book and contains the wealth of insight. This is by far the book's value. Posing as a patterns book is misleading; this book is really just a very good general guide to web design. As a pattern book, it's flawed, because almost every 'pattern' is just a guideline for effectively presenting information, not an elusive insight or 'trick of the trade' in itself, such what as Erich Gamma's (et al) original 'Design Patterns' brought us. There are mountains of outstanding tips and bits of advice throughout the book, but if you've already achieved a decent level of competency in design, then you're not going to be using the book very often and when you do, you might not get the depth of advice you're seeking.

On the other hand, the book gives beginner-to-intermediate-level designers everything they need to get started or fill in the gaps. The Design of Sites would also make an outstanding text book and is likely to be one of the best general guides to web design on the market.

I'll give it a 6 out of 10, judging a book on its utility as a design patterns books (just as you would give The Illiad a possible 2 out of 10 if Homer presented it to me as a historical text and I expected as much). As an introduction to web design, it easily deserves at least 9 points out of 10.

Slashdot Top Deals

Regardless of whether a mission expands or contracts, administrative overhead continues to grow at a steady rate.

Working...