Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Dr.Dobb's journal.2005.12

.PDF
Скачиваний:
25
Добавлен:
23.08.2013
Размер:
9.06 Mб
Скачать

E M B E D D E D S P A C E

Linux

Symposium 2005

Ed Nisley

symposium (plural: symposia)

1.A conference or other meeting for discussion of a topic, especially one in which the participants make presentations

2.(in ancient Greece) a drinking party, especially one with intellectual discussion

—Wiktionary

The 7th Annual Linux Symposium took place in Ottawa. In addition to formal presentations and tutorials, informal Birds of a Feather Sessions covered specific topics of interest to small

groups.

Unlike larger trade conferences, the Linux Symposium (LS) has no exhibit floor, no commercial presence, and no hustle. This makes for a much smaller and quieter show, as the attendees come for education rather than entertainment. Well, at least during the day, as the WhiskeyPurchasers BoFS met every evening.

I was impressed by the intensity of the presentations and eventually figured out what’s different. Unlike some speakers at commercial conferences, these folks haven’t been picked for their speaking ability or stage presence. They speak from deep, first-hand knowledge, rather than reciting bullet items generated by someone else. In fact, they may be the “center of competence” for one particular part of the Linux system.

The audience also carries knowledge and interest that transcends language barriers. A question from the ranks often triggered an esoteric discussion between people who obviously spoke English as a

Ed’s an EE, PE, and author in Poughkeepsie, NY. Contact him at ed.nisley@ieee

.org with “Dr Dobbs” in the subject to avoid spam filters.

second or third or fourth language, but who had no trouble at all communicating.

It was refreshing, to say the least.

The Big Picture

The single most significant thing I observed throughout all four days was that Big Business is now pushing Linux development hard. Perhaps the best indication of that can be seen in the companies employing the presenters.

To judge from the 53 Linux Symposium speaker biographical sketches, IBM sent 17 speakers, Intel 8, HP 3, Red Hat 3, and other Linux distros about 10. Yes, half the speakers work at various IBM, Intel, and HP locations around the globe.

In contrast, the 43 speakers at the 2nd Annual Linux Symposium in 2000 came from smaller operations. LinuxCare sent 7, Red Hat 5, VALinux 4, ZeroKnowledge 3. On the big-company end, IBM and HP sent one speaker apiece.

As you might expect, big-company programmers work on big-company problems. That’s not to say the rest of us don’t benefit from the work, but you probably don’t do a lot of memory hot-plugging, either. The era of the lone, unsupported coder seems to be drawing to an end, if only because increasing complexity requires a team of experts. In fact, mere mortals can’t afford the gargantuan hardware that exercises the new features.

Of those 53 speakers, about 38 gave talks on kernel or system topics. The remaining presentations covered a wide variety of business, application, and embedded topics. The Linux kernel and its infrastructure are undergoing heavy development, with extensions in a number of useful directions.

Shrinking the Large

Given that many of the LS papers deal with large-scale kernel topics, what’s in it for embedded systems? Jonathan Corbet (Linux Weekly News) said it best in his keynote address: “Today’s big iron is tomorrow’s laptop.” As we’ve seen, today’s laptop becomes next week’s embedded system.

The majority of embedded systems run 8-bit microcontrollers that simply lack the moxie for Linux. The small slice of the market that can afford the megabytes of memory and megahertz of speed required to run a complex operating system currently supports a mix of commercial RTOS and Linux vendors, plus the usual homegrown solutions.

Within that slice, commercial RTOS vendors continue to hold their own in those projects requiring software behavior certified to specific safety and operational standards. Most systems don’t require that level of certification, however, providing a perfect entrée for Linux. As nearly as I can tell from the few numbers I’ve seen, the growth rate for embedded Linux is far higher than anything else and the absolute usage is at least approaching that of traditional RTOS designs.

Although it’s an oversimplification to say that any gadget that can run Linux will run Linux, that’s probably not far from the truth. The Consumer Electronics Linux Forum exhibited several such trinkets at its CELF BoFS, including a minuscule mobile phone camera. Problems remain with memory footprint, power consumption, and real-time performance. The examples showed that good-enough solutions are available now and better ones are pending.

http://www.ddj.com

Dr. Dobb’s Journal, December 2005

79

Suresh Siddha (Intel) described the changes required for a “Chip Multi Processing Aware Linux Kernel Scheduler.” The current scheduler ably wrings maximum performance from multiple separate CPUs, but lacks the information to meet other goals that will become critical in the giga-transistor CPUs now looming over the horizon.

Up to this point, maximum-performance scheduling simply meant keeping each CPU busy while the hardware sorts out nuances such as cache contention and bus bandwidth. That works well for CPUs optimized for single-instruction-stream processing.

Although Intel’s Hyper-Threading technology made one physical CPU look like a pair of CPUs sharing one memory interface, memory contention could affect overall performance. When Intel’s Pentium roadmap imploded due to terrible power-versus-performance numbers, the ensuing multicore CPUs vastly complicated the memory interfaces. System boards with multiple chips, each with multiple CPU cores, each capable of multithreaded execution, can have spectacular performance, if only we figure out how to take advantage of it.

A multicored, multithreaded gaggle of CPUs can achieve high throughput with a slower clock, simply because more results emerge per tick. That’s assuming enough memory bandwidth to keep the pipes full, software amenable to parallel execution, and a scheduler competent to orchestrate the whole affair. What’s new and different is the requirement to simultaneously minimize power consumption for a given software-performance level, with the upper power limit and the lower performance limit chosen on the fly.

Power consumption in CMOS circuits varies almost linearly with the hardware clock speed, so slowing a core’s clock linearly reduces its power consumption, shutting off the clock to unused hardware helps, and stopping a core drops its power consumption nearly to zero. Unfortunately, the vagaries of chip design may force different cores to share a single power source. The lowest overall power may therefore require clocking a single core at top speed, slow-clocking two cores sharing a power source, or some even more bizarre combination. The rules depend on the exact chip, so the scheduler must use deep hardware knowledge that’s currently unavailable.

The eventual solution will involve percolating power and clock rules up to the scheduler so that it can determine the cost of various policies, rather than simply keeping all of the hardware busy all the time.

Although this talk concerned Intel CPUs, various DSP and embedded-processor

vendors have introduced multicore chips in the last year or so. Most of these appear in applications that require both high performance and low power, so the trend is clear: The end of single-threaded CPU hardware is at hand. It’s not clear just how many embedded applications can realize a major performance boost from hardware multiprocessing, but maybe yours will.

Getting It Right

When the Linux kernel was the exclusive domain of enthusiasts, reliability and stability were less important than bare functionality. Big businesses with the Linux kernel at the core of their operation have begun placing major emphasis on getting the bugs out of both existing code and new functions.

Rusty Russel (IBM) described “nfsim: Untested Code Is Buggy Code.” The project resurrected the netfilter test suite from the bitrot morass, created a more comprehensive test-case collection, and rebuilt the testing environment. The netfilter code manages the kernel’s network interface by massaging incoming and outgoing packets, so this code is at the heart of any networked system.

The nfsim program allows “netfilter developers to build, run, and test code without having to touch a real network, or having superuser privileges.” In effect, nfsim is a virtual environment running actual kernel code with the ability to inject errors into simulated network traffic and observe the results. It is now feasible to test error paths in a way that simply isn’t possible on a real network.

Injecting and tracking errors is expensive, turning a five-second mainline test run into a 44-minute exhaustive-error marathon. While developing the simulator and the test cases, they also flushed many longstanding bugs out of the netfilter code. In fact, one run using Valgrind to verify their own memory-allocation code lasted 18.5 hours, but exposed a kernel bug.

Despite testing all the error paths, the total test coverage hovers around 65 percent. The tested code includes otherwise untestable paths as well as mainline code and provides considerable confidence that actual errors will be reported correctly.

The programmers observe that any code lacking test cases almost certainly has errors, while noting that “developers have a certain antipathy to testing.” What’s needed is a change in mindset and they hope nfsim will provide an example of how to go about getting the job done.

Hardware drivers form a particularly sore point for testing and verification. The central problem is that Linux supports a tremendous amount of hardware that doesn’t exist in any one place. A devel-

oper working with, say, a new SCSI driver simply cannot test any existing code for Other People’s Hardware. As a result, old code suffers bitrot that may not be seen until the single organization owning that hardware installs the new code.

You can see a certain circular pattern lying in wait, can’t you? The only solutions seem to be heaving out truly obsolete hardware features and simplifying the remaining code to the point where it must work. That Quixotic process is ongoing.

Embedded Machinations

The new verb “to brick” has been making the rounds, referring to a flash-memory update rendering a device unbootable, whether due to a power failure or a firmware error. Gilad Ben-Yossef (from Codefidence, as in “Code Confidence”) described cfgsh, a shell environment designed for safe in-the-field flash memory updates.

It seems that embedded-system designers take the path of least resistance when planning update procedures. UNIX expatriates tend to manually untar archives and twiddle rc files, a process inevitably leading to completely inconsistent and undocumented firmware states, the bane of tech-support desks everywhere. RTOS veterans produce each firmware build as a huge binary lump, with any subsequent changes applied as a delta to the unpacked files. Regardless of the technique, an untimely reset can trash the firmware and leave the system unbootable: a brick.

The cfgsh firmware automates the update process by completely configuring the new firmware, then flipping from the old firmware to the new in a single atomic operation. It also gracefully handles the case of continuous reboots or hangs due to firmware errors. In short, even if you think you can do this stuff yourself, read the paper to discover several failure modes you didn’t consider.

Keith Packard (of HP, but probably no relation) described TWIN, a 100-KB Tiny WINdowing system that replaces the 4–5 MB X Window system, in a talk that I couldn’t attend. TWIN is designed for “subPDA” devices such as phones and a cute distributed computer node in use at HP Cambridge. The secret to size reduction lies in a relentless concentration on not including every bell and whistle found useful in the last four decades of graphics research.

Chasing the Kernel

Dave Jones (Red Hat) presented the final keynote address on the need for better kernel bug reporting and testing, observing that, although the Linux kernel has an enviable reputation for continuity, it’s certainly not error free. Perhaps the fundamental

80

Dr. Dobb’s Journal, December 2005

http://www.ddj.com

ActiveX & VCL
Also Available

problem is that kernels can’t be tested under real-world conditions until they’re released for general use, but for some unknown reason, nobody wants to run development kernels on production machines.

Version-to-version kernel stability and backwards compatibility is pretty much ruled out by the Linux kernel development methodology, which is the main reason the kernel now accommodates such a wide range of hardware. However, internal great leaps also affect external interfaces, which poses a considerable problem for applications with projected lifetimes longer than Linux has been around.

The best advice I’ve read is that embedded systems developers using the Linux kernel must break a long-standing habit by not keeping up with the latest kernel changes. Regardless of how nifty a new feature might be or which bug got squashed, you must learn to ignore those changes if they don’t affect your application. Of course, that means you must track and evaluate all kernel changes. But you were doing that anyway, right?

Reentry Checklist

The Linux Symposium differs from commercial conferences in another regard: You

can freely fetch the proceedings as PDF files from http://www.linuxsymposium

.org/2005/.

“A multicored, multithreaded gaggle of CPUs can achieve high throughput with a slower clock”

You can look up odd words in Wiktionary, a multilingual dictionary at http:// www.wiktionary.org/. If that’s too tame, try http://www.urbandictionary.com/.

Ottawa also hosted a related pair of two-day Linux conferences prior to the LS: the Kernel Summit and the Desktop Conference. The former, a small invitationonly event for kernel developers, gathered key folks together in one place at

one time for the sort of discussion, planning, and schmoozing you can’t do electronically. The latter concentrated on issues relevant to application development for the desktop, with a smattering of kernel issues. I didn’t attend either meeting, but you can read more at http:// lwn.net/Articles/143649/ and http://www

.desktopcon.org/.

A comprehensive comparison of Windows and Linux metrics, including some embedded OS design estimation, is at http:// www.dwheeler.com/oss_fs_why.html.

The Valgrind project may be just what you need to get bugs out of your own code. It’s named after the entrance to Valhalla, pronounced “valgrinned,” and found at http://www.valgrind.org/.

Subscribe to the Linux Kernel Mailing List at http://lkml.org/.

Reader Motti Shimoni sends in a plea for you to turn off your monitor. He works in a huge corporation that does third shift remote updates, so all PCs must be left on overnight. It seems everyone also leaves the monitor on and nobody uses screensavers with display power management. Maybe that corporation lacks a clue, but yours shouldn’t: Turn on power management and turn off the monitors, okay?

DDJ

I/O Controls

High-Speed for Real-Time applicationsBuilt-In custom Property Editors

Automatic and Custom Sizing. No Restrictive BitmapsLook and Feel of Real Hardware

Includes : Switches, Gauges, Sliders, Led’s, Led Bar, Led Spiral, Integer/Binary/Hexadecimal Displays, Tanks, Valves, Motors, LCD Matrix, Spectrum Display, Percent and Pie Graph, Odometers, Analog Clock, Image Display, Rotation Display, and Mode Combo Box.

Plot Control

High-Speed for Real-Time applicationsUnlimited Number of Channels & AxesFull Customizable External Toolbar

Legends, Tables, Limits, Labels, Annotations, CursorsGradient Backgrounds

Log Files and Data Export and Import

Save images to BMP, PNG, JPEG, TIF, GIF and EMF

Many built in channel types : Tracy, Trace-XY, Bar, Bubble, Fill, Bi-Fill, Digital, Differential and Sweep Interval (EKG)

Std Pack

Pro Pack

Plot Pack

Ultra Pack

.Net

.Net

.Net

.Net

 

ActiveX & VCL

 

ActiveX & VCL

28 Controls

Also Available

55 Controls

Also Available

 

 

Basic I/O Controls

 

Basic & Advanced I/O Controls

Single Developer

: $559

Single Developer

: $1099

Additional Developer : $189

Additional Developer : $379

Plotting : Scientific, Engineering, Strip-Chart, Digital, EKG, and more...

Single Developer

: $859

Additional Developer : $289

 

ActiveX & VCL

56 Controls

Also Available

 

Basic & Advanced I/O Controls plus Plotting

Single Developer

: $1699

Additional Developer

: $579

www.iocomp.com

888-599-2929

+1-407-226-3456

7081 Grand National Drive Suite 112, Orlando, FL 32819

http://www.ddj.com

Dr. Dobb’s Journal, December 2005

81

C H A O S M A N O R

Windows Vista:

First Impressions

Jerry Pournelle

We’ve installed Longhorn. Microsoft insists we call it Windows Vista, but most of the information screens still call it Longhorn. I

have been told there will be seven versions of Vista when it is released. Phrases come to mind, such as the Seven Pillars of Vista, Seven Dancing Vista Masters…

Installation beta proceeded smoothly. Our only problems were with hardware. We installed this on the test machine that had been running 64-bit Windows, and alas, that machine had been mined for memory and some other parts, and had to be reassembled. Then one of our highspeed video cards developed a fatal error. The card is fine, but the chip fan on the video board died, and it takes only seconds before the card ceases to output coherent video without the fan. I’ll replace the fan, but for now we have replaced the video board. Once we had a stable system, there were no further problems.

We let the new OS reformat the hard drive, which is a pair of Seagate Serial ATA 160-GB Barracuda drives. The formatting took about 10 seconds, so clearly it employed fast format, not the more thorough formatting that inspects the drive surface. We were not offered that option; I presume that will be built into the installer in the final versions.

After that, installation was normal, except for drivers. Our first trip was to the Windows Update site, where we were told that this site doesn’t support Longhorn systems. Then we went to nVidia where we got the very latest beta Vista drivers; the “very latest” don’t work and produced one of our system crashes. Doing a rollback in Vista got the video system working but with an amusing (amusing now, infuriating at the time) quirk I’ll tell you about later. Going to the motherboard site got us the latest Ethernet card drivers, but note that we were able to get on the Internet immediately with the generic drivers that came with Longhorn. Nvidia’s Vista beta sound drivers installed without problems, and in less than

Jerry is a science-fiction writer and senior contributing editor to BYTE.com. You can contact him at jerryp@jerrypournelle.com.

an hour from when we began we had an operating Longhorn system.

When it came time to name the system, I called it “Servilia” for no particular reason — it’s not a server. The name came to me from the HBO series Rome, which, incidentally, I like quite a lot.

I began playing around with Longhorn, and discovered to my horror that there was no “Start” button. That got me spending time learning things, such as that the F3 key brings up interesting search windows that don’t work quite the way you expect them to. Eventually, I was able to open a “Computer” window (having fruitlessly searched for “My Computer”) and use that to find some other programs, but nary a “Start.” This was first amusing, then frustrating, finally infuriating.

About then Chaos Manor Associate Dan Spisak came over and experimented until he discovered that Vista was both displaying the wrong screen resolution and rendering that resolution incorrectly. This had the effect that the system thought the Start menu was on another screen when in fact it wasn’t displaying on the only screen. Once this was fixed I had a normal Windows Vista to play with — there really is a Start button, as you would expect — and I fooled around with it for a few hours.

My initial impression is that I am going to like Windows Vista a lot.

Remember, It’s Beta

Having said that, let me warn you: This is very much a beta. We have managed to crash it several times, including at least one blue screen from which no recovery was possible short of turning off the system. We have also had crashes that took out the current processes but left the rest of the operating system intact. We have had instances in which processes simply could not be killed short of reboot. You would be wise to install beta Vista on a system whose contents you don’t care much about so that you can test the applications you use frequently without fear of data loss.

Much of the user interface is unfinished. As an example, the wizard for connect-

ing a Longhorn system (again, Microsoft calls it Vista, but most of the internal information screens talk about Longhorn) to an Active Directory Microsoft Windows Network does not work, nor do a couple of other approaches to this elementary task; but once you cotton on to using the old-fashioned approach of right click on My Computer, Properties, Computer Name, and going on from there, connection to a network is quite painless and the networking works smoothly and swiftly. Of course, you need to know that My Computer is now just “Computer,” but you’ll discover that soon enough.

And, of course, it’s still sometimes “My Computer” in some of the help documents, and if you go into various System Tools it’s “My Computer,” but we can be certain that Microsoft will clean up all that gubbage long before this becomes a release candidate, let alone before it gets out to the public, just as we can be sure they will put in all the help files. At the moment it can be disconcerting to find a help topic only to discover that the file consists of a placeholder and a promise to have an actual help file later.

In a word: It’s a beta, and you would have to be mad to entrust any critical operations to it. On the other hand, it’s different enough from Windows XP that large establishments will probably want to get it running for at least one guru to play with, because I have a feeling this is going to be pretty popular when it finally comes out.

Random Observations

This is very much a first look, and I can’t do more than give impressions. I’ll have more in future columns.

Drivers and peripherals work. After we had the system running, I installed a Plextor PX716A DVD Read/Write drive. The system recognized it instantly, and it’s ready to read and write DVDs. Nero 6 installs and runs properly, or you can use the builtin Microsoft Windows capability.

Our initial system has “only” 512 MB of Kingston PC3200 DDR-SDRAM. Microsoft recommends 512 MB minimum, but for our tests this seemed to be plenty. There

82

Dr. Dobb’s Journal, December 2005

http://www.ddj.com

are three memory slots on the motherboard, and we expect to put in two Kingston 1-GB PC3200 DDR-SDRAM memory cards for a total of 2.5 GB, but I don’t have the new memory yet. With only 512 MB, the user interface is crisp and reasonably intuitive.

Microsoft recommends a minimum of 1 GB for 64-bit Vista, with 2 GB recommended. Memory is cheap, and that’s just as well. Programmers will add features and expand requirements to use all the memory you can give them. That’s often a criticism, but in fact it can be a good thing. Code kludges to save memory have led to some notorious bugs.

We don’t know just how much of the Longhorn Aero feature set has been incorporated into the beta; so far nothing spectacular beyond semitransparent windows (the transparency is adjustable, and works almost exactly like the transparency settings of dialogue and command windows in Everquest II).

Vista is pretty cool. Of course, in the coolness department, it’s playing catch-up with Mac OS X 10.4 Tiger, which is not only cool but also stable and shipping. It’s also playing a bit of catch-up to desktop Linux, as Bob Thompson points out. KDE already has much, if not all, of the Vista eye candy, and Reiser4 has a filesystem better than what we expect Vista to ship with. For most of its life Microsoft has always run scared. That is in Bill Gates’ nature, and of course he was one of the few people to not only understand the implications of Moore’s Law, but to act on them. Most of Microsoft’s success has been due to anticipating hardware gains, which led to the philosophy of “ship it soon; the hardware will bail you out.”

The big attractiveness of Vista will be its Windows applications compatibility, better search and file-organizing capabilities, and vastly improved security. Mac users can point out that except for the Windows applications compatibility, they already have all that, and for that matter, Macs run a perfectly good version of Microsoft Office that will create files you can open in Windows or Mac systems.

I decline to get into that battle. I like small computers, I’ve always had at least one good Apple system, and if Apple made a good TabletPC, I’d seriously consider going over to the Mac just because on the Mac everything is either very easy or impossible (and with OS X 10.4 much of the impossible becomes merely as difficult as nearly everything is with Windows). Having said that, I also have to say that I am used to Windows. It’s familiar and easy enough for me to use — the difficulties come when I am trying to explain to someone else how I do something— and I haven’t had a security problem for

more than 10 years. And Windows has two big things going for it — games, particularly massive multiplayer online role playing games (Everquest II if you must know), and TabletPC OS and OneNote.

A Mirra Report

Mirra (http://www.mirra.com/) is a Linuxbased backup server system, based on reports from a reliable reader who had installed it in his clinic. I now have the Mirra system in place, and I can say it works very much as described.

“My initial impression is that I am going to like Windows

Vista a lot”

Installation is simple with one problem — the instructions tell you to wait for an orange light. Either that’s wrong, or the orange LED on my Mirra system is defective. This turns out to be unimportant because the orange light is simply a signal that certain operations have been completed, and there are many alternative ways to determine that.

The beauty of the Mirra backup system is that, once it is in place and running, you never need think about it. We have in fact tested its capability to restore some crucial data files, and it works exactly as advertised. Other than that, I often forget that Mirra is here at all. It sits back in the cable room and sucks in data from four different networked machines, and It Just Works.

In particular, Mirra grabs the open outlook.pst file from Anastasia, my main communications workstation. Of course, that file is huge and changes all the time, so Mirra is often well behind; but because it is not overwriting its previous backup, there is always a more or less up-to-date backup file, and eventually there will be a quiet enough period that Mirra can catch up on my 2-GB outlook.pst file.

There is one glitch. Mirra believes that the Chaosmanor web folder where I keep the working files for The View From Chaos Manor (http://www.jerrypournelle.com/) holds system files. Nothing I can do manipulating file attributes can disabuse Mirra of that notion, and it will not attempt

to backup anything in its contents. Now by its very nature, a web source file has a backup out on the web server, but this inability is annoying. I have reported it to the Mirra people and they say the next revision of their software will fix this problem. In the meantime, I run xcopy from a command line with the /e/s/d/y switches to copy the Chaosmanor folder off to our “box of drives” backup storage box.

I know there are many Linux-based backup systems, and several readers have written to recommend theirs. I have tried to open communications with some of those companies, but so far to no avail. Meanwhile, I know the Mirra system works as advertised with the one glitch about thinking that webs are system files. It’s the simplest and most easily installed backup system I’ve run across. I have the 400-GB model, and I wonder if that’s too small, but it hasn’t proved to be. Recommended.

Winding Down

The game of the month is Microsoft’s Dungeon Siege II, which is an improvement over the already enjoyable Dungeon Siege I. You can play Dungeon Siege alone, in a LAN party with friends, or online with either friends or a pickup group, and it’s as good a way to while away an afternoon as any. My preference in online games remains Everquest II, but then I have a lot of time and energy invested in that. I used to like Star Wars Galaxies a lot but they kept tweaking it until it really wasn’t so much fun any longer, at least for me. In any event, you won’t regret getting Dungeon Siege II, although you may find yourself spending too much time investigating one more place; it’s very seductive that way.

There are two Computer Books of the Month. Maven: A Developer’s Notebook, by Vincent Massol and Timothy O’Brien (O’Reilly & Associates, 2005), is about the Maven Java “project comprehension tool” for building your project. Chances are if you don’t work on Java projects (and perhaps even if you do), you have never heard of Maven; which is one reason to look into this book, if only to see whether you ought to learn more.

Second is Brian Hook’s Write Portable Code: An Introduction To Developing Software for Multiple Platforms (No Starch Press, 2005). I am neither a user nor an admirer of any variant of C— I remain stubbornly convinced that strongly typed languages with range checking make for far better code with far less debugging— but experienced C users advise me that I will not go wrong by recommending this book.

DDJ

http://www.ddj.com

Dr. Dobb’s Journal, December 2005

83

Marketplace

Imageviewing.

Scrolling,Zooming,Panning

Readsandwritesallcommon rasterimageformatslike PDF,PICT,TIFF,JBIG,FPX,PCX,TGA, PSD,PBM,JPEG2000,...

Comprehensiveset of

imageprocessingoperations.

AutoContrast, AdaptiveThreshold,Hue,

EdgeDetection,Rotate,...

Imageannotations.Placepoints, lines,rectangles,polygons,text, circles,ellipsesorsmallsymbols ontheimage

EasilyintegrateTW AINimageacquisition

Affordable components for .NET, C#, VB, C++,ASP,Access.

THBComponentware

BREAKING NEWS:

2005 results are in!

Once again, when Evans Data Corporation fielded its annual Developer Marketing Patterns study and asked software developers to fill in the name of “THE BEST PRINT MAGAZINE TO LEARN ABOUT TOOLS AND NEW SOFTWARE TECHNOLOGIES,” they chose Dr. Dobb's Journal.

We at Dr. Dobb’s Journal would like to thank the developer community for choosing us as the best developer publication for the 3rd consecutive year!

www.thbcomponents.com Componentware

P R O G R A M M E R ’ S B O O K S H E L F

Six Books,

Seven Paragraphs

Gregory V. Wilson

Iam clearly obsolete. Not only do I prefer e-mail to instant messaging, I have a first and a last name, both spelled conventionally, and neither containing any nonalphabetic characters. Recycle me now. But while you’re waiting for the big green truck to arrive, have a look at 37signals’ Defensive Design for the Web. It (They? Pronouns have become so tricky) is/are a Chicago-based design firm, and this book is what they know about designing web sites that gracefully handle missing pages, out-of-stock items, and glitches in multistep registration processes. Its/their lean writing, clean layout, and carefully explained examples earned a double handful of yellow sticky notes, and

a “must read” recommendation.

Ian Langworth and chromatic-with-a- small-c’s Perl Testing is just as well written, but aimed at a much smaller audience. As the title suggests, its focus is how to test, and test with, Perl. There’s lots of good stuff here, and I particularly liked the organization: Each topic includes “How Do I Do That?”, “What Just Happened?”, and “What About…?” sections. However, you have to be a fairly strong Perl programmer to make sense of it all — I used to teach the language, but still found myself lost in the forest at least once a chapter.

Next up is Jared Richardson and William Gwaltney’s Ship It!, which is a “lite” version of Hunt and Thomas’s instant classic The Pragmatic Programmer, with bits and pieces of other Pragmatic books stirred in. (Fair notice: The Pragmatic Bookshelf published my last book, too.) Everything you’d expect is here, from the importance of version control and an automated build-and-test cycle, to “tracer bullet” development and advice on how to handle common problems. None of it is new, but it’s all good stuff that the world needs more of.

Greg is a DDJ contributing editor, and can be reached at gvwilson@ddj.com. His most recent book is Data Crunching: Solve Everyday Problems Using Java, Python, and More.

Defensive

Design for the Web

37signals,

Matthew Linderman, and Jason Fried

New Riders, 2004 246 pp., $24.95 ISBN 073571410X

Head First Servlets & JSP

Bryan Basham, Kathy Sierra, and Bert Bates

O’Reilly & Associates, 2004 886 pp., $44.95

ISBN 0596005407

DHTML Utopia: Modern Web Design Using JavaScript & Dom

Stuart Langridge

SitePoint, 2005 318 pp., $39.95 ISBN 0957921896

Perl Testing:

A Developer’s Notebook

Ian Langworth and chromatic

O’Reilly & Associates, 2005 180 pp., $29.95

ISBN 0596100922

Ship It! A Practical Guide to Successful Software Projects

Jared Richardson and

William Gwaltney Jr.

The Pragmatic Bookshelf, 2005 198 pp., $29.95

ISBN 0974514047

Spring Into Technical Writing for Engineers and Scientists

Barry J. Rosenberg

Addison-Wesley, 2005 352 pp., $29.99

ISBN 0131498630

The fourth book this month is Stuart Langridge’s DHTML Utopia. I picked it up primarily because of the “Covers Remote Scripting/AJAX” splodge on the front cover. While there’s actually less than a dozen

pages on that particular topic, the rest of the book was well worth reading. After a quick introduction to how dynamic HTML works, Langridge shows how to make pages come alive with JavaScript. Animation, form validation, and yes, the asynchronous client/server communication promised in the splodge are all here, carefully dissected and clearly explained. I particularly liked the way this book shows the whole of each code sample first, then repeats snippets while explaining how they work, instead of the other way around.

Bryan Basham et al.’s Head First Servlets & JSP is as thick as the previous four books are thin, but don’t let that stop you from buying it. At first (or even second) glance, the kung fu movie stills and art school layout make it look like a “for morons” title, but there’s a lot of hard-core technology in its almost 900 pages. The book covers all the topics in Sun’s Certified Web Component Developer exam: servlet configuration and lifecycle, custom tag development, a handful of design patterns (including Model-View-Controller), and a brief taste of the Struts framework. The book’s frenetic energy wore me out after a while, but I learned a lot from it, and my students (who are 20 years younger than me) have nothing but good things to say about it.

Finally this month is Barry Rosenberg’s

Spring Into Technical Writing for Engineers and Scientists. Rosenberg teaches the subject at MIT, and once you’re past the probably-worked-better-in-person jokes in the first couple of pages, it’s clear that this material is based on first-hand experience. The first major part of the book covers general principles of grammar, organization, and so on; the second analyzes particular kinds of documents — manuals, web sites, proposals, PowerPoint presentations, and so on — while the third describes the editing and production process. There’s a lot of crunch in this granola, and I’d recommend it to anyone with a thesis or a business plan to write.

DDJ

http://www.ddj.com

Dr. Dobb’s Journal, December 2005

85

The Advertiser Index

Visit Our Advertisers’

 

 

 

 

 

 

 

 

Web Sites Today!

 

 

 

 

 

 

 

ADVERTISERS’ NAME

PAGE #

ADVERTISERS’ NAME

PAGE #

ADVERTISERS’ NAME

PAGE #

 

 

 

 

 

 

Altova ............................................

2

LISA ‘05 ......................................

31

red-gate software ..........................

7

www.altova.com

 

www.usenix.org/lisa05/dja

 

www.red-gate.com

 

FairCom ........................................

6

Microsoft ................................

22-23

red-gate software ........................

48

www.faircom.com/go/index

 

www.microsoft.com/sql/2005

www.red-gate.com

 

Google ........................................

33

Microsoft ..................................

C2-1

SAP ..............................................

13

www.google.com/ddj

 

www.microsoft.com

 

sdn.sap.com

 

IBM ............................................

C4

MKS ..............................................

5

Scientific Toolworks......................

45

www.ibm.com/middleware/tools

www.mkssoftware.com

 

www.scitools.com

 

IEEE..............................................

29

Pegasus Imaging ..........................

59

Sparx Systems..............................

21

www.ieee.org/member2

 

www.pegasusimaging.com

 

www.sparxsystems.com

 

IMAGIX ........................................

65

Programmer’s Paradise ................

15

Sun Microsystems ..................

37-38

www.imagix.com

 

www.programmersparadise.com

www.sun.com/suntrademarks

 

Infragistics ..............................

46-47

Programmer’s Paradise ................

19

TechExcel ..................................

11

devcenter.infragistics.com

 

www.programmersparadise.com/intel

www.techexcel.com

 

Intel ............................................

17

QL2..............................................

58

TechExcel ..................................

25

www.intel.com/software/products

www.ql2.com

 

www.techexcel.com

 

InterSystems ..................................

9

Quest Software ............................

C3

TIBCO Software ......................

39-40

www.InterSystems.com/Cache12N

www.quest.com

 

www.tibco.com

 

Iocomp ........................................

81

Recursion Software ..................

26

WIBU ..........................................

43

www.iocomp.com

 

www.recursionsw.com/cinergi.htm

www.wibu.com

 

LEAD Technologies ......................

51

Recursion Software ..................

32

 

 

www.leadtools.com

 

www.recursionsw.com/cplus.htm

The index on this page is provided as a

 

 

 

 

service to our readers. The publisher does

 

 

 

 

not assume any liability for errors or

 

 

 

 

omissions.

 

 

 

 

 

 

 

Contact your Account Manager to discuss an ad campaign that best meets your advertising goals!

Visit www.ddj.com/ddj/adstaff.htm for contact information.

O F I N T E R E S T

Excel Software is starting MacTranslator OSX 1.0, a reengineering tool for generating graphic models of programming source code on Mac OS X computers. MacTranslator scans source code to extract design information that it outputs to a text file. That text is imported into the MacA&D modeling tool to automatically generate UML class models, structure charts, and rich data models. MacTranslator lets you generate accurate models of unfamiliar code in minutes. Through a mix of options and translation commands, MacTranslator can process over a hundred programming-language dialects of C, Pascal, Basic, Fortran, C++, Java, Object Pascal, Delphi, Objective-C, and SQL.

Excel Software

19 Misty Mesa Court

Placitas, NM 87043 505-771-3719 http://www.excelsoftware.com/

Xamlon’s Web lets you use C# or Visual Basic.NET in Visual Studio to build WinForms applications and deploy them directly to the Web without requiring the

.NET runtime system. The product includes complete integration with Visual Studio.NET, and lets you use existing APIs you are already familiar with, including WinForms, GDI+, and XML web services. Programs are written in Visual Studio, then, from Microsoft’s Intermediate Language bytecode, Xamlon creates compact Macromedia Flash (SWF) files. The resulting applications can be deployed anywhere Flash is installed, including Windows, Macintosh, Linux, and PDAs and cell phones. The .NET runtime is not required for deployment and the resulting application may be deployed to platforms where .NET is not even supported.

Xamlon Inc.

8899 University Center Lane, Suite 330 La Jolla, CA 92122

858-526-0704 http://www.xamlon.com/

Dekart has released Dekart Private Disk SDK, an SDK that lets you integrate on-the- fly encryption, disk-exclusive access, and other Private Disk capabilities into any application. Dekart Private Disk SDK includes everything you need to build security into new or existing publishing, health care, legal, financial, and other applications. With the Dekart “disk firewall” feature, you can ensure that applications have an exclusive access to the protected disk, thus providing the highest possible level of security. The integration of “disk firewall” allows developers to rest assured that all the intellectual property created with their applications will never be disclosed to any unauthorized third party. The API included in Dekart Private Disk SDK can be transparently integrated into existing programs, avoiding the need to rewrite the interface or the existing documentation.

Dekart, s.r.l. 75, Alba Iulia

MD2071, Chisinau Republic of Moldova 373-22-245580 http://www.dekart.com/

Franson Technology has released Franson CoordTrans 2.0, a tool for converting geographic coordinates. A coordinate from a GPS typically uses the WGS84 datum, but maps and many GIS applications use other coordinate systems like NAD83 and UTM. CoordTrans can be used to convert between virtually all coordinate systems on Earth. Franson CoordTrans converts single coordinates, large files of coordinates, and live coordinates from a GPS. A large database is included, which contains thousands of coordinate systems — data and grids — from all over the world. The coordinate systems are categorized by country and can also be found by free text search. Custom datums and grids can be defined.

Franson Technology

Arkovagen 45, Johanneshov 121 55 Stockholm, Sweden

46-8-612-50-70 http://franson.com/coordtrans/

Parasoft has released C++Test 6.5, an automated unit testing and coding standard analysis toolsuite that prevents the occurrence of software errors as they develop. C++Test 6.5 finds and resolves software errors in C/C++ code with enhancements to both code analysis and unit testing as well as increased platform and team support. With Parasoft C++Test 6.5, source code can now be validated against over 600 C/C++ coding standards and guidelines that reflect industry standard best practices in code design and constructionaffecting reliability, performance, main-

tainability, security, and compliance. A new RuleWizard Autocreator lets you easily create your own custom rules or guidelines by simply providing RuleWizard a sample of “bad code” as the guideline for automatic rule creation.

Parasoft

101 East Huntington Drive Monrovia, CA 91016 626-256-3680 http://www.parasoft.com/

Quinn-Curtis has released Java versions of its QCChart2D Charting and QCRTGraph Real-Time Graphics software tools. The software supports linear, logarithmic, time/date, and polar coordinate systems. Data plot types include static and dynamic plotting of line plots, bar graphs, scatter plots, dials, gauges, meters, clocks, annunciators, and panel meter indicators. Users are able to interact with charts: adding annotations, selecting, marking and moving data points, displaying data tooltips, and zooming into a particular chart region.

Quinn-Curtis

18 Hearthstone Drive

Medfield, MA 02052 508-359-6639 http://www.quinn-curtis.com/

SoftIntegration has announced availability of ChExcel Toolkit 1.0. Ch is an embeddable C/C++ interpreter for crossplatform scripting, 2D/3D plotting, numerical computing, shell programming, and embedded scripting. ChExcel is a Microsoft Excel add-in. It embeds Ch (a C/C++ Interpreter) into Excel using Embedded Ch. ChExcel lets users access Ch statements, functions, programs, toolkits, and packages from Excel spreadsheets and Visual Basic for Applications (VBA). With ChExcel, Excel spreadsheets can be manipulated through C/C++ scripts. The data can be easily exchanged between Ch and Excel.

SoftIntegration Inc.

216 F Street, #68

Davis, CA 95616 530-297-7398

http://www.softintegration.com/

DDJ

Dr. Dobb’s Software Tools Newsletter

What’s the fastest way of keeping up with new developer products and version updates? Dr. Dobb’s Software Tools e-mail newsletter, delivered once a month to your mailbox. This unique newsletter keeps you up-to-date on the latest in SDKs, libraries, components, compilers, and the like. To sign up now for this free service, go to http://www.ddj.com/maillists/.

http://www.ddj.com

Dr. Dobb’s Journal, December 2005

87

S W A I N E ’ S F L A M E S

Dead Software Walking

I’m sure some of you remember Randy Sutherland. Randy stopped by our place in September for a couple of days. On the first evening, we went out to eat; but on the second night, our restaurant was open, so Randy ordered the Epicurean Adventure. Very appropriate.

Randy was my right-hand guy when I was editor-in-chief of DDJ back in the early 1980s. He was first managing editor, then editor. He went on to other jobs, including a long stint at Cisco, where he made a ton of money before getting out with — or for — his sanity.

Randy’s always seemed eminently sane to me, but he’s a different kind of sane these days. I was getting e-mail diaries from him last year from remote locations that were always exotic and often downright dangerous-sounding, in North Africa and the Middle East, some of it reading like passages from The Sheltering Sky. So you can see why the Epicurean Adventure, or any adventure, would sound like his dish.

Randy’s visit, coupled with the impending 30th anniversary of this magazine and other events of this year, put me in a nostalgic mood.

Just the mood to mark the passage of a software company that was not just admired, but loved by many. Cyan has faded to black, gone white on white, been blue-penciled. It has fallen down the manhole, faded in the mist, seen the world beyond the mackerel, and has been riven from reality and exiled to the end of ages. It has been given an earth suit and sent to Headstone Park to curl up its toes and dance the horizontal tango.

It was in 1987, my last year of working in an office, when brothers Rand and Robyn Miller wrote Manhole, the first CD-ROM-based game and a new kind of electronic entertainment. Manhole and every subsequent game from their company, Cyan, was a hit, and every one pushed the limits in the creation of virtual worlds. The titles include Cosmic Osmo and the Worlds Beyond the Mackerel, Spelunx, Myst, Riven, and various Myst sequels.

The talented Miller brothers will continue to do creative work, probably in a variety of media, but their company ran out of money and came to an end in September of this year. With it disappears a gentle spirit that is lacking in most popular computer games today. Cyan will be missed.

The Miller brothers wrote Manhole in HyperCard, and used HyperCard to prototype later games. Some would say that HyperCard has also Gone to the Place where Grampa Lives, but that case is more complicated. It’s true that Apple no longer sells or supports or acknowledges HyperCard, but software doesn’t really die until all the hardware it can run on dies. Apple’s working on that.

HyperCard, also released in 1987, was a wonderful product, a development environment for ordinary users, almost a virtual computer on top of the Mac environment. It didn’t take a lot of time to learn the rudiments of HyperTalk, HyperCard’s scripting language, and start creating the miniapplications called “stacks.” Naive users could use stacks written by others, and a huge number of these quickly became available. HyperCard was a godsend to educators in particular.

HyperCard had its limitations: It was object based, not object oriented, and it was originally black and white only. But it could have been brought up to date, made to work under OS X, and if that had happened it would still be popular today. In fact, a small but significant number of people still use it, on old Macs or under the Classic environment.

Classic, however, will not run on the new Macintel machines. That would seem to spell the doom of HyperCard, but its fans are not giving up.

The most obvious thing to do would be to create a HyperCard clone. It’s been done before: SuperCard, Plus, ToolBook, MetaCard. And Edinburgh-based Revolution (Mike Markkula is an investor) has built on the MetaCard engine to create a powerful multiplatform HyperCard-like product. But it’s different enough from HyperCard that some stackheads are still hoping somehow to get HyperCard running on Macintel. A recent baroque proposal involved using Basilisk, a 68K Mac emulator. It makes my head hurt.

Michael Swaine editor-at-large mike@swaine.com

88

Dr. Dobb’s Journal, December 2005

http://www.ddj.com