Domain: clbooks.com
Stories and comments across the archive that link to clbooks.com.
Stories · 9
-
Effective Tcl/Tk Programming
Lo, the reviewing hero has returned: Jason Bennett has returned with a review of Mark Harrison and Michael McLennan's effort Effective Tcl/Tk Programming. Designed as a book for those going deeper with their Tcl/Tk knowledge, this book works for those of you beyond the introductory page. Click below for more information. Effective Tcl/Tk Programming author Mark Harrison and Michael McLennan pages publisher Addison Wesley Publishing Company, Inc. rating 8/10 reviewer Jason Bennett ISBN 0-201-63474-0 summary A book for advanced Tcl/Tk programmers with thorough examples and good tips. As with most advanced books, it's probably better as a reference book than for pure reading, but its coverage is thorough enough to teach most Tclites a few tricks. BackgroundGreetings, all, I'm back once again. After my travels into the world of Tk a few weeks ago, I've branched out to include its sibling, Tcl, in all its glory. Tcl, I have to say, reminds me a lot of Lisp, at least in its typelessness and fondness for lists. I do miss all the (()), though :-).
What's the book about?Generally speaking, it is designed as a sequel to any and all introductory Tcl books with a view toward more advanced and narrow concepts. The authors go through various parts of Tcl that the novice programmer might not use frequently, but the advanced programmer will find quite useful. The geometry managers are all covered in detail, so the advanced programmer can select the best one. The canvas widget, that all-purpose blank slate, is given quite a bit of room. The book even covers communicating with other programs on the same machine and through sockets. Most all aspects of Tcl and Tk are addressed to some extent, leaving few stones unturned. Of course, programmers on different levels and with different experiences will find different nuggets in here. Personally, I was well acquainted with the text widget, making chapter five somehwat redundant, but needed some help with communicating with other processes. YMMV. Generally, the book is composed of several large examples, with new features added in each chapter. There certainly is a great deal of code, relative to the amount of explanation, so a good grasp of Tcl is required. In addition, the final chapters deal with delivering a complete, cross-platform Tcl application to the marketplace, in terms of packaging and cross-platform compatability. There's a nice install program example, and plenty of cross-platform minefields mentioned.
What's Good?This book is excellent for any Tcl programmer who's looking to add one of the skills covered in this book to his bag o'tricks. If you want to know more about text widgets, or using Tcl as a front-end to other programs, there's plenty of explanation and example to glean from this book. If you want to know more about general Tcl concepts like the event loop or the geometry manager, there's still more for you. There are also plenty of concepts addressed that could be applied to other GUI efforts outside of pure Tcl/Tk. I wouldn't necessarily read the book just for those, but they are a welcome addition. The examples in particular are quite thorough, with extra code available that is not printed in the book. There's even an entire calander manager written that's quite full-featured. Any topic covered comes with not only text but plenty of code. Commercial Tcl developers will especially appreciate the emphasis on professional Tcl libraries and delivery. If you do Tcl for a living, you'll appreciate this book.
What's Bad?If you don't want to delve deep into Tcl, don't bother with this book. You'll end up having to deal with areas of the language you never wanted to know, and you'll end up frustrated. Similarly, I wouldn't recommend reading this from beginning to end unless you love Tcl. There are plenty of parts where the flow is bogged down by the endless obscure code, and if you aren't interested, you'll end up skipping it anyways. Skim the parts that you don't need now, and come back to them.
What's In It For Us?Since I know there are plenty of Tcl fans out there, I'm sure there will be plenty of interest in this book. As I said, if you're just starting with Tcl, hold off on this one. If, however, you've honed your Tcl skills, but need some extra help in some areas, this book is for you. Whether you're into sockets with Tcl or just want to use that text widget more effectively, you will find this book useful. I'm sure it will be coming off the shelf for reference much in the future.
To purchase this book, head over to FatBrain.com, and pick it up. -
Review:Garbage Collection
A.M. Kuchling is back again, this time with a review of Richard Jones and Rafael Lins' oddly named Garbage Collection. This book is not actually about Waste Management Inc, but is "A highly detailed survey of garbage collection algorithms, and the research literature surrounding them. Interesting, if at times very dry.". Click below for more information. Garbage Collection author Richard Jones and Rafael Lins pages publisher Wiley & Sons rating 6 reviewer A.M. Kuchling ISBN summary A highly detailed survey of garbage collection algorithms, and the research literature surrounding them. Interesting, if at times very dry.The first time you encounter garbage collection (GC, for short) is often by using Lisp or Scheme in an introductory computer science course, where it can seem an almost magical technology. How does the interpreter determine that a variable has become garbage, and can safely be deallocated? This book explains how GC works, in great detail, and interest people implementing garbage collectors or who've wondered how it's done. There are 3 approaches to GC, all of which are covered in this book:
- Reference counting:
Every object keeps a count of the references pointing to it. When new references are created, the counter must be increased; when references are destroyed, the counter is decremented, and, if the count is zero, the object has become garbage and can be reclaimed. Reference counting unfortunately exacts the most overhead from constantly incrementing and decrementing the counters, and in its simplest form it can't collect cyclic data structures, because their count will never reach zero. - Mark-sweep:
Traverse the graph of object references, starting from the roots of the computation; roots might be the program's global variables, the contents of the C stack, static class variables, or a main namespace of some sort. Each object that's traversed is marked as being reachable; when the traversal is complete, any unmarked objects are unreachable because they can't be reached by the program any longer, and can be reclaimed as garbage. - Copying:
Divide memory into two halves, called "Fromspace" and "Tospace". Memory for new objects is always allocated out of Fromspace. When Fromspace fills up, a traversal similar to the one used by mark-sweep is done, but instead of just marking objects as reachable, they're copied into Tospace. Once the traversal is done, all the live objects are now in Tospace, and Fromspace no longer contains any live data; only garbage objects can be left in Fromspace. Tospace is now declared the new Fromspace, and new objects are allocated until it fills up; the algorithm is then repeated.
This book covers the above 3 algorithms for GC in great detail; there's a chapter for each algorithm, examining its limitations, common implementation techniques, and historical notes on the its development. Later chapters cover more advanced collectors that extend the basic algorithms in various ways. Generational collectors are based on the observation that many objects are temporary and have short lifetimes, while some few objects may last for the entire lifetime of the program. A generational garbage collector concentrates on young objects, because they will occupy the most recyclable space, and spends less time examining old objects that probably won't be reclaimed. Incremental and concurrent collectors don't bring the whole program to a halt while they scavenge through memory doing a collection, making them more suited for interactive or even real-time applications.
Chapter 9 is an interesting examination of the implementation of GC in an unfriendly environment, namely C programs. The Boehm-Demer-Weiser collector implements a mark-sweep garbage collector that can replace C's
malloc()function, scanning stack frames and registers for potential pointers, and managing to do it fairly efficiently. One study found the Boehm-Demer-Weiser collector added 20% more execution time overhead thanmalloc()did -- that is, the time spent in memory allocation was 20% longer. (That doesn't mean it made programs 20% slower, because most programs spend more time computing results than they spend allocating memory). A garbage collector for C is a tricky job, complicated by the lack of type information, data values that may mimic pointers, and compiler optimizations that may render objects invisible to the collector. Barlett's Mostly Copying Garbage Collector, also described in this chapter, is more liberal and requires some assistance from the C programmer in exchange for greater accuracy.The remaining 3 chapters consider suggestions for adding garbage collection to C++, the interaction of GC with cache memory, and distributed garbage collection. The topics of these chapters are still subjects of active research, so the final chapters are lighter on implementation details and heavy on references to research papers, making them a lot less interesting.
The authors are computer scientists specializing in GC (Richard Jones maintains a garbage collection page), and their coverage is quite complete, which at times makes for exceedingly dry reading as the authors enumerate what seems like every minor implementation variation and every relevant paper. On the other hand, if you're actually faced with implementing a garbage collector, the pointers into the research literature will be very useful. A casual reader (like me) can simply skim, or even skip, pages until the next interesting section arrives.
Excerpt
However, the matter is more subtle than this. The collectors described in this chapter are very simple and inefficient. The behaviour of these collectors cannot be automatically ascribed to their more sophisticated variants. The cost of copying an object is likely to be more expensive than simply testing and setting a mark-bit, particularly if the object is large. Although mark-sweep must sweep the entire heap, in practice its real cost is dominated by the mark phase. Linearly scanning the heap will generally be less expensive than tracing data structures even using the simple technique shown above. ... Furthermore, more sophisticated methods can substantially reduce the cost of the sweep. Although copying collectors have predominated in the past, recent studies suggest that the choice between mark-sweep and copying garbage collection may well depend as much on the behaviour of the client program as on the inherent properties of the garbage collection algorithm.
-- From section 2.4 of the book.To purchase this book, head over to Fatbrain.
Table of Contents- Introduction
- The Classical Algorithms
- Reference Counting
- Mark-Sweep Garbage Collection
- Mark-Compact Garbage Collection
- Copying Garbage Collection
- Generational Garbage Collection
- Incremental and Concurrent Garbage Collection
- Garbage Collection for C
- Garbage Collection for C++
- Cache-Conscious Garbage Collection
- Distributed Garbage Collection
- Reference counting:
-
Review:Developing Linux Applications with GTK+ and GDK
Eric Harlow, author of Developing Linux Applications with GTK+ and GDK has written a book well worth reading. A good first round of things, click below to find out how to write more of applications/widgets/whatever. Thanks to A.M. Kuchling for the review. Developing Linux Applications with GTK+ and GDK author Eric Harlow pages publisher New Riders rating 6 reviewer A.M. Kuchling ISBN summary A reasonably good first book on GTK+, though it's not likely to become the definitive one unless the second edition makes some minor improvements. REVIEW: Developing Linux Applications with GTK+ and GDK Eric Harlow New Riders
Nutshell
Review: A reasonably good first book on GTK+, though it's not likely to become the definitive one unless the second edition makes some minor improvements.
Rating: 6/10 A.M. Kuchling The Scenario-->The GTK+ GUI toolkit was developed for the GIMP, and was subsequently adopted by both the current Mozilla codebase and the GNOME project. I believe this is the first formally published documentation for the GTK+ toolkit. (It is not a generic guide to application development under Linux, even though the spine of the book reads only "Developing Linux Applications".)
The book provides good coverage of the fundamentals that you need to know: the basic data structures provided by GLIB; the overviews of buttons, menus, dialog boxes, and all the other major widgets; and four sample applications -- a calculator, text editor, Minesweeper game, molecule viewer, and a simple Defender game. Harlow's development of each topic is understandable and helpful, making the book a vast improvement over struggling through the toolkit's source code, and well worth purchasing if you want to program with GTK+.
My one major problem with the book is, surprisingly, wishing there were more screenshots in it. The opposite is true of most computer books, because a screenshot and a paragraph of text can be made to fill a whole page, and helps immensely in padding out a book to make it look bulky and comprehensive. This book goes to the opposite extreme; there's no screenshot of the calculator application at all, and only one or two screenshots for each of the other sample programs.
Another flaw is that the book seems to contain every single line of code for the sample applications. As a general rule, in any given C program, 90% of the code is uninteresting; only 10% contains the heart of the program, and the rest is all scaffolding. I would have preferred to see a dissection of the central portions of each program in pseudocode and small chunks of C code, relying on the Web to get the complete distribution, instead of having to flip past page after monospaced page of program listings. So What's In It For Me?-->
This book rates 6 out of 10 points, because it covers GTK+ quite well, and provides you with the basic information you'll need to hack with it. It would get 7 out of 10 points if there were fewer pages of code and more illustrative screenshots.
Purchase this book over at Computer Literacy.
Table of Contents- Introduction to GTK+
- GLIB
- Developing GUI Applications
- Basic Widgets
- Menus, Toolbars, and Tooltips
- More Widgets: Frames, Text, Dialog Boxes, File Selection Dialog Box, Progress Bar
- Writing a Calculator Application
- Developing a Simple Word Processor
- Minesweeper
- Graphics Drawing Kit
- Styles, Colors, Fonts, Cursors, and Referencing
- Molecule Viewer Using GDK
- Sprites and Animation
- Trees, Clists, and Tabs
- Creating Your Own Widgets
-
Learning Perl/Tk
After a bit of a hiatus, Jason Bennett has returned with a review of Nancy Walsh's Learning Perl/Tk. As the title of the book would indicate, this is an ideal book for those looking to learn the Tk tool kit and Perl. This book assumes a level Perl background, and a little GUI, but is a good intermediate step-click below if you want to know more. Learning Perl/Tk author Nancy Walsh pages publisher O'Reilly rating 8/10 reviewer Jason Bennett ISBN 1-56592-314-6 summary A solid introduction to using the Tk toolkit with Perl. If you have a reasonable Perl background, and a little GUI on the side, you'll pick it up in no time. BackgroundGreetings, all. This will be the first in a series of reviews dealing with some Tcl/Tk books I've recently acquired. Since I already have some Perl in my background, I took this one first, both to sharpen my Perl skills, and to find out what this Tk thing is all about. Given that my GUI experience is limited to Smalltalk and Java, Tk is quite easy to use. With Smalltalk, I was too busy wrapping myself around OO theory to enjoy the interface, and Java always seemed to make GUI stuff more difficult than it needed to be (although I still love it). Perl and Tk are strong partners, because they share a philosophy of getting things done without a lot of fuss. Perl and Tk are excellent replacements for any GUI scripting language you might use (read: VB). Read on to see how to jump in!
What's the book about?This is another book in O'Reilly's Learning series (of which Learning Perl really saved my butt in college), which is dedicated to teaching the fundamentals of a certain topic. I want to compare this series with the Learn XY in 21 days type of books, although I believe that would generally be an insult to the quality of O'Reilly. Once you finish this book, you will have enough of an understanding of Tk to be able to do most small projects. You will know most widgets (although I'll admit my own knowledge is limited here), and will generally be prepared to be productive with Tk in Perl.
What's Good?In order for you to be able to evaluate the usefulness of this book, it will probably help to understand where I'm coming from. I have a BSCS from Georgia Tech, and have enough languages under my belt to do some damage (Lisp is cool!). In fact, I learned Perl originally for a networking project using Learning Perl. It gave me enough to do what was needed. Having said that, I don't live to program, and in fact I'm not big on reading language books. I don't know every language under the sun, and I don't necessarily learn them with the greatest of ease. In other words, my results should be duplicable by most programmers. The most important thing when reading this book is to know Perl (at least have written some stuff in it), and probably have an idea of what to expect when writing GUI code.
Going into this, my Perl was definitely rusty (having not touched it in a while). I didn't have any trouble diving straight in, however. The Perl constructs used are not overly complicated, and my knowledge was sufficient. (NOTE: make sure you have a very recent version of Perl installed. My Redhat 5.2 needed to be upgraded to m4 before the examples would work. Also, get the errata from O'Reilly.) The early chapters deal with basic constructs and widgets, and spend a great deal of time on the geometry managers (go figure). Each chapter introduces a new widget, although some are used before they are introduced (just nod and smile when you see those and don't worry). There are plenty of examples, code fragments, and exercises to keep anyone busy. I tried to work as many as I could, to get a feel for the language, and generally felt like they were helpful. I never felt completely lost or confused, and generally followed things without much trouble. Having finished the book, I feel confident that, given a little work on my Perl, I could write a useful application with Tk, especially given some research on CPAN for various contributed modules. For me, the book worked.
What's Bad?Nothing in this book is particularly bad, although there are a few nits I'd like to pick. First, the early emphasis on geometry was somewhat interesting. I'm not sure why I care about grid vs pack when I can barely create a button to put on the screen. For that matter, frames are referenced in a short chapter late in the book, after being used all throughout. If the concept is so basic, why not put it toward the beginning? Also, there were times when the author mentions that an option is esoteric, or generally unused, and then spends much more time than necessary on that point. If it's so esoteric, why is it being covered in a basic book like this one? Finally, there were a few times that the book did not explain a point well enough to me, and I had to divine the answer down the road (like configuring scrollbars). It was not a major issue, but there were some things that could have been clearer.
What's In It For Us?If you want to learn Tk using Perl, this book will let you do that. It gives a solid introduction to the topic, and on completion, you will be a useful Perl/Tk programmer. Just know your Perl going in, and you will be fine.
Purchase the book over at Computer Literacy.
- Preface
- Introduction to Perl/Tk
- Geometry Management
- The Basic Button
- Checkbuttons and Radiobuttons
- Label and Entry Widgets
- Scrollbars
- The Listbox Widget
- The Text Widget
- The Canvas Widget
- The Scale Widget
- Menus
- Frames
- Toplevel Widgets
- Binding Events
- Composite Widgets
- Methods for Any Widget
- Configuring Widgets with configure and cget
- Operating System Differences
- Fonts
Index
- Preface
-
Applied Cryptography, 2nd Edition
Tal Cohen, author of a number of book reviews in his own right, has sent over a review of Bruce Schneier's Applied Cryptography, 2nd Edition. One of the best introductions to the field of cryptography this is a book well worth reading, even for those who simply want a better understanding of the potentials about cryptography, and what it's all about. Applied Cryptography, 2nd Edition author Bruce Schneier pages publisher John Wiley & Sons rating 8/10 reviewer Tal Cohen ISBN 0-471-11709-9 summary A fantastic introduction and a handy reference on one of computer science's most interesting fields.More than any other field in computer science, cryptography is associated with computer warfare. Recent international treaties define cryptographic algorithms as weapons, and the laws of many countries prohibit either the development, the usage, or the export of cryptographic algorithms. Yet while feared by governments, cryptography is one of the most fascinating -- and useful -- fields of algorithmics.
The whole point of cryptography is to solve problems. (Actually, that's the whole point of computers -- something many peopletend to forget.) Cryptography solves problems that involve secrecy, authentication, integrity, and dishonest people. You can learn all about cryptographic algorithms and techniques, but these are academic unless they can solve a problem.
Bruce Schneier's Applied Cryptography, in its second edition, is probably the best introduction to the field. Schneier is not merely an excellent technical writer, but also a researcherin the field; for example, he developed the public-domain Blowfish encryption algorithm. But unlike many works by other researchers, Schneier's work does not read like a dry paper for a scientific journal. His writing is very enjoyable (though the jokes are overdone at times) and his explanations are almost always lucid.
Breaking a plate is a good example of a one-way function. It is easy to smash a plate into a thousand tiny pieces. However, it's not easy to put all those tiny pieces back together into a plate. [...]
So, what good are one-way functions? We can't use them for encryption as is. A message encrypted with the one-way function isn't useful; no one could decrypt it. (Exercise: Write a message of a plate, smash the plate into bits, and then give the bits to a friend. Ask your friend to read the message. Observe how impressed he is with the one-way function.) For public-key cryptography, we need something else.
Generally, the book covers four main subjects: protocols, algorithms, source code (in C), and politics. As the title indicates, the book is intended to people who actually wish to apply cryptographic methods to their programs, and so the theoretical discussions and mostly at introductory level - sufficient to make you understand how an algorithm works and what are its benefits and potential weaknesses, but without elaborate mathematical proofs, for example.
Part I of the book, "Cryptographic Protocols", includes five chapters: building blocks, basic protocols (like key exchange and authentication), intermediate protocols (timestamping, fair coin flips, key escrew, etc.), advanced (zero-knowledge proofs, simultaneous contract signing, digital certified mail, etc.) and esoteric ones (like secure elections and anonymous message broadcast).
Part II, "Cryptographic Techniques", deals with such issues as key length, key management, and methods of employing algorithms. The longest section, Part III, spans 13 chapters -- "Cryptographic Algorithms". The algorithms covered include DES and its variants,Skipjack, Lucifer, LOKI, RC2, RC4, RC5 (that's the cow in your tray-bin!), IDEA Blowfish, RSA and many others. The greatest detail is given to the venerable old DES, but the information about other protocols (over 50 in all, including blockDES, but the information about other protocols (over 50 in all, including block ciphers, stream ciphers, random-sequence generators, one-way hash functions, public key algorithms, and more) is sufficiently detailed for you to decide which best suites your needs. And if you need more information, an outstandingl$ detailed list of over 1,600 references is included.
As in most texts about cryptography, protocols and algorithms are described using the merry cast of Alice (side A), Bob (side B), Eve the eavesdropper, Mallory the malicious attacker, and their other friends and foes. This makes descriptions much easier, since once you get used to these Dramatis Personae (which happens rather quickly), you immediately know who plays what role in each scene, without wasting time on repeated explanations. Schneier brings those characters to life in numerous examples of the pros and cons of various approaches.
Part IV, "The Real World", deals with two subjects: sample implementations in actual products, and politics, including history and legal issues. The history of cryptography is much longer than that of computer science: from secret codes to invisible inks, encoded messages were here for a very long time indeed. On the other hand, cracking cryptographic codes was among the earliest uses of computers, back in WWII (as anyone familiar with the story of Alan Turing knows).
One section in chapter 25 lists the import and export limitations on cryptography in different places around the globe. The most interesting entry is for my own country, Israel, which (according to Schneier) "has import restrictions, but no one seems to know what they are."
The final section, "Source Code", includes over 50 pages of sources in C for several algorithms: DES, LOKI91, IDEA, GOST, Blowfish, 3-Way, RC5, A5 and SEAL. It looks insane that a book with so many lines of source is not accompanied by a CD; but then you realize that what's insane is not the boo$ but export laws, which allow cryptographic algorithms to be distributed in prin$ -- but not on electronic media. Consider, for example, how Phil Zimmermann's PG$ was legally exported from the US to the rest of the world: the sources were printed in a one-copy book, which was mailed to Europe, scanned in and recompiled.
If you live in the States, you can order a set of 3 floppies directly from Schneier, with sources for most of the algorithms discussed in the book (and more).
Anyone cares to mail me a printout?
Purchase this book at Computer Literay and help Slashdot.
For more information about this book, see the sidebar of http://www.forum2.org/tal/books/crypto.html.
For additional book reviews, please visit http://www.forum2.org/tal/books.
-
Review:Developing Intelligent Agents for Distributed Systems
Sam Mulder sent a review of Michael Knapik and Jay Johnson's Developing Intelligent Agents for Distributed Systems. A book for those taking a high level view of intelligent agents. Click below for more information. Developing Intelligent Agents for Distributed Systems author Michael Knapik and Jay Johnson pages publisher McGraw-Hill rating 6 reviewer Sam Mulder ISBN summary This is a high level overview of intelligent agents that is suitable for someone getting started in the field. The Scenario Knapik and Johnson attempt to provide an overview on the field of intelligent agents. They claim to cover "virtually all aspects of intelligent agent technology." They do cover a wide variety of topics such as object orientation in at least enough detail to get started. Other areas such as artificial intelligence are just too broad for them to discuss at any useful level.
What's Bad? The main problem that I had with this book was that it tried to take on too much. While trying to cover every aspect involved in developing agents, it ends up covering none of them very well. Instead of detailed coverage of any subject, we get a brief introduction to a wide spread of subjects and pointers for further information.Another thing that I found annoying is the authors' exuberance for Smalltalk and Java and their downplaying the power of C++. They seem to be under the impression that C++ is dead and obsolete. They also completely fail to mention Perl. This is curious considering the power of Perl for these sorts of applications. I suppose they don't like it because they are trying to develop a pure object oriented system but it is by far the easiest way to rip apart HTML documents. While Java may be the language of the future, I think C++ with maybe some Perl tools provides the best platform for agent development today.
What's Good? The huge range of topics covered in this book is both a strength and a weakness. If you want to get a very general overview of many of these areas, it would be much cheaper to buy and read this book than a dozen books covering them in detail. This book would probably be good to give a manager or non-programmer when trying to explain what an agent is and what technologies are used to develop them.In addition, the discussion of agent architectures is somewhat interesting and useful. I haven't seen many books cover this stuff very well. Several different organizational possibilities are presented with advantages and disadvantages. I found some of this to be rather shallow and commonsensical but I suppose it would be useful to someone with no knowledge of agents.
So What's In It For Me? If you are looking for a good overview of a wide range of fields involved in the development of intelligent agents, this book may be for you. It introduces artificial intelligence, fuzzy logic, object orientation, distributed computing, agent architecture, and several programming languages. Unfortunately, to actually start writing agents, you will need to read separate books on most of these topics. It does give you a starting place and some ideas about the approaches that others are trying. If you are an experienced programmer looking to start into agents, you will need to skip over large sections (like the introduction to object oriented programming) to keep from being bored. The sections on agent architecture are the best and are probably worth reading if you are trying to get into the field. Overall though, I found this book fairly disappointing. In the authors' defense, this is a large subject that would be difficult to cover with the wide scope that they are attempting. I think it is better left to books specializing on more manageable sub-areas.Purchase this book over at Computer Literacy, and help Slashdot out.
Table of Contents- Introduction
- From Artificial Intelligence Comes Intelligent Agents
- Converging Technologies that Facilitate and Enable Agents
- Agent-Enabling Infrastructures
- Agent Architectures
- Agent Design Considerations
- Developing Intelligent Agents Now
- Agent Applications
- Agent Futures
-
The Psychology of Computer Programming
After a long hiatus away, Jason Bennett has returned to book reviewers with this review of Gerald M. Weinberg's The Psychology of Computer Programming (Silver Anniversary Edition). This book talks about the meta side of CS, and this book is where many of the other mental CS books have their roots-which means some repitition. Click below for more info. The Psychology of Computer Programming (Silver Anniversary Edition) author Gerald M. Weinberg pages publisher Dorset House rating 7/10 reviewer Jason Bennett ISBN 0-932633-42-0 summaryIn many ways, this is the book that started the "meta" trend in computer science. Most books that discuss the mental side of CS have their roots here. Unfortunately, that also means that you've heard it all before.
BackgroundLong time, no talk! Unfortunately, my reading schedule didn't exactly go as planned (for various and sundry reasons, like slackness), and thus my reviews have not been coming as fast and furious as before. It's good to be back in the saddle again, however, dispensing syrup and vitriol as required.
What's the book about?The original preface to POCP says it best: "to trigger the beginning of a new field of study: computer programming as a human activity...." Before the original edition, most books viewed programming in a mechanical fashion, in terms of how better to turn a crank. Weinberg, however, deliberately took a different approach: programming is done by people, as part of a thought process, and should be studied as any other thought process. This book focuses on the people aspects of programming, and how people think about doing programming. It discusses how to study programming, how people work together on programming projects, how people program alone, and what tools people use to get their work done. In short, it discusses how people program, not how code is best churned out.
What's Good?Even though this is the original book on programming psychology, Weinberg managed to hit most of the important facets of the subject. Now, 25 years and many books later, he has come back to the subject. The book itself consists of all of the original work, annotated with chapter-ending notes and reflections. In other words, you read the original chapter, and then Weinberg's thoughts on it. This is not unlike the anniversary edition of Mythical Man-Month, although there is much less new material here. As with most meta-books, the ideas have aged well. People don't change much over 25 years, even though their surroundings do. Egoless programming, the passing around of code for peer analysis, was pioneered in the original work, proven over the years, and still needs to be implemented in more ways. Generally, Weinberg introduces the entire field of computer psychology, laying the groundwork for an entire area of research.
What's Bad?Well, to be perfectly honest, I didn't enjoy the book that much, at least in terms of enjoying the reading. I feel that I learned some things, but I don't think the book has aged well in certain areas, and additionally I felt that much of the material was covered elsewhere. MMM taught me things that I had never thought of before, and in fact have not been well covered elsewhere since then. Plus, there was a huge section analyzing the entire book. TPOCP, on the other hand, has pages and pages devoted to annoying PL/I details, while adding only a few blurbs here and there. Note that the ideas themselves are still important, there's just a lot to wade through to get to them. In addition, I think this material has been well covered by books such as Peopleware and others. The book is enough of a classic that nothing can be said to be "bad," but I question if it hasn't been superceded.
What's In It For Us?It's always important to look at we do on a metaphysical level. Computer science and software engineering are some of the most non-physical work areas known, and because of that can be difficult to analyze. Whether you choose this book, or one of the others mentioned above, do read up on how people deal with programming. It's just as important, if not more so, than language syntax or new IDE's.
Purchase the book over at Computer Literacy.
Preface to the Silver Anniversary Edition
Original Preface
Comments on the Original Preface
Suggestions for Course Use
Part 1: Programming as Human Performance- Reading Programs
- What Makes a Good Program?
- How Can We Study Programming?
Part 2: Programming as a Social Activity - The Programming Group
- The Programming Team
- The Programming Project
Part 3: Programming as an Individual Activity - Variations in the Programming Task
- Personality Factors
- Intelligence, or Problem-Solving Ability
- Motivation, Training, and Experience
Part 4: Programming Tools - Programming Languages
- Some Principles for Programming Language Design
- Other Programming Tools
Part 5: Epilogue
Index
-
Review:Year 2000 In A Nutshell
The approach of the Millenium presents society with a chance to consider the issues, technological and otherwise, that affect the planet as we enter the next century, from the grinding poverty that engulfs billions of people to growing toxic waste problems to decaying nuclear weaponry and the spewing CO2 exacerbating global warning. Instead, thanks to dumb reporting about chaos, bunkers and food shortages, the country is coming to associate the year 2000 only with computer software problems. These are very real but manageable. A technology scholar explains why this is ironic and sad, and a new Y2K book from O'Reilly and Associates offers some of the clearest and most useful info yet on what this Millenial bug might really do.It says volumes about our times that when most Americans talk about the year 2000 they think not of the many symbolic or mystic implications of the Millenium, but of the mundane but potentially significant programming glitch that threatens many computer systems.
"Because programmers in earlier decades economized on space by cleverly dropping two digits," writes Langdon Winner in the Tech Knowledge Revue, "we are now obsessed with the problem and the costly challenge of minimizing its possible damage."
It's typical of the mass media's narrow-minded approach to technology to focus so obsessively on the worst possible consequences of Y2K computer problems that some people are planning to stockpile food, water and cash in case our collective lights go out. And it's typical of cyber-gurus geeks, programmers and Web developers to forget that there are political, social and cultural issues surrounding the approaching Millenium that go far beyond technics.
Winner, a political scientist at Rensselaer Polytechnic Institute in New York, and one of the country's most thoughtful technology scholars, argues that the approach of the new century offers an occasion to ponder the condition of humanity and the planet that sustains us.
"How many of the world's nearly six billion people live well or in circumstances that are even marginally agreeable?," he wonders. "How many still suffer poverty, war, disease, illiteracy, and the other scourges of the species? Will the policies of global civilization merely magnify well-known ecological, economic and social ills? Or will the next century finding ingenious remedies?"
Nobody knows, and nobody's even talking about it much. The media's technology coverage has increasingly focused on Internet stock prices, Silicon Valley businesses, the gee-whiz computer gadgets of tomorrow, and the handful of panicked people digging bunkers in preparation for the supposed havoc to be wrought by the Y2K bug.
Small wonder some people are scared out of their wits. Few people outside the computer industry know how seriously to take the Y2K bug. Are predictions of possible chaos alarmist and exaggerated? Should reasonable people take steps to protect themselves and their families? Should we, as a culture, be taking the Y2K issue more seriously? Will we be able to withdraw our cash from banks next January? Turn on our faucets and furnaces? Will our E-Z passes still let us through the toll booth?
Journalists don't seem to have a clue. While every Internet stock blip is covered like the outbreak of World War III, Stories on Y2K range from the hysterical to the ignorant.
But there is at least one intelligent, useful and highly credible guide, "Year 2000 In A Nutshell", by Norman Shakespeare." ($19.95 www.oreilly.com). O'Reilly is perhaps the best publisher of technical and computing books in the United States. Its "Running Linux" and "Linux In A Nutshell" were so coherent and intelligently presented, I almost ordered "Year 2000" hoping it would make some sense of the approaching traumas.
It did.
"Year 2000" has O'Reilly's trademark clarity and organization. It contains one of the best overviews of the Year 2000 problem I've seen anywhere, along with a master plan for conversion projects, ways to identify Y2K problems and fix them, and reference information on the date and time functions in the computer languages most likely to be affected: COBOL (a business language), PL/1, Visual Basic C, and MVS LE.
For those who don't grasp the origins of this mess: decades ago, when programming code was tight, it was common practice to use two-digit storage (e.g. 69 for the year 1969) for date code within software. The earliest computer programmers had so little memory to work with that any trick for saving two bits was worthwhile. The chances that a year entered into records would need to begin with anything other than "19," seemed to unlikely that dropping the century digits was adopted as a memory-saving method.
As computers became more powerful, this abbreviated dating convention continued to be the standard, mostly out of habit.
In l950, asks Shakespeare, "who was even worried about how computers would handle data in 2050?"
But when the clock rolls over at midnight on the last day of December, l999, many of these older computers won't recognize "00" as the correct date. How odd in the Digital Age that poorly designed computer programs won't be able to handle the transition to the next century. The (Y2K) dilemma might render applications and hardware ineffective unless the original code is altered, an expensive, time-consuming but urgently necessary task. This is not merely an American, but a global problem. As politicians and Wall Street analysts like to remind us daily, we live in a global economy whose infrastructure literally is computer networks.
Small Year 2000 errors are already occurring, says "Year 2000." A computer program recently determined that a prisoner's release date, 1/10/15, had passed and he was almost released after serving only a few days. New York Stock Exchange executives want to close on the 31st of December in l999, because NYSE managers fear that all prior dealings could somehow be accidentally invalidated due to Year-2000 computer errors. Malfunctioning programs could cause businesses to lose track of critical systems that affect both production and cash flow.
For organizations and institutions in the healthy and public safety areas, Y2K problems could be life-threatening. Lawyers and firms are already cranking up in preparation for all sorts of litigation, as companies and governments try and pin blame and responsibility on someone. And it will be tough for companies to argue that they weren't warned or didn't have time to prepare.
There is widespread disagreement about just how urgent and dangerous the Y2K problems will prove to be. Some warn of the collapse of power and utility systems, along with banking and other financial operations. I know sober and knowledgeable computer programmers and engineers who say they won't fly on the last day of December in case air traffic control systems fail, and who plan to set aside cash in case banks shut down.
Plenty of other knowledgeable computer experts ridicule these alarms and insist that the disruptions will be numerous but minor. Meanwhile, engineers and programmers are making a fortune helping government agencies and corporations scramble to get their programs in order.
For most Americans, it's all as disturbing as it is bewildering.
Clearly, some of these fears are real. Many computer programs still aren't ready to handle the transition from l999 to 2000. Not only are most computers and applications suspect, but electromechanical equipment, networking and process-control hardware and operating systems could also be affected. Unless all such systems are checked and converted, there could be global repercussions.
While most banks, utilities and government agencies are working to update their programs and applications, nobody really knows how companies or countries -- especially outside of the United States and Europe - haven't, or how their problems might affect a world of networked computing systems.
"Year 2000" is sober and clear-headed. The book doesn't warn of apocalyptic disasters so much as smaller problems: the point-of-sale terminal at the counter of your favorite diner won't print a receipt; the gas pump won't work because the date set by the company's back-office computer is invalid; the parking gate at work won't function because its logic has been reset; elevator buttons all flash simultaneously since routine service appears a century overdue. And operating systems on computers fail to work because of network failures sparked by invalid dates. When you call your Help Desk, the phone may not accept your code because it automatically expires extensions that haven't been used for a year or more.
This book suggests that Y2K problems will be greater than most Americans think, yet fall well short of media-invoked notions of Armageddon. And Shakespeare reminds us that in our litigious culture, the biggest costs might be legal bills.
"The actual cost of achieving Year-2000 compliance will go far beyond analysis and conversion costs," says Shakespeare. "Production delays, reduced market share due to poor PR and media reports, and the loss of profitability or important data will all affect companies. Once the dust has settled and everyone is compliant, another ugly chapter will unfold: the search for culprits within companies, and the search for corporate accountability by shareholders and victims of accidents or other losses."
According to "Year 2000", the U.S. government is budgeting $30 billion for conversion, and Fortune 500 corporations have earmarked between $20 million and $200 million. That's excluding, in most cases, the cost of litigation, which without some form of government intervention, could exceed that of conversion. Government figures suggest that only 30 per cent of small to medium size companies (those with between five and 100 staffers) will be even close to compliance by the big day.
Small wonder Americans are increasingly coming to associate the Millenium with still more computer troubles instead of more symbolic and ultimately, much more significant, issues.
This, Winner suggests, has a hidden and poignant irony. Our culture has become so slavishly dependent on digital technology that it is increasingly unwilling to face any technological issue other than Y2K.
"Among the issues that cry out for attention as a new era dawns is the widening gap of inequality that characterizes the world's population, " he writes. "Our much heralded global economy has been good at producing a handful of millionaires and billionaires, but a third of the earth's people live in grinding poverty.
"While we're at it," Winner suggests, "why not tackle some of the 'bugs' that threaten the environment that we hand to our children? How about fixing the technologies that spew millions of tons of CO2 into the air each day, exacerbating global warming? How about replacing the systems that pour toxic chemicals into the air, water and land, slowly poisoning human populations and other species?"
Winner is right, but he needn't hold his breath if he thinks journalism will suddenly start covering technology in this more detached and thoughtful way. Like other scholars of technology, he guesses that if enough time, money and effort are invested this year, most of our computers will actually remember that a new Millenium has arrived.
It's the humans that might forget.
You can buy this book at Computer Literacy and help Slashdot out.
-
Review:Effective C++ CD-ROM
A name that all the book reviewers know SEGV has sent in a review of Scott Meyers' CD work Effective C++ CD. This is a stray from our normal book reviews, but figured people would appreciate seeing Scott Meyers' newest effort. Effective C++ CD author Scott Meyers pages publisher Addison Wesley rating 10 reviewer SEGV ISBN 0-201-60615-1 summary More than the sum of its hardcopy contents, this electronic resource earns a place on the programmer's bookshelf.What to Expect?
I wasn't sure exactly what to expect. Subtitled "85 Specific Ways to Improve Your Programs and Designs," I knew this CD was an electronic version of Scott Meyers' already-published books, which I had previously reviewed for Slashdot:
So I knew a priori that the content was excellent, but how would it be packaged and presented? Would it be Windows-only, forcing me to use it only at work as I run Linux at home? Would it be awkward to read onscreen? Would it be easily searchable? Could I annotate and print portions of it?
A Pleasant Surprise
I was pleasantly surprised when the package contained only a CDROM with these instructions printed on it:
To start, open INDEX.HTM
System requirements: Netscape Navigator 4.0+ (on Unix, Mac, or Win32) or Microsoft Internet Explorer 4.0+ (on Win32 only).So far so good! I had no problems using the CD with Communicator 4.5 on NT 4.0, and Communicator 4.04 on Debian GNU/Linux 2.0. Pretty much any modern browser with Java and JavaScript support should work. If you experience browser problems, the publisher provides helpful advice.
Initial Impressions
The CD has a nice look and feel to it. A navigation area is always present, acting as a control and providing a colour indication of where you are in the CD.
The text is decent to read and is true HTML, not merely raw text. It seems Meyers is conscious of the fact that an electronic version must add value to complement a printed version, otherwise it is not useful for its target audience.
Overall, I'd say this offering is a well though out and put together product, and not just a cheap knock-off.
Content
The CD (which itself has a printing number) contains the latest printings of the two books. It also boasts five magazine articles chosen by Meyers to augment the material in the books:
- "Exception Handling: A False Sense of Security" by Tom Cargill, from C++ Report Nov-Dec 1994.
- "Coping With Exceptions" by Jack W. Reeves, from C++ Report Mar 1996.
- "Exception-Safe Generic Containers" by Herb Sutter, from C++ Report Sep 1997, Nov-Dec 1997.
- "Counting Objects in C++" by Scott Meyers, from C/C++ Users Journal Apr 1998.
- "A First Look at C++ Program Analyzers" by Scott Meyers and Martin Klaus, from Dr. Dobb's Journal Feb 1997.
The first three are highly recommended for anyone dealing with exceptions. And of course, since any function may throw an exception, that means anyone writing C++! The object counting article elaborates on an idea from Effective C++ Item 14, illustrating some subtle language issues along the way. The final article outlines the state of the art in commercial static C++ analysis tools in September 1996.
Hyperlinks
The CD has links everywhere. Let me repeat: everywhere. In addition to hyperlinking existing references, Meyers added many cross references to the books and articles to further solidify the material.
Links to the internet at large are redirected through Addison Wesley Longman's online site so that they may stay current. And every single paragraph on the CD is anchored and hyperlinked, to facilitate electronic referencing and bookmarking.
Search Facilities
The CD provides two alternatives to your browser's "find in page" search facility. The first is a comprehensive merged index of the two books. The second is a search applet, modified from the Design Patterns CD search applet. It displays the resulting hits, with their enclosing paragraph for context if you select it. I found it easy to scan through hits until I found an interesting paragraph, then to jump to that document.
Although the search applet is aware of the entire CD, it appears that it can search only for one keyword. I'd really prefer more sophisticated search string options, such as multiple keywords, boolean operations, and perhaps even full regular expressions.
Configuration Facilities
For a set of web pages, the CD is impressively configurable. You can choose between five navigation area sizes, and five image sizes. You can view the books by item, by chapter, or in their entirety. And of course you can change text size in your browser.
Performance and Licensing
To implement the configurability options, there are actually five copies of each image and three copies of each book on the CD. Still, the total data size is a mere 16MB, which easily fits on a hard drive for greater performance and frees a CDROM drive for other use. This is also important because, given technology, actually altering the HTML files is really the only viable way of annotating the CD.
The CD comes with a single user license. You must contact the publisher for additional network license options. The short story is: you can make the CD available on a non-internet-accessible server to as many users as you have licenses, and you can purchase additional network licenses more cheaply the more you buy.
Summary
I've been using the CD both at work and at home for a couple of weeks, and I continue to find it a valuable resource. It easily subs in for my absent printed books, although of course I can't use it without a computer. The articles are useful, and the index and search applet allow me to quickly find what I am looking for.
Really, I have only three complaints:
- the search applet is somewhat limited
- there could be more magazine articles
- Scott's author photo is starting to look less like Eddie Van Halen and more like Gene Simmons
However, I don't think any of those detracts from the CD enough to reduce its 10/10 rating. In the worst case, since the CD is composed of text HTML files, you could apply other search utilities (eg, grep) to it.
The CD's online site has a demo, which I recommend trying if you want to get a feel for the CD before you purchase it. In addition to the general look and feel, navigation area, and search applet, it includes all of the magazine articles and a few of the books' items.
I'm happy with the CD, and recommend it as a professional resource.
To pick this up and help Slashdot, head over to Computer Literacy.
TABLE OF CONTENTS
Introduction
Effective C++ Second Edition
More Effective C++
Magazine Articles
Search the CD