SlideShare ist ein Scribd-Unternehmen logo
1 von 62
Downloaden Sie, um offline zu lesen
Why code in Node.js
often get rejected by
SoundCloud
Phil Calçado - SoundCloud
@pcalcado
http://philcalcado.com
Tuesday, October 1, 13
2011: Phil zieht nach Berlin
Tuesday, October 1, 13
Tuesday, October 1, 13
~ 200 million users / month
> 11 hours of audio
uploaded every minute
Tuesday, October 1, 13
Tuesday, October 1, 13
http://bit.ly/15DToNK
hiring @ SoundCloud
Tuesday, October 1, 13
Phone
Code Review
Interviews
Offer
Tuesday, October 1, 13
Phone
Code Review
Interviews
Offer
Tuesday, October 1, 13
challenge until late 2012
Tuesday, October 1, 13
you can choose any language.
0
10
20
30
40
Ruby Java JavaScript (Node.js) C Clojure Scala
% of submissions ~2011-2012
Tuesday, October 1, 13
you can choose any language.
0
10
20
30
40
Ruby Java JavaScript (Node.js) C Clojure Scala
rejected before interview invited for inverview
Tuesday, October 1, 13
new challenge
Tuesday, October 1, 13
you can choose any language.
0
7.5
15
22.5
30
Ruby Java JavaScript (Node.js) Go Clojure Scala
% of submissions on the past ~1 year
Tuesday, October 1, 13
you can choose any language.
0
7.5
15
22.5
30
Ruby Java JavaScript (Node.js) Go Clojure Scala
% of submissions on the past ~1 year
Tuesday, October 1, 13
you can choose any language.
0
7.5
15
22.5
30
Ruby Java JavaScript (Node.js) Go Clojure Scala
rejected before interview invited for inverview
Tuesday, October 1, 13
you can choose any language.
0
7.5
15
22.5
30
Ruby Java JavaScript (Node.js) Go Clojure Scala
rejected before interview invited for inverview
WTF?
Tuesday, October 1, 13
http://bit.ly/J1aLNn
don’t get me wrong
we are all hipsters
Tuesday, October 1, 13
Tuesday, October 1, 13
Not OO, not Functional...
Just (bad) Procedural code.
Tuesday, October 1, 13
http://bit.ly/JiECRp
Tuesday, October 1, 13
we don’t need this complicated stuff.
this is not java, you know.
Tuesday, October 1, 13
http://bit.ly/JiFSnq
so how do we structure our app?
Tuesday, October 1, 13
what to use?
(decent)
procedures?
Tuesday, October 1, 13
Tuesday, October 1, 13
Tuesday, October 1, 13
what to use?
objects?
Tuesday, October 1, 13
Tuesday, October 1, 13
what to use?
...functions?
Tuesday, October 1, 13
http://bit.ly/JFbZt8
Tuesday, October 1, 13
http://bit.ly/JFbZt8
“SICP and some of the Sussman & Steele "Lambda
the ..." papers made a big impression on me years
before, although I did not understand their full
meaning then.
Remember, I was recruited to "do Scheme" [...] My
interest in languages such as Self informed a
subversive agenda [...]. Likewise with first-class
functions, which were inspired by Scheme [...]”
Tuesday, October 1, 13
http://bit.ly/JiEQYM
Tuesday, October 1, 13
Tuesday, October 1, 13
Tuesday, October 1, 13
Tuesday, October 1, 13
Tuesday, October 1, 13
Tuesday, October 1, 13
http://bit.ly/JiF7ef
going old school
Tuesday, October 1, 13
e.g. passing functions around
Tuesday, October 1, 13
we see a lot of this
Tuesday, October 1, 13
1st, we extract what is common
Tuesday, October 1, 13
then we refactor our functions
Tuesday, October 1, 13
and we send them as arguments
Tuesday, October 1, 13
e.g. closures not only for objects
Tuesday, October 1, 13
we see a lot of this
Tuesday, October 1, 13
we can keep writeComment as it is
Tuesday, October 1, 13
and we add a function with two closures
Tuesday, October 1, 13
and we add a function with two closures
immutable
Tuesday, October 1, 13
and we add a function with two closures
immutablemutable
Tuesday, October 1, 13
now we don’t need to pass in the kitchen sink
Tuesday, October 1, 13
e.g. functions all the way down
Tuesday, October 1, 13
we see a lot of this
Tuesday, October 1, 13
first we extract common protocol
Tuesday, October 1, 13
then we clean up our functions
Tuesday, October 1, 13
then we use them.
Tuesday, October 1, 13
then we use them. redundant?
Tuesday, October 1, 13
http://bit.ly/JiETnd
Tuesday, October 1, 13
our “framework”:
1 - Extract protocol in
“combinators”
2 - Keep mutable state in
closures
Tuesday, October 1, 13
no scary monads required
Tuesday, October 1, 13
there is plenty to learn from
Tuesday, October 1, 13
in the javascript community too
Tuesday, October 1, 13
phil calçado
http://philcalcado.com
@pcalcado
www.soundcloud.com
Tuesday, October 1, 13
How to Design Programs - http://bit.ly/K0BfrL
Structure and Interpretation of Computer
Programs - http://bit.ly/K0BjYm
The Art of the Metaobject Protocol
http://amzn.to/K0BqU1
Purely Functional Data Structures
http://amzn.to/JFn4KG
Let Over Lambda - http://amzn.to/IMMkNO
An Introduction to Lambda Calculi for Computer
Scientists - http://amzn.to/IX8d1B
All drawings are available as t-shirts from the
awesome Diesel Sweeties -
http://dieselsweeties.com/
Tuesday, October 1, 13

Weitere ähnliche Inhalte

Andere mochten auch

Andere mochten auch (18)

ScalaItaly 2015 - Your Microservice as a Function
ScalaItaly 2015 - Your Microservice as a FunctionScalaItaly 2015 - Your Microservice as a Function
ScalaItaly 2015 - Your Microservice as a Function
 
Three Years of Microservices at SoundCloud - Distributed Matters Berlin 2015
Three Years of Microservices at SoundCloud - Distributed Matters Berlin 2015Three Years of Microservices at SoundCloud - Distributed Matters Berlin 2015
Three Years of Microservices at SoundCloud - Distributed Matters Berlin 2015
 
Rhein-Main Scala Enthusiasts — Your microservice as a Function
Rhein-Main Scala Enthusiasts — Your microservice as a FunctionRhein-Main Scala Enthusiasts — Your microservice as a Function
Rhein-Main Scala Enthusiasts — Your microservice as a Function
 
Vida longa para SOA com microservices
Vida longa para SOA com microservicesVida longa para SOA com microservices
Vida longa para SOA com microservices
 
Microservices - Quebrando gigantes em pequenos
Microservices - Quebrando gigantes em pequenosMicroservices - Quebrando gigantes em pequenos
Microservices - Quebrando gigantes em pequenos
 
Amadurecendo Equipes com Microservices
Amadurecendo Equipes com MicroservicesAmadurecendo Equipes com Microservices
Amadurecendo Equipes com Microservices
 
Um pequeno estudo sobre a microsoft
Um pequeno estudo sobre a microsoftUm pequeno estudo sobre a microsoft
Um pequeno estudo sobre a microsoft
 
Integração utilizando REST API e Microservices
Integração utilizando REST API e MicroservicesIntegração utilizando REST API e Microservices
Integração utilizando REST API e Microservices
 
Flexbox and Grid Layout: How you will structure layouts tomorrow.
Flexbox and Grid Layout: How you will structure layouts tomorrow.Flexbox and Grid Layout: How you will structure layouts tomorrow.
Flexbox and Grid Layout: How you will structure layouts tomorrow.
 
Microservices
MicroservicesMicroservices
Microservices
 
DOM, CSSOM e RenderThree - Introdução ao Browser Render Path
DOM, CSSOM e RenderThree - Introdução ao Browser Render PathDOM, CSSOM e RenderThree - Introdução ao Browser Render Path
DOM, CSSOM e RenderThree - Introdução ao Browser Render Path
 
Introdução à Microservices
Introdução à MicroservicesIntrodução à Microservices
Introdução à Microservices
 
Workshop soa, microservices e devops
Workshop soa, microservices e devopsWorkshop soa, microservices e devops
Workshop soa, microservices e devops
 
Microservices: uma abordagem para arquitetura de aplicações (Devcamp 2015)
Microservices: uma abordagem para arquitetura de aplicações (Devcamp 2015)Microservices: uma abordagem para arquitetura de aplicações (Devcamp 2015)
Microservices: uma abordagem para arquitetura de aplicações (Devcamp 2015)
 
O que você precisa saber para se tornar um dev front-end
O que você precisa saber para se tornar um dev front-endO que você precisa saber para se tornar um dev front-end
O que você precisa saber para se tornar um dev front-end
 
Vantagens e desvantagens de uma arquitetura microservices
Vantagens e desvantagens de uma arquitetura microservicesVantagens e desvantagens de uma arquitetura microservices
Vantagens e desvantagens de uma arquitetura microservices
 
UX, Front-end and Back-end: How front-end can help these guys?
UX, Front-end and Back-end: How front-end can help these guys?UX, Front-end and Back-end: How front-end can help these guys?
UX, Front-end and Back-end: How front-end can help these guys?
 
O básico sobre Web Semântica, JSON-LD e Linked Data
O básico sobre Web Semântica, JSON-LD e Linked DataO básico sobre Web Semântica, JSON-LD e Linked Data
O básico sobre Web Semântica, JSON-LD e Linked Data
 

Mehr von Phil Calçado

the afterparty: refactoring after 100x hypergrowth
the afterparty: refactoring after 100x hypergrowththe afterparty: refactoring after 100x hypergrowth
the afterparty: refactoring after 100x hypergrowth
Phil Calçado
 
don't try this at home: self-improvement as a senior leader
don't try this at home: self-improvement as a senior leaderdon't try this at home: self-improvement as a senior leader
don't try this at home: self-improvement as a senior leader
Phil Calçado
 
From microservices to serverless - Chicago CTO Summit 2019
From microservices to serverless - Chicago CTO Summit 2019From microservices to serverless - Chicago CTO Summit 2019
From microservices to serverless - Chicago CTO Summit 2019
Phil Calçado
 
The Not-So-Straightforward Road From Microservices to Serverless
The Not-So-Straightforward Road From Microservices to ServerlessThe Not-So-Straightforward Road From Microservices to Serverless
The Not-So-Straightforward Road From Microservices to Serverless
Phil Calçado
 
Microservices vs. The First Law of Distributed Objects - GOTO Nights Chicago ...
Microservices vs. The First Law of Distributed Objects - GOTO Nights Chicago ...Microservices vs. The First Law of Distributed Objects - GOTO Nights Chicago ...
Microservices vs. The First Law of Distributed Objects - GOTO Nights Chicago ...
Phil Calçado
 
An example of Future composition in a real app
An example of Future composition in a real appAn example of Future composition in a real app
An example of Future composition in a real app
Phil Calçado
 
From a monolithic Ruby on Rails app to the JVM
From a monolithic  Ruby on Rails app  to the JVMFrom a monolithic  Ruby on Rails app  to the JVM
From a monolithic Ruby on Rails app to the JVM
Phil Calçado
 
Applying Evolutionary Architecture on a Popular API
Applying Evolutionary Architecture on a  Popular APIApplying Evolutionary Architecture on a  Popular API
Applying Evolutionary Architecture on a Popular API
Phil Calçado
 
SoundCloud Masterclass on Brazil
SoundCloud Masterclass on BrazilSoundCloud Masterclass on Brazil
SoundCloud Masterclass on Brazil
Phil Calçado
 
SpeakerConf: my findings in trying to use this functional programming busines...
SpeakerConf: my findings in trying to use this functional programming busines...SpeakerConf: my findings in trying to use this functional programming busines...
SpeakerConf: my findings in trying to use this functional programming busines...
Phil Calçado
 
[GOTO Copenhagen 2012] The Startup Hangover: Supporting 15 mil Users
[GOTO Copenhagen 2012] The Startup Hangover: Supporting 15 mil Users[GOTO Copenhagen 2012] The Startup Hangover: Supporting 15 mil Users
[GOTO Copenhagen 2012] The Startup Hangover: Supporting 15 mil Users
Phil Calçado
 

Mehr von Phil Calçado (20)

the afterparty: refactoring after 100x hypergrowth
the afterparty: refactoring after 100x hypergrowththe afterparty: refactoring after 100x hypergrowth
the afterparty: refactoring after 100x hypergrowth
 
don't try this at home: self-improvement as a senior leader
don't try this at home: self-improvement as a senior leaderdon't try this at home: self-improvement as a senior leader
don't try this at home: self-improvement as a senior leader
 
The Economics of Microservices (redux)
The Economics of Microservices (redux)The Economics of Microservices (redux)
The Economics of Microservices (redux)
 
From microservices to serverless - Chicago CTO Summit 2019
From microservices to serverless - Chicago CTO Summit 2019From microservices to serverless - Chicago CTO Summit 2019
From microservices to serverless - Chicago CTO Summit 2019
 
The Not-So-Straightforward Road From Microservices to Serverless
The Not-So-Straightforward Road From Microservices to ServerlessThe Not-So-Straightforward Road From Microservices to Serverless
The Not-So-Straightforward Road From Microservices to Serverless
 
Ten Years of Failing Microservices
Ten Years of Failing MicroservicesTen Years of Failing Microservices
Ten Years of Failing Microservices
 
The Next Generation of Microservices
The Next Generation of MicroservicesThe Next Generation of Microservices
The Next Generation of Microservices
 
The Next Generation of Microservices — YOW 2017 Brisbane
The Next Generation of Microservices — YOW 2017 BrisbaneThe Next Generation of Microservices — YOW 2017 Brisbane
The Next Generation of Microservices — YOW 2017 Brisbane
 
The Economics of Microservices (2017 CraftConf)
The Economics of Microservices  (2017 CraftConf)The Economics of Microservices  (2017 CraftConf)
The Economics of Microservices (2017 CraftConf)
 
Microservices vs. The First Law of Distributed Objects - GOTO Nights Chicago ...
Microservices vs. The First Law of Distributed Objects - GOTO Nights Chicago ...Microservices vs. The First Law of Distributed Objects - GOTO Nights Chicago ...
Microservices vs. The First Law of Distributed Objects - GOTO Nights Chicago ...
 
Finagle @ SoundCloud
Finagle @ SoundCloudFinagle @ SoundCloud
Finagle @ SoundCloud
 
A Brief Talk On High-Performing Organisations
A Brief Talk On High-Performing OrganisationsA Brief Talk On High-Performing Organisations
A Brief Talk On High-Performing Organisations
 
Finagle-Based Microservices at SoundCloud
Finagle-Based Microservices at SoundCloudFinagle-Based Microservices at SoundCloud
Finagle-Based Microservices at SoundCloud
 
An example of Future composition in a real app
An example of Future composition in a real appAn example of Future composition in a real app
An example of Future composition in a real app
 
From a monolithic Ruby on Rails app to the JVM
From a monolithic  Ruby on Rails app  to the JVMFrom a monolithic  Ruby on Rails app  to the JVM
From a monolithic Ruby on Rails app to the JVM
 
Applying Evolutionary Architecture on a Popular API
Applying Evolutionary Architecture on a  Popular APIApplying Evolutionary Architecture on a  Popular API
Applying Evolutionary Architecture on a Popular API
 
SoundCloud Masterclass on Brazil
SoundCloud Masterclass on BrazilSoundCloud Masterclass on Brazil
SoundCloud Masterclass on Brazil
 
SpeakerConf: my findings in trying to use this functional programming busines...
SpeakerConf: my findings in trying to use this functional programming busines...SpeakerConf: my findings in trying to use this functional programming busines...
SpeakerConf: my findings in trying to use this functional programming busines...
 
[GOTO Copenhagen 2012] The Startup Hangover: Supporting 15 mil Users
[GOTO Copenhagen 2012] The Startup Hangover: Supporting 15 mil Users[GOTO Copenhagen 2012] The Startup Hangover: Supporting 15 mil Users
[GOTO Copenhagen 2012] The Startup Hangover: Supporting 15 mil Users
 
(v2.0) Better Functional Design Through Test-Driven Development
(v2.0) Better Functional Design Through Test-Driven Development(v2.0) Better Functional Design Through Test-Driven Development
(v2.0) Better Functional Design Through Test-Driven Development
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Kürzlich hochgeladen (20)

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 

Why code in Node.js often get rejected by SoundCloud