730 likes | 867 Views
10 Ways to Get Your Project Started Right. Benjamin Day. Benjamin Day. Consultant, Coach, Trainer Scrum.org Classes Professional Scrum Developer (PSD) Professional Scrum Foundations (PSF) TechEd , VSLive , DevTeach , O’Reilly OSCON Visual Studio Magazine, Redmond Developer News
E N D
10 Ways to Get Your Project Started Right Benjamin Day
Benjamin Day • Consultant, Coach, Trainer • Scrum.org Classes • Professional Scrum Developer (PSD) • Professional Scrum Foundations (PSF) • TechEd, VSLive, DevTeach, O’Reilly OSCON • Visual Studio Magazine, Redmond Developer News • Microsoft MVP for Visual Studio ALM • Team Foundation Server, TDD, Testing Best Practices,Silverlight, Windows Azure • www.benday.com/blog • benday@benday.com
Professional Scrum at Scrum.org Professional Scrum Product Owner Professional Scrum Master Professional Scrum Developer .NET or Java Product Owners Executives Scrum Masters Architects Business Analysts DB Specialists Designers Developers Testers Professional Scrum Foundations Everyone
Top 10 Ways • Write down your Definition of Done. • Don't use a shared development database. • Write unit tests. • Design from the UI to the database. • Keep it simple. • Assume everything will change. • Ask yourself if you really need that ORM. • Create an automated build on day #1. • Do less. • Be humble and honest.
Top 10 Ways • Write down your Definition of Done. • Don't use a shared development database. • Write unit tests. • Design from the UI to the database. • Keep it simple. • Assume everything will change. • Ask yourself if you really need that ORM. • Create an automated build on day #1. • Do less. • Be humble and honest.
Definition of Done (DoD) = Everything it takes to say something iscompletely done.
What is your DoD? • Closest thing to a “silver bullet” in Scrum • Technical Debt will ruin you. • Write it down. • Review and discuss it regularly.
Sample DoD • Checked in to source control • Compiled as part of an automated build • Unit tested with >75% code coverage • Automated build output is tested by someone who didn’t write the code • No P1 or P2 bugs • Automated deployment script • Code review
Top 10 Ways • Write down your Definition of Done. • Don't use a shared development database. • Write unit tests. • Design from the UI to the database. • Keep it simple. • Assume everything will change. • Ask yourself if you really need that ORM. • Create an automated build on day #1. • Do less. • Be humble and honest.
Just say no. • Fuzzy version control • “What’s in production?” • “Have we tested that?” • Rots your brain • Bad unit tests • Bad application architecture • No automated builds. • Abysmal maintainability • Everyone on top of each other
Top 10 Ways • Write down your Definition of Done. • Don't use a shared development database. • Write unit tests. • Design from the UI to the database. • Keep it simple. • Assume everything will change. • Ask yourself if you really need that ORM. • Create an automated build on day #1. • Do less. • Be humble and honest.
What is Test Driven Development? • Develop code with proof that it works • Code that validates other code • Small chunks of “is it working?” • Small chunks = Unit Tests • “Never write a single line of code unless you have a failing automated test.” • Kent Beck, “Test-Driven Development”, Addison-Wesley
Why Use TDD? • High-quality code • Fewer bugs • Bugs are easier to diagnose • Encourages you to think about… • …what you’re building • …how you know you’re done • …how you know it works • Less time in the debugger • Tests that say when something works • Easier maintenance, refactoring • Self-documenting
Maximize Your QA Staff • You shouldn’t need QA to tell you your code doesn’t work • Unit tests minimize the pointless bugs • “nothing happened” • “I got an error message” + stack trace • NullReferenceException • QA should be checking for: • Stuff only a human can test • User Story / Product Backlog Item • Bug assigned to you should add business value
What is Design For Testability? • Build it so you can test it. • How would you test this? • Do you have to take the plane up for a spin? http://www.flickr.com/photos/ericejohnson/4427453880/
Top 10 Ways • Write down your Definition of Done. • Don't use a shared development database. • Write unit tests. • Design from the UI to the database. • Keep it simple. • Assume everything will change. • Ask yourself if you really need that ORM. • Create an automated build on day #1. • Do less. • Be humble and honest.
Emergent Architecture. • Build what you need. • It’s a spectrum.
Iterate the UI with your customer. • Minimal to no implementation. • Visual Studio 2012 PowerPoint Storyboarding • If you have to write code… • Dependency Injection • Interface-driven programming • Mock implementations
Top 10 Ways • Write down your Definition of Done. • Don't use a shared development database. • Write unit tests. • Design from the UI to the database. • Keep it simple. • Assume everything will change. • Ask yourself if you really need that ORM. • Create an automated build on day #1. • Do less. • Be humble and honest.
Top 10 Ways • Write down your Definition of Done. • Don't use a shared development database. • Write unit tests. • Design from the UI to the database. • Keep it simple. • Assume everything will change. • Ask yourself if you really need that ORM. • Create an automated build on day #1. • Do less. • Be humble and honest.
It’s a metaphysical *certainty* that you’ll have to change stuff.
Loose coupling. • Code to interfaces. • Use the Dependency Injection Pattern • (Pass dependencies in on the constructor.) • Consider an IoC Framework • Use the Repository Pattern • Remember Single Responsibility Principle
Build for Testability • Unit test, unit test, unit test • Unit test != Integration Test • Test one layer at a time in isolation • No database connections from a unit test • Integration tests in a separate project • Keep yourself honest
Top 10 Ways • Write down your Definition of Done. • Don't use a shared development database. • Write unit tests. • Design from the UI to the database. • Keep it simple. • Assume everything will change. • Ask yourself if you really need that ORM. • Create an automated build on day #1. • Do less. • Be humble and honest.