SlideShare une entreprise Scribd logo
1  sur  58
Télécharger pour lire hors ligne
ex-specs
@jonatasdp
HowI discovered
3k lines of USELESS
code in a week
NO broken builds
¯_(ツ)_/¯
Experiments
Autonomous
Context
- Huge codebase
- Mechanical task
- Meaningless work
Legacy specs
It was a good idea when it was written
Things get old
“You don’t stop doing things
because you get old.
You get oldbecause you stop
doing things.”
Rosamunde Pilcher
“The codedoes not get old
because we don’t run it.
It get oldbecause we stop
changing it.”
Jônatas
Old things are not BAD
We just start new things
EVERYDAY
HUGEcodebases
Dozens of
teams
Pull Requests
changing code
everywhere
MY FOCUS
Legacy specs
INTERESTING
RESULTS
ALL ||NOTHING
BAD STRATEGY
I need
independent
replacers
WRITE
it down.
http://ideia.me
Divide &
conquer
Experiments allow us to…
➔ Test “what if…”
➔ Find useless code and commit same mistakes
➔ Avoid repeating same experiments
➔ Like a linter but it’s not a linter
Simple 1 to 1 combination used to
generate the next interaction
Combining
experiments
Same experiment
Replace `create`
with
`build_stubbed`
1
Third experiment
Remove useless blocks options
Fast.experiment
1
https://github.com/jonatas/fast#experiments
Last experiment
Remove before/after blocks
Component Browser
Experiment identifier
Component Browser
What files it should lookup:
Component Browser
Use the node pattern to find the target nodes
Use parser gem
Code
Representation
Component Browser
Balsamiq Tip | Use the Balsamiq add-on to make your own wireframe.
What should be done in the target node
Parser::Writer ● remove(range)
● insert_after(position, content)
● insert_before(position, content)
Very simple interface to rewrite
code file based on AST
Component Browser
Policy: Is it a good change?
Find stubbed methods being called without
parameters and check the parameters signature.
Using fast as a research tool
Example
Mock cases
Method Signature
Example of the research
Using bundler/inline is cool
Hunting for method signatures compatibility
Experiments
will not save youfrom thinking.
Only automate some repetitive tasks.
Let’s code!!!
Next Steps > Fast#experiments
● Public experiments suite
● Run multiple checkers
● Check only diff nodes
● Improve combination strategy
● Implement “fast --warn” to report issues
“You don’t stop doing things
because you get old.
You get oldbecause you stop
doing things.”
Rosamunde Pilcher
References
https://github.com/jonatas/fast#fastexperiment
http://ideia.me/the-dynamic-experiment-initiative
http://ideia.me/adventures-on-automated-code-replacement
https://gist.github.com/jonatas/c1e580dcb74e20d4f2df4632ceb084ef
Questions
? @jonatasdphttp://ideia.me
@jonatasdp
T h a n k s !

Contenu connexe

Plus de Jônatas Paganini

Plus de Jônatas Paganini (18)

Onboarding developers on a ful remote environment
Onboarding developers on a ful remote environmentOnboarding developers on a ful remote environment
Onboarding developers on a ful remote environment
 
Floripa on Rails - dev workflow
Floripa on Rails - dev workflowFloripa on Rails - dev workflow
Floripa on Rails - dev workflow
 
Ensinando e aprendendo com desafios
Ensinando e aprendendo com desafiosEnsinando e aprendendo com desafios
Ensinando e aprendendo com desafios
 
Go Lang migrating billions of documents
Go Lang  migrating billions of documentsGo Lang  migrating billions of documents
Go Lang migrating billions of documents
 
Otimizando tempo de build: performance da suíte de testes
Otimizando tempo de build: performance da suíte de testesOtimizando tempo de build: performance da suíte de testes
Otimizando tempo de build: performance da suíte de testes
 
XP - eXtreme Programming - 2010
XP - eXtreme Programming - 2010XP - eXtreme Programming - 2010
XP - eXtreme Programming - 2010
 
Apresentação sobre Rails - 2010
Apresentação sobre Rails - 2010Apresentação sobre Rails - 2010
Apresentação sobre Rails - 2010
 
Tech for non techs
Tech for non techsTech for non techs
Tech for non techs
 
Otimizando tempo de build: performance da suíte de testes
Otimizando tempo de build: performance da suíte de testesOtimizando tempo de build: performance da suíte de testes
Otimizando tempo de build: performance da suíte de testes
 
4 ferramentas para acompanhar seu app em produção pelo slack
4 ferramentas para acompanhar seu app em produção pelo slack4 ferramentas para acompanhar seu app em produção pelo slack
4 ferramentas para acompanhar seu app em produção pelo slack
 
Concurrency in Ruby
Concurrency in RubyConcurrency in Ruby
Concurrency in Ruby
 
Quando descobri que era programador
Quando descobri que era programadorQuando descobri que era programador
Quando descobri que era programador
 
Life hacks for productivity
Life hacks for productivityLife hacks for productivity
Life hacks for productivity
 
ø Downtime migrations - Ruby Conf 2015
ø Downtime migrations  - Ruby Conf 2015ø Downtime migrations  - Ruby Conf 2015
ø Downtime migrations - Ruby Conf 2015
 
Tdc cloud computing - RDStation experiences
Tdc cloud computing - RDStation experiencesTdc cloud computing - RDStation experiences
Tdc cloud computing - RDStation experiences
 
Life hacks for productivity
Life hacks for productivityLife hacks for productivity
Life hacks for productivity
 
Dicas para uma boa impressão 3D
Dicas para uma boa impressão 3DDicas para uma boa impressão 3D
Dicas para uma boa impressão 3D
 
ø Downtime migrations
ø Downtime migrationsø Downtime migrations
ø Downtime migrations
 

Dernier

Dernier (20)

Abortion Clinic In Polokwane ](+27832195400*)[ 🏥 Safe Abortion Pills in Polok...
Abortion Clinic In Polokwane ](+27832195400*)[ 🏥 Safe Abortion Pills in Polok...Abortion Clinic In Polokwane ](+27832195400*)[ 🏥 Safe Abortion Pills in Polok...
Abortion Clinic In Polokwane ](+27832195400*)[ 🏥 Safe Abortion Pills in Polok...
 
The Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationThe Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test Automation
 
How to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabberHow to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabber
 
Weeding your micro service landscape.pdf
Weeding your micro service landscape.pdfWeeding your micro service landscape.pdf
Weeding your micro service landscape.pdf
 
Spring into AI presented by Dan Vega 5/14
Spring into AI presented by Dan Vega 5/14Spring into AI presented by Dan Vega 5/14
Spring into AI presented by Dan Vega 5/14
 
^Clinic ^%[+27788225528*Abortion Pills For Sale In soweto
^Clinic ^%[+27788225528*Abortion Pills For Sale In soweto^Clinic ^%[+27788225528*Abortion Pills For Sale In soweto
^Clinic ^%[+27788225528*Abortion Pills For Sale In soweto
 
Abortion Clinic In Springs ](+27832195400*)[ 🏥 Safe Abortion Pills in Springs...
Abortion Clinic In Springs ](+27832195400*)[ 🏥 Safe Abortion Pills in Springs...Abortion Clinic In Springs ](+27832195400*)[ 🏥 Safe Abortion Pills in Springs...
Abortion Clinic In Springs ](+27832195400*)[ 🏥 Safe Abortion Pills in Springs...
 
Abortion Clinic Pretoria ](+27832195400*)[ Abortion Clinic Near Me ● Abortion...
Abortion Clinic Pretoria ](+27832195400*)[ Abortion Clinic Near Me ● Abortion...Abortion Clinic Pretoria ](+27832195400*)[ Abortion Clinic Near Me ● Abortion...
Abortion Clinic Pretoria ](+27832195400*)[ Abortion Clinic Near Me ● Abortion...
 
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
 
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
 
Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024
 
Effective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeConEffective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeCon
 
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-CloudAlluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AI
 
Food Delivery Business App Development Guide 2024
Food Delivery Business App Development Guide 2024Food Delivery Business App Development Guide 2024
Food Delivery Business App Development Guide 2024
 
Sinoville Clinic ](+27832195400*)[🏥Abortion Pill Prices Sinoville ● Women's A...
Sinoville Clinic ](+27832195400*)[🏥Abortion Pill Prices Sinoville ● Women's A...Sinoville Clinic ](+27832195400*)[🏥Abortion Pill Prices Sinoville ● Women's A...
Sinoville Clinic ](+27832195400*)[🏥Abortion Pill Prices Sinoville ● Women's A...
 
OpenChain @ LF Japan Executive Briefing - May 2024
OpenChain @ LF Japan Executive Briefing - May 2024OpenChain @ LF Japan Executive Briefing - May 2024
OpenChain @ LF Japan Executive Briefing - May 2024
 
A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdf
 
^Clinic ^%[+27788225528*Abortion Pills For Sale In witbank
^Clinic ^%[+27788225528*Abortion Pills For Sale In witbank^Clinic ^%[+27788225528*Abortion Pills For Sale In witbank
^Clinic ^%[+27788225528*Abortion Pills For Sale In witbank
 
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
 

TDC Floripa 2018 Dev Tests - weak specs