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

Practices of agile developers

on

  • 1,580 views

Agile learning, coding, debugging & collaboration.

Agile learning, coding, debugging & collaboration.

Statistics

Views

Total Views
1,580
Views on SlideShare
1,569
Embed Views
11

Actions

Likes
1
Downloads
40
Comments
0

2 Embeds 11

http://aptech.ac.vn:8801 8
https://jujo00obo2o234ungd3t8qjfcjrs3o6k-a-sites-opensocial.googleusercontent.com 3

Accessibility

Categories

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.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
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: http://www.flickr.com/photos/vaxzine/2278300537/
  • 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
    tandt@fpt.edu.vn
    Hanoi, December 2010
  • Objectives
    TurboBoost your development performance
    2
    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
    3
    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
    4
    Beginning Agility
  • Prepare some basic “principles” before loading...
    TurboBoost your development performance
    5
    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”
    Courage
    Be honest, and have the courage to communicate the truth.
  • Tips
    TurboBoost your development performance
    6
    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]
    7
    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
    8
    Feeding Agility
  • TurboBoost your development performance
    9
    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
    10
    “There is nothing permanent except change”
    Technologyevolves rapidly, where are you on the “wave”?
    Tips:
    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
    11
    Image courtesy to Andy Hunt
  • This is your brain (cont’d)
    TurboBoost your development performance
    12
    Non-verbal
    Spatial
    Random
    Intuitive
    HolisticSynthesizing
    Subjective
    Looks at wholes
    Verbal
    Symbolic
    Abstract
    Logical
    Sequential
    Rational
    Analytical
    Objective
    Temporal
    Looks at parts
    Image courtesy to Vaxzine
  • TurboBoost your development performance
    13
    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
    14
    “Capture 24/7”, every where
    Uses
    Pen and notepad
    Index cards
    PDA/Smartphone
    Voice Memo
    Laptop/Notebook/Netbook/Tablet PC
  • Metaphor
    TurboBoost your development performance
    15
    “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
    16
    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
    17
    Deliver What Customers Want
  • Let Customers Make Decisions
    TurboBoost your development performance
    18
    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
    19
    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
    20
    As the project progresses, you’ll get a lot of feedback including
    corrections,
    suggestions,
    change requests,
    feature enhancement,
    bug fixes, etc.
    Log all issues into a good tracking system
    Hints: Redmine, Google Code, Assembla.com, etc.
  • TurboBoost your development performance
    21
    Open Question
    Do we need estimation?
  • TurboBoost your development performance
    22
    Agile Feedback
  • Where feedbacks come from?
    TurboBoost your development performance
    23
    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
    24
    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
    25
    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
    26
    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
    27
    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
    Expert
    Proficient
    Competent
    Advanced Beginner
    Novice
    28
    From Journeyman to Master
  • Pair Programming
    TurboBoost your development performance
    29
    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
    30
    Code should provide high-level of:
    readability and
    understandability.
    public void MakeCoffee()
    {
    lock(this)
    {
    // ... operation
    }
    }
    private object makeCoffeeLock = new object();
    public void MakeCoffee()
    {
    lock(makeCoffeeLock)
    {
    // ... operation
    }
    }
  • Communication in Code
    TurboBoost your development performance
    31
    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
    32
    “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
    33
    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(){
    if(instance!=null){
    return instance;
    }
    else{
    instance = new Logger();
    }
    }
    public void log( String message){
    System.out.println(message);
    }
    }
    34
    TurboBoost your development performance
  • Refactoring
    TurboBoost your development performance
    35
    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:
    Maintainability
    Extensibility
    High Cohesion
    Low Coupling
  • Refactoring Techniques
    TurboBoost your development performance
    36
    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
    37
    Agile Debugging
  • There is no bug-free software!
    TurboBoost your development performance
    38
    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
    39
    Agile Collaboration
  • Meetings
    TurboBoost your development performance
    40
    Planning
    Objective oriented
    Review
    Product|Release review : formal
    Technical review (code, design): informal
    Attack and Defense
    Design, algorithm, code review
    Tracking
    Daily meeting
    Stand up meeting
    Retrospection
    Training|Seminar|Composium|Pilot
  • Keep the meeting focused
    TurboBoost your development performance
    41
    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
    42
    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
    43
    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
    44
    Formal code inspections are very efficient in finding problems
    It works in “bug-prevention” mode
    Styles:
    The all-nighter
    The pick-up game
    Pair programming
    Receipt:
    Can you read and understand the code?
    Are there any obvious errors?
    Will the code have any undesirable effect on other parts of the
    application?
    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
    45
    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 http://www.richmondmontessori.ca
  • Communication tools
    TurboBoost your development performance
    46
    Whiteboard
    Sticky note
    Email
    Version control
    Wiki
    Blog
    Task management tools
    Issue trackers
  • How can you kaizen?
    TurboBoost your development performance
    47
    Improve Expertise and Productivity Continuously
  • TurboBoost your development performance
    48
    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
    50
    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.