Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs...

42
Chris Tava Head of Software Engineering - NYC Cleaning code as you go - High Impact Software Engineering (a case study) NY Developer Week 6/19/19

Transcript of Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs...

Page 1: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Chris TavaHead of Software Engineering - NYC

Cleaning code as you go - High Impact Software Engineering (a case study)

NY Developer Week 6/19/19

Page 2: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

About Tempus - We are hiring in NYC :)

● Tempus is a biotech company that's building the world’s largest library of molecular and clinical data

● We provide genomic sequencing services with our CLIA certified laboratory and state-of-the-art bioinformatics pipeline

● We empower physicians and researchers to make real-time, data-driven decisions

● For more information, head on over to tempus.com

Page 3: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

High Impact Software Engineering - Cleaning code as you go

● Experience & Perspective● Speed & Accuracy● Software engineering as a financial investment● Risks & Unit Testing● Complexity & Refactoring

Page 4: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Experience & Perspective

Page 5: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

To be great at Software Engineering

Experience

● How to do things● How NOT to do things

Perspective

● What to do● What not to do

Page 6: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Experience

● How would I like my software to be built?● Which tooling do I want to use to build my software?

Page 7: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Experience - Engineering - Tradeoffs

● Front-end stacks: react vs vue vs angular

Page 8: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Experience - Engineering - Tradeoffs

● Back-end stacks: node vs java/scala/kotlin vs python or go

Page 9: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Experience - Engineering - Tradeoffs - How

● Would you pick your favorite language / stack?○ The one you have the most experience with

● Would you build a rubric and try to make the decision more objective?

Page 10: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Experience - Engineering - Tradeoffs - How - Decision Time

● Take a combination of objective , subjective factors and decide● Build up your experience!● Follow through

Page 11: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Perspective

● What to do● What not to do

Page 12: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Perspective - Business - Influence

When

● Whats the priority?● How often should we be meeting as team?● What do we talk about?● Should we write more unit tests?● When do i need to refactor my code?

Page 13: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick
Page 14: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

1 week sprints

Pros

● Producing a ton of product● Super-agile: constantly discussing changing things

Cons

● Lots of meetings● Seeing rework

Page 15: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Accuracy - Quality Control

● Design reviews● Linting & unit tests● Code reviews● User acceptance testing● Performance tuning

Page 16: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick
Page 17: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Software Engineering as a financial tool

Page 18: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Software engineering as a financial investment● 12 weeks of software engineering (3

engineers)● 12 weeks payback period

Page 19: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Strategy & Product

Page 20: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Software engineering is a financial tool for businesses

● Companies count on software engineers for just about everything these days

● This is why we are demand and the salaries are good● Every minute counts● Growing businesses like software to be built fast

○ Because efficiency gains are like gasoline to a fire

● Businesses like certainty and dont like risk

Page 21: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Risks & Unit Testing

Page 22: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Experience and perspective is used to avoid, mitigate and accept risks

● Building software is an expensive and risky endeavor● There are too many variables● Engineering scales because of trade offs

○ Just developing & programming - doesn’t scale

● B2B software companies have a little less variability because they dont have to directly crack consumer behavior

○ But companies are and should be demanding as enterprise SAAS customers

● B2C software companies have to deal with the fickle consumer

○ Tackle behavioral change over time

Page 23: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Let’s talk about programmatic testing

● I love programmatic testing. Hopefully you do too.● Its 2019, its simply not defensible to NOT be writing tests

○ Companies are getting smarter about the quality of their software engineering■ They are really starting to understand the value of clean code

Page 24: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Server Unit test Coverage - March

Page 25: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Server Unit test Coverage - April

Page 26: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Server Unit test Coverage - May

Page 27: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Client Unit test Coverage - March

Page 28: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Client Unit test Coverage - April

Page 29: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Client Unit test Coverage - May

Page 30: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Complexity & Refactoring

Page 31: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Tail winds

● Decreased IT costs - cloud storage● Decreased genomic sequencing costs● Increased understanding and application

of machine learning

Page 32: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Biology is complex

● DNA, RNA, Protein Model is basic● Reality: scientific advances are growing

○ Immuno oncology○ Biomarkers

Page 33: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Code Complexity - Branching

Lets take a look at the increase in code complexity through Jest Branching

What is branching logic?Where the code can take more than one route, i.e. it branches. A couple of examples of branching statements are if/else and switch statements.

Branch coverage tracks which of those branches have been executed so you can ensureall routes are tested properly.

Page 34: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Code Complexity - Branching - Increasing - March

Page 35: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Code Complexity - Branching - Increasing - April

Page 36: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Code Complexity - Branching - Increasing - May

Page 37: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Need to refactor?

● Can compare branching logic coverage to the # of lines and # functions covered

Page 38: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Backend - refactoring

● Fix how we get diseaseStages and simplify querying● Refactor diseaseStatusMatches● Matching performance improvement

Ultimately, we are going to rip out the hard coded business rules and express them using an externally configured expression library.

Page 39: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Frontend - refactoring

● Client cleanup● Make histology valuesets dependent on disease site● Preload all valuesets on the server● Moved shareable react components to commons

Page 40: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Putting it all together

● Value to business - increasing○ Speed & Accuracy○ Making an impact

● # of lines, functions covered in unit testing - increasing● Small amounts of refactoring were done

JavaScript, React and Node make it easy● Complexity is increasing...

Page 41: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Wrap up

What i’ve presented to you is using experience and perspective to balance

● speed and accuracy● complexity and refactoring● make rapid changes to a code base● and prevent regressions through unit (and other types) testing

Ultimately using software engineering as a financial investment

Page 42: Chris Tava Head of Software Engineering - NYC Cleaning ... · Back-end stacks: node vs java/scala/kotlin vs python or go. Experience - Engineering - Tradeoffs - How Would you pick

Thank you for your interest and attention.

Thank you to my team: Fernando, Eterna, John & Charlie - you guys Rock!

Speaker Hour - right after this talk - Room B (Upstairs) - Hope to see you there

tempus.com