جزء من كتاب Practical Software Factories in .Net اعجبنى و اردت ان اورده
Before we start diving into theory, we start this chapter with a little anecdote, "a typical day in
a software developer's life," that probably sounds all too familiar to many of us:
It is Tuesday morning. John comes to work around 7:30 a.m., and after he gets his coffee and
checks his e-mails, he continues working on a functional requirements document, which is due for
review by his fellow software developers, the quality guy, and a customer representative later today.
Around 10 a.m., John gets a call from his manager, who tells him to stop working on whatever
he is doing because a high-priority defect was reported by an important customer. John
shelves the requirements document in Visual Studio 2005 Source Control and switches context.
He retrieves the defect report in Visual Studio 2005 Team System and manages to reproduce the
defect. He then tries to isolate it. It turns out that the defect is only occurring sporadically and
seems to be located in a component that was developed by a contractor who no longer works with
John's company.
Because of this, John decides to get the functional and design specification from the Visual
Studio Version Control system. While reading through the functional description attached to the
work item, John realizes rather quickly that the document is not complete, and the description of
the functionality he is interested in is vague to say the least. Nevertheless, he moves on to the
design document. After analyzing the design document, John believes he has a good grip on the
2 CHAPTER 1 ■ SOFTWARE FACTORIES OVERVIEW
overall architecture of the component. When he goes back to Visual Studio 2005 and browses
through the Class Designer, he realizes that the description in the design document was not only
outdated, but even wrong.
In the meantime, it is 11:30 a.m., and the review of the requirements document, the one he
stopped working on, is scheduled for 2:30 p.m. John is starving, but he figures lunch is out of the
question, so he gets some crackers and soda from the vending machine and continues to work
through lunch in order to give feedback to his manager (or possibly fix the problem) before the
document review.
Since the documents proved pretty much useless, John starts debugging the problem, which
puts him in a bad mood because there are no unit tests in place for this part of the code. In his
quest to identify the problem, he realizes that some basic functionality of the system is implemented
at least three times in different components with slightly different behaviors. However,
he decides not to refactor the source code at this point because the philosophy of the team is "If it
ain't broke, don't fix it."
Debugging takes some time because John ends up creating some unit tests, doing some static
analysis, and executing performance tests to find out that the error is caused by a race condition
in the multithreaded part of the program, which is unpredictable and appears in different flavors.
John eventually finds the source of the problem and has an idea how to fix it. Since it is already
1:30 p.m., he decides to call his manager to update him on the progress and to see whether he
should reschedule the document review in order to fix the bug or finish the document and leave
the bug fix for later.
John's manager decides that the document review should not be rescheduled since a customer
representative is already on his way. Again, John shelves the bug fix, unshelves the requirements
he was working on before, and rushes to finish it. Just before 2:30 p.m. he commits the changes to
Team Foundation Server together with the updated work item, takes the laptop, and goes to the
conference room. By 2:47 p.m., all the review participants arrive and the review takes place. A lot
of time in the review is spent on issues not related to the functionality but rather style and formatting
(even though John used the mandatory document template).
By 5:34 p.m., John finally gets back to his desk. He unshelves the changes from before, continues
working on fixing the high-priority defect, and ultimately fixes the problem a few hours later (so
he thinks). He runs his unit test against his fix, and whoopy doo!, the test passes. Just to be on the
safe side, he decides to run the unit test suite for the entire system to make sure nothing else broke
before he commits the changes. Sure enough, a whole bunch of other tests now are failing. John
investigates the problem and realizes that several other parts of the system are dependent on the
functionality just fixed.
John continues to work furiously. It is 9:45 p.m., and John made changes to five other source
files within three different components, and still a few tests are failing. John now gets somewhat
desperate because the company closes at 10 p.m. Finally, John shelves his changes and leaves to
grab a beer and get something to eat, setting aside the bug for the next day.
Many problems that John encountered during his workday are similar to the ones that each
one of us struggles with. Statistics about the software industry over the last ten years provide
factual backing to the picture we just painted: while new and improved life-cycle tools certainly
help, the main problems in software development—poor quality, poor predictability, and poor
collaboration—still remain unsolved to a large degree.
[/ltr]
تم تعديل هذه المشاركة بواسطة طارق إبراهيم في 22 يونيو 2010 في 15:32
Technical Lead Developer
اللهم قنى شر الجهل و الجهلاء
( اقْتَرَبَ لِلنَّاسِ حِسَابُهُمْ وَهُمْ فِي غَفْلَةٍ مَّعْرِضُونَ ) {الأنبياء:1}



