SlideShare una empresa de Scribd logo
1 de 62
Descargar para leer sin conexión
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

Más contenido relacionado

Destacado

Destacado (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
 

Más de 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
 

Más de 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
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
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
 
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
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 

Why code in Node.js often get rejected by SoundCloud