DVD Direct: Programming and Languages

INTRODUCTION

DVD Direct is an entirely Web oriented movie rental business in which customers select movies to rent from the company's Web site and choose the delivery method. One way is to receive selected movies on DVD disks by mail. This is how the business originally started out. The other way is to immediately download the movies onto the member's hard disk. Online delivery is a recent innovation. To encourage the choice of online delivery (which is more cost effective for DVD Direct), a Frequent Renters Club has been established. Whenever a member selects online delivery, they receive reward points which can be redeemed for a variety of items.

To support the record keeping of the Frequent Renters Club, an information system was developed by Alice, a marketing analyst, and Mia, a systems analyst. The hardware needed to support the system was leased and most of the software was purchased from an outside vendor. Mia created one program that integrated a login screen to the Frequent Renters Club Web site. After some initial modifications, the Frequent Renters Club has been successfully operating for the past two months.

One morning Mia receives a telephone call from Bob, the vice president of marketing, asking her to come to the meeting room to discuss the login program she wrote for the Frequent Renters Club Web site and to bring all her documentation from the project. This is a bit of a surprise and Mia wonders what it could be about. The system has been up and running for two months without problems. The login program is quite simple. Could that in itself somehow be the problem? Why aren't they meeting in Bob's office?

THE MEETING

When Mia opens the meeting room door her last question is answered when she is greeted not only by Bob but by four new faces.

Bob: Hi Mia. Good morning! I'd like you meet Laurence, Nicole, and Oscar. They are from the Web development team. They have a few questions about the program you wrote.

15-1.jpg “Hi Mia. Good morning! I'd like you meet Nicole, Oscar, and Laurence.”

Mia greets each person in turn, hoping her smile hides her nervousness, and waits apprehensively for the first question.

Laurence: Mia, would you walk us through the process you followed to develop your login application?

Mia: Sure! I closely followed the systems life cycle approach throughout the project. In the systems development phase, it became apparent that we would need some customized software to integrate the current login code with a new login screen. It was a fairly simple job to create a Java program.

At this, Mia notices a series of glances between the Web developers. Do they question her abilities as a programmer? Are they unhappy with her choice of programming languages? Trying to clear these questions from her head, she hesitates.

Bob: Go on, Mia...

Mia: I followed the six steps in the software development life cycle: specification, design, code, test, documentation, and maintenance. I started with program specification and worked through all the steps in order.

Nicole: Mia, could you please walk us through each step?

15-1a.jpg

PROGRAM SPECIFICATION

Mia: In the first step, I focused on identifying objectives, outputs, inputs, processing requirements, and documentation. Our program's objective is to accept user input, to verify valid membership, and to connect members to the appropriate Web site. The program's outputs are directions for the member's Web browser to connect to the appropriate Web site. The inputs are a member's name, password (in encrypted form), and a preference for mail-delivered DVDs or online delivery.

Nicole: What form is used to record their preferences? Did they type a phrase, pull down a menu...?

15-1b.jpg

Mia: Users select their preference from a pull-down menu. That preference is associated with an integer sent to the server, so the input is an integer. The processing requirements are minimal. The user name and password are verified from the MEMBER database and the delivery preference is a simple comparison. Here's the documentation for this step.

Mia provides the team a copy of her program specifications document, of which she is quite proud, having meticulously researched the program specifications and documented the objectives, outputs, inputs, and processing requirements. Glancing around as they pass the document around, she is pleased to note that they seem impressed with her thoroughness.

PROGRAM DESIGN

Laurence: So how did you go about step two, program design?

Mia hands him a copy of her program design document.

15-1c.jpg Mia: Well, as you well know, the program design step is where you plan the solution to the problem identified in the specification step, and originally, I started with a top-down program design.

Oscar: How did you use that?

Mia: I divided the login process into its input and output components and defined the individual process of each step as indicated in the diagram you see on the document.

Laurence: What then?

Mia: Next, I developed pseudocode for each of the processes in the top-down program diagram. Here is one I did on verifying the user name and password.

Get user name, password, and video type.
If user name/password invalid try again.
After 3 invalid entries, go to user login FAQ.
If valid, are they streaming.
If streaming, are they a frequent renter club member,
if no, go to new member page
if yes, go to their account page.

Oscar: And what are these diagrams here?

Mia: That chart is the final step in the program design. It is a flowchart and logic structure describing the process the computer uses to log in a user.

Everyone looks at Mia's documentation with great interest, especially Oscar. Something in Oscar's tone makes Mia briefly worry that Oscar may find fault with her design decisions. The process she followed was clear and well documented. If he wants to make an issue of her work, she's prepared to defend her choices.

15-3.jpg

PROGRAM CODE

Oscar: So far you've done a lot of planning, but I haven't seen any actual code yet.

Mia: That's true, Oscar, but as you know only one of the six steps of the software development lifecycle is actually writing code. The first two phases, specification and design, in my opinion require as much of a programmer's talent as does the program code. Although writing code is an important part of my job as a programmer, to me it is only a small part of my overall responsibilities.

Nicole: Mia, I think you're right! But how did you decide on Java as a programming language?

Mia: I considered several possibilities. I wanted a language that was easy to use in Web applications, so I considered HTML, C++, and Java. I rejected HTML because it is a formatting language and not well suited to handle the required programming loops and if statements. While C++ could certainly handle the programming requirements, it does not integrate with the Web as well as Java. So I chose Java. It meets all of the programs needs. Here is the final Java code.

As Mia speaks, she feels the interest of her audience rise. They are eager to see the code. It is certainly something about her decision to use Java.

TESTING

Laurence: Certainly you didn't write this code bug free your first time?

Mia: No, I don't know any programmers who write error-free code in the first draft, and I'd be a little suspicious of any programmer who claimed they did.

15-4a.jpg

This gets a chuckle from the group and Nicole even blushes slightly. Mia can't help wondering if perhaps she has recently made such a claim.

Mia: Initially I had several syntax errors and typos. Once those were dealt with, I discovered a minor logic error.

Nicole: What testing methods did you use?

Mia: For syntax errors, I just did desk checking, going through the program line by line looking for errors. For logic errors, I manually tested with sample data. I assumed the role of a user going through the process of logging in to verify that the functions worked. Once it worked to my satisfaction, it was further tested by a select group of potential users.

15-4b.jpg

DOCUMENTATION

Mia: There were just two steps left. First, I wrote up the documentation for the program. I wrote a FAQ for the users on how to log in to their new system, and I compiled my documentation of the previous four steps for programmers who might work on this code in the future–which I have been handing out to you. MAINTENANCE

Mia: Lastly–maintenance. We have just completed a review of the streaming video system after two months of service. We checked for operational errors and none were identified. And with only two months of use, we feel that it is too soon to be checking for changes in the program based on the changing needs of our customers.

Coming to her conclusion, Mia realizes she has lost all her apprehension and is at ease about her work. Perhaps it's been the group that was nervous! Oscar smiles.

Oscar: Thank you Mia, you've been very helpful. We're looking into upgrading our code to an object oriented language like Java. The languages we currently use are all procedure oriented rather than object oriented. We really appreciate all you've told us.

15-4c.jpg

Laurence: We've been investigating whether we will need to modify our established life cycle model. Your experiences are invaluable to us, Mia. Thanks for your presentation! You've done an excellent job on this project.

15-5.jpg
“You've done an excellent job on this project.”

Return to the DVD Direct menu