Applied craftsmanship

46
Applied Craftsmanship In A Real Project A talk by Alex Bolboaca & Claudia Ro u ș [email protected] [email protected]

description

We've been discussing software craftsmanship for years. But does it match the realities of a business? How? This is a story about applying the ideas and practices of software craftsmanship for a real project in a difficult context. The conclusion? It helped us, it might help you as well.

Transcript of Applied craftsmanship

Page 1: Applied craftsmanship

AppliedCraftsmanship

In

A Real ProjectA talk by Alex Bolboaca & Claudia Ro uș

[email protected]@mozaicworks.com

Page 2: Applied craftsmanship

The Challenge

Page 3: Applied craftsmanship

5 topics● Starting with a new technology● Apprenticeship● Consistency● Testing Strategy● Adapting to the Customer

Page 4: Applied craftsmanship

About Us

● Software crafter● Experience with Java● Active in communities

● Polyglot programmer● Trainer● Coach

Page 5: Applied craftsmanship

Background● Innovative eHealth application for a GP

association● Started in March 2013 with Alex part time● First picked the right technologies● Claudia joined September 2013 full time● Alex half time

Page 6: Applied craftsmanship

Constraints● Demo twice a week

– Because client is very involved in the process

● Had to use Java technologies– Because of specific needs for eHealth applications

● Limited monthly budget● Web-based, usable on tablet

Page 7: Applied craftsmanship

1. Starting with a New Technology

Page 8: Applied craftsmanship

How it started● Evaluation of Java frameworks

● Evaluation of UI libraries

Page 9: Applied craftsmanship

How it started (cont'd)● Templating: Client vs. Server side?● Javascript library

Page 10: Applied craftsmanship

Deferred decisions● Database engine: working with in-memory

database● Authentication and authorization: picked Shiro

in Jan 2014● Public API

Page 11: Applied craftsmanship

How We Improved● Self-assessment● Identified weak points● Learned and practiced them● Applying in production

– New code: written based on new understanding– Refactoring when revisiting old code– Test First Programming => TDD

Page 12: Applied craftsmanship

Self-Assessment

Page 13: Applied craftsmanship

Conclusions● Learning a new technology is challenging● Build upon strong points!

– Alex: Polyglot programming, Training and coaching experience, Strong knowledge of design and technical practices

– Claudia: Unit testing, Java, Java Web Development– Eager to improve

● Learning should be included in the development process

Page 14: Applied craftsmanship

2. Apprenticeship

Page 15: Applied craftsmanship

Why● Now: Deliver twice a week● Near future: Coordinate own team

Page 16: Applied craftsmanship

Structure● Self-assessment (project-related)● Identify necessary skills to achieve the goal

(professional growth)● 121 meetings every 2 weeks

– Discuss progress– Define next actions – reading, watching videos, coding

kata etc.– Coaching, mentoring

Page 17: Applied craftsmanship

Skills

Page 18: Applied craftsmanship

How● Learn grails, javascript through katas● Include refactoring in daily work● Test First Programming => TDD● Growing knowledge on software design

– Reviews, discussions, articles, videos etc.

● Continuous– Pair programming– Review sessions

Page 19: Applied craftsmanship

Code - Tests

Page 20: Applied craftsmanship

Code - Production

Page 21: Applied craftsmanship

3. Consistency

Page 22: Applied craftsmanship

Why● Facilitate decisions● Enable user-centric conversations

Page 23: Applied craftsmanship

The User View● User perspective = “storymap”● UI

– Same type of info presented in the same way

– Same actions in different places look the same

Page 24: Applied craftsmanship

The Code View● Same concept should have same name

– Eg: doctor *, physician, personalGP...

● The concept should be named in business terms– Eg. current encounter, consultation *

Page 25: Applied craftsmanship

The Design View● Separate responsibilities

– Exception handling– Controller only renders, Service works with data– Client side – refresh UI and minimal UI logic

● Tests organization– Avoid duplication in tests

Page 26: Applied craftsmanship

Conclusion● Consistency helps us make decisions, have

meaningful conversations● Consistency requires attention to detail● Consistency is a general design principle

Page 27: Applied craftsmanship

4. Testing Strategy

Page 28: Applied craftsmanship

Why● Keep the development rhythm● Structure tests for maximum efficiency● Ideally:

– One test per behavior– No duplication between tests

Page 29: Applied craftsmanship

Pyramid of Tests

Page 30: Applied craftsmanship

How we started

Page 31: Applied craftsmanship

Where we are

Page 32: Applied craftsmanship

Acceptance Tests

Page 33: Applied craftsmanship

Acceptance Tests Report

Page 34: Applied craftsmanship

Controller Unit Tests

Page 35: Applied craftsmanship

Service Unit Tests

Page 36: Applied craftsmanship

Javascript Tests

Page 37: Applied craftsmanship

Conclusion● The testing strategy evolved based on what

we learned● We improved test and application design● Acceptance tests

– help us structure our work– allow customer to understand the complexity

Page 38: Applied craftsmanship

5. Adapting to the Customer

Page 39: Applied craftsmanship

Benefits● Optimize our work based on reality● Increase customer satisfaction

Page 40: Applied craftsmanship

How we started

Page 41: Applied craftsmanship

Where We Are

Page 42: Applied craftsmanship

Transparency

Page 43: Applied craftsmanship

Results● Excellent feedback

– “Very good”– “You show a lot of care for my money”– “Very beautiful application”

● Improved collaboration

Page 44: Applied craftsmanship

3 Core Ideas1.High Quality, Fast Feedback At All Levels

2.Continuous Improvement

3.Attention to Details

We believe this is software craftsmanship.

Page 45: Applied craftsmanship

Your Questions?

“The important thing is not to stop questioning”

Page 46: Applied craftsmanship

Photo Attributionhttp://3.bp.blogspot.com/-_wmj16Vjb3Y/Uckwv7kSQJI/AAAAAAAAAik/RC6Hat-2dLo/s1600/Casa_batllo_2.jpg

http://s1ngal.files.wordpress.com/2012/11/up.jpg

http://www.wallsave.com/wallpapers/1920x1080/new-technology/2313189/new-technology-hd-hdpaperz-com-2313189.jpg

http://www.trendecoration.com/wp-content/uploads/fantastic-idea-for-interior-design-and-decoration-by-gaudi.jpg

http://2.bp.blogspot.com/-jy6M3uYUgtM/UgJShTrwtfI/AAAAAAAAI4M/jM7w39ed8xg/s1600/1290462608-gaudi5-1000x864.jpg

https://lh6.googleusercontent.com/-jl4_nEiEsog/TXtvoKGClxI/AAAAAAAAAC0/SaUP996hmPw/s1600/IMG_1591.JPG