Practices of agile developers
Upcoming SlideShare
Loading in...5

Practices of agile developers



Agile learning, coding, debugging & collaboration.

Agile learning, coding, debugging & collaboration.



Total Views
Views on SlideShare
Embed Views



2 Embeds 11 8 3



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment
  • No more theory, no more processes, no more models. We’ll discuss the daily practices of an agile developer which help you actively transform yourself to a higher level of SoftDev capability. We need to step out from books!
  • 1: human-driven2: outcome-driven3: feedback-driven4: adaptive
  • Things: code, process, model, tools. Adjustment must be based on well-understanding of stuffs.common responses to an obvious error:• Dismiss the person as incompetent.• Dismiss the idea by pointing out the obvious flaw.• Ask your teammate to address your concern.Courage: sometimes you don’t see the situation as written in books, you must be honest with ys that requires courage
  • At the start of a meeting, pick a mediator who willact as the decision maker for that session.
  • take Java, forinstance. You have the Java language with its series of updated features.Then you have Swing, Servlets, JSP, Struts, Tapestry, JSF,JDBC, JDO, Hibernate, JMS, EJB, Lucene, Spring...; the list goes on.If you are into Microsoft technology, you have VB, Visual C++, MFC,COM, ATL, .NET, C#, VB.NET, ASP.NET, ADO.NET, WinForms, EnterpriseServices, Biztalk.... And don’t forget UML, Ruby, XML, DOM, SAX,JAXP, JDOM, XSL, Schema, SOAP, web services, SOA; yet again the listgoes on (and we’re starting to run out of short acronyms).
  • Words vs. ImagesImage:
  • Metaphor : transferWhat we call windows on the computer screen aren’t really windows at all. The mouse isn’t actually a rodent. A folder on your hard disk isn’t a real folder, and the trashcan isn’t a real can.
  • For pricing, for example.What are use case point, function point, man month, person day, user story point?
  • Use prototyping for test code, code some, fill someAutomate to save timeSimulation: write code for Arithmetics. Add/Substract/Divide/Multiply
  • Novices need recipes. Advanced beginners don’twantthe big picture. Competent practitioners can troubleshoot. Proficient practitionerscan self-correct. Experts workfrom intuition.For your team:Use rules for novices, intuition for experts.For you: Know what you don’t know.For student: Expert != TeacherNo Expertise Without ExperienceGladwell: take any chance you got to practice. Think ab. the case of MS.
  • Comment a function:Purpose: Why does this method exist?Requirements (pre-conditions): What inputs do we need, and what state must the object be in, for this method to work?Promises (post-conditions): What state is the object in, and what values are returned, on successful completion of this method?Exceptions: What can go wrong, and what exceptions may be thrown?
  • XP values:Keep it simpleDRYCohesion is a measure of how functionally related the members of acomponent (package, module, or assembly) are
  • GoF: Gang of Four() – authors of Design Patterns: Elements of Reusable Object-Oriented Software“Don’t reinvent the wheel”Example:
  • Example of Singleton design pattern, used in code
  • What do you have in NetBeans, Eclipse, VS?
  • Bug Report:* Date of the problem• Short description of the problem or issue• Detailed description of the solution• References to articles, and URLs, that have more details or relatedinformation• Any code segments, settings, and snapshots of dialogs that maybe part of the solution or help you further understand the detailsAttack Problems in Isolation: design low-coupled code
  • Training is not all about technical .Ask Phuong : how can she train her team?
  • DRY practice in seeing others report progress motivates each of us to do the same.
  • What is dirty|smelling code?
  • One-night-a-month monster code review session: bring all needed stuffs: food, drink, music, game ..
  • Using “crowd intelligence”
  • Next session will examine some advanced tool for agile devlopers
  • Reflection: use a paper, draw a mind-mapRepeat the spirit
  • Closing Remarks: Take any chance, and practice.

Practices of agile developers Practices of agile developers Presentation Transcript

  • Session 2
    Practices of agile developers
    AgileDev Tour
    Duong Trong Tan
    Hanoi, December 2010
  • Objectives
    TurboBoost your development performance
    Beginning agility
    Feeding agility
    Deliver what customers want
    Agile feedback
    Agile coding
    Agile debugging
    Agile collaboration
    Improvement of individual expertise and productivity
  • Recap : The Manifesto
    TurboBoost your development performance
    Individuals and interactions
    over processes and tools
    Working software
    over comprehensive documentation
    Customer collaboration
    over contract negotiation
    Responding to change
    over following a plan
  • “He who chooses the beginning of a Road
    chooses the place it leads to.”
    Harry Emerson Fosdick
    TurboBoost your development performance
    Beginning Agility
  • Prepare some basic “principles” before loading...
    TurboBoost your development performance
    Work for outcome
    “Quick fixes become quicksand”
    Understand things first, before you begin to make changes effectively.
    Criticize ideas, not people
    “Keep It Professional, Not Personal”
    “Negativity kills innovation”
    Be honest, and have the courage to communicate the truth.
  • Tips
    TurboBoost your development performance
    Set a deadline.
    Argue the opposite.
    Use a mediator.
    Support the decision.
    “There is no absolute best, only better.”
    “Being unemotional does not mean you blindly accept any and all ideas presented.”
  • Practices of agility
    “Agile development uses feedback to make constant adjustments in a highly collaborative environment.”[1]
    TurboBoost your development performance
  • “Even if you are on the right track, you will
    get run over if you just sit there.”
    Will Rogers
    TurboBoost your development performance
    Feeding Agility
  • TurboBoost your development performance
    Who knows Java?
    How about these buzzes:
    Swing, Servlets, JSP, Struts, Tapestry, JSF, JDBC, JDO, Hibernate, JMS, EJB, Lucene, Spring, UML, Ruby, XML, DOM, SAX, JAXP, JDOM, XSL, SOAP, web services, SOA, OOAD, SVN, JUnit, JMeter etc.
  • Information is money, keep up with changes
    TurboBoost your development performance
    “There is nothing permanent except change”
    Technologyevolves rapidly, where are you on the “wave”?
    Learn iteratively and incrementally.
    Get the latest buzz.
    Attend local user groups.
    Attend workshops or conferences.
    Read voraciously.
    Know whenwhat to un-learn
    Question Until You Understand
  • This is your brain
    TurboBoost your development performance
    Image courtesy to Andy Hunt
  • This is your brain (cont’d)
    TurboBoost your development performance
    Looks at wholes
    Looks at parts
    Image courtesy to Vaxzine
  • TurboBoost your development performance
    R-mode Sees Forest; L-mode Sees TreesWe need to see both trees and forest => Let both sides of your brain work hard.
  • R-mod is unpredictable, so prepare for it
    TurboBoost your development performance
    “Capture 24/7”, every where
    Pen and notepad
    Index cards
    Voice Memo
    Laptop/Notebook/Netbook/Tablet PC
  • Metaphor
    TurboBoost your development performance
    “Metaphors are a way of internalizing and abstractingconcepts, allowing one's thinking to be on a higher plane and low-level mistakes to be avoided.”
    Fernando J. Corbató
    Use metaphor as the meeting place between L-mode and R-mode.
  • Time Boxing Your Learning
    TurboBoost your development performance
    Time boxing— hard deadline for an activity that cannot be extended.
    A time box forces you to make the hard choices
    A time box keeps you moving.
    Sharks have to keep swimming, or they die. Learning is the same.
  • “No plan survives contact with the enemy.”
    Helmuth von Moltke
    TurboBoost your development performance
    Deliver What Customers Want
  • Let Customers Make Decisions
    TurboBoost your development performance
    Developers, managers, or business analysts shouldn’t make business-critical decisions.
    Decide what you shouldn’t decide. Don’t make any assumption.
    Don’t bug busy businesspeople with trivial low-level details.
    “I don’t know” is a perfectly acceptable answer from a business owner.
    Use of User Stories
  • Keep it releasable in increment
    TurboBoost your development performance
    Use version control for sharing code and builds
    This helps you integrate early and often
    Tools: SVN, CVS, Git
    Commit “potentially shippable code” to contribute the “potentially shippable product” at the end of sprint.
    Automate build and deployment early
    Preparing scripts, manuals, settings etc.
    Tools: Ant, Maven
  • Issue Tracking
    TurboBoost your development performance
    As the project progresses, you’ll get a lot of feedback including
    change requests,
    feature enhancement,
    bug fixes, etc.
    Log all issues into a good tracking system
    Hints: Redmine, Google Code,, etc.
  • TurboBoost your development performance
    Open Question
    Do we need estimation?
  • TurboBoost your development performance
    Agile Feedback
  • Where feedbacks come from?
    TurboBoost your development performance
    From the System
    Using testing, coding
    From the Users
    During requirement discussion, demo, sprint review
    From the Team
    During code, test, design and “chit chat”
  • Unit Testing
    TurboBoost your development performance
    Unit testing
    provides instant feedback
    makes your code robust
    can be a helpful design tool
    is a confidence booster
    Unit tests
    can act as probes when solving problems are reliable documentation
    are a learning aid
    Tools: Junit, NUnit, HttpUnit, etc.
    Write tests before writing code (TDD)
  • Best Practices from Scrum
    TurboBoost your development performance
    Feedback are gathers before, during and after the sprint begins:
    Sprintplanning => feedback from the customers, about requirement
    DailyScrum => feedback from the team
    Sprintreview => feedback from the customer, about the product
  • Listen to the users
    TurboBoost your development performance
    Let them do acceptance testing
    “It’s a bug” : Every complaint holds a truth.
    => There is no such thing called a stupid user.
  • Quality code for productivity
    TurboBoost your development performance
    Agile Coding
  • Dreyfus Model
    Levels of Expertise
    TurboBoost your development performance
    You are neither “expert” nor “novice” at all things; rather, you are at one of these stages in some particular skill domain
    Advanced Beginner
    From Journeyman to Master
  • Pair Programming
    TurboBoost your development performance
    A pair of developers shares a problem, a computer, a keyboard and a goal: solve the problem
    PP was defined in XP
    Utilize the R-mode activities
    Improve communication and effectiveness
    Improve software quality
    Widely ADOPTED, but still CONTROVERSAL!
    2 roles: Driverand Navigator:
    The Driver doesn’t see the big picture
    The Driver should “step a way from the keyboard”
    The Navigator tends to use pattern-matching problem solving technique
  • Program Intently and Expressively
    TurboBoost your development performance
    Code should provide high-level of:
    readability and
    public void MakeCoffee()
    // ... operation
    private object makeCoffeeLock = new object();
    public void MakeCoffee()
    // ... operation
  • Communication in Code
    TurboBoost your development performance
    Use standard comments for communication, avoid misunderstanding and create “developer manual”
    Document code using wellchosen, meaningful names.
    Use comments to describe its purpose and constraints.
    BUT Don’t use commenting as a substitute for good code.
    Use tools for help: RDoc, javadoc, and ndoc, IDEs
  • Trade-off and Simplicity
    TurboBoost your development performance
    “There is no best solution”
    Code in Increments, not a “big bang”
    Use of TODO + skeleton before code
    Keep It Simple, but not simplistic
    Write High-Cohesive, Low-Coupled Code
    Efficient Use of Design Patterns
  • Design Patterns
    TurboBoost your development performance
    Design Patterns is a modern classic in the literature of object-oriented development, offering timeless and elegantsolutions to common problems in software design.
    Utilize design principles and best practices for better design
    Create “vocabulary” for team communication
    Keep GoF’s and JavaEE’s DP in your “thinking toolbox”
  • What do you see in this piece of code?
    * This is a singleton class.
    * Used for logging action to the std out.
    * Example: Logger.getInstance().log(“foo”);
    public class Logger{
    private static Logger instance;
    private Logger(){}
    public static getInstance(){
    return instance;
    instance = new Logger();
    public void log( String message){
    TurboBoost your development performance
  • Refactoring
    TurboBoost your development performance
    You practice “code a bit, fix a little” => result in dirty code & bad design.
    Refactoring helps in restructure or design your code to make it better. But what does “better” means?
    Keep in mind:
    High Cohesion
    Low Coupling
  • Refactoring Techniques
    TurboBoost your development performance
    for abstraction
    Encapsulate Field
    Generalize Type
    Replace type-checking code with State/Strategy
    Replace conditional with polymorphism
    for breaking code apart
    Extract Method, turn part of a larger method into a new method
    Extract Class
    for improving code standard
    Move Method or Move Field
    Rename Method or Rename Field
    Pull Up, move to a superclass
    Push Down, move to a subclass
  • How do you face with mistakes?
    TurboBoost your development performance
    Agile Debugging
  • There is no bug-free software!
    TurboBoost your development performance
    Keep a solutions log
    Don’t get burned twice
    Use custom DB, or issue tracker
    Warnings are really errors
    Attack problems in isolation
    Report all exceptions
    • Report as issues too!
    Provide useful error messages
  • TurboBoost your development performance
    Agile Collaboration
  • Meetings
    TurboBoost your development performance
    Objective oriented
    Product|Release review : formal
    Technical review (code, design): informal
    Attack and Defense
    Design, algorithm, code review
    Daily meeting
    Stand up meeting
  • Keep the meeting focused
    TurboBoost your development performance
    Ask 3 questions:
    What did I achieve yesterday?
    What am I planning to do today?
    What’ s in my way?
    Or What impeded me from doing good job?
    Use time box
  • Stand-up Meeting Benefits
    TurboBoost your development performance
    kick off the day ahead in a focused way
    bring the issue out into the open and actively seek help
    determine areas that may need additional hands
    make team members aware of what’s going on
    identify redundancy or areas
    facilitating the sharing of code and ideas
    encourage forward momentum
  • Collaborative Coding
    TurboBoost your development performance
    Architects Must Write Code
    Don’t let anyone design in isolation
    Practice collective ownership correctly
    Share Code Only When Ready
    Developers should be a Mentor
    Knowledge grows when given
    Don’t let others smell your code
  • Code Review
    TurboBoost your development performance
    Formal code inspections are very efficient in finding problems
    It works in “bug-prevention” mode
    The all-nighter
    The pick-up game
    Pair programming
    Can you read and understand the code?
    Are there any obvious errors?
    Will the code have any undesirable effect on other parts of the
    Is there any duplication of code (within this section of code itself or with other parts of the system)?
    Are there any reasonable improvements or refactorings that can improve it?
  • Self-organization and Self-management
    TurboBoost your development performance
    In Scrum, developers in Scrum Team manage themselves.
    This helps in:
    Encouraging transfer and share of ideas, status, problems
    Seeking problems as soon as possible
    Avoiding conflicts and problems
    Working collectively.
    Image courtesy to
  • Communication tools
    TurboBoost your development performance
    Sticky note
    Version control
    Task management tools
    Issue trackers
  • How can you kaizen?
    TurboBoost your development performance
    Improve Expertise and Productivity Continuously
  • TurboBoost your development performance
    to conclude …
  • 10,000 HOURS
    Malcolm Gladwell writes in Outliers that people at the very top don’t work harder than everyone else. They work much, much harder. In fact, Gladwell quotes neuroscientists who believe that 10,000 hours of practice is required to become world class at a particular skill--whether it’s surgery, shooting baskets, or public speaking.
  • References and Further Readings
    TurboBoost your development performance
    Code Complete 2ndEdn., by Steve McConnell
    Practices of an Agile Developer - Working in the Real World by VenkatSubramaniam and Andy Hunt.
    Pragmatic Thinking and Learning – Refactor your wetware by Andy Hunt.