SlideShare a Scribd company logo
1 of 150
Download to read offline
Aprendendo a
Aprender
Fabio Akita

@akitaonrails
?
+Fácil
+Elegante
Johannes Vermeer
Johannes Vermeer
Johannes Vermeer
Johannes Vermeer
Ciência da
Computação
11

3
11

3

5

6
11

3

5

6

2

12
11

3

5

6

2

12

1

24
11

3

5

6

2

12

1

24

3 + 6 + 24 =

33
57

5
57

5

28

10
57

5

28

10

14

20
57

5

28

10

14

20

7

40
57

5

28

10

14

20

7

40

3

80
57

5

28

10

14

20

7

40

3

80

1

160
57

5

28

10

14

20

7

40

3

80

1

160

5+40+80+160=

285
Longinus
Charles Babbage (1791-1871)
John von Neumann (1903 – 1957)
Alan Mathison Turing (1912 – 1954)
“The Imitation Game" (2014 - Benedict Cumberbatch)
people = 20	
count = 0	
people.times do |person_a|	
people.times do |person_b|	
count += 1 if person_b > person_a	
end	
end	
puts count # => 190
people = 20	
count = 0	
people.times do |person_a|	
people.times do |person_b|	
count += 1 if person_b > person_a	
end	
end	
puts count # => 190
people = 20	
count = 0	
people.times do |person_a|	
people.times do |person_b|	
count += 1 if person_b > person_a	
end	
end	
puts count # => 190
people = 20	
puts (people * (people - 1) / 2) # => 190
require 'benchmark'	
people = 10_000	
Benchmark.bm do |x|	
x.report do	
count = 0	
people.times do |person_a|	
people.times do |person_b|	
count += 1 if person_b > person_a	
end	
end	
puts count	
end	
x.report do	
puts (people * (people - 1) / 2)	
end	
end
require 'benchmark'	
people = 10_000	
Benchmark.bm do |x|	
x.report do	
count = 0	
people.times do |person_a|	
people.times do |person_b|	
count += 1 if person_b > person_a	
end	
end	
puts count	
end	
x.report do	
puts (people * (people - 1) / 2)	
end	
end
require 'benchmark'	
people = 10_000	
Benchmark.bm do |x|	
x.report do	
count = 0	
people.times do |person_a|	
people.times do |person_b|	
count += 1 if person_b > person_a	
end	
end	
puts count	
end	
x.report do	
puts (people * (people - 1) / 2)	
end	
end
require 'benchmark'	
people = 10_000	
Benchmark.bm do |x|	
x.report do	
count = 0	
people.times do |person_a|	
people.times do |person_b|	
count += 1 if person_b > person_a	
end	
end	
puts count	
end	
x.report do	
puts (people * (people - 1) / 2)	
end	
end
user
190	
0.000000
190	
0.000000

system

total

real	

0.000000

0.000000 (

0.000043)	

0.000000

0.000000 (

0.000008)
user
49995000	
6.310000
49995000	
0.000000

system

total

real	

0.000000

6.310000 (

6.354882)	

0.000000

0.000000 (

0.000011)
“The Social Network" (2010)
http://u.akita.ws/naousesqllike
“I made up the term
‘object-oriented’,
and I can tell you
I didn’t have
C++ in mind”
- Alan Kay
soma = 1 + 2
soma = 1 + 2
soma = 1.+(2)
soma = 1 + 2
soma = 1.+(2)
soma = 1.send(:+, 2)
Ole-Johan Dahl e Kristen Nygaard
require 'prime'	
gerador_de_primos = Fiber.new do	
numero = 1	
loop do	
Fiber.yield(numero) if numero.prime?	
numero += 1	
end	
end
require 'prime'	
gerador_de_primos = Fiber.new do	
numero = 1	
loop do	
Fiber.yield(numero) if numero.prime?	
numero += 1	
end	
end	
gerador_de_primos.resume
=> 2
require 'prime'	
gerador_de_primos = Fiber.new do	
numero = 1	
loop do	
Fiber.yield(numero) if numero.prime?	
numero += 1	
end	
end	
gerador_de_primos.resume
=> 2
gerador_de_primos.resume
=> 3
require 'prime'	
gerador_de_primos = Fiber.new do	
numero = 1	
loop do	
Fiber.yield(numero) if numero.prime?	
numero += 1	
end	
end	
gerador_de_primos.resume
=> 2
gerador_de_primos.resume
=> 3
gerador_de_primos.resume
=> 5
Gordon Moore - Intel co-founder
Gordon Bell - DEC early employee
Vaticano 2005
Vaticano 2013
Vaticano 2005
Vaticano 2013
Richard Stallman
James Gosling
Richard Stallman
James Gosling
Richard Stallman
?
+Promíscuos
+Sádicos
+Críticos
www.codeminer42.com
www.codeminer42.com
www.codeminer42.com
www.codeminer42.com
www.codeminer42.com
www.codeminer42.com
www.codeminer42.com
www.codeminer42.com
www.codeminer42.com
www.codeminer42.com
www.codeminer42.com
www.codeminer42.com
Iniciando
Douglas Engelbart - 1925 a 2/Jul/2013
Douglas Engelbart - 1925 a 2/Jul/2013
Bons artistas Copiam
Grandes artistas Roubam
Pablo Picasso
Ciência da
Computação
OBRIGADO!
slideshare.net/akitaonrails
codeminer42.com
@akitaonrails

More Related Content

What's hot (6)

Sim1
Sim1Sim1
Sim1
 
Squaring a binomial
Squaring a binomialSquaring a binomial
Squaring a binomial
 
【演習】Re:ゲーム理論入門 第14回 -仁-
【演習】Re:ゲーム理論入門 第14回 -仁-【演習】Re:ゲーム理論入門 第14回 -仁-
【演習】Re:ゲーム理論入門 第14回 -仁-
 
Re:ゲーム理論入門 第14回 - 仁 -
Re:ゲーム理論入門 第14回 - 仁 -Re:ゲーム理論入門 第14回 - 仁 -
Re:ゲーム理論入門 第14回 - 仁 -
 
Factoring polys
Factoring polysFactoring polys
Factoring polys
 
Tone deaf: finding structure in Last.fm data
Tone deaf: finding structure in Last.fm dataTone deaf: finding structure in Last.fm data
Tone deaf: finding structure in Last.fm data
 

More from Fabio Akita

More from Fabio Akita (20)

Devconf 2019 - São Carlos
Devconf 2019 - São CarlosDevconf 2019 - São Carlos
Devconf 2019 - São Carlos
 
Meetup Nerdzão - English Talk about Languages
Meetup Nerdzão  - English Talk about LanguagesMeetup Nerdzão  - English Talk about Languages
Meetup Nerdzão - English Talk about Languages
 
Desmistificando Blockchains p/ Developers - Criciuma Dev Conf 2018
Desmistificando Blockchains p/ Developers - Criciuma Dev Conf 2018Desmistificando Blockchains p/ Developers - Criciuma Dev Conf 2018
Desmistificando Blockchains p/ Developers - Criciuma Dev Conf 2018
 
Desmistificando Blockchains - 20o Encontro Locaweb SP
Desmistificando Blockchains - 20o Encontro Locaweb SPDesmistificando Blockchains - 20o Encontro Locaweb SP
Desmistificando Blockchains - 20o Encontro Locaweb SP
 
Desmistificando Blockchains - Insiter Goiania
Desmistificando Blockchains - Insiter GoianiaDesmistificando Blockchains - Insiter Goiania
Desmistificando Blockchains - Insiter Goiania
 
Blockchain em 7 minutos - 7Masters
Blockchain em 7 minutos - 7MastersBlockchain em 7 minutos - 7Masters
Blockchain em 7 minutos - 7Masters
 
Elixir -Tolerância a Falhas para Adultos - GDG Campinas
Elixir  -Tolerância a Falhas para Adultos - GDG CampinasElixir  -Tolerância a Falhas para Adultos - GDG Campinas
Elixir -Tolerância a Falhas para Adultos - GDG Campinas
 
Desmistificando Mitos de Tech Startups - Intercon 2017
Desmistificando Mitos de Tech Startups - Intercon 2017Desmistificando Mitos de Tech Startups - Intercon 2017
Desmistificando Mitos de Tech Startups - Intercon 2017
 
30 Days to Elixir and Crystal and Back to Ruby
30 Days to Elixir and Crystal and Back to Ruby30 Days to Elixir and Crystal and Back to Ruby
30 Days to Elixir and Crystal and Back to Ruby
 
Uma Discussão sobre a Carreira de TI
Uma Discussão sobre a Carreira de TIUma Discussão sobre a Carreira de TI
Uma Discussão sobre a Carreira de TI
 
THE CONF - Opening Keynote
THE CONF - Opening KeynoteTHE CONF - Opening Keynote
THE CONF - Opening Keynote
 
A Journey through New Languages - Rancho Dev 2017
A Journey through New Languages - Rancho Dev 2017A Journey through New Languages - Rancho Dev 2017
A Journey through New Languages - Rancho Dev 2017
 
Desmistificando Mitos de Startups - Sebrae - AP
Desmistificando Mitos de Startups - Sebrae - APDesmistificando Mitos de Startups - Sebrae - AP
Desmistificando Mitos de Startups - Sebrae - AP
 
A Journey through New Languages - Guru Sorocaba 2017
A Journey through New Languages - Guru Sorocaba 2017A Journey through New Languages - Guru Sorocaba 2017
A Journey through New Languages - Guru Sorocaba 2017
 
A Journey through New Languages - Insiter 2017
A Journey through New Languages - Insiter 2017A Journey through New Languages - Insiter 2017
A Journey through New Languages - Insiter 2017
 
A Journey through New Languages - Locaweb Tech Day
A Journey through New Languages - Locaweb Tech DayA Journey through New Languages - Locaweb Tech Day
A Journey through New Languages - Locaweb Tech Day
 
A Journey through new Languages - Intercon 2016
A Journey through new Languages - Intercon 2016A Journey through new Languages - Intercon 2016
A Journey through new Languages - Intercon 2016
 
Premature Optimization 2.0 - Intercon 2016
Premature Optimization 2.0 - Intercon 2016Premature Optimization 2.0 - Intercon 2016
Premature Optimization 2.0 - Intercon 2016
 
Conexão Kinghost - Otimização Prematura
Conexão Kinghost - Otimização PrematuraConexão Kinghost - Otimização Prematura
Conexão Kinghost - Otimização Prematura
 
The Open Commerce Conference - Premature Optimisation: The Root of All Evil
The Open Commerce Conference - Premature Optimisation: The Root of All EvilThe Open Commerce Conference - Premature Optimisation: The Root of All Evil
The Open Commerce Conference - Premature Optimisation: The Root of All Evil
 

Recently uploaded

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
 
+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@
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Recently uploaded (20)

AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
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...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
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, ...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
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
 
+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...
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 

Aprendendo a Aprender - Evento de Verão em Montes claros