Developer disciplines

62
DEVELOPER DISCIPLINES CHRIS HOWE-JONES @AGILE_GEEK 14TH MARCH 2016

Transcript of Developer disciplines

Page 1: Developer disciplines

DEVELOPERDISCIPLINES

CHRIS HOWE-JONES@AGILE_GEEK

14TH MARCH 2016

Page 2: Developer disciplines

DEVELOPER DISCIPLINESWho wants to be a Developer?

Page 3: Developer disciplines

DEVELOPER

What makes a 'Developer'?

Why it matters? Why am I qualified to talk to you?

Page 4: Developer disciplines

WHO AM I?Name: Chris Howe-Jones

Job Title: Technical Navigator

Twitter: @agile_geek

Github: http://github.com/chrishowejones

Blog: http://chrishowejones.wordpress.com

LinkedIn: https://uk.linkedin.com/in/chrishowejones

Organiser: London Clojurians, Clojure eXchange, Functional

Programming eXchange

Speaker:FP North East, Agile North East, London

Clojurians, Dynamo Conference

Page 5: Developer disciplines

WORKED FOR?

Page 6: Developer disciplines

JOBS?

Page 7: Developer disciplines

LANGUAGES?

Page 8: Developer disciplines

TECHNOLOGIES AND DISCIPLINES?

Page 9: Developer disciplines

SO?

Why do you care?

Because I'm the person who will employ you!

Or someone just like me

Page 10: Developer disciplines

WHAT DISCIPLINES?Don't I just need to program?

What else do I need?

Page 11: Developer disciplines

SOFTWARE DEVELOPMENT IS ACOMPLEX WORLD

Page 12: Developer disciplines

MULTI-DISCIPLINED TEAMS

Developers/ProgrammersTesters/QABusiness AnalystsScrum MastersProduct OwnersProject ManagersTech LeadsTeam LeadersProduct Managers

Page 13: Developer disciplines

COMPLEX ENVIRONMENT

Polyglot Programmingmultiple languages

Polyglot Persistencemultiple persistence technologies

Cloud Deploymentelastic virtualised environmentsservers on demand

Page 14: Developer disciplines

DISCIPLINESTDDBDDTest Pyramid

Unit,System,Integration,Performance,Stress,Failure,Load,Functional

Page 15: Developer disciplines

SDLC'Waterfall',Scrum,DSDM,Kanban

Version Controlfrequent,small,incremental

Page 16: Developer disciplines

Continuous IntegrationContinuous DeploymentAutomated testingAutomated buildStatic code analysisPeer reviewFunctional reviewRefactoringDebugging

Page 17: Developer disciplines

SOLID principles

Single Responsibility Principle - a class shouldhave only a single responsibilityOpen for Extension, Closed for ModificationLiskov Substitution Principle - "objects in aprogram should be replaceable with instancesof their subtypes without altering thecorrectness of that program."Interface Segregation Principle - “many client-specific interfaces are better than one general-purpose interface.”Dependency Inversion Principle - one should“Depend upon Abstractions. Do not dependupon concretions.”

Page 18: Developer disciplines

Referential transparencyImmutabilityReduced side effects

Page 19: Developer disciplines

WHAT'S MOST IMPORTANT?I had a manager who asked?

How do you know when you've finished?

You decide what success is You write tests to prove itYou implement your code You run your tests They pass

YOU'RE DONE!

Page 20: Developer disciplines

TEST, TEST, TEST AGAIN…

Page 21: Developer disciplines

TYPES OF TESTING?

Only really two types of test…

Developer TestsUser Tests

Page 22: Developer disciplines

DEVELOPER TESTS

UnitIntegrationSystem

Non functional

PerformanceSecurityStressResilience

…etc

Page 23: Developer disciplines

USER TESTS

Functional

Smoke testsSanity testingExplorative testingRegression testingUsability testingAccessibility testingAcceptance testing

Page 24: Developer disciplines

TESTS TO DISCOVER DESIGN

Test Driven Development

Page 25: Developer disciplines

TEST DRIVEN DEVELOPMENT

What is Test Driven Development?

Page 26: Developer disciplines

WHAT?

Incremental process to build low level designthrough the feedback mechanism of tests,

written tests first.

Page 27: Developer disciplines

WHY?

Tests code (automated and run in build).Evolves design constantly checking against tests for'completeness'.Provides automated 'safety net' to catch 'breaking changes'.Enables rapid and radical design changes in future.Avoids 'big ball of mud'

Page 28: Developer disciplines

Good design is testable, And design that isn’ttestable is bad.

“I haven’t got time to test that…” If it's worthbuilding, it's worth testing.

If it's not worth testing, why are you wasting yourtime working on it?

Tests are your first users.

Page 29: Developer disciplines

Tests can be your documentation

If TDD hurts..you're doing it wrong.

“The story of the unforeseen requirement.”

Page 30: Developer disciplines
Page 31: Developer disciplines

HOW?

1. Write a (failing) test.2. Run a (failing) test.3. Write the (simplest) implementation to get the test to pass.4. Run test (if pass do next step else do 3)5. Refactor implementation (and/or test) to remove duplication.6. Repeat from step 1.

Page 32: Developer disciplines

HOW?

Page 33: Developer disciplines

WHEN?

ALL THE TIME

Page 34: Developer disciplines

TDD?

Test Driven

Design

Page 35: Developer disciplines

VERSION CONTROL - SCMGit, Subversion, CVS, VSS, Mercurial, PVCS

Page 36: Developer disciplines

WHAT IT'S NOT

BackupCentralised code sharing

Page 37: Developer disciplines

WHAT IT IS

It's a Time Machine

Small, incremental changes

Record of events

Who

What

When

Why

Page 38: Developer disciplines

WHAT CAN YOU DO WITH IT?

Rewind time

Try out a change safely

Integrate code across team

Page 39: Developer disciplines

WHY IS IT IMPORTANT?

It tells a story.

It protects you from mistakes.

It enables review.

Page 40: Developer disciplines

OTHER IMPORTANT DISCIPLINES?

Page 41: Developer disciplines

CONTINUOUS INTEGRATION

"Continually integrating (and testing) code acrossa team."

Merging code regularly.Regression testing.

Page 42: Developer disciplines

CONTINOUS BUILD

"Continually build (and testing) code across ateam."

Automated builds.

Page 43: Developer disciplines

Build on merges.Tests run on build.E.g. Jenkins, TeamCity, etc.

Page 44: Developer disciplines

CONTINOUS DEPLOYMENT

"Continually deploy (verified) code to 'live'."

Automated deployment.'Push Button' deployment.

Page 45: Developer disciplines

STATIC CODE ANALYSIS TOOLS

"Analyse code for style and common 'bugs'."

Page 46: Developer disciplines

C# - Resharper, FxCop, StyleCop…Java - Sonar, CheckStyle, FindBugs…

Page 47: Developer disciplines

AUTOMATED CODE FORMATTER

"Automatically format code to 'team' or'organisational' standards."

Page 48: Developer disciplines

PROPERTY OR GENERATIVE TESTING

"In computer science, a property testingalgorithm for a decision problem is an algorithm

whose query complexity to its input is muchsmaller than the instance size of the problem.

Typically property testing algorithms are used todecide if some mathematical object (such as a

graph or a boolean function) has a "global"property, or is 'far' from having this property,

using only a small number of 'local' queries to theobject."

Page 49: Developer disciplines

WHAT?

Page 50: Developer disciplines

"A high level approach to testing in the form ofabstract invariants [that] functions should satisfy

universally."

Page 51: Developer disciplines

WHAT?

Page 52: Developer disciplines

"Property-based tests make statements about theoutput of your code based on the input, and these

statements are verified for many differentpossible inputs."

Page 53: Developer disciplines

COMMAND LINE IS YOUR FRIEND

"Don't be afraid of the command line."

Page 54: Developer disciplines

WHAT OTHERS SAY ARE IMPORTANTDISCIPLINES?

Page 55: Developer disciplines

"Take baby steps and always look for steppingstones, be obsessed with feedback, keep it simple,

communicate as much as you can"

Giuseppe Capizzi, Developer Pivotal Labs

Co-organiser: CodeLovers

Speaker: Bergamo Linux User Group, CodeLovers, Milano XP UserGroup, ClojureBridge

Page 56: Developer disciplines

"…SCM, tests, simplifying, static analysis, reviewsto share knowledge." "…thinking, talking,

sharing…"

Glen Mailer, Freelance Software Developer

Organiser Sheffield Geeks

Speaker: Sheffield Geeks, Clojure eXchange 2015

Page 57: Developer disciplines

"deliberate practice using fast feedback."

Philip Potter, Tech lead on registers at @gdsteam

Speaker: London Clojurians, EuroClojure, Clojure eXchange,CodeMesh

Page 58: Developer disciplines

"code as if you are going to support your owncode…because you might have to."

Mazhar Iqbal, Tech lead LLoyds Bank

Page 59: Developer disciplines

"learn your short-cut keys."

Stephen Hobbs, Software Developer at Orchid Software

Page 60: Developer disciplines

"frequent commits to source control."

Chris Ford, Functional Composer at Thoughtworks

Speaker: London Clojurians, EuroClojure, Clojure eXchange, StrangeLoop - St Louis, GOTO Berlin

Page 61: Developer disciplines

"Simplifying code, document processes, rangebased estimates, low coupling, code formatters,

lint, automation, few side effects."

Michael Langford, Founder and iOS Development Director RowdyLabs, Atlanta GA

Page 62: Developer disciplines

Bruce Durling, Co-founder & CTO Mastodon C, London

Co-founder London Clojurians, Co-organiser Clojure eXchange,EuroClojure board, Co-organiser Functional Programming

Exchange.

Speaker: Data Science, Clojure, Functional Programming.