Thursday, March 10, 2011

Extreme Programming Ch 22-24 and Inmates Are Running the Asylum Ch. 3 - 5 and Mythical Man Month Ch 4 - 6

Extreme Programming
By: Ron Jeffries; Ann Anderson; Chet Hendrickson
Publisher: Addison-Wesley Professional
Pub. Date: October 16, 2000

Chapter 22 : Handling Defects

In the extreme programming model, the word "bugs" is taboo because it implies that bugs are out of the programmer's control. Instead words like "defects" are promoted to enhance the responsibility and feeling of control over them.

When defects are found, they are to be scheduled with the story card system that allows them to be assigned to a programming pair team along with an estimate of the amount of time to implement it.

If the defect fix has a high priority, then other stories will need to be delayed. In that case, XP advocates keeping track of the amount of time fixing defects and reporting these figures to the customer and explaining how it will affect the release time which should already include a defect fixing time factored into the original estimate.

A dedicated defect fixing team is fine, but it helps to have the "string" feedback of bugs hurt the team to spur them into making higher quality code the first time and prevent creating the same mistakes again.

The presence of a defect indicates that a unit test missed it, so XP says to go and fix the test so that it actually catches the defect.

As a general outline, defects are handled this way:
Report
Schedule
Test to Fix
Prevent

In the advanced topics section, bug tracking database tools are played down simply because XP methodology provides the feedback, communication, and testing that should allows teams to uncover bugs efficiently.
This advanced section also mentions a few ways to keep track of defect tests.

Chapter 23 : Conclusion

This 'final' chapter closes the main content by citing that the XP methodology has worked well for the authors and that they'd never go back to developing software like the way they did before XP.

They cite the main virtues of XP as being courage, simplicity, feedback, and communication. They said that many of the pitfalls of other programming methodologies is their fear of failure and the unknown and that XP works to counteract those with communication and empowerment.

XP cites 12 key practices:
1) On Site Customer
2) Small Releases
3) Planning
Story Estimation
Customer Defines Release
Iteration Planning
Steering
4) Metaphor
5) Simple Design
6) Pair Programming
7) Collective Code Ownership
8) Continuous Integration
9) Coding Standard
10) Testing
Acceptance Tests
Unit Tests
11) Refactoring
12) Forty-hour Week

Chapter 24 : We'll Try

The saddest expression used by a programmer. It sums up the dilemma of the programmer/team forced by management into developing software that they know they can't deliver on time. XP proposes that the best option is to outline the program into stories with estimates on the number of perfect engineering days it would take to accomplish, multiply that number by 3 as the actual time to implement, and to lay all these cards in front of the managers/customer and be frank about what it will take to accomplish these cards. As the product is delivered, management will see that the estimates are usually close to right and begin to accept these estimates and schedule around those and not the other way around.

All the stories will never be caught at once and estimates will be rough at first but these practices should overcome the toughest and most stentorian of managers.

Inmates Are Running the Asylum,
The: Why High-Tech Products Drive Us Crazy
and How to Restore the Sanity
By: Alan Cooper
Publisher: Sams
Pub. Date: February 24, 2004

Part 2 - It Costs You Big Time

Chapter 3 : Wasting Money

In this chapter, Cooper claims that money is wasted by not understanding what
the software to be developed actually does for the user and what it means to be "done" developing a certain product. Naive ideas for a software product's requirements usually include things like "runs on target computer," "doesn't crash," and "fulfills X features."

Lack of adequate specification or description of the goals of the users of the program leads to expansion of the project's scope and confusion about when a deadline should be set. Furthermore, descriptions of a product based on features leads description of the product desired, much like a describing a cake's ingredients doesn't lead to a description of an actual cake.

Since the deadline could expand infinitely based feature creep from the programmers, managers tend to arbitrarily set deadlines and usually, in response to Parkinson's law, at a point much too early to be able to realistically deliver by.

Other factors that lead to unrealistic scheduling include fears that the product will never actually ship leading to the delusion that it is better to ship an undesirable project on time than a desirable project late. Cooper makes the point that a well designed product will capture the market over products that have been rushed out because they are a pleasure to use.

Elicitation of feature lists that can't be accomplished on time leads team members on the programming side to bargain and haggle with managers about what features can possibly be delivered rather than really examining which features are important and desirable to the end product.

To fuel the mad dash toward delivering features and products quickly is the propagation of the myth that the technology market is unpredictable. Hence, "design" should be done in iteration where users complain until they get something that is bearable rather than doing good design upfront.

Badly designed software also incurs high hidden costs of destroying customer loyalty by, time to develop, reputation, and buggy software. Bad software that is used in business contexts can cause workers to be unhappy and to lower their productivity. Bad software also requires tech support which can cut into the bottom line.

Bad software (or any software) is also difficult to replace, so software should be built correctly the first time. Prototypes lure managers into using bad code as foundational code because it deceives them into thinking that the code works well when it doesn't actually scale into robust commercial use, therefore, Cooper discourages and warns of their use.

Lost opportunity costs (programmers not working) also forces management to rush into the coding phase of development rather than doing design.

Chapter 4 : The Dancing Bear

In this chapter, Cooper describes bad software.
Cooper claims that people are trapped by bad software and usually don't realize it or simply assume that it's the best that technology can do at the current point.
Bad software is usually covered up by simply labeling the product as "user friendly."

Cooper then explains a few drawbacks of e-mail, scheduling programs, calendar software, and local executable software (as compared to browser based) could benefit from good design.
(Depth of the inbox, identification of resources that should be managed, how people really interact with time and their classification, and getting rid of the installation process, respectively)

Cooper highlights several things about software that is 'bad':

Software forgets input and interaction history.

Software is lazy and makes the user work harder than they have to or works in a way that the programmer would like as an expert.

Software is parsimonious with information and doesn't display all the information that a human would usually need.

Software in inflexible and the user can only act with the information in ways that reflect how the computer it is used to dealing with information. Ex: Stacks only display the top item and not the depth while humans want to shift things on the stack as they need/want them.

Software blames users for errors and gives rude and uninformative error messages.

Software won't take responsibility and defers to the user to make sure that the user chose the right option which makes the user feel stupid.

Chapter 5 : Customer Disloyalty

In this chapter, Cooper stresses desirability as the component that unites a companies managers and programmers and makes the business successful. Managers tend to deliver viability (sales numbers) while programmers deliver capability (features) bu these need to be balanced by desirability that commands the customer's loyalty.
Commanding loyalty insulates the company from market fluctuations and poor delivery of capability or viability. With desirability users are able to become advocates of the software and free them from being an apologist or a survivor.

Cooper illustrates this concept by comparing three companies:

Novell: First to market, low desirability and minimal capability and viability
=> No loyalty, fast decline with competition
Microsoft: High viability, medium capability, low desirability
=> Begrudged market leader with amazing leader = Bill Gates
Apple: High desirability, medium capability, low viability
=> fiercely loyal, slow decline

Lastly, Cooper downplays time to market considerations, emphasizing that quality will command the market in the long term.


Mythical Man-Month, The: Essays on Software Engineering, Anniversary Edition
By: Frederick P. Brooks Jr.
Publisher: Addison-Wesley Professional
Pub. Date: August 02, 1995

Chapter 4 : Aristocracy, Democracy, and System Design

In this chapter, Brooks contends that "conceptual integrity is the most important consideration in system design," that reflects a unified and directed set of design ideas rather than to have a good set of features that are uncoordinated.

To this end, Brooks illuminates how to achieve conceptual integrity and how the concept ties into philosophical and practical considerations of achieving it.

First, Brooks asserts that the purpose of programming system is to make it easy to use and that the only way to truly achieve this, simplicity must be balanced with range and power of various functions. Ease of use is promoted by having more consideration given to functional specification that to the time taken in learning and searching how to use those functions.

In other words, good design and clear goal specification for the user must be directed by a set of architects that promotes simplicity and straightforwardness thereby leading to ease of use.

Next Brooks covers the philosophical considerations as it relates to Aristocracy, the rules of a privileged few, and Democracy, the rule of many. Brooks advocates Aristocracy in that he wants design to be delegated to a few dedicated architects for unity of design but also admits that much of the creative works and good input for design can and does come from the many.

Brooks addresses fears of lost opportunity costs and productivity by making the implementers of the system wait on design by saying that many of the tasks can in development can be done concurrently in three separate phases of development:
Architecture, Implementation, and Realization.

Chapter 5 : The Second-System Effect

In this chapter, Brooks discusses the "Second-System Effect" in which the second system to be designed usually has excessive feature and "frills" that were left out in the first design. Usually these features are not inline with changes of design and intended functionality and hence, discretion and discipline should be used and encouraged.

In order for an architect to be successful in this, he must consider the limitation of scheduling and estimation of the project length. To keep this consideration in mind, the architect(s) must communicate with the builder(s) and be careful to:
suggest and not dictate ways of implementation to promote inventiveness and creativity
deal quietly and privately in suggestions
be ready to forego credit for suggested improvements

Chapter 6 : Passing the Word

This chapter expounds on the subject of communication and how an architect maintains conceptual integrity on large teams.

There are several venues:
The Manual - Communicates with users
Formal Definitions - specificity in formal definitions vs. clarity of natural language
Direct Incorporation (of definitions and concepts) - adherence to design
Conferences and Courts - Team involvement/input, unity, communication, and feature control
Multiple Implementations - Enforces system adherence to design rather than the reverse
The Telephone Log - informal and quick
Product Test - acts as the customer and forces quality


Discussion:

Extreme Programming:

The shift in perspective in owning up to "defects" rather than submitting to the mercies and whims of "bugs" is a powerful, I think.

XP's methods of dealing with defects, however, I think highlights the drawbacks of XP since it's easy to introduce a lot of defects with bad programming on the iterations and not properly take into account enough time to handle all the defects. Overall, I think this could lead to significant deadline delay.
But maybe I'm just a pessimist.

Looking back at the main points of the summary, XP is a methodology I would recommend just for its simplicity and its attempts at changing the viewpoints toward efficacy and improvement of software.

The first bonus chapter that talked about "We'll Try" rang a bell to me from my first internship. I remember my boss coming in and asking what I could show and it wasn't everything and I felt a little ashamed I couldn't deliver more. Having a bit of control and outlining the system in cards would have helped explain my situation.

The Inmates are Running the Asylum:

Coopers observations are blunt but they ring true. Badly designed software costs not only money, but more importantly, loyalty and grinds away at our lives in frustrating ways. Thinking about software in terms of goals rather than requirements and features seems like the healthiest focus for a business and would certainly illuminate the implementation of a project more clearly.

Coding well the first time is a point well worth making because I know I find code hard to throw away from personal experience but motivating businesses to do good design in the light of opportunity costs is probably a problem that needs a more specific plan despite the obvious advantages of doing design.

Despite being an older book, many of Coopers illustrations of bad software are still readily observable in related example, if not directly. File systems don't always remember where I last saved a similar document and it's frustrating directing the file directory to the correct place again.

Cooper frustrations with the move to browsers is kind of funny in retrospect, but I wonder what the world could look like if we had focused on doing better design on local programs.

Mythical Man-Month:

Once again, Brooks shows his innate urbanitas and intelligence in his writing style and diction and I must say that I am impressed. His work has aged fairly well despite the advances of technology and his comparisons to cathedral architecture are timeless although they may require some foreknowledge. It's ironic that many of his examples and allusions to other arts hold up better than many of the actual computer systems and software he talks about.



Brooks' ties into the philosophical considerations show great insight and consideration for the positions of peoples in the various roles of a development team. It would have been easy to offend in asserting that an aristocratic is the preferred model for system design but he makes strong arguments in favor of it while simultaneously making delicate concessions and considerations to the "cogs in the wheel" by pointing out the implementation is a "creative process of the first order."

Brooks examples on up-keeping communication show their age also. He includes consideration of "phone communication" that technically still exists today but would probably be trumped by considerations for instant messaging or email. But his points still stand, despite their age.

No comments:

Post a Comment