Cf objective2014 software-craftsmanship

49
Software Craftsmanship Kev McCabe CF Objective 2014 Thursday 15 th May http://bit.ly/ softwareCraft

description

 

Transcript of Cf objective2014 software-craftsmanship

Page 1: Cf objective2014 software-craftsmanship

Software Craftsmanship

Kev McCabeCF Objective 2014Thursday 15th May http://bit.ly/softwareCraft

Page 2: Cf objective2014 software-craftsmanship

About Me

Software Craftsmanship Mentor @ General Electric

• ColdFusion since 1996 (v2)• London CFML & Web

Community Leader• Scrum Master• Kanban Practitioner• Agile Coach

T: @bigmadkevW: BigMadKev.com

http://bit.ly/softwareCraft

Page 3: Cf objective2014 software-craftsmanship

Introductionhttp://bit.ly/softwareCraft

Page 4: Cf objective2014 software-craftsmanship

Post Its & Pen

You may have questions to ask

Please note them, and put your email/twitter/name

I’ll follow up with you at a later stage

Or discuss here if time permits

Please place into the box at the front here

Page 5: Cf objective2014 software-craftsmanship

Agile Software Development

Individuals and interactions overprocesses and tools

Working software overcomprehensive documentation

Customer collaboration overcontract negotiation

Responding to change overfollowing a plan

http://bit.ly/softwareCraft

Page 6: Cf objective2014 software-craftsmanship

We adopted Agile and now things will be OK

… and the Agile Transformation Era began.

http://bit.ly/softwareCraft

Page 7: Cf objective2014 software-craftsmanship

& then we spend 10 year focusing on...

… people, interactions, team building, the ecosystem

Process and Interactions became more important than technical practices

http://bit.ly/softwareCraft

Page 8: Cf objective2014 software-craftsmanship

The Agile Hangover

Many Agile projects are now, steadily and iteratively, producing shit crap mediocre software.

http://bit.ly/softwareCraft

Page 9: Cf objective2014 software-craftsmanship

We want to get things done...

… but we are under pressure

http://bit.ly/softwareCraft

Page 10: Cf objective2014 software-craftsmanship

But what is to be Agile anyway?

http://bit.ly/softwareCraft

Page 11: Cf objective2014 software-craftsmanship

Agile Software Development

We are uncovering better ways of developing software by doing it and  helping others do it. Through this work we have come to

value:

Individuals and interactions over processes and tools

Working software over comprehensive documentation

Customer collaboration over contract negotiation

Responding to change over following a plan

That is, while there is value in the items onthe right, we value the items on the left more.

http://bit.ly/softwareCraft

Page 12: Cf objective2014 software-craftsmanship

The invisible threat

Code quality

Time per feature

http://bit.ly/softwareCraft

Page 13: Cf objective2014 software-craftsmanship

Manifesto for Software Craftsmanshipraising the bar

As aspiring Software Craftsmen we are raising the bar of professional software development by practising it and helping others learn the craft.

Through this work we have come to value: 

Not only working software, but also well-crafted software

Not only responding to change,  but also steadily adding value

Not only individuals and interactions, but also a community of professionals

Not only customer collaboration, but also productive partnerships

 

Page 14: Cf objective2014 software-craftsmanship

What is Software Craftsmanship?

Software Craftsmanship is all about

putting responsibility, professionalism, pragmatism and pride back into software development

http://bit.ly/softwareCraft

Page 15: Cf objective2014 software-craftsmanship

How do we know we are building the right thing?

How do we know we are building the thing right?

http://bit.ly/softwareCraft

Page 16: Cf objective2014 software-craftsmanship

http://bit.ly/softwareCraft

Page 17: Cf objective2014 software-craftsmanship

Adding value through practice

Automated testing Test first Test-Driven Development Pair-programming Continuous Integration

http://bit.ly/softwareCraft

Page 18: Cf objective2014 software-craftsmanship

Mastering the practices is hard …

… and that's why we practice

http://bit.ly/softwareCraft

Page 19: Cf objective2014 software-craftsmanship

Perfect practice(narrowing the gap)

http://bit.ly/softwareCraft

Page 20: Cf objective2014 software-craftsmanship

Software Craftsmanship is a long journey to mastery

http://bit.ly/softwareCraft

Page 21: Cf objective2014 software-craftsmanship

Software Craftsmanship Attitude

- Owning your career- Not a 9 to 5 profession- Practice- Boy Scout rule- Expecting promotions

http://bit.ly/softwareCraft

Page 22: Cf objective2014 software-craftsmanship

Keep Learning

Learn stuff all the time

Small and often

You don’t want to be out of work and having a large learn curve

http://bit.ly/softwareCraft

Page 23: Cf objective2014 software-craftsmanship

Big Learning Curvehttp://bit.ly/softwareCraft

Page 24: Cf objective2014 software-craftsmanship

Small and Oftenhttp://bit.ly/softwareCraft

Page 25: Cf objective2014 software-craftsmanship

Seniority is subjective and transient

http://bit.ly/softwareCraft

Page 26: Cf objective2014 software-craftsmanship

The attitude towards legacy code

http://bit.ly/softwareCraft

Page 27: Cf objective2014 software-craftsmanship

Why would we want to be better developers?

http://bit.ly/softwareCraft

Page 28: Cf objective2014 software-craftsmanship

Software Craftsmanship is not...

… a church, trying to convert all developersIt's about leading by example and

showing how we can be better… about beautiful code

It's about continuously delivering value not writing crap code

http://bit.ly/softwareCraft

Page 29: Cf objective2014 software-craftsmanship

Raising the Bar

http://bit.ly/softwareCraft

Page 30: Cf objective2014 software-craftsmanship

Stop...

… being miserable and negative

… spreading your frustrations

http://bit.ly/softwareCraft

Page 31: Cf objective2014 software-craftsmanship

The only way to have people buying into what you believe is if they see you happy.

http://bit.ly/softwareCraft

Page 32: Cf objective2014 software-craftsmanship

Craftsmanship is not enough to guarantee the success of a project but the lack of it can be the main cause of its failure

http://bit.ly/softwareCraft

Page 33: Cf objective2014 software-craftsmanship

Agile and Craftsmanship complement each other and both are necessary.

Agile processes assume technical excellence and a professional attitude.

Software Craftsmanship takes technical excellence and professionalism to a whole new level.

http://bit.ly/softwareCraft

Page 34: Cf objective2014 software-craftsmanship

Clean Code

Meaningful Names Short Functions

Single Responsibility Principal Minimal Arguments

Show intent No need for comments

Formatting Unit Testing

http://bit.ly/softwareCraft

Page 35: Cf objective2014 software-craftsmanship

Unit Testinghttp://bit.ly/softwareCraft

Page 36: Cf objective2014 software-craftsmanship

Code Reviewshttp://bit.ly/softwareCraft

Page 37: Cf objective2014 software-craftsmanship

Code Layout Matters

Easy to scan Expressive layout Compact format Code is written once and Read ∞

http://bit.ly/softwareCraft

Page 38: Cf objective2014 software-craftsmanship

The Elements of Programming Style

1st edition 1974 2nd edition 1978

56 lessons Most of which are

still valid today

Book costs $150+

http://bit.ly/softwareCraft

Page 39: Cf objective2014 software-craftsmanship

http://bit.ly/softwareCraft

Page 40: Cf objective2014 software-craftsmanship

Some of the rules valid today

1. Write clearly -- don't be too clever.

2. Say what you mean, simply and directly.

3. Write clearly -- don't sacrifice clarity for efficiency.

4. Replace repetitive expressions by calls to common functions.

5. Parenthesize to avoid ambiguity.

6. Choose variable names that won't be confused.

7. Write first in easy-to-understand pseudo language; then translate into whatever language you have to use.

8. Modularize. Use procedures and functions.

9. Don't patch bad code -- rewrite it.

10. Write and test a big program in small pieces.

11. Check some answers by hand

11. Make it right before you make it faster.

12. Make it fail-safe before you make it faster.

13. Make it clear before you make it faster.

14. Don't sacrifice clarity for small gains in efficiency.

15. Don't strain to re-use code; reorganize instead.

16. Make sure special cases are truly special.

17. Keep it simple to make it faster.18. Don't just echo the code with

comments -- make every comment count.

19. Don't comment bad code -- rewrite it.

20. Use variable names that mean something.

21. Format a program to help the reader understand it.

22. Don't over-comment.

http://bit.ly/softwareCraft

Page 41: Cf objective2014 software-craftsmanship
Page 42: Cf objective2014 software-craftsmanship
Page 43: Cf objective2014 software-craftsmanship

Books

Ebook on Lean Pub

Written by the London Software Craftsmanship Community Manager

https://leanpub.com/socra

http://bit.ly/softwareCraft

Page 44: Cf objective2014 software-craftsmanship

Clean Code

Robert “Uncle Bob” Martin

Changes your thought process

+ Videos

Also Clean Coders – More about your career

http://bit.ly/softwareCraft

Page 45: Cf objective2014 software-craftsmanship

Extreme Programming Explained: Embrace Change

Kent Back

Good Technical Practices

http://bit.ly/softwareCraft

Page 46: Cf objective2014 software-craftsmanship

Working Effectively with Legacy Code

Michael Feathers

http://bit.ly/softwareCraft

Page 47: Cf objective2014 software-craftsmanship

TDD with Lego

Today @ 3pm In ad hoc room (next to lunch room)

Learn TDD / BDD Principles without code

Open to all

http://bit.ly/softwareCraft

Page 48: Cf objective2014 software-craftsmanship

Questionshttp://bit.ly/softwareCraft

Page 49: Cf objective2014 software-craftsmanship

Contact Me

Happy to work with people over Google hangout / Skype. UK Time(After lunch EST/Before Lunch PST)FREE / Amazon Wish list

T: @bigmadkevS:bigmadkevW: BigMadKev.com

http://bit.ly/softwareCraft