SlideShare a Scribd company logo
@kfirondev
Scala from the Trenches
@kfirondev
Introduction to TDD and clean code
Kfir Bloch
Head of Backend Engineering
@kfirondev
KFIR BLOCH
● Head of backend engineering @ Wix
● Hands-on developer above 17 years
● Joined Wix 5 years ago
linkedin/in/blochkfir github.com/kfiron@kfirondevkfirb@wix.com
@kfirondev
BASICS
@kfirondev@kfirondev
THE ESSENCE
OF TDD
REFACTOR
MAKE THE
TEST PASS
WRITE A
FAILING TEST
@kfirondev@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.
“
“
@kfirondev@kfirondev
TDD is based on a simple idea:
Write tests for your code before you write the
code itself. However, this "simple" idea takes
skill and judgment to do well.
Now there's a practical guide to TDD that takes
you beyond the basic concepts.
“
“
@kfirondev@kfirondev
Unit Test FakesCollaborators
Stubs
Matchers
Integration
Tests
Mocks
Contract
tests
www.maplecityrubber.com
TDD & CLEAN CODE
“BUZZWORDS”
Refactoring
@kfirondev
USE
CASE
@kfirondev@kfirondev
Get - prize Get - prize
OK OK
Get - prize Get - prize
Already wonAlready played
Get - prize
Get - prize
Get - prize
Get - prize
Get - prize
Get - prize
Get - prize
Get - prize
Get - prize
Get - prize
Already won
Already won
Already won
Already won
Already won
Already won
Already won
Already won
Already won
Already won
USER QUIZ PRIZE
SERVER
DATABASE
@kfirondev@kfirondev
Get - prize Get - prize
OK OK
Get - prize
Already played
Get - prize
Get - prize
Get - prize
Get - prize
Get - prize
Already won
Already won
Already won
Already won
Already won
USER QUIZ PRIZE
SERVER
DATABASE
FAIL FAST PATTERN
T
H
R
O
T
T
L
E
R
ROLLING WINDOW KEY (user-id) THROTTLER
@kfirondev
LET’S
CODE
@kfirondev
• TDD & Clean code definitions
• DOS attack use case
• Developed rolling window throttler
• Wire the throttler to pre-baked service
Summary of what we did
@kfirondev
• ~120 backend developers
• Zero QA engineers
• ~100 deployments per day
It works for us
projectlifemastery.com
@kfirondev
• Throttler code ->
https://github.com/kfiron/tdd-clean-code-workshop-result
• Demo app code ->
https://github.com/kfiron/java-one-demo-app
Resources
github.com/kfiron
@kfirondev
linkedin/in/blochkfir github.com/kfiron@kfirondevkfirb@wix.com
Kfir Bloch
Head of Backend Engineering
Q&A
@kfirondev
Thank YouWix Engineering Blog
http://engineering.wix.com/
We are hiring
http://jobs.wix.com
email
jobs@wix.com
@kfirondev
Kfir Bloch
Head of Backend Engineering

More Related Content

What's hot (20)

PDF
Angular vs React - Devoxx BE 2017
Deepu K Sasidharan
 
PDF
Design Microservice Architectures the Right Way
Michael Bryzek
 
PDF
Standing out as a new grad candidate
Sashko Stubailo
 
PPTX
Migrating from an AngularJS 1.x app to an NG8 Mono-Repo Architecture
Cristhian Ferrufino
 
PDF
From legacy to DDD
Andrzej Krzywda
 
PDF
How to GraphQL
Tomasz Bak
 
PPTX
A Roadmap to Enterprise Quality
Jeff Bramwell
 
PPTX
HOW TO OPTIMIZE NON-CODING TIME, ORI KEREN, LinearB
DevOpsDays Tel Aviv
 
PDF
CYA: Cover Your App
Jorge Ortiz
 
PDF
Continuous integration for Ruby on Rails
David Paluy
 
PPTX
ATAGTR2017 Machine Learning telepathy for Shift Right approach of testing
Agile Testing Alliance
 
PPTX
Go Faster - Remove Inhibitors to Rapid Innovation
Fred George
 
PPTX
SFDC Seamless Deployment Techniques
Pawan Tyagi (2x)
 
PPTX
Ciprian redinciuc continuous integration with jenkins for i os
Codecamp Romania
 
PPTX
Tech breakfast at Lab49
bankingt702sanskruti
 
PDF
Android Clean Architecture for Dummies
Kengo Suzuki
 
PPTX
SPOTLIGHT IGNITE (10 MINUTES): THE FUTURE OF DEVELOPER TOOLS: FROM STACKOVERF...
DevOpsDays Tel Aviv
 
PDF
Berlioz - Delivering Microservices Applications
Ruben Hakopian
 
PPTX
10/29 Austin Ansible MeetUp - AnsibleFest Talk & Extending Ansible
tylerturk
 
PDF
Agile android
Godfrey Nolan
 
Angular vs React - Devoxx BE 2017
Deepu K Sasidharan
 
Design Microservice Architectures the Right Way
Michael Bryzek
 
Standing out as a new grad candidate
Sashko Stubailo
 
Migrating from an AngularJS 1.x app to an NG8 Mono-Repo Architecture
Cristhian Ferrufino
 
From legacy to DDD
Andrzej Krzywda
 
How to GraphQL
Tomasz Bak
 
A Roadmap to Enterprise Quality
Jeff Bramwell
 
HOW TO OPTIMIZE NON-CODING TIME, ORI KEREN, LinearB
DevOpsDays Tel Aviv
 
CYA: Cover Your App
Jorge Ortiz
 
Continuous integration for Ruby on Rails
David Paluy
 
ATAGTR2017 Machine Learning telepathy for Shift Right approach of testing
Agile Testing Alliance
 
Go Faster - Remove Inhibitors to Rapid Innovation
Fred George
 
SFDC Seamless Deployment Techniques
Pawan Tyagi (2x)
 
Ciprian redinciuc continuous integration with jenkins for i os
Codecamp Romania
 
Tech breakfast at Lab49
bankingt702sanskruti
 
Android Clean Architecture for Dummies
Kengo Suzuki
 
SPOTLIGHT IGNITE (10 MINUTES): THE FUTURE OF DEVELOPER TOOLS: FROM STACKOVERF...
DevOpsDays Tel Aviv
 
Berlioz - Delivering Microservices Applications
Ruben Hakopian
 
10/29 Austin Ansible MeetUp - AnsibleFest Talk & Extending Ansible
tylerturk
 
Agile android
Godfrey Nolan
 

Similar to Scala from the Trenches - Java One 2016 (20)

PDF
The Art of Decomposing Monoliths - Kfir Bloch, Wix
Codemotion Tel Aviv
 
PPTX
The art of decomposing monoliths - Kfir Bloch - Codemotion Amsterdam 2016
Codemotion
 
PDF
Angular vs React Smackdown - Devoxx BE 2017
Matt Raible
 
PDF
How to Do Kick-Ass Software Development
Josiah Renaudin
 
PDF
Guided Path to DevOps Career.
wahabwelcome
 
PPTX
From Design to Code in Seconds
JohnMcGuigan10
 
PDF
Parallel universes of DevOps and cloud developers, plus a BONUS config manage...
Donnie Berkholz
 
PDF
Pitch Deck Teardown: Encore's $3M Pre-seed / Seed deck
HajeJanKamps
 
PDF
Better and Faster: A Journey Toward Clean Code and Enjoyment
Chris Holland
 
PDF
The building blocks of the next web
Pier Paolo Orioli
 
PDF
The building blocks of the next web, from Customer Journey to UI Components. ...
Codemotion
 
PPTX
Boilerplates: Step up your Web Development Process
Fibonalabs
 
PDF
How to hire a developer functional imperative
Josh Borts
 
DOCX
Get Codeigniter Developement Services From Us
Joe_Mason
 
PPTX
Typescript kata The TDD style 2 edition
Ronnie Hegelund
 
PPTX
Studio 5000® Application Code Manager: Introduction and Demonstration
Rockwell Automation
 
PDF
Frontend Development vs Backend Development | Detailed Comparison
Mariya James
 
PDF
How to get trusted AI in your favorite IDE
Edward Burns
 
PPTX
DevOpsDays 2018 - Migrating a Cloud Native App to k8s
Gökhan Şengün
 
PPTX
You cant be agile if your code sucks
Peter Gfader
 
The Art of Decomposing Monoliths - Kfir Bloch, Wix
Codemotion Tel Aviv
 
The art of decomposing monoliths - Kfir Bloch - Codemotion Amsterdam 2016
Codemotion
 
Angular vs React Smackdown - Devoxx BE 2017
Matt Raible
 
How to Do Kick-Ass Software Development
Josiah Renaudin
 
Guided Path to DevOps Career.
wahabwelcome
 
From Design to Code in Seconds
JohnMcGuigan10
 
Parallel universes of DevOps and cloud developers, plus a BONUS config manage...
Donnie Berkholz
 
Pitch Deck Teardown: Encore's $3M Pre-seed / Seed deck
HajeJanKamps
 
Better and Faster: A Journey Toward Clean Code and Enjoyment
Chris Holland
 
The building blocks of the next web
Pier Paolo Orioli
 
The building blocks of the next web, from Customer Journey to UI Components. ...
Codemotion
 
Boilerplates: Step up your Web Development Process
Fibonalabs
 
How to hire a developer functional imperative
Josh Borts
 
Get Codeigniter Developement Services From Us
Joe_Mason
 
Typescript kata The TDD style 2 edition
Ronnie Hegelund
 
Studio 5000® Application Code Manager: Introduction and Demonstration
Rockwell Automation
 
Frontend Development vs Backend Development | Detailed Comparison
Mariya James
 
How to get trusted AI in your favorite IDE
Edward Burns
 
DevOpsDays 2018 - Migrating a Cloud Native App to k8s
Gökhan Şengün
 
You cant be agile if your code sucks
Peter Gfader
 
Ad

More from Kfir Bloch (7)

PDF
Increasing velocity via serless semantics
Kfir Bloch
 
PPTX
The secrets of building a team that can do everything
Kfir Bloch
 
PPTX
A sweet taste of clean code and software design
Kfir Bloch
 
PPTX
Rest is bad
Kfir Bloch
 
PPTX
Design pattern-refactor-functional
Kfir Bloch
 
PPTX
Refactoring Design Patterns the Functional Way (in Scala)
Kfir Bloch
 
PDF
The art of decomposing monoliths
Kfir Bloch
 
Increasing velocity via serless semantics
Kfir Bloch
 
The secrets of building a team that can do everything
Kfir Bloch
 
A sweet taste of clean code and software design
Kfir Bloch
 
Rest is bad
Kfir Bloch
 
Design pattern-refactor-functional
Kfir Bloch
 
Refactoring Design Patterns the Functional Way (in Scala)
Kfir Bloch
 
The art of decomposing monoliths
Kfir Bloch
 
Ad

Recently uploaded (20)

PDF
CloudStack GPU Integration - Rohit Yadav
ShapeBlue
 
PDF
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
PDF
Meetup Kickoff & Welcome - Rohit Yadav, CSIUG Chairman
ShapeBlue
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PPTX
Top Managed Service Providers in Los Angeles
Captain IT
 
PPTX
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
PDF
Français Patch Tuesday - Juillet
Ivanti
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Wojciech Ciemski for Top Cyber News MAGAZINE. June 2025
Dr. Ludmila Morozova-Buss
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PPT
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PPTX
Building and Operating a Private Cloud with CloudStack and LINBIT CloudStack ...
ShapeBlue
 
CloudStack GPU Integration - Rohit Yadav
ShapeBlue
 
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
July Patch Tuesday
Ivanti
 
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
Meetup Kickoff & Welcome - Rohit Yadav, CSIUG Chairman
ShapeBlue
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
Top Managed Service Providers in Los Angeles
Captain IT
 
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
Français Patch Tuesday - Juillet
Ivanti
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Wojciech Ciemski for Top Cyber News MAGAZINE. June 2025
Dr. Ludmila Morozova-Buss
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Building and Operating a Private Cloud with CloudStack and LINBIT CloudStack ...
ShapeBlue
 

Scala from the Trenches - Java One 2016

Editor's Notes

  • #4: The first case is degradation of service
  • #6: Inspire me and drive how I do TDD
  • #8: Many people thinks that code before tests, it is just unit tests I will try to show you some of it in the live coding
  • #9: The first case is degradation of service
  • #10: Already won
  • #11: It not about correctness , it is about resources