SlideShare a Scribd company logo
1 of 58
Download to read offline
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 !

More Related Content

More from Jônatas Paganini

More from 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
 

Recently uploaded

CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
anilsa9823
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
anilsa9823
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Recently uploaded (20)

HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 

TDC Floripa 2018 Dev Tests - weak specs