Chapter 1. Parking Cost Calculator Workshop

A while ago the Major International Airport Corp. decided to extend its Internet presence. In particular their website should enable potential travelers the option of pre-calculating parking costs. Travelers should be able to fill out an online form that calculates the parking lot costs for their particular choice of travel duration.

Previously Major International Airport Corp. built such a form. The feedback from travelers on the current form is so bad that the management team decided to rewrite it from scratch.

Based on the experiences from the previous project, the implementation team, consisting of one senior programmer, Phyllis, one programmer, Alex, and one tester, Tony, takes a new approach. On the first implementation of the project the requirements seemed to keep changing all the time, resulting in code that was extended with patch after patch, just to find out that the wrong thing was implemented right from the start.

Instead of repeating the process anew, the team uses a specification workshop in order to gather the business rules of the parking lot calculator. In preparation for the new functionality, Phyllis and Tony invite the manager of Major International Airport Corp.’s parking lot division, Bill, as a business expert for parking lot costs to a meeting.

Valet Parking

PHYLLIS

OK, then let’s discuss the parking lot cost calculation requirements. Bill, what can you tell us about them?

BILL

We basically have three types of parking lots. Some have costs per hour, some per day, some have a daily or weekly maximum.

PHYLLIS

How do you refer to the different parking lots? Are there names for them?

BILL

Valet parking, short-term parking, and regular parking. If you lose your ticket, you will be charged a fee of $10.00.

PHYLLIS

Let’s try to concentrate on the three types. What’s the difference between them?

BILL

For valet parking, the passenger drops his or her car off at the valet dropoff and gets a receipt to get the car back.

PHYLLIS

What can you tell us about parking costs?

BILL

Valet parking costs $18.00 per day. For five hours or less you get a reduction of $6.00.

TONY

Wait a moment, Bill. You mean for even 30 minutes I get charged $12.00, for three hours I have to pay the same, as well as for five hours? But for five hours and one minute I have to pay $18.00 as well as for twelve or even twenty-four hours?

BILL

Yes, absolutely right.

TONY

What about twenty-four hours and one minute? Would this be $30.00 then, or $36.00?

BILL

Oh, that is of course $36.00.

PHYLLIS

What about weekly limits? Are there any for valet parking?

BILL

No, that’s basically all there is for valet parking.

TONY

OK, then let me write these down as examples.

Tony writes down Table 1.1 representing the discussed examples and labels it “Valet Parking.”

Table 1.1. Initial Valet Parking Examples

Image

PHYLLIS

Are these examples meaningful for valet parking?

BILL

Yes, these sum up our conversation.

Short-Term Parking

PHYLLIS

OK, what other type of parking costs are there? You mentioned three different types.

BILL

We also offer short-term parking places for visitors dropping off or picking up other passengers.

PHYLLIS

How much does that cost?

BILL

We charge $2.00 for the first hour. Then for each half hour it’s another $1.00.

TONY

Is there any boundary such as maximum parking duration?

BILL

No, there isn’t. Although we charge just up to $24.00 per single day.

PHYLLIS

So, we have a daily maximum of $24.00?

BILL

Right.

TONY

And after the first day the first hour will be charged at $2.00, or does it increase the costs then on a half-hour basis?

BILL

Oh, it’s a $25.00 for one day and half an hour.

TONY

What about a weekly maximum? Is there one?

BILL

No. For short-term parking people won’t stay a week, since it’s probably too expensive for them. The third option is way more attractive.

TONY

OK, what do you think about this table?

Tony has written down Table 1.2 and shares it with Bill and Phyllis.

Table 1.2. Initial Short-Term Parking Examples

Image

BILL

Yes, that’s it, exactly.

Economy and Long-Term Parking

PHYLLIS

Now, what’s the third type of parking costs that we will need to calculate?

BILL

There is also economy parking. The lot is placed way apart from the airport. That’s what makes it cheaper for the passengers. We have a bus shuttle to get travelers to the terminal.

PHYLLIS

All right, how cheap is it?

BILL

The rules are a bit more complicated there. First, parking costs $2.00 per hour.

TONY

Any day? Or do you charge a different fee maybe for the weekends?

BILL

No, the day of week does not matter.

TONY

So, in the Economy Lot the first 30 minutes as well as the first 60 minutes cost exactly $2.00, right?

BILL

Exactly.

PHYLLIS

Well, that does not sound complicated. Three hours then probably cost $6.00 while ten hours would cost $20.00.

BILL

Yes, and no. We have a daily maximum of $9.00. That means that the first hour to the fourth hour will be charged at $2.00 each. The fifth hour then raises the costs to the daily maximum of $9.00. Any additional hour does not raise the costs until the next day.

TONY

So, we have half hour, one hour, $2.00, three hours $6.00, four hours $8.00, five hours $9.00, six hours $9.00, twenty-four hours $9.00. . .

BILL

Yes, that sounds fine with me.

TONY

OK, what happens on the second day? Do we add $2.00, or do we add $9.00 then on a daily basis?

BILL

No, it’s then another $2.00 added to the sum per hour, up to a daily maximum of $9.00 again.

TONY

So, one day and half an hour costs $11.00, one day and five hours $18.00. And I suppose that the third, fourth, fifth, . . . is just like that?

BILL

Yes, but there is yet another limitation. There is a weekly maximum of up to $54.00. So, basically the seventh day is free of charge.

TONY

OK, I got that. Let me sum this up. Here is the table I created while we were talking.

Tony shows Bill and Phyllis Table 1.3, which he labeled “Economy Parking.”

Table 1.3. Initial Economy Parking Examples

Image

BILL

Yes, that looks good.

PHYLLIS

Wait a minute, Bill. What about six days and one hour? Does that sum up to $56.00 or rather $54.00?

BILL

No, that’s still $54.00 since the seventh day is free of charge. But maybe we should add that example as well.

TONY

I added it already.

PHYLLIS

All right, that’s all there is to parking lot costs then?

BILL

No, there are two variations of Economy Parking. For parking long-term in the garage, parking costs are $2.00 per hour, $12.00 as daily maximum, and the seventh day is free as well. For long-term parking without the garage we charge $2.00 per hour, with a daily maximum of $10.00, and the seventh day is free here, too.

TONY

So, do these two tables reflect this?

Tony has created Tables 1.4 and 1.5 and shows them to Bill and Phyllis.

Table 1.4. Initial Long-Term Garage Parking Examples

Image

Table 1.5. Initial Long-Term Surface Parking Examples

Image

BILL

Yeah, this looks good.

PHYLLIS

One more concern. Regarding the twenty-four-hour example, what happens if we arrive at 11 pm and stay until the next day 11 pm? Does this yield one day plus the second day, each $10.00, so a total of $20.00?

BILL

No, we will charge $10.00 since the overall parking duration has been twenty-four hours.

TONY

Is this the same handling for multiple days in the parking lot?

BILL

Absolutely. The day boundary does not matter in all cases, just the boundary in the overall parking duration.

Essential Examples

TONY

Now, we are nearly finished. There is one final step we have to do with all these examples. I think we understand the business requirements, but I would like to reduce the number of examples now to reflect the essence of the business rules. Let’s go over the tables one last time and see what we can and should throw out.

BILL

Let’s work backwards. I would like to drop some of the long-term surface parking examples.

Bill strikes through some of the examples from the long-term surface parking table. The results are shown in Table 1.6.

Table 1.6. Long-Term Surface Parking Examples After Bill Removed Some Redundant Examples

Image

PHYLLIS

What about the three days example? We already have one and six days covered. May we drop this one as well?

TONY

Yes, probably. Bill, what do you think?

BILL

Yeah, let’s drop it. We have pretty much everything covered there. I think it’s safe to drop that one as well.

Table 1.7 shows the cleaned up examples.

Table 1.7. Long-Term Surface Parking Examples After Bill Removed Redundant Examples

Image

BILL

For long-term garage parking, I think it’s safe to drop the three days example.

By striking out some examples from Table 1.4, Bill creates Table 1.8.

Table 1.8. Long-Term Garage Parking Examples After Removing Additional Examples

Image

BILL

Hmm, for economy parking let’s get rid of the three hours example as we already cover four hours.

TONY

And we should drop the three days example here as well.

BILL

Yes, you’re right.

Bill again cuts from the economy parking examples to the ones in Table 1.9.

Table 1.9. Economy Parking Examples After Bill Removed Some Examples

Image

BILL

All right, for short-term we may cut down the examples by dropping one hour and thirty minutes, two hours, and twelve hours and thirty minutes.

TONY

Wait a minute, Bill. I think we shouldn’t drop the twelve hours thirty minutes example. It reflects the daily maximum of $24.00.

BILL

Oh, you’re right. Let’s put that back in.

Bill strikes out superfluous examples for short-term parking as visible in Table 1.10.

Table 1.10. Short-Term Parking Examples After Removing Redundant Examples

Image

BILL

Finally, let’s take a look on the valet parking examples. I don’t see an example I would like to drop from these.

TONY

Agreed. These already represent the essentials of the business rules as you explained them to us.

PHYLLIS

OK, then we seem to have our scope for the stories on parking lots settled. Thanks, Bill and Tony.

Summary

In this chapter we saw how a collaborative meeting with business experts, programmers, and testers can settle and agree upon the requirements for the software. Although initially Tony could contribute only a few ideas, he helped to reach a common understanding by making the examples visible. With his unique testing knowledge, Tony could contribute to the discussion and focus the abstract discussion on concrete examples with the tables he created for the parking scenarios.

After Tony brought in the first table with examples, the group had a more meaningful discussion about the requirements. Phyllis the programmer recognized a bug in the examples they had identified for the economy parking lot. She asked for clarification about the case for six hours and one minute. Based on the examples the three had a conversation about the expected behavior from the business perspective.

Bill articulated his thoughts more meaningfully as well. He could directly see whether he agreed with the denoted examples. For the valet parking examples, even before seeing the first table that Tony created, Bill could directly tell how much the parking for twenty-four hours and one minute will cost. At the point where the first example was written down, the team communication in this Specification Workshop gained momentum.

During the discussion in the workshop, everyone was able to contribute. Phyllis threw in her perspective, while Tony brought in his critical thinking for edge cases. Phyllis spotted a bug in the economy examples before implementing a single line of code. The removal of that defect costs just a few words instead of going through the whole development cycle later.

Tony worked through the initial specification that Bill gave. He derived examples from the specification and explored corner conditions like twenty-four hours and one minute in order to get the correct answer from Bill right now. One of the questions would have been unanswered within the iteration. At the point where the team realized this flaw, Bill might have been on a business trip, unable to answer their demanding questions. At that point, the team could have gone with one interpretation for the implementation. If their interpretation is wrong at that point, the problem might become visible during the customer presentation, or even later when the product is in production for months.

Still, Bill, the business expert, made all the relevant decisions about the software, what to keep and what to throw out. When he mentioned that the costs for valet parking of twenty-four hours and one minute are $36.00, he said that the costs were obvious to him, still, Tony’s question revealed an underlying assumption from Bill. Through the diversity of the participants the team could agree upon a common target for the implementation very easily.

The five cleaned-up tables that the team discussed are shown in Tables 1.11, 1.12, 1.13, 1.14, and 1.15. The team will implement and automate these soon. In Agile methods this might be the next iteration, or an iteration within the next three months. Since team members had a conversation about the requirements and manifested their understanding in essential examples, implementing the story with the agreed upon specification will be clear even at some later point in time.

Table 1.11. Final Valet Parking Examples

Image

Table 1.12. Final Short-Term Parking Examples

Image

Table 1.13. Final Economy Parking Examples

Image

Table 1.14. Final Long-Term Garage Parking Examples

Image

Table 1.15. Final Long-Term Surface Parking Examples

Image
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.146.206.243