Careers: Interviews
Top-ranking Software Development Expert and Java Authority

This week, Stephen Ibaraki, I.S.P., has an exclusive interview with distinguished author, software development and Java expert, Alan Moffet.


Alan is a consultant with over 20 years of experience in software development and management. He specializes in software architecture and design, and development practice. His work has focused on applying emerging technologies, updating legacy systems, and improving organizational effectiveness. His programming experience includes a variety of systems and programming languages. He began to work with Java professionally while it was a beta product and continues to follow its development and use it in his projects. He is a member of the JCP.


Alan has been active in programming since the days of the Mark 8 (Radio Electronics, July 1974) and progressed through the "classics" - SWTP 6800, H-8, Z-100 and finally the PC. He started programming professionally in 1985 when he began writing diagnostics for hardware that he was responsible for repairing. In 1991, he joined BNR, the R&D division of Nortel. There, he began using Java in 1995 for some projects that leveraged Java's built-in support for networking - including code mobility. His group was among the first at Nortel to embrace Java.


Although he also uses other languages and platforms to perform his work, his interest in Java continues. Besides the widely regarded recent offering, “SAMS Teach Yourself JavaServer Pages 2.0 with Apache Tomcat in 24 hours,” he has also contributed to Java P2P Unleashed. In addition, he has served as a technical editor for XML Unleashed 2nd Edition, SE Using Enterprise JavaBeans 2.0, SE Using Java 2 Enterprise Edition, SE Using JSP and Servlets, SE Using Java 2 Standard Edition, SE Using XSLT, Java APIs for XML, and Windows Telephony Programming.




Q: Alan, you have such a considerable and proven background in software development, Java, and long-history of successes in computing. We are most fortunate to interview you--thank you!


A: Thank you. I appreciate the opportunity.


Q: You were there when computers first came out in kit form and progressed to the PC--profile your early days working with the Mark 8, SWTP 6800, H-8, Z-100, and PC. Describe your experiences.


A: I’m grateful to have had the opportunity to work with computers through the evolution of the personal computer. It’s been an amazing journey. The first computers I worked with were programmed using your fingers to input machine code with toggle switches. Light Emitting Diodes provided the output, although clever programmers could also use nearby radios as another output device, since the early machines interfered badly with their reception. Writing loops, you could play songs. Memory use was limited to a few kilobytes because that was all the machines had. Once you powered down, everything was lost – there were no inexpensive storage devices then. However, personal computers progressed rapidly. It wasn’t long before you could use a basic operating system, a keyboard and monitor and could save your work to cassette tapes and eventually to floppy and hard disks. I’m not nostalgic for those days, but the experience of working on home-built equipment with limited resources was very valuable. I also appreciate the pioneering.


Q: What was it like to program in the 1970s’ through to the 80s’?


A: First, I need to mention that I essentially grew up with the microprocessor. I didn’t work with mainframes or larger systems until later in my profession. So, while there was opportunity to work with mature operating systems and programming languages during this time, my experience was limited to what became available on the personal computer, or on smaller systems like the PDP-11.


Most of the programming that I did at that time worked in concert with hardware. It was in assembler or C. Programming required a deep understanding of the hardware - the applications themselves were usually architecturally simple. Because of the limited resources, you were careful about your design – making certain that you did not waste memory or CPU cycles.


It was a time of rapid change - The spirit of invention was everywhere.

Microprocessors and other logic advanced quickly. Personal computers multiplied as companies and hobbyists built upon new technology. Personal operating systems eventually abstracted some of the functions away from the hardware and the tools became much better. Platforms stabilized. Gradually, I could stop thinking about how to lay software on top of a machine and focus on the structure of the software itself. Languages like C++ and Smalltalk made programming particularly enjoyable. I think that I was fortunate to be able to watch and participate in the growth of the personal computer.


Q: Describe your experiences at Nortel.


A: Nortel is one of the favorite places I have worked at. The company invested heavily in its employees by providing opportunities to grow. I participated in many exciting projects and worked with some great people.


I worked for BNR (or Bell Northern Research), which was the research and development arm of Nortel. In particular, I worked with a digital PBX. It was an incredible piece of machinery with 25-30 million lines of code and thousands of developers. The breadth of the system provided a never-ending playground for engineering. One week, I would write a new random-number generator for the OS and the next investigating problems within a compiler.


Nortel provided training in many areas and often had instructors or lecturers who were inspiring. I was taught Smalltalk by Graham Glass (Formerly of ObjectSpace and now of The Mind Electric), and listened to Grady Booch lecture on design and methodologies. I was able to parlay my education into my work. After finishing a government contract, my group and I explored technologies that might be useful for application in the PBX. We were particularly excited about the possibilities afforded by Java, which was in Alpha testing at the time.


Q: Detail how Java programming has progressed from the mid-90s’ to the present.


A: There’s much more to learn about now! The release of Java, along with the creation of the World-Wide-Web, inspired thinking about distributed applications. With applets, you could build competent “light-weight” interfaces to back-end applications. With a little understanding about class-loaders and networking, you could build applications that were easily distributed. The language was easy to learn and forgiving – we could create a prototype in a fraction of the time it took to develop the same prototype using X-Windows or Microsoft Windows – and it ran on either platform (although applets were not as portable as you would have liked).


Obviously, the platforms and technologies that exist today did not exist then. Today, the platforms and technologies that make up Java are comprehensive and mature. The patterns and architectures of systems are well defined and broadly understood. Collectively, they make it possible to easily create sophisticated and robust applications of all types.


Q: Your recent book in JavaServer Pages is garnering considerable attention. However, first can you provide ten tips from your other books?


A: That’s a tall order. I’ve also co-authored a book on P2P programming and worked on a number of books for other authors as a technical or developmental editor. The topics vary widely. In fact, people often seem to wonder how I became “well rounded,” yet have also have depth. What if I offered a few tips about that?


1) Love what you are doing. It’s easier to spend time doing something you like. And it takes time and effort to do anything well.

2) Learn what you are good at. Chances are that you like to do this also, since you probably enjoy the satisfaction of a well-done job. You’ll also stumble across the things you’re not very good at. You can decide to avoid doing this kind of work, or to focus on improving your performance.

3) Align your talents and interests with your work. Good managers want to use their resources effectively and you can practice while you work.

4) Become a mentor, or find a mentor. I’m a better student of a topic if I’m teaching it. First, it has to make sense to me before I can help another. Second, repeating something is practice. Allowing somebody else to be a mentor helps them sharpen their own skills, brings you up to speed quickly and helps you avoid the difficult spots on the path to expertise. A good book can help you by providing information and by allowing you to learn from the experience of the author.

5) Set goals. Choose where you will spend your time. I have a regular study schedule for topics I need to know more about, or feel that I’d like to review. Your employer may allow you the privilege of studying for a couple of hours each week at work. After all, they do want qualified employees who demonstrate great initiative, right? Even if they can’t afford the time, you may need to spend some of your off-hours time honing your skills. It’s a competitive marketplace with rapidly changing technologies – you’re contributing to your own value. Finally, borrowing from a recent Family Circus comic strip, remember that “goal” starts with “go.” Accomplish what you set out to do.


Q: Now, let us discuss your book, which you co-authored, “SAMS Teach Yourself JavaServer Pages 2.0 in 24 Hours.” Who is the intended audience? Moreover, why would our readers want to read this book? What is uniquely compelling about this book?


A: The book is written for programmers who are somewhat experienced with Java, and would like to learn how to use JavaServer Pages. If you’ve read about JSPs elsewhere in the past, you’ll want to read this book for its practical and in-depth coverage. We have packed a lot of information into the 24 one-hour sessions without making it difficult to understand. The book will teach you how to use JSPs in real applications. Besides introducing the reader to the features of JSP 2.0, it also introduces useful topics such as how to select an appropriate architecture or how to tune applications for performance. And it will help you to become a proficient developer by providing the background necessary to be able to use JSPs effectively, or debug them when things don’t go as planned.


Q: What new features in JSP 2.0 make it easy and quick to create Web sites?


A: We were able to put quite a bit into the book because of the great work that the specification authors (and everyone else involved in this release) did to simplify web application development using JSPs. It wasn’t difficult to explain new features. That might be one of the best improvements – the “ramp-up” time is significantly smaller. Creating your own tags has become even simpler (pun intended). Tag files are great! Of course, EL and Tag libraries will help also. Finally, in the longer term, these changes, combined with the ability to express JSPs as XML documents and the improvements made to make it easier to debug JSPs, will aid productivity and quality as tool developers release IDEs that are more sophisticated.


Q: Describe working with the built-in expression language and JSP tag libraries.


A: In the past, it has been somewhat difficult to keep the functions of your JSPs “pure”. In other words, if you want to be strict about using JSPs only for presentation, you would often spend a lot of time developing your own custom tags. This meant that you had to understand Servlets. You also needed to know how to work with the underlying mechanisms used to implement custom tags – which were somewhat troublesome. Moreover, the design often didn’t accomplish all that you hoped – the application wasn’t as simple, flexible or maintainable as you would have liked.


JSP Tag libraries and EL help considerably. They allow you to focus on presentation in the JSP. JSP Tag Libraries provide many useful, predefined functions that you can use to build JSPs using syntax page authors are already somewhat familiar with. EL is frequently used with Tags to provide access to expressions involving objects, data, or functions.


The simplicity of EL makes it easier for page authors to develop sophisticated pages without having to dive into the complexities associated with scriptlets. Tool developers will be happier because JSPs can be completely expressed through tags.


It’s easier to develop well organized pages that are architecturally consistent. I like working with these improved features. However, like the developers of JSTL, I would have liked to have these improvements without creating two new primitive “languages” (JSTL Core Tags and EL) and their supporting environment. I expect that we will see continued improvements in these areas. JSP page authors should not create JSPs that consist of a significant amount of logic.


Q: How would you go about debugging your Web applications?


A: As we mention in the book, debugging web applications can be difficult because there are many pieces that interact – including application components and technologies. Well-designed applications are easier to debug. I try to start out with debugging in mind. For example, when an application can be divided so that presentation is decoupled from the underlying data, it’s easier to decide where a problem lies. One of the techniques that is very useful is good logging. Java 1.4 introduced a logging framework that is good. I prefer to continue to use Log4J and a supporting tag library. I found that debugging using logging is enhanced if you are careful about defining the levels of logging. Putting too much detail into the wrong levels isn’t helpful. It’s distracting. A full trace isn’t useful when you’re trying to determine if the user entered something incorrectly.


I’m also careful to write software that is error-aware. As a language, Java has some great mechanisms for dealing with problems. Exceptions are very helpful. I notice that many developers are content to ignore error handling, partly because Java does such a great job when it lets you know about an error. I also find that it’s useful to build testing into components with a framework like JUnit. The Java virtual machine has always had great support for debugging. With the release of 1.4 there are even better facilities, such as the ability to hot-swap classes. With JSR-45, you can debug JSPs directly, since there is a way to correlate byte-codes to JSP source. I use a JPDA capable IDE with integrated debugging capabilities for difficult problems. With these, I can examine the state of the application


Q: Discuss using Servlets and JSP together to build browser-based dynamic applications.


A: JSPs and servlets can have complimentary roles. I use JSPs where the output is more or less “templated.” Looking at the source of a JSP, you can essentially determine what the consumer will see. If I need different “layouts”, I use different JSPs or compose top level JSPs from fragments. I use servlets for control, application logic and other services. In less complicated applications, I use a simple architecture with only a few tiers. In this case, servlets perform functions similar to those ordinarily performed by EJBs. I strongly encourage developers to separate business logic from presentation, and to use JSPs for presentation. In our book, we provide guidelines that help you determine which functions should be handled by JSPs or servlets. We also introduce Model-View-Controller as an example of how to separate responsibilities. Sun’s “Blueprints” are also a great resource for the developer.


Q: Comment on including XML data and XSL stylesheets in JSP applications.


A: It makes perfect sense to use JSPs to produce structured content using XML. XSLT is a great tool for transforming documents and can be used to normalize data to the requirements of the consumer. On the other hand, JSPs should not parse XML data to build data objects or validate documents. Again, the role of JSPs should be restricted to rendering data.


Q: Tell us more about personalizing the users’ experience using cookies.


A: I am impressed with sites that do a great job personalizing the user’s experience. Each time I visit Amazon, I am reminded of how effective it can be. They remember which books I’ve looked at, have suggestions for others that I might be interested in, allow me to create customized pages made up of items I want to remember, and even form communities of interest. Amazon does a great job. Most applications can benefit from personalization. When used properly, cookies can help an application become aware of the identity of a user before they authenticate through another means. It’s easy to work with cookies using JSPs or servlets. I prefer to use cookies for this purpose only, except as they are used to support sessions. Anything that I want to remember about the client is stored with the session or in persistent store. If you choose to store any other information, you should consider disclosing the information that you store to your users.


Q: How can you access databases from JSP applications?


A: The JSTL provides tags used to perform queries or modify tables in databases. They are very easy to use. However, in keeping with my earlier advice, I would limit their use to simply displaying data in the simplest applications.


Q: Describe how you develop applications using Struts and JavaServer Faces.


A: Struts provides a great framework for building applications. JavaServer Faces basically “extends” the Struts model to add presentation components. They can help produce better designed and more flexible software. The key to success with these tools is to understand the model and your own requirements. It’s helpful to start by thinking of your application as message driven and built of resources to which the messages are directed. From there, you can easily create the controllers and other supporting objects that form the basis for Struts. All that is left is to provide the declarative “glue.”


Using the early implementation of the Struts-Faces integration library, you can use JavaServer Faces components for the presentation portion of the application, leveraging the power of both of these superb tools. Of course, the “Devil is in the details”, but I can’t get into that here – there’s simply too much to cover. “SAMS Teach Yourself JavaServer Pages 2.0 in 24 Hours” gives a brief introduction to Struts and JavaServer Faces, and there are some other really good books out there too. Moreover, Sun has a few good forums that can be helpful, particularly for JSF – which is just emerging. Craig McClanahan, Struts creator and development lead for JSF, participates in discussions in the Struts and JSF forums.


Q: Provide more details on creating JSP applications for international audiences.


A: Java has had great support for internationalization for a long time. Through the Format Tag Library, JSTL helps developers create applications suitable for international audiences. The mechanisms are similar to the way that other platforms are programmed for international audiences – you create one or more resource bundles that contain the local-specific translations and use functions that are adapted specifically to use the bundles for output. Currency, numbers, and dates are formatted with utility functions. Like the other JSTL tags, the library is easy to work with. The most difficult part is getting the appropriate translations.


Q: How do you secure your Web site?


A: My web site is hosted on a Linux box that uses IPTables to provide front-line protection. I also use tripwire and network monitoring software. At the application layer, I generally use the facilities of the container for role-based authentication, using modules that tie into standard mechanisms provided by the operating system or other systems. There are a number of single-login technologies such as SAML that I like to use.


Q: Describe your latest projects.


A: I’ve recently been involved in creating a replacement system for a business who has an online store, and uses web based applications for most of their business processes. The client also has several large databases that are made up of content that is sold to the consumer by subscription. I’ve been concerned with the scalability of the application the customer uses to search through the data and retrieve the data sets they are interested in. The application will also help the consumer find data they are interested in or suggest other research avenues.


On other fronts, I’m involved in a couple of start-ups – one focuses on a few good ideas that a friend and I have been talking about for a while. The other is an exciting opportunity to work with wireless broadband and some unique applications involving mobile devices. I can’t say much more about those.


In addition, I still work on books.


Q: Where do you see yourself in five years time?


A: Retired and wealthy. Wouldn’t we all like to be? Retirement for me probably wouldn’t be much more restful than what I do today – I have too many interests to be idle. In actuality, I’d like to see some success in the projects I mentioned earlier and be able to pursue some other professional and personal interests. I’ve always enjoyed the creative end of engineering – and I have lots of ideas to pursue.


Q: You are a well-respected Java expert. What are your top tips in five major areas of Java development—you choose what you consider the five most important areas of Java-related development?


A: Sure! Although I’m certain I’m being given far too much credit. I hope you won’t mind if I generalize, though. I think that the most valuable top tips actually apply to development in general.


Area 1— Develop a solid foundation

An understanding of the language and the idioms is essential. Several good books are available that accelerate your understanding of the language and its use. “Practical Java” and “Effective Java” are two good ones to start with once you’ve learned something about the language. Once you start using more advanced features of the platform, look for specialized training in the topic. Hands-on training is best. If you’re using a book, do the exercises.


Sun does a superb job of producing helpful material. With each release of a platform, they include specifications, a reference implementation, and a set of blueprints that define the best practices. Read the blueprints. Sun also often provides tutorials that are well constructed.


Finally, find an experienced co-worker and “look over his/her shoulder.” Ask to be a part of their code reviews, just so that you can listen and learn. If you’re on your own, pick a mature open source project, such as Apache Commons, and read the source code. Join a user’s group.


Area 2 - Develop an understanding of design

Although the language is incredibly good at protecting you from your own coding errors, and can even enforce some level of good design, it can’t do everything for you. I’ve seen many poorly constructed applications – often written by developers who have years of experience with the language. Start with a great book on Object-Oriented design – such as “Object Oriented Analysis and Design” by Grady Booch. Learn how to develop your ideas on paper and communicate them to others with UML. Another great book that helps in both of the areas I’ve mentioned is “Fundamentals of Object-Oriented Design in UML” by Meiler Page-Jones.


Area 3 - Develop an understanding of construction

Improve your ability to implement high quality software. Now that you have an outstanding design, make it “hit the pavement” so that it performs. Your software should behave correctly, run efficiently, and be maintainable. In the notes for the first area, I already mentioned a few helpful books. Some of my other favorites within this area are “The Practice of Programming” By Brian Kernighan and Rob Pike and “Code Complete” by Steve McConnell. Although these books use other programming languages to illustrate the concepts, the advice is priceless. And, if Java is the only tool in your belt, take the time to become familiar with another language. Java is as close to a Swiss Army Knife as I have found – I’ve done small and large applications with nothing else - but there are occasions when you need an axe or jeweler’s screwdriver. If you learn C++, you’ll be able to read the VM source!


Area 4— Become familiar with patterns

Most developers are familiar with the “Gang of Four” patterns book, “Design Patterns.” If you don’t own it, add it to your library. It’s one of the best investments you’ll make. It will expose you to a few good reusable solutions to common problems. If you really catch on, you’ll approach your work differently – and start “painting” with more than keywords.


To get started using patterns in Java, a good “template” book is one like James Cooper’s “Java Design Patterns.”


Area 5—Learn how to engineer software

I have always appreciated the effort to raise the standards for software and developers. I was exposed to David Parnas’ work a few years ago and became interested in the process of creating software and software theory. E.W. Dijkstra is also interesting reading. Google for some of their papers. To come up to speed more quickly, and for good advice about all aspects of software development, read “The Pragmatic Programmer” by Hunt and Thomas. I also recommend Steve McConnell’s other books. I have all of them.


Area 6— Leave room for the thing you haven’t thought of yet, or for the idea somebody else might think of.


There’s always something. Here is where I would do some listening, if I could, to the readers. There is usually something to be gained from an exchange of ideas.


Q: What kind of computer setup do you have?


A: My primary computer is modest. It’s home-built with an AMD Athlon 1.2 GHz processor and 768 MB of RAM. I use a wireless (Super) 802.11g network connection that provides a 45 Mb/s connection to the rest of my machines. I needed a wireless connection to my office, and I have been pleased with the results. My other machines are slower Athlon based machines. There are three of these – two of which are running Linux . Linux performs very well even on machines like these. These machines host Apache 2.0, MySQL 4, CVS, DNS, email, and the other usual services. I also run Tomcat, and JBoss. For project management, I use GForge. The other is a windows box for doing .NET backend development.


Q: Alan, we were indeed fortunate for the in-depth answers and insights you have given us. Thank you again for your time, and consideration in doing this interview.


A: Thank you.


Suggestions for this page?
Email NPA Web Services: click here

NPA      facebook      LinkedIN logo
© Copyright Network Professional Association® 1994-2024 All Rights Reserved.
NPA Privacy Statement