wiki:PROCESS

Version 8 (modified by pavlina, 14 years ago) (diff)

--

Sophie 2.0 Process

Тo keep the quality of the product (both internal and external) high, we need to define some additional things (this is related to the SCRUM mandatory definition of done).

This should improve the situation with the following challenges:

  • Internal quality (quality of code)
  • External quality (quality of the visible product)
  • Documentation reading (many things are written, few things are read)
  • Not to produce too much process overhead

Rules

This is a list of rules you have to follow. It is not final yet, but disobeying them may lead to penalties.

General

  1. Work towards the goal!
    • No matter what this document defines, or how concrete your task is defined, there is no way to define exactly what should be good for our goal, and what should be bad.
    • You have to work towards the goal.
    • When you work on something, you have to understand why and how it is related to our goal.
    • You have to try to drive the whole team towards the goal (no one alone is capable of reaching it)
  2. Be honest!
    • You have to present the situation to the leader as is.
    • Even if it does not look good.
    • For example, if you have no idea how to make something, don't tell "almost done" to the leader.
  3. Be initiative!
    • If you find a way that, you can make something good to the team, don't wait, but propose it to be done.
  4. Look around!
    • If you see problems in the code, in the product, in the organization, or whatever, announce them.
    • Try to keep an eye about what other people do (either for things you can learn from, or for things they are doing bad).
    • Try to get a global vision of what is happening in our team.
  5. Seek improvements (for yourself, and for the team)
    • No matter how good you are, there are always more things you can learn, or skills you can get (note that knowledge and skills are different things..)
    • Improving and learning is your responsibility.
    • Not trying to understanding how things work, but learning that this does this, and that does that will lead you nowhere! Really! Even if you program for 20 years. I've seen such people.
  6. Seek the most appropriate solution!.
    • There is no perfect code. There is no perfect solution also (or maybe there is, but it is not reachable).
    • There are no general good design rules - a design is good if it works well, it is easy to use (like if it is library, the clients need not to write much), is simple, has good performance, is modifiable/extensible, testable, etc. Nor the number of design patterns used solves this, nor a code convention... nothing. You have to find a design that is good.
    • Hacking around just to make things work is usually a time bomb. It is not acceptable to do this, because saving 1 day this month, usually costs 7 days the next month.
    • What we should do, is seeking something between just make it work, and perfect, but more close to perfect than just works.
    • That is, seek a good solution.
  7. Quality is not negotiable! - but scope and resources are
    • If something can not be done in acceptable quality, given the resources (time) and scope (functionality) it has, the we either reduce the scope, or increase the resources.
    • We are not allowed to reduce the quality!
  8. Accept the challenge!
    • We are not doing the next Store Information System, the next Lawyer's web site, nor the next database module for the big company X
    • What we are doing, is something that only few companies in the world can do, and even they are not good enough.
    • There is no "How to make the next generation desktop publishing software"!

Discipline

  1. You have to try to follow the process as much as possible.
    • Self discipline is needed.
    • If you don't have enough self discipline, then this team is not appropriate for you (you should go to a company which forces you to be disciplined by other means).
  2. By default, our work-time for half-time working (all of us currently) is 11:00 to 15:00.
    • If you need to shift it, or not work some days, but work more other days, you need to warn the leader, or the appropriate person.
    • you can not shift more than the half of the working time
  3. By default you have to make 20 working hours per week.
    • This means 20 productive work hour not 20 hours staying in the office.
    • You may stay at the office as much as you like, take breaks, study, play games, whatever, but you should make 20 productive hours (working on a task).
  4. You may work from home, or from other locations, but unless you have approval from the leader (like when we had no electricity), at least 3/4 of your time you should work from the office.
  5. Unless having approval from the leader, you may not work more than 8 hours per day.
    • Or at least you may not count more than 8 hours per day as productive time.
    • This means, that you need to work at least 3 days per week in order to complete your time.
  6. You should be present in at least 2/3 of the team meetings.
    • For one month, we usually have 10 meetings, which means you may skip at most 3.
  7. In case you can not be present in a meeting, you have to warn the leader before this, and have a representative (someone else in the team) who will represent you.
  1. You have to write in the end of every working day daily report about what have you done during the day. You have to write how much effort each activity takes. See report structure(TODO).

Other

  1. SVN commits should have clear message!
    • no commits without message
    • if it is hard to state what the change is, then probably you are not working on one thing.
  2. Integrate continuously.
    • Do not hold a source code very long (or prolong the task).
  3. Time box to 150% the estimate.
    • If you see that you are about to exceed the estimated time, warn the leader immediately.
    • If you leader agrees, and it seems that the task can be completed with little more time, it is possible to work a bit more on it.
    • A task reaching 150% (or 200% if the leader agrees) its estimate should be dropped, even if it is 99.9% complete.
  4. Do not commit bad code!
    • Generally, you should not commit before a review is passed!
  5. Do not start implementation phase of a task if the design phase is not reviewed yet!
    • wait for the review of the design otherwise your work will be for nothing.

SCRUM

We are continuing to use SCRUM (see Sophie-JR-Process-Optimization#Scrum). What is new, is that:

  • Becoming much more strict (and unfortunately increasing the process overhead)
  • Trying to have much higher quality.
  • Hoping that the lost of speed will be compensated by non lost of momentum (that we usually suffer from)
  • The sprint backlogs will be wiki page (TODO: link when ready).
  • The four state of a story/task are:
    • to [analyzing, designing, implementing, done, testing]
  • Each passing between states requires a review.

We create the internal backlog which should track:

  • Impediments backlog
  • ?Documentation backlog?? (reading tracking?)
  • ?Code reviewing?

Task Phases

Each taken task in the current sprint should pass trough the following phases:

  • analyzing - task is waiting to be taken, and someone to determine What should be done?
    • to learn how to write good analysis, see Platform Standards Analysis
    • transitions:
      • to designing when all the post-conditions are met
      • to analyzing when post-conditions are not met
  • designing - The implementer is designing it, that is, tries to decide How it should be done?
    • pre-conditions:
      • the post-conditions of analyzing
      • work:
        • designing is not only getting an idea of how to do it, but a detailed concept,
        • for many tasks the design phase should take most of the time
        • post-conditions - see below
        • transitions:
          • implementing if the reviewers decide, that the task is designed well
          • designing if the reviewers decide, that the task needs better design, or does not satisfy the requirements
          • analyzing if the reviewers or implementers decide that the task can not be done in acceptable time or have no idea how to do it
  • implementing - The implementer makes an attempt to complete the task.
    • pre-conditions:
      • the post-conditions of designing
    • post-conditions - see below
      • transitions:
        • done if
          • the reviewers decide, that there are no any issues.
          • the reviewers decide, that there are very minor issues which should be fixed later
          • the issues are reported as bugs (or something)
          • the leader agrees on this
          • *note: it is usually better to face the reality, that it is just not done.
        • implementing if the reviewers decide that the requirements are not fully satisfied
        • designing if the reviewers decide, that the initial design will not do the work, and needs to be fixed.
        • analyzing if the reviewers decide, that the task can not be done in acceptable time or quality.

  • done
    • when the task is really done
  • testing
    • pre-conditions:
      • the task is in done phase
    • post-conditions:
      • transitions:
        • done if
          • the reviewers decide, that there are no more tests to be added
          • the reviewers decide, that minor missing tests can be added later
          • the leader agrees on this
        • implementing if the reviewers decide that the requirements are not fully satisfied
        • designing if the reviewers decide, that the current tests need to be fixed
        • analyzing if the reviewers decide, that the task can not be done in acceptable time or quality.
  • *Note that, failing a state (for example moving from implementing to analyzing because implementing failed) requires that the state of the product is reversed to the initial.

You may note that some bigger tasks can not be easily made with these phases. However this is a problem to the task. Big tasks should be decomposed to smaller so that they can fit.

Requirements

Refactoring should be continuous process(not doing again great refactorings!).

All Code Tasks

Both implementer and reviewer must be very careful. Please check that you understand all of the above.

For each code task (no matter whether it is a library, external feature, bug fix...), should pass the following check list:

  • code
    • The code style is correct to our convention.
    • The code is easily readable.
    • There are no fake JavaDocs (JavaDocs without useful information).
    • The java-doc is complete enough.
      • For each element, the JavaDoc should describe clearly what is it (if this is not easy, then probably the design is bad)
    • It causes 0 errors.
    • It causes 0 warnings.
    • The @SuppressWarnings annotation is used only if really needed:
      • unused, when something is used only by reflection
      • synthetic-access, when you want to touch something internal with inner class (although in many cases this may be avoided)
      • unchecked, when you are doing something complex with generic (note that this is also avoidable in many cases)
    • No inaccurate, or unclear XXX and TODO tags
    • It should not break other code (ensured by their tests).
    • There some bad code examples here - CODE_SMELLS
  • design
    • It is documented
      • (not only in the code).
    • It is simple and understandable.
    • It is easy to use.
      • (using it requires less work / small code)
    • It is error proof (hard to use it in a wrong way)
      • The compiler prevents most errors.
        • (it is better to have an abstract getKind() instead of forcing implementors to call setKind at construction)
        • (final may also help)
      • Most of other errors cause an exception
        • (defensive programming helps here)
    • When a library is used, it is used correctly.
    • There are no representation exposures.
    • There are no GOD (very long) methods.
    • There are no GOD (very long) classes.
    • The coupling is low.
    • No magic numbers (and strings)
    • No array members.
      • (unless there is really a reason)
    • No public instance fields.
    • No public non final fields
    • It has high cohesion.
    • It has low coupling.
    • It is possible to state in one sentence what every class or member is/does.
    • Classes and members are named correctly.
    • Every class (or attribute) is self responsible and self complete.
    • No code duplication (copy paste).
    • It is easily testable.
      • (when not, testing helpers are provided to make it such).
    • No other kind of smells.
  • It has good package structure.
  • It is logging correctly.
  • It has adequate error handling.
  • No premature optimization.
  • No premature abstraction.
  • tests
    • It has automatic use case tests, before implementing.
      • (they are very good to demonstrate the design for a library)
    • If it has demos, the demos are actually tests with main method.
      • (demos should be done at design time!)
    • It has enough unit tests to ensure its correctness
      • (listed at design time, passing at implementation time)
    • It has enough integration tests
      • (listed at design time, passing at implementation time)
    • It has enough system tests
      • (listed at design time, passing at implementation time)
    • It has written scenarios for manual testing
      • (when it is an external feature or a bug)
    • The tests had code coverage
      • (good code coverage does not mean good tests, but bad code coverage means bad tests)
  • other:
    • Enough information should be provided in the backlog.

General

The following are valid for no matter what kind of task we are doing:

  • Analysis - What is to be done?
  • Design - How will we do it?
  • Implementation - The actual "do it".

Review may be applied after each phase. Each activity should be logged (in the sprint backlog), and all information needed to log it should be filled. If implementers want, they can (and are encouraged to) ask for guidelines early. This is something like an early review, which is not logged.

At first month, each review should be rechecked by Milo.

However, to clarify the things further:

  • Implementing a new external feature (visible from the user):
    • analyzing -
      • should have a specification, and a manual testing scenario
    • designing -
      • write an automatic test/tests which verifies that your feature is working
      • look at the related code,
      • decide what needs to be added
      • if you add new library feature
        • write use case tests for it
      • You may also write skeleton types (only declaration) and demos.
        • write an outline of your design.
      • implementing
        • Make all the designed things work.
        • Ensure that all tests pass.
        • During the process, add more tests.
      • reviewers - one other developer and one QA.
  • Researching about a technology, library, whatever.
    • analyzing - specify what needs to be researched
      • what the research will solve,
      • what is needed to be solved (this is important)
    • designing
      • You can try things, etc, but... do not pollute the main source (for example with libraries).
      • If you need to use other libraries, do it in another project (or in another branch)
      • If you don't need other libraries, you can do it in a research package, but you should make sure that you don't introduce warnings, failing tests, etc.
    • implementing
      • You present the written results / conclusions of your research, demo codes, etc.
    • reviewers - 1-2 developers
  • Implementing a new internal feature (a library or something, not directly visible).
    • analyzing - what the library will provide
    • designing - should include
      • use case tests,
      • samples,
      • (in some cases demo),
      • design outline
    • implementing
      • the library should be implemented
      • enough tests should be written during the process
    • reviewers: 2 developers
  • Performing some structure changes, or refactoring.
    • analyzing - what the issues are
    • designing - understanding it, and providing an idea how to fix the issues
    • implementing - fixing the issues
    • reviewers: 1-2 developers
  • Writing a specification
    • analyzing - what needs to be specified
    • designing - brief ideas about the thing
    • implementing - writing the specification exactly
    • reviewers: - 1 qa + 1 developer
  • Doing documentation.
    • analyzing - what needs to be document
    • designing - what it will contain (outline) and understanding of the content
    • implementing - adding the appropriate content.
    • reviewers: - 1-2 team members
  • External testing (the usual testing task).
    • analyzing - has to state what the focus of the tests will be.
    • designing - has to select test scenarios, and make new if necessary
    • implementing - should apply testing scenarios and provide bugs and recommendations (things that probably the users will like/dislike)
    • reviewers: 1 developer
  • Fixing a bug.
    • analyzing - what the bug is. needs a manual testing scenario (in bugzilla)
    • designing - an automatic test (failing) should be present, idea what is causing it, more tests (which detect related internal bugs), idea how can be fixed
    • implementing - fixing the bug, making the tests pass, and some refactoring
    • reviewers: 1 QA and 1 developer

Templates for logging specific task kinds should be added.

Roles

  • leader - someone assigned to do the management (default: milo)
  • implementers - the workers on given task
  • reviewers - someones (it needs to be two, usually one developer and one QA) which is assigned to review something.
    • the reviewers and the implementers may not intersect!

Things to be read tracking - TODO

Other notes

Reverting

If some bad code is committed (for example one that breaks changes) there may be a need to revert it.

Reverting is done by:

  • creating an inverting diff (between revisions, or several revision numbers)
  • applying that diff to the current source code.
  • commiting