CodeMash 2010 Wrap UP

I attended CodeMash at Kalahri in Sandusky, Ohio last Wednesday and Thursday.  I skipped out on the last day to catch up on some work.  All in all it was a great experience.  I learned quite a bit and also felt validated in many of the approaches we’ve been taking at work.

Below are my notes from the sessions I attended.  I also have to note my favorite quote from CodeMash.  Barry Hawkins was giving a presentation on Domain Driven Design.  When trying to describe the experience of talking to Doman Driven Design people about Domain Driven Design, (apparently they can be long winded in their explanations)  he said something like, “it’s like talking to Ents with crack pipes”.  I liked that description a lot!

Session Notes:

Engineering Vs Design

Domain Driven Design

Software Design and Testablity

User Stories Closing The Agile Loop

Keynote – Lean Methodology

Agile – Iteration Zero

Practical B/TDD

Fundamentals Of Software Engineering

CodeMash – Engineering Vs Design

It’s my last session today and forever at CodeMash this year.  I’m not able to show tomorrow.  Currently sitting in on Engineering Vs Design, given by Joe Nuxoll.

Reviewing Web 2.0 and RIA‘s, things like Google Maps, could they have been envisioned by a designer with no software knowledge or vice versa?  Probably not.  Must have design and engineering mixed together in ways not previously needed.  UI Engineering is design and design is UI Engineering.

Traditional Roles in product development: Designers, UI Developers, and web UI developers.  More and more you are seeing people who can do all of these tasks as need to understand them all.  New breed of tools to simplify this sort of work, RIA Design tools:  Adobe Catalyst, JavaFX Production Suite.

Important to cross train engineers and designers as they function with very different processes.  Important to educate engineers on the design process and designers on the engineering process to encourage mutual skill appreciation.  To this end co-location is very helpful.  Much easier for designers and engineers to understand and support each others processes if they are situated together.

Important to understand the difference between prototype and production.  Build many prototypes and be willing to throw them away.  Joe likes to use a separate folder in subversion for design, partly because subversion is good at handling design type resources and partly to separate highly iterative resources.   The design folder is prototype work, not production.  Also brings benefit of version control to design, where it is not traditionally used.

Build detailed facades.  These are generally not going to be production code, be ready to throw much of it away.  Really iterate to get it right.  Stub out back end calls and keep back end people in the loop.  Make sure the UI team has regular check ins with the back end team.

Once you’ve iterated to the point where can start work on production code can lift much of the final iteratino prototype code to start production work.  Keep prototypes clean by doing production work in separate source control folder.

Joe seems to be wrapping up although still 20 minutes left in the session.  I think we’re going to Question and Answer now.  Question came up as to how to get end users to not focus on color and such when reviewing a functional wire frame?  Joe’s answer, keep all design detail out of functional wireframe so nothing for end user to get distracted by.

Wire frame prototyping should happen before visual design.  Designers need app functionality to be fairly solid before they can effectively begin their work.  Interaction and functionality should be defined thoroughly before visual design.

Well that’s a wrap.  Another good session, not very technical but very relevant to our current work.

CodeMash – Domain Driven Design

Time for the second afternoon session here at CodeMash.  This session is called Domain Driven Design and is being given by a gentleman by the name of Barry Hawkins.  This is the second presentation I’ve seen Barry give today, he’s a very dynamica and entertaining speaker, but still is very on point.

The presentation focused on the importance of modeling.  To distill this greatly models are a representation of the domain, the domain is the subject matter itself.  It is important to use ubiquitous language across a team made up of all people necessary to move project from conception to completion.  This means that subject matter experts and scenarios they provide feed the domain vocabulary, not pattern and practice leanings.

Domain models should start small and be validated by detailed reference scenarios.  Barry’s team uses nNuit or jUnit to create tests to in effect ‘model’ the reference scenarios so they can validate the model accurately reflects them.  The reference scenarios get increasingly complicated and are provided by domain subject matter experts.  Barry used an example from the shipping industry as an example.

Another importance concept was to entertain different models, don’t settle on the first solution you think of.  Use natural language to pseudo code out multiple modeling options to decide which is best for the context you’re in.  Don’t be afraid to throw out models if they don’t work, the first thing isn’t the best thing necessarily.

Barry works with Eric Evans who authored a book, Domain Driven Design, which the talk was based on.  Great overview of a very deep topic.  I’m looking forward to picking up the book and learning more.

CodeMash – Software Design and Testablity

It’s Thursday afternoon here now at CodeMash.  Had a nice lunch while listening to a presentation on Microsoft’s open source efforts given by Hank Janssen. Now I’m sitting in on my first afternoon session, Software Design and Testability, the presentation is being given by Jeremy Miller, a gentleman from Dovetail Software in Austin Texas.

Testability and Design …is about finding, removing and preventing defects….is about assiging and partitioning responsibilities in an application…corresponds well to traditionally good design ideas…..is facilitated by patterns.

Need to shift mindset, I don’t write code, I ship software….people should see their efforts in the context of the whole, testability promotes this.  Software isn’t designed for the efficiency and optimzation of the code itself, but for the software as a whole.   Good code is only important in that it enables us to delivery what the customer wants, where it does not do that it doesn’t really matter.  That being said it is really important since good code allows software to be changed and worked on by other developers more easily, allowing us to better deliver wanted features to our customers.

First Causes Of Good Design: Fast feedback, short iterations are important to good design (agile)……Orthogonality, good separation of concerns (persistence, ui) so changes can be kept to small parts of the system when made.  Changes will be needed when made only want to change one area of system to accommodate.  This allows you to change things more easily when you know more later in your project.   You will be wrong at times, this helps make things easier to change to accommodate this…………Reversibility, give customers the ability to change their mind………….Understandability, although smaller classes for testing that interact more may make things less understandable.

Writing Automated Tests:  Known Inputs and Measurable Outcomes.  State Based tests versus Interaction Based tests, state based tests check to see if state changes occurred appropriately, testing to see if something else was called appropriately are interaction based tests (mock objects).

What makes a good test?  Repeatable…..Run Fast…..Easy To Write….Easy To Understand, a good test tells you where and why it failed, not just that it failed.

Jeremy is pulling up an example of something he did early on that was not testable.  Showing us the actual code.  Example code is doing many things at once, hitting database and doing processing.  Code is impossible to test without setting up entire application.

You should isolate the ugly stuff, isolate external dependencies ie the database, active directory, remoting, chatty api’s, etc…..etc……  Jeremy gave an example from Jay Flowers, Expand The Creamy Center.   Jeremy is now walking through how to do this with the sample bad code he has up on the screen.   Refactoring code into state machine that is heart of the workflow, ugly stuff is pulled out and state machine is tested using mocks for the ugly stuff.

Coding from the bottom up is good idea.  Test small to begin with, then test big.  Don’t try and put everything together and then test, hard to find problems you find.  Build little things at a time and assemble them.  Jeremy is a big fan of Object Role Stereotypes and responsiblity driven design, this is in the context of introducing a controller into his refactoring of his example code.

Inversion of control discussion.  Should push not pull, if your class is directly accessing a config file or database it is very tightly coupled to these things and hard to test.  Push externally needed things into your classes so they aren’t coupled to these items.  Push don’t pull!  This also causes you to keep a short tail, can resuse code without needing a whole lot of other code to come with it.

The hour is up, a very good presentation I thought.  The push versus pull analogy really made a lot of sense a clarified why we’re doing a lot of the things we’re doing.

CodeMash – User Stories Closing The Agile Loop

Time for the second morning session here at CodeMash.  This session is called User Stories Closing the Agile Loop and is being given by a gentleman by the name of Barry Hawkins.

Barry says requirements churn is not a crisis.  This really hits home, it feels like it is, but it is also a reality.  Barry is now walking through the agile manifesto.  Creating working software over comprehensive documentation does not mean we don’t create any documentation.  It means we create high quality documentation that people actually want and use.

Barry’s reviewing the pieces of the manifesto and talking about his real world experiences and what they practically mean to him.  This is really interesting stuff.  Comparing estimation process with business in its usual way similar to a game of poker.  Points out contracts are made at beginning of project when we are as ignorant as we’ll ever be about the project, this may not be the optimal time to lock in absolutes.  An Agile approach would dictate a softer approach that involves collaborating and allowing for changes along the way as we learn more.

Underlying agile assumptions:  Motivated self-directed people make up the team.  Cross functional team, have everyone you need to move product from concept to launch.  Good teams have a QA person at all stages, not just at the end.  Teams have highly available domain experts.  A culture of testing.  A failure tolerant environment.  Value projects completed, not projects launched (context switching for developers can be time costly).

Most agile adoption is driven by development teams.  Usually it is not management that proposes development is done using an agile methodology.  This produces situation where development doing iterative approach while business is still providing phased waterfall analysis, use cases at best.  Hard to fit non iterative requirements/analysis process into iterative development process, very time costly to translate requirements.

What are user stories?  Barry recommends the book User Stories Applied for deeper understanding.  User Stories are place holders for interaction, not a substitute.   User Stories are much smaller than use cases, they focus on a small strip of functionality, they don’t dictate detailed requirements such as UI requirements.   User Story structure:  “As a ___ user, I can ____, so that _______”.  Structure defines who is going to do what and what benefit it will provide.  The “so that’ is the benefit statement and is very important.  Stories should follow Bill Wake‘s  INVEST acronym: Independent, Negotiable, Valuable, Estimatable, Small, and Testable.

But what about __________.   Business won’t cooperate: maybe business doesn’t like you, you say no to often.  Could it be that business has come to believe no will already be the answer.    Functional spec already written:  you can turn these into user stories.   Team is not co-located: wiki’s can help here.  no UI for code : just  becuase no UI doesn’t mean there aren’t users.

Well that’s that.  Very good presentation I thought.