Wednesday, 11 February 2009

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 may be the root of all evil in software." (ii)

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

  1. Eliminate Waste
  2. Create Knowledge
  3. Build Quality In
  4. Defer Commitment
  5. Optimize the Whole
  6. Deliver Fast
  7. 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:

  1. Weekly, voluntary, brown bag lunch sessions (alternating between presentations and Coding Dojo’s)
  2. 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.

Followers

Contributors