Skip to main content

Exception Breakpoints

Posted by daniel on April 5, 2005 at 7:28 AM PDT

Flow control when developing

Exceptions are all about figuring out what happened when your program is not executing as expected. Tom Ball talks about the benefits of using exceptions when debugging in his post Exceptional Debugging
in today's href="http://weblogs.java.net"> Weblogs . For him, "The justification for exception breakpoints was simple: exceptions (should) indicate abnormal control flow in a program, and since we spend most of our time in debuggers figuring out why our programs are acting abnormally, there should be an easy way to halt whenever the program is indicating something worth investigating. "

Srikanth Shenoy kindly shares his experience in publishing the "Struts Survival Guide: Basics to Best Practices" in his blog entry Memoirs of Self Publishing. He takes you through the whole process from writing, to editing, through distribution.

John Reynolds advises you to Keep the objective in mind. He begins with an example from a construction projects and concludes "In our world of software development, simple directives are often overlooked. We often get lost in the minutiae and confuse details with objectives". He then narrows the discussion to the issue of whether JAXB should work with Fields or Properties. He doesn't care, but he suggests we keep the objective in mind. This, of course, requires that we first identify the objective.


In Also in
Java Today
, Kode Vicious warns that "One of the biggest problems when people use an object-oriented language is that when they realize how easy it is to create yet another class, they do." His recommendation is to start by taking smaller bites out of your problem (which he argues is better accomplished with a scripting language). In his response to a question about valid input he suggests using a whitelist containing a list of input you accept rather than a blacklist. "Whitelists can be very restrictive but they have a distinct advantage over blacklists in that the only time you have to change a whitelist it to make it more permissive."

There is more than one way to parse text-based content. The Core Java Tech Tip From StringTokenizer to Scanner looks at the difference between using java.util.Scanner and java.util.StringTokenizer. The tip "demonstrates that rather than using StringTokenizer, it's better to use the split() function included in the String class, or move to other regular expression-based solutions such as Scanner."


In Projects and
Communities
, Trung Duc Tran blogs that the NetBeans 4.1 branch created and that "We are now in the so called high resistance mode [..] Do no harm, no new last minute features."

The JXTA community's James Todd blogs that Voice over JXTA is being opened up for broader testing in the MyJXTA application.


In today's Forums, jdolphin writes that
"One of the most obvious omissions from Java is 2-dimensional arrays. Any chance of these being added.This is also discussed along with other performance issues here:http://www.jot.fm/issues/issue_2003_09/column3"

MThornton is not so sure that it would be a good idea to obfuscate rt.jar. "While it would be possible to obfuscate just the internal classes and methods (e.g. stuff in the com.sun.* heirarchy), it would also make stack traces in bug reports less useful or more tedious to understand. A better idea would be to find a way of obtaining line number information (for those stack traces) without paying a memory penalty until (if) a stacktrace was actually requested."


In today's java.net
News Headlines
:


  • Jakarta Commons Configuration 1.1

  • JORAM 4.2 - Final - Java Messaging

  • MevenIDE for JBuilder 0.2 - Maven Integration

  • AtLeap 0.5 Beta 2 - Java CMS

  • Sleep 2.0-b3 - Scripting Language
  • Registered users can submit news items for the href="http://today.java.net/today/news/">java.net News Page using our
    news submission
    form
    . All submissions go through an editorial review before being
    posted to the site. You can also subscribe to the href="http://today.java.net/pub/q/news_rss?x-ver=1.0">java.net News RSS
    feed.


    Current and upcoming Java
    Events
    :

    Registered users can submit event listings for the href="http://www.java.net/events">java.net Events Page using our href="http://today.java.net/cs/user/create/e"> events submission form.
    All submissions go through an editorial review before being posted to the
    site.


    Archives and Subscriptions: This blog is delivered weekdays as
    the Java
    Today RSS feed
    . Also, once this page is no longer featured as the
    front page of java.net it will be
    archived along with other past issues in the href="http://today.java.net/today/archive/">java.net Archive.

    Flow control when developing