This document provides a summary of a presentation on best practices for software development. The presentation covers topics such as test-driven development, behavior-driven development, continuous integration, source control systems, Scrum methodology, and Agile principles. Key aspects of Scrum discussed include 2-4 week sprints, roles like the ScrumMaster and Product Owner, daily standups, planning and burn down tracking. Test frameworks like xUnit and behavior specification tools like Cucumber are also mentioned. The presentation emphasizes writing tests first, iterative development, collaboration, and responding quickly to change.
10. Ariane 5 Flight 501
Flight 501, which took place on June 4, 1996, was the first, and
unsuccessful, test flight of the European Ariane 5 expendable launch system.
Due to an error in the software design (inadequate protection
from integer overflow), the rocket veered off its flight path 37
seconds after launch and was destroyed by its automated self-destruct
system when high aerodynamic forces caused the core of the vehicle to
disintegrate. It is one of the most infamous computer bugs in history.
The breakup caused the loss of four Cluster mission spacecraft, resulting in
a loss of more than US$370 million
10
Monday, February 27, 12
11. Therac-25
The Therac-25 was a radiation therapy machine produced by Atomic Energy of
Canada Limited (AECL) [...]. It was involved with at least six accidents between 1985
and 1987, in which patients were given massive overdoses of radiation, approximately
100 times the intended dose. Three of the six patients died as a direct consequence.
These accidents highlighted the dangers of software control of safety-critical systems,
and they have become a standard case study in health informatics and software
engineering.
[...]
A commission has concluded that the primary reason should be attributed to the bad
software design and development practices, and not explicitly to several coding errors
that were found. In particular, the software was designed so that it was relatively
impossible to test it in a clean automated way.
Monday, February 27, 12
12. More online:
http://en.wikipedia.org/wiki/List_of_software_bugs
Monday, February 27, 12
18. A Simple Prayer
Lord, please protect our biggest VPS from
Eric's installed software
- including but not limited to plugins and
gems written by 11 year old Pakistanis.
May his apps be well behaved and may they
be considerate of CPU and RAM.
Lord, if any of these terms are unfamiliar to
you, look them up on Wikipedia.
Peace be to all other apps and all other
VPSs on the same physical server.
Amen.
Monday, February 27, 12
20. What You Already Know
• Follow coding standards.
• Be consistent. If you do operations in a specific way, do that kind of
operations in the same way (e.g. defining variable/method/class names,
parenthesis usage etc.).
• More code does not mean better code. Keep it simple and reduce
complexity.
• Catch specific exceptions instead of highest level class 'Exception'. This will
provide understandability and more performance.
• Use understandable and long names for variables. Loop variable names can
be i, j, k, index etc., local variable names must be longer than loop variables,
parameter names must be longer than local variables and static variable
names must be longer than parameters; proportional with scope size.
• Don't use magic numbers and strings directly in the code. Use constants.
This method provides more modularity and understandability.
• Use understandable comments. Bad comment is worse than no comment.
• Method names must include "what is done by this method" information.
Monday, February 27, 12
21. • Package related classes (that changed together and/or used together) together.
• Use positive conditionals. Readability of positive conditionals are better than negative
ones.
• Use dependency injection to manage too many singletons.
• Use exceptions only for catching exceptions, not for control flow. Think as required and
perform control flow with control statements/conditionals.
• Don't use so many arguments with methods. Keep the number at most 8-10. If more is
required, review your design.
• Don't use method alternatives with boolean flag variables (public void
someMethod(bool flag)). Write more than one method for each flag condition.
• Think twice before defining a method as static and be sure if you really need to. Static
methods are harder to manage.
• Avoid using methods with reference parameters. Use multi attributed object
parameters instead.
• Number of interface methods must be minimized to decrease coupling/dependency.
Monday, February 27, 12
22. What School Did not Teach You
• Deliver often, get user feedback in a
continuous regular and intense flow
• Don't try to be too much smarter than
your customer, just enough
• Do only whats needed to deliver the
functionality expected in each step in the
best possible way
• Make sure you love and care about your
work, code, user and customer
Monday, February 27, 12
23. Questions?
Comments?
Concerns?
Monday, February 27, 12
24. “Motivational
products don’t
work.
But our
Demotivators®
products don’t
work even
better.”
Monday, February 27, 12
25. TDD
Test Driven Development
Monday, February 27, 12
26. Write Tests
Let them fail
Monday, February 27, 12
27. Write the minimal
code that will make
your tests pass
Monday, February 27, 12
72. Agile Manifesto
We are uncovering better ways of developing
software by doing it and helping others do it.
Through this work we have come to value:
Individuals and interactions over processes & tools
Working software over comprehensive documentation
Customer collaboration over contract negotiation
Responding to change over following a plan
That is, while there is value in the items on
the right, we value the items on the left more.
Monday, February 27, 12
74. Agile Modeling
Agile Unified Process (AUP)
Dynamic Systems Development Method (DSDM)
Essential Unified Process (EssUP)
Extreme Programming (XP)
Feature Driven Development (FDD)
Open Unified Process (OpenUP)
Scrum
Velocity tracking
Monday, February 27, 12
80. “ScrumMaster”, who
maintains the processes
(typically in lieu of a
project manager)
Monday, February 27, 12
81. “Product Owner”,
who represents the
stakeholders, represents
the business
Monday, February 27, 12
82. “Team”, a cross-
functional group of about 7
people who do the actual
analysis, design,
implementation, testing,
etc.
Monday, February 27, 12
83. Pigs & Chickens
A pig and a chicken are walking down a road. The chicken
looks at the pig and says,
“Hey, why don’t we open a restaurant?”
The pig looks back at the chicken and says, “Good idea,
what do you want to call it?”
The chicken thinks about it and says,
“Why don’t we call it ‘Ham and Eggs’?”
“I don’t think so,” says the pig, “I’d be committed, but you’d
only be involved.”
Monday, February 27, 12
84. Key Notions
• (Sprint) Planning
• Backlog*
• (Sprint) Burn down
• Daily Standups
• + more...
*Backlog: Product/Sprint backlog or any list of tasks
Monday, February 27, 12
92. The Right Process Will
Produce the Right Results
1. Create continuous process flow to bring problems to the surface.
2. Use the "pull" system to avoid overproduction.
3. Level out the workload (heijunka). (Work like the tortoise, not the
hare.)
4. Build a culture of stopping to fix problems, to get quality right from
the [start].
5. Standardized tasks are the foundation for continuous improvement
and employee empowerment.
6. Use visual control so no problems are hidden.
7. Use only reliable, thoroughly tested technology that serves your
people and processes.
Monday, February 27, 12
93. Add Value to the Organization by
Developing Your People and Partners
1. Grow leaders who thoroughly understand
the work, live the philosophy, and teach it
to others.
2. Develop exceptional people and teams who
follow your company's philosophy.
3. Respect your extended network of
partners and suppliers by challenging them
and helping them improve.
Monday, February 27, 12
94. Continuously Solving Root Problems
Drives Organizational Learning
1. Go and see for yourself to thoroughly understand
the situation (Genchi Genbutsu, 現地現物);
2. Make decisions slowly by consensus, thoroughly
considering all options (Nemawashi, 根回し);
implement decisions rapidly;
3. Become a learning organization through relentless
reflection (Hansei, 反省) and continuous
improvement (Kaizen, 改善).
Monday, February 27, 12