Wednesday, 3 June 2009
What is a mock object?
You might use a mock object when a real object is impracticle or impossible to incorporate in a unit test or to test behaviour which is new.
Mock objects are used in test driven development.
Monday, 1 June 2009
Show what you know and what you don't know
Advice from Esther Derby's "Insights you can use" blog
Article: 5 ways that team members build trust with each other (April 02 2009)
Monday, 18 May 2009
Why keeping a backlog on index cards is a good idea...
Easy to prioritise - put them on a table and shuffle them.
Focused - there's not much you can write on an index card so only the most important information will be written on them.
Low maintenance - all you need is a pencil and a pile of index cards, and if something changes tear up the current card and write a new one.
Friday, 15 May 2009
What is a test stub?
A stub is used to inject the SUT with indirect inputs allowing the test to execute different paths through the SUT.
There are two types of test stub - a responder and a saboteur. A responder injects valid values and a saboteur injects errors or exceptions.
Thursday, 12 February 2009
Burnup or Burndown
A burndown chart shows how much work is left to do. For example, a release burndown will show the amount of story points left on the backlog for a particular release, or a sprint burndown will show the amount of ideal (golden) hours left for the current sprint.
A burnup chart shows how many running, tested, features have been done and is thus more value-focussed.
What is the difference?
A burndown chart tracks net progress. It doesn’t easily depict changes in scope. For example, if we have 100 story points to burndown and we discover 20 missed points whilst completing 50 then we still have 70 left to do.
A burnup chart tracks gross progress.
When would you use each chart and why?
In Scrum, a burndown chart is best suited to depicting sprint progress because scope is not permitted change during a sprint. A burndown chart also gives the team a sense of an end goal (the ‘getting to zero’ feeling). On the other hand, a burn-up chart is best suited to depicting overall product progress because scope is likely to change throughout the lifetime of the project. Burnup will easily communicate these changes in scope because a change in the top line clearly indicates this change.
So why might you use a burnup chart for a sprint or iteration?
A burnup chart being used for tracking a sprint or iteration is generally a sign that a team is unable to work out its’ velocity. This can happen for a number of reasons, most notably:
- Poor estimation – tasks are not broken down into small enough pieces (rushed planning meeting)
- Unclear stories (information provided is often unsuitable)
- Poor acceptance criteria (not done before or during sprint planning)
- Missed tasks, such as reporting
- Working on items not in the sprint (such as items slipped in undercover, bugs or management tasks)
Wednesday, 11 February 2009
GIF
GIF (Graphics Interchange Format)
- Uses a palette of 256 colours
- Handles solid colours well
- Handles sharp edged line art well
- Doesn’t handle gradients well (can be handled with dithering and blur)
- GIF allows interchange of images / frames to support animation
- Handles transparency on block objects
- Uses matting for edges of graphic & transparency
A Bug is not a Bug unless you provide
- Steps to reproduce
- What you expected to see
- What you saw instead
ASP.NET MVC Attributes
There are attributes available in ASP.NET MVC that allow us to handle common scenarios consistently and easily, such as:
- [Authorize]
- [HandleError]
We are using these in some places and not in others. Maybe we should take the time during development tasks to investigate different ways of doing things.
Criticise ideas, not people
Don’t do this:
“You have a lot invested in your design. You’ve put your heart and soul into it. You know it’s better than anyone else’s. Don’t even bother listening to their ideas, they’ll just confuse the issue.”
Tuesday, 3 February 2009
DRY (i) Don't Repeat Yourself
Duplication slows you down and makes your code more error prone. If the same code has to be changed in more than one place you may/will miss something.
Dupliction appears in many disguises, but there are ways to deal with it so don't worry...
1) Clumps of identical code/CPS (iii). Consider using extract method or extract class followed by highlight and delete on the remaining offenders.
2) Conditional logic testing for the same set of conditions (switch/case OR if/else). Consider polymorphism.
3) Database schema. Consider using normalisation, it can be a winner
In short duplication stinks, exterminate it ruthlessly.
(i) Andy Hunt and Dave Thomas - The Pramattic Programmer
(ii) Uncle Bob - Clean Code
(iii) CPS © - Copy/Paste Syndrome - James Enock 2009)
Add Nothing But Value
Lean : Eliminate Waste
What is waste?
Waste is anything that does not add value, such as defects not caught by tests, developing features not required for the current sprint, not coding directly from stories, etc
Mary Popendieck provides a table for waste in software in her paper Principles of Lean Thinking which also demonstrates how XP addresses waste.
Seven Principles of Lean Software Development
- Eliminate Waste
- Create Knowledge
- Build Quality In
- Defer Commitment
- Optimize the Whole
- Deliver Fast
- Respect People
See also: Agile Software Development.com
Thursday, 22 January 2009
What is this blog?
Those of you who have happened upon this blog for the first time may be wondering what it is.
Three weeks ago, I took over as CTO of MoveMe.com (a London-based start-up). I am committed to agile development practices and amongst the changes I am bringing to the development team are two practices that deliberately place the value of knowledge at the heart of the team:
- Weekly, voluntary, brown bag lunch sessions (alternating between presentations and Coding Dojo’s)
- A Knowledge Nugget at the Daily Stand-Up
The rules for the Knowledge Nugget are simple:
- The nugget must be written (legibly) on one side of an index card.
- At the end of the Stand-Up, the nugget is simply read out by the author
- No questions about the nugget inside the Stand-Up (to avoid wasting time)
- When the nugget has been read, someone volunteers to do the next nugget (they do not need to say what it is about)
- The index card is placed in team view until the next nugget is done (pinned to a board, or blue-tacked on the wall)
On top of this, I decided to blog the nuggets for posterity :-)
PNG (Portable Network Graphics)
- The PNG format was created to improve upon and replace GIF (Graphics Interchange Format) which was limited to 256 Colours.
- An image format embodying lossless data compression (known as deflate).
- PNG offers a variety of transparency options; most notably allowing the addition of an alpha channel thus greatly improving transparency quality with no need for matting.
- Improved transparency allows improved layering and visual effects in web design.
- Greater colour depth gives greater precision and clarity and improves the quality of fades.
- PNG has better image clarity than JPEG when used for text or images with sharp transitions.
Monday, 19 January 2009
View SQL Server Metadata
SQL Server stores metadata about all objects in a database.
Highlight the object name and press Alt+F1.
The Common Closure Principle
“Classes that change together, belong together.” (Robert Martin)
This principle advises which classes should be packaged together based on patterns of change.
The classes in a package should be closed together against the same kind of changes.
A change that affects a package affects all the classes in that package.
Wednesday, 14 January 2009
The L in SOLID
The Liskov Substitution Principle
- Subtypes must be substitutable for their base types.
- Closely related to Design by Contract.
- Substituting subtypes should not cause different or unexpected behaviour.
- Google: Liskov Substitution Square Rectangle
Tuesday, 13 January 2009
The D in SOLID
Dependency Inversion Principle
- High-level modules should not depend on low-level modules. Both should depend on abstractions.
- Abstractions should not depend upon details. Details should depend on abstractions.
Advantages
- Re-use high-level modules in different contexts.
- Reduces coupling and increases cohesion.
- Increases separation of concerns.
- Makes unit testing easier as it allows low-level module injection; for example Mocks.
Inversion of Control (IoC)
Objects do not create other objects on which they rely to do their work. Instead they get their dependencies from an outside source.
IoC Frameworks:
See also: “What is S.O.L.I.D?”
301 Moved Permanently
- You know the the URI requested is never going to be available again
- You know where the replacement URI can be found
301 Moved Permanently
Location: http://example.com/new-location
Cache-Control: public
Expires: {Now + 1 year}