Gene Callahan

Subscribe to Gene Callahan: eMailAlertsEmail Alerts
Get Gene Callahan: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn

Top Stories by Gene Callahan

As we try to keep pace in the frantic Internet era, it's easy to become enraptured by the latest technologies - JavaBeans, CORBA, Swing and so on. However, in the rush to add the latest buzzword to our resumes or marketing brochures, we too often forget the basics of object-oriented programming. The basics were the reason OOP was developed and what first attracted us to this paradigm. How many of us have had the dismaying experience of coming across "object-oriented code" that, although it might implement a "cross-platform, event-driven, multithreaded, multitiered" application, had all the elegance and organization of spaghetti code written in unstructured Basic. The basic principles underlying the object paradigm haven't changed since its inception. Although not all experts agree, the most common definition of an object-oriented language is that it's required to supp... (more)

Secrets of Java Serialization

Serialization in Java is an operation in which an object's internal state is translated into a stream of bytes. This binary stream or image of the object is created in an operating system-neutral network byte order. The image can be written to a disk, stored in memory, or sent over a network to a different operating system. This amazing feat requires little or no work on the part of the programmer. Just implement the serializable interface, which contains no methods, and call the writeObject() method on your object, and it's serialized! You can serialize an object to or from any ... (more)

A Generic Client/Server Architecture for Java

We set out to build a generic framework for creating Java client/server relationships. Our hope was to encapsulate all of the messy details of the relationship, allowing developers writing a client or a server to focus just on their particular application. This would allow our team to swiftly create client/server relationships relying on robust, fully debugged classes to handle communications. We wanted a framework that was simple and easy to use, but flexible enough to handle multiple communications methods. Motivation It has generally been difficult to set up the communications ... (more)

Clarify Your Code in the Functional Style

In creating the HotScheme interpreter (JDJ Vol. 4, Issue 1), we decided to employ functional programming concepts to Java, our implementation language, whenever it was practical. Functional programming has a number of advantages over more traditional procedural code, which we will enumerate below. The common thread uniting these advantages is an attempt to create code that's conceptually transparent. Employing this functional style directly in Java allowed us to define many Scheme functions in Java the same as they'd be written in Scheme itself. We wouldn't recommend attempting t... (more)

PropArgs - Every Programmer's Dream

A common set of programming problems drove us to develop a Java class we call PropArgs. Consider the following questions a programmer may want answered about a program: Which RDBMS instance should data come from? Does this particular user have any personal preferences I should be setting? Should debugging code be executed during a particular run of a program? Are there different execution paths based on the current operating system? Should the programmer be operating in batch or interactive mode? What directory should disk output be written to? The common factor in these questio... (more)