Articles


Why I Dislike C++ For Large Projects
Short paper explaining why I don't like C++ for large projects. The primary point is that while there are lots of programmers with C++ on their resume, many of them can't even code simple classes without serious bugs.

JavaWorld Java Tip 88: Complement testing with code inspections
Code inspections are one of the most powerful tools for eliminating bugs. These inspections are so useful, in part, because they tend to catch errors overlooked during testing. Code inspections are even more beneficial if reviewers look for specific mistakes; in particular, those more easily found by reading code than testing it. This article presents a list of these types of programming mistakes that you can easily detect through code inspections. (2,000 words)

JavaWorld Java Tip 84: Customize scoping with object keys
The standard types of scoping provided by Java -- public, packaged, protected, and private -- are usually all you need. Occasionally, however, standard scoping is insufficient. While C++ permits you to establish a friend relationship between a class and other classes or functions (see the Sidebar, "What is C++ friendship?"), Java does not provide this capability. This article presents an approach for building very specific relationships between a class and other functions, classes, and packages in Java. Using this approach, you can grant access to a class's methods with fine-grained control. (1,500 words)

JavaWorld Replace 1.1 event adapters to build better apps
The event adapter classes provided by Sun as part of the JDK 1.1 event model are missing functionality that many Java applications need. This article presents a template for sophisticated event adapter classes that improve on the JDK 1.1 adapters in three ways: they catch all exceptions, including those that are unchecked; they allow events to be processed asynchronously, so that the GUI does not lock up when executing long running operations; and they provide an installable error-handling policy. This article also discusses using these new adapter classes with IDEs like JBuilder and Visual Cafe, and then looks at a strategy to take advantage of some of these benefits when using the JDK 1.0 event model. (2,000 words)

JavaWorld How to avoid traps and correctly override methods from java.lang.Object
The base class for all Java classes, java.lang.Object allows five of its methods to be overridden by subclasses. Sometimes it is necessary to override the default implementations provided by Object. Unfortunately, it's easy to override these methods incorrectly, which can result in classes that are difficult to subclass and that fail, in subtle ways, to work properly. This article explains why it's important to implement these methods correctly and also shows how to override these methods and get it right.

JavaWorld Accelerate your Java apps! : Where does the time go? Find out with these speed benchmarks
There are two basic types of benchmarking: benchmarking to discover relative speeds or bottlenecks; and benchmarking to understand performance characteristics and thus where to expect bottlenecks. This article provides benchmarks for the second purpose, and it measures and interprets the cost of various common language operations on different hardware platforms. This information can help you look for performance bottlenecks and avoid accidentally building bottlenecks into your applications. It also helps you avoid the sin of premature optimization: if a simple, clean algorithm is expected to run fast enough, wait to optimize until after the need is clear. (3,200 words)

Misty Beach Forth: An implementation in Java
This article appeared in the November/December 1997 issue of Forth Dimensions (published by the Forth Interest Group. From the opening paragraph: "The article provides an overview of Misty Beach Forth, a Forth implementation running under Java. While, at first glance, the two technologies would seem an easy fit, the Java Virtual Machine (JVM) has peculiarities that make the fit awkward. Further, in the spirit of Java's well defined semantics, I added some design constraints of my own that made implementing Misty Beach Forth harder than it needed to be."

JavaWorld Reduce the launch time of your applets: Store them on client machines
Glacially slow downloads are one of the biggest problems with Java applets today. This article demonstrates how to radically decrease your applet's launch time by storing your applets on client machines. You will learn how to write applets so that they are ready to be installed on client machines (much like Netscape plug-ins). You'll also learn where and how to install these applets under Netscape Navigator 3.x and Microsoft Internet Explorer 3.x. Finally, this article discusses when this technique is appropriate and when it is not. (3,200 words)

This article was written in 1997. The newer JDKs supports the notion of cached applets and installed JAR files (called extensions). This direct support is a much better solution than that proposed by this article.

JavaWorld Java's three types of portability
Sun Microsystem's Java technology brings with it three distinct types of portability. Each is independent of the others, but the combination of the three provides Java with much of its power and promise. This article discusses the three types of portability and shows the benefits and costs associated with each of them. One -- and only one -- of these types of portability threatens Microsoft; this article also examines how Microsoft can convert Java into a technology for writing Windows-only programs by embracing two forms of portability and subverting the third. (4,100 words)

JavaWorld Creating download progress bars for applets
While the Java bytecode format produces fairly small object code files, there are still three bottlenecks to rapidly launching Java applets: the user's connection speed, often 28.8 kilobytes per second or less; Internet congestion; and the fact that each class file requires a new connection to download. This article shows how to use a download progress indicator, which allows the users of your applet to watch the download progress being made and gives them an idea of when the applet will be ready to run. (1,500 words)

This article was written in 1996. Since then Sun has introduced JAR files, which are a better solution to the problem.


Misty Beach Home Page
Last Updated: 12-June-2001
Questions? Comments? Email: Mark
Copyright © 1996-2001 by Misty Beach Software Organization