Participation in Upcoming Conferences

Later this week (Thursday, September 23), I'll be at the Compuware OJX conference at the company headquarters in Detroit (disclaimer: I toil by day for Compuware, but am not paid to promote company products or services in this forum). Compuware offers an MDA modeling product for J2EE called OptimalJ, and this event is geared toward explaining and promoting the model-driven architecture. I'll be moderating an experts panel on the topic of "The Future of Java." There will be speakers on a variety of topics, and food and music at the end of the day. < color="#335588">http://www.compuwareojx.com.

Next week (September 27-29), I'll be participating in the Gartner Application Development Summit in Phoenix. This is the opportunity to hear a number of Gartner analysts speak on a wide variety of software development topics, including platforms, techniques, and management.

Last, on October 17-19, I'll be co-chair of Java Pro Live!, Fawcette Technical Publications' first conference promoting Java technologies and solutions across the application lifecycle. This will be at the Sheraton adjacent to the Hynes Convention Center in Boston. I'll write on this in detail in the next couple of weeks, but in the meantime, you can get more information at http://www.ftponline.com/conferences/javaprolive/. I hope to see you there.

Posted by Peter Varhol on 09/20/20040 comments


Testing is the New Debugging

I've gradually noticed that developers don't use debuggers much any more. It was a gradual sort of thing, even in my own occasional development activities. This got me to thinking about the shift we've experienced over the last several years to managed platforms, primarily Java and Microsoft .NET. They have changed a lot of behaviors, because most bugs in the past typically had something to do with memory allocations, references, and de-allocations.

(Of course, some of you might remember programming for DOS, when you also had to worry about small, medium, and large memory models, adding yet another layer of complexity to using and misusing memory).

Ten years ago, I spent possibly as much as half of my development time chasing down memory references. Today, I do occasionally think about the implications of my implementations on memory use, but I know things are going to work.

But even when they don't, I don't typically turn to a debugger. The debugger menu selection on my IDE remains ignored, even when I have problems getting something to work correctly. The debugger—which lets me set breakpoints, step through code line by line, and examine the value of variables—seems more and more like a sledgehammer attacking a thumbtack problem.

Instead, once I get something running, I'll write a quick unit test, and see what results it returns. From there, I might record code coverage to identify the code path used, and write a few more tests to narrow down the possible scope of the error. As a last resort, I might turn to the debugger to step through the code executed by a unit test to examine specific pieces of logic.

It's not that bugs have gone away with managed platforms. Instead, I've come to the conclusion that the debugger is simply less useful when the majority of your problems are logic errors, failure to consider a wide range of possible use cases, and flow-of-control errors. It's more useful to localize the error with small tests, collect information during these tests, and then drill down into that information to understand not only the error, but what led to it.

That is why I say that testing is the new debugging. The corollary of that is that any way to improve the process of writing and executing tests, evaluating the results, and collecting more detailed information during testing to enable the drill-down is an essential part of finding and diagnosing errors. There is still a role for traditional debugging, but it should take a back seat to an increased focus on testing. Managed platforms made a lot of coding practices more efficient, and testing can make debugging more efficient as well.

I talk about this topic in more detail in my column in the November issue of Java Pro.

Posted by Peter Varhol on 09/17/20040 comments


Subscribe on YouTube