Scala from the Trenches

Post on 07-Jan-2017

220 views 0 download

Transcript of Scala from the Trenches

Kfir Bloch

Scala From The Trenches

Head of Backend Engineering @ Wix @kfirondev

Introduction to TDD and clean code

Kfir Bloch

Your pic here

• Head of backend engineering @ Wix

• 17 years experience as hands-on developer

• Joined Wix 5 years ago linkedin/in/blochkfir github.com/kfiron@kfirondevkfirb@wix.com

Definitions

01

@kfirondev

The essence of TDD

@kfirondev

Great software is something to marvel at: powerful, elegant, functional, a pleasure to work with as both a developer and as a user. Great software isn’t written by machines. It is written by professionals with an unshakable commitment to craftsmanship

TDD & Clean code “Buzzwords”

Unit Test

Fakes

Collaborators

Stubs Matchers

IntegrationTests

Refactoring

Mocks

Contract tests

www.maplecityrubber.com@kfirondev

Use Case

02

QuizPrize server Database

Get - prizeGet - prize

OKOK

Get - prizeGet - prize

Already played

Already played

Get - prizeGet - prize

Get - prizeGet - prize

Get - prize

Get - prizeGet - prize

Get - prizeGet - prize

Get - prize

Already p.Already p.

Already p.Already p.

Already p.

Already p.Already p.

Already p.Already p.

Already p.

Database

QuizPrize server Database

Get - prizeGet - prize

OKOK

Get - prize

Already played

Get - prizeGet - prize

Get - prizeGet - prize

Get - prizeAlready p.

Already p.Already p.

Already p.Already p.

Fail fast pattern

THROTTLER

Rolling window key (IP) Throttler

Live Coding

03

Q&Alinkedin/in/blochkfir github.com/kfiron@kfirondevkfirb@wix.com

Kfir Bloch

Thank YouWix Engineering Blog http://engineering.wix.com/

We are hiring http://jobs.wix.com

Kfir Bloch @kfirondev

emailjobs@wix.com