SlideShare une entreprise Scribd logo
1  sur  67
Télécharger pour lire hors ligne
FUNCTIONAL
RUBY
ABOUT ME
• Mikhail Bortnyk
ABOUT ME
• Mikhail Bortnyk
• Too old for this shit
ABOUT ME
• Mikhail Bortnyk
• Too old for this shit
• Work for Amoniac OÜ
ABOUT ME
• Mikhail Bortnyk
• Too old for this shit
• Work for Amoniac OÜ
• Ruby developer
ABOUT ME
• Mikhail Bortnyk
• Too old for this shit
• Work for Amoniac OÜ
• Ruby developer
• Language researcher
ABOUT ME
• Mikhail Bortnyk
• Too old for this shit
• Work for Amoniac OÜ
• Ruby developer
• Language researcher
• kottans.org co-founder
ABOUT ME
• Mikhail Bortnyk
• Too old for this shit
• Work for Amoniac OÜ
• Ruby developer
• Language researcher
• kottans.org co-founder
• twitter @mikhailbortnyk
LOOK
FOR
JACKIE*
SPECIAL OFFER
*НАЕБЫВАЮ
PART ONE
WHY FUNCTIONAL?
SIDE EFFECTS
PROBLEM 1.1
• your objects store state
SIDE EFFECTS
PROBLEM 1.1
• your objects store state
• your code modifies state
SIDE EFFECTS
PROBLEM 1.1
• your objects store state
• your code modifies state
• your other code modifies state too
SIDE EFFECTS
PROBLEM 1.1
• your objects store state
• your code modifies state
• your other code modifies state too
• summary: mess
SIDE EFFECTS
PROBLEM 1.1
• your objects store state
• your code modifies state
• your other code modifies state too
• summary: mess
DATA/CODE ENTITY SHARING
PROBLEM 1.2
• your model stores both your logic and data
DATA/CODE ENTITY SHARING
PROBLEM 1.2
• your model stores both your logic and data
• nuff said
DATA/CODE ENTITY SHARING
PROBLEM 1.2
• your model stores both your logic and data
• nuff said
HYPE
PROBLEM 1.3
• Erlang
HYPE
PROBLEM 1.3
• Erlang
• Haskell
HYPE
PROBLEM 1.3
• Erlang
• Haskell
• Scala
HYPE
PROBLEM 1.3
• Erlang
• Haskell
• Scala
• OCaml
HYPE
PROBLEM 1.3
• Erlang
• Haskell
• Scala
• OCaml
• Lisp
HYPE
PROBLEM 1.3
• Erlang
• Haskell
• Scala
• OCaml
• Lisp
• Javascript (sic!)
HYPE
PROBLEM 1.3
• Erlang
• Haskell
• Scala
• OCaml
• Lisp
• Javascript (sic!)
• Ruby (sic!)
PART TWO
EASY (NOT REALLY) LEVEL
LIMITS ARE FREEING
CLEAN YOUR RUBY
• David Copeland article “Adventures in functional programming
with Ruby”
LIMITS ARE FREEING
CLEAN YOUR RUBY
• David Copeland article “Adventures in functional programming
with Ruby”
• Loops are just functions
LIMITS ARE FREEING
CLEAN YOUR RUBY
• David Copeland article “Adventures in functional programming
with Ruby”
• Loops are just functions
• Data structures are just functions
LIMITS ARE FREEING
CLEAN YOUR RUBY
• David Copeland article “Adventures in functional programming
with Ruby”
• Loops are just functions
• Data structures are just functions
• Objects are just functions
LIMITS ARE FREEING
CLEAN YOUR RUBY
• David Copeland article “Adventures in functional programming
with Ruby”
• Loops are just functions
• Data structures are just functions
• Objects are just functions
• Namespaces are just functions
LIMITS ARE FREEING
CLEAN YOUR RUBY
• David Copeland article “Adventures in functional programming
with Ruby”
• Loops are just functions
• Data structures are just functions
• Objects are just functions
• Namespaces are just functions
• P.S. Ruby HAS Tail Call Optimization
ROUGH HACK
TAIL-CALL OPTIMIZATION
def fact(n, acc=1)
return acc if n <= 1
fact(n-1, n*acc)
end
RubyVM::InstructionSequence.compile_option = {
tailcall_optimization: true,
trace_instruction: false
}
fact(1000)
FUNCTIONAL VS OBJECT-ORIENTED
SIDE TO SIDE COMPARISON
new_person = ->(name, birthdate, gender, title, id=nil) {
return ->(attribute) {
return id if attribute == :id
return name if attribute == :name
return birthdate if attribute == :birthdate
return gender if attribute == :gender
return title if attribute == :title
nil
}
}
class Person
attr_reader :id, :name, :birthdate, :gender, :title
def initialize(name, birthdate, gender, title, id=nil)
@id = id
@name = name
@birthdate = birthdate
@gender = gender
@title = title
end
end
SPECIAL KNOWLEDGE
WHAT’S WRONG WITH OO-CODE?
• WTF is “class”
SPECIAL KNOWLEDGE
WHAT’S WRONG WITH OO-CODE?
• WTF is “class”
• WTF are .new and initialize
SPECIAL KNOWLEDGE
WHAT’S WRONG WITH OO-CODE?
• WTF is “class”
• WTF are .new and initialize
• API of class
SPECIAL KNOWLEDGE
WHAT’S WRONG WITH OO-CODE?
• WTF is “class”
• WTF are .new and initialize
• API of class
• WTF are @-variables
SPECIAL KNOWLEDGE
WHAT’S WRONG WITH OO-CODE?
• WTF is “class”
• WTF are .new and initialize
• API of class
• WTF are @-variables
• difference between class and instance
SPECIAL KNOWLEDGE
WHAT’S WRONG WITH OO-CODE?
• WTF is “class”
• WTF are .new and initialize
• API of class
• WTF are @-variables
• difference between class and instance
• WTF is “attr_reader”
NO HIDDEN MAGIC
FUNCTIONAL PROGRAMMING CODE
• how to define function
NO HIDDEN MAGIC
FUNCTIONAL PROGRAMMING CODE
• how to define function
• how to call function
TO DON’T SHOOT YOUR LEG
SAFETY RULES
• do not modify, create new
TO DON’T SHOOT YOUR LEG
SAFETY RULES
• do not modify, create new
• BUY MORE RAM
TO DON’T SHOOT YOUR LEG
SAFETY RULES
• do not modify, create new
• BUY MORE RAM
• functions should not depend on environment
TO DON’T SHOOT YOUR LEG
SAFETY RULES
• do not modify, create new
• BUY MORE RAM
• functions should not depend on environment
• BUY EVEN MORE RAM
TO DON’T SHOOT YOUR LEG
SAFETY RULES
• do not modify, create new
• BUY MORE RAM
• functions should not depend on environment
• BUY EVEN MORE RAM
• avoid returns
TO DON’T SHOOT YOUR LEG
SAFETY RULES
• do not modify, create new
• BUY MORE RAM
• functions should not depend on environment
• BUY EVEN MORE RAM
• avoid returns
• use lambdas
TO DON’T SHOOT YOUR LEG
SAFETY RULES
• do not modify, create new
• BUY MORE RAM
• functions should not depend on environment
• BUY EVEN MORE RAM
• avoid returns
• use lambdas
• DO NOT FORGET TO ORDER RAM RIGHT NOW
SIDE TO SIDE RULES COMPARISON
FUNCTIONAL VS OBJECT-ORIENTED
• how to perform tasks and
how to track changes

• state changes are important
• order of execution is
important
• flow controlled by loops,
conditionals, function calls
• instances of structures and
classes
• focus on what information is
needed and what
transformations required
• state changes are non-existent
• order of execution is low-
important
• flow controlled by function
calls including recursion
• functions are first class
objects, data collections
— Greenspun’s tenth rule of programming
ANY SUFFICIENTLY COMPLICATED C OR
FORTRAN PROGRAM CONTAINS AN AD-HOC,
INFORMALLY-SPECIFIED, BUG-RIDDEN, SLOW
IMPLEMENTATION OF HALF OF COMMON LISP.
”
“
PART THREE
I AM DEVELOPER, I DON’T WANT
TO LEARN, I WANT PATTERN
MATCHING AND IMMUTABILITY
STILL EVOLVING!
FUNCTIONAL-RUBY GEM
• created by Jerry D’Antonio
STILL EVOLVING!
FUNCTIONAL-RUBY GEM
• created by Jerry D’Antonio
• inspired by Erlang, Clojure, Haskell and Functional Java
STILL EVOLVING!
FUNCTIONAL-RUBY GEM
• created by Jerry D’Antonio
• inspired by Erlang, Clojure, Haskell and Functional Java
• has records, unions and tuples
STILL EVOLVING!
FUNCTIONAL-RUBY GEM
• created by Jerry D’Antonio
• inspired by Erlang, Clojure, Haskell and Functional Java
• has records, unions and tuples
• has protocols
STILL EVOLVING!
FUNCTIONAL-RUBY GEM
• created by Jerry D’Antonio
• inspired by Erlang, Clojure, Haskell and Functional Java
• has records, unions and tuples
• has protocols
• has Erlang-style pattern matching
STILL EVOLVING!
FUNCTIONAL-RUBY GEM
• created by Jerry D’Antonio
• inspired by Erlang, Clojure, Haskell and Functional Java
• has records, unions and tuples
• has protocols
• has Erlang-style pattern matching
• has function memoization
STILL EVOLVING!
FUNCTIONAL-RUBY GEM
• created by Jerry D’Antonio
• inspired by Erlang, Clojure, Haskell and Functional Java
• has records, unions and tuples
• has protocols
• has Erlang-style pattern matching
• has function memoization
• supports MRI, JRuby and Rubinius
FUNCTIONAL-RUBY GEM
SHORT OVERVIEW
PATTERN MATCHING AND TYPE CHECKING
FUNCTIONAL-RUBY GEM
class Yoga
include Functional::PatternMatching
include Functional::TypeCheck
defn(:where_is_sun) do
puts "o"
end
defn(:where_is_sun, 14) do
puts "88!"
end
defn(:where_is_sun, _) do |name|
puts "o, #{name}!"
end
defn(:where_is_sun, _) do |name|
puts "Are you in wrong district, #{name.rude_name}?"
end.when { |name| Type?(name, Moskal) }
defn(:where_is_sun, _, _) do |name, surname|
"o, #{name} #{surname}!"
end
end
MEMOIZATION
FUNCTIONAL-RUBY GEM
class Factors
include Functional::Memo
def self.sum_of(number)
of(number).reduce(:+)
end
def self.of(number)
(1..number).select {|i| factor?(number, i)}
end
def self.factor?(number, potential)
number % potential == 0
end
memoize(:sum_of)
memoize(:of)
end
RECORDS
FUNCTIONAL-RUBY GEM
Name = Functional::Record.new(:first, :middle, :last, :suffix) do
mandatory :first, :last
default :first, 'J.'
default :last, 'Doe'
end
QUESTION
Q&A
THANK YOU

Contenu connexe

Tendances

TDC2016SP - Otimização Prematura: a Raíz de Todo o Mal
TDC2016SP - Otimização Prematura: a Raíz de Todo o MalTDC2016SP - Otimização Prematura: a Raíz de Todo o Mal
TDC2016SP - Otimização Prematura: a Raíz de Todo o Maltdc-globalcode
 
Refactoring RIA Unleashed 2011
Refactoring RIA Unleashed 2011Refactoring RIA Unleashed 2011
Refactoring RIA Unleashed 2011Jesse Warden
 
Social dev camp_2011
Social dev camp_2011Social dev camp_2011
Social dev camp_2011Craig Ulliott
 
Project Tools in Web Development
Project Tools in Web DevelopmentProject Tools in Web Development
Project Tools in Web Developmentkmloomis
 
Lessons from Branch's launch
Lessons from Branch's launchLessons from Branch's launch
Lessons from Branch's launchaflock
 
LeanStartup:Research is cheaper than development
LeanStartup:Research is cheaper than developmentLeanStartup:Research is cheaper than development
LeanStartup:Research is cheaper than developmentJohn McCaffrey
 
AWS Users Meetup April 2015
AWS Users Meetup April 2015AWS Users Meetup April 2015
AWS Users Meetup April 2015Jervin Real
 
Conexão Kinghost - Otimização Prematura
Conexão Kinghost - Otimização PrematuraConexão Kinghost - Otimização Prematura
Conexão Kinghost - Otimização PrematuraFabio Akita
 
Scala for android
Scala for androidScala for android
Scala for androidTack Mobile
 
Premature optimisation: The Root of All Evil
Premature optimisation: The Root of All EvilPremature optimisation: The Root of All Evil
Premature optimisation: The Root of All EvilFabio Akita
 
PRDC-ror-trilogy-part1
PRDC-ror-trilogy-part1PRDC-ror-trilogy-part1
PRDC-ror-trilogy-part1Amir Barylko
 
Better Framework Better Life
Better Framework Better LifeBetter Framework Better Life
Better Framework Better Lifejeffz
 
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 EvilFabio Akita
 
Effectively Using UI Automation
Effectively Using UI AutomationEffectively Using UI Automation
Effectively Using UI AutomationAlexander Repty
 
Developing Complex WordPress Sites without Fear of Failure (with MVC)
Developing Complex WordPress Sites without Fear of Failure (with MVC)Developing Complex WordPress Sites without Fear of Failure (with MVC)
Developing Complex WordPress Sites without Fear of Failure (with MVC)Mike Schinkel
 
Sensus Uses Liferay to Strengthen Their Global Web Presence
Sensus Uses Liferay to Strengthen Their Global Web PresenceSensus Uses Liferay to Strengthen Their Global Web Presence
Sensus Uses Liferay to Strengthen Their Global Web Presencerivetlogic
 
Devops kc meetup_5_20_2013
Devops kc meetup_5_20_2013Devops kc meetup_5_20_2013
Devops kc meetup_5_20_2013Aaron Blythe
 

Tendances (18)

TDC2016SP - Otimização Prematura: a Raíz de Todo o Mal
TDC2016SP - Otimização Prematura: a Raíz de Todo o MalTDC2016SP - Otimização Prematura: a Raíz de Todo o Mal
TDC2016SP - Otimização Prematura: a Raíz de Todo o Mal
 
Refactoring RIA Unleashed 2011
Refactoring RIA Unleashed 2011Refactoring RIA Unleashed 2011
Refactoring RIA Unleashed 2011
 
Social dev camp_2011
Social dev camp_2011Social dev camp_2011
Social dev camp_2011
 
Project Tools in Web Development
Project Tools in Web DevelopmentProject Tools in Web Development
Project Tools in Web Development
 
Lessons from Branch's launch
Lessons from Branch's launchLessons from Branch's launch
Lessons from Branch's launch
 
LeanStartup:Research is cheaper than development
LeanStartup:Research is cheaper than developmentLeanStartup:Research is cheaper than development
LeanStartup:Research is cheaper than development
 
OOP in JS
OOP in JSOOP in JS
OOP in JS
 
AWS Users Meetup April 2015
AWS Users Meetup April 2015AWS Users Meetup April 2015
AWS Users Meetup April 2015
 
Conexão Kinghost - Otimização Prematura
Conexão Kinghost - Otimização PrematuraConexão Kinghost - Otimização Prematura
Conexão Kinghost - Otimização Prematura
 
Scala for android
Scala for androidScala for android
Scala for android
 
Premature optimisation: The Root of All Evil
Premature optimisation: The Root of All EvilPremature optimisation: The Root of All Evil
Premature optimisation: The Root of All Evil
 
PRDC-ror-trilogy-part1
PRDC-ror-trilogy-part1PRDC-ror-trilogy-part1
PRDC-ror-trilogy-part1
 
Better Framework Better Life
Better Framework Better LifeBetter Framework Better Life
Better Framework Better Life
 
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
 
Effectively Using UI Automation
Effectively Using UI AutomationEffectively Using UI Automation
Effectively Using UI Automation
 
Developing Complex WordPress Sites without Fear of Failure (with MVC)
Developing Complex WordPress Sites without Fear of Failure (with MVC)Developing Complex WordPress Sites without Fear of Failure (with MVC)
Developing Complex WordPress Sites without Fear of Failure (with MVC)
 
Sensus Uses Liferay to Strengthen Their Global Web Presence
Sensus Uses Liferay to Strengthen Their Global Web PresenceSensus Uses Liferay to Strengthen Their Global Web Presence
Sensus Uses Liferay to Strengthen Their Global Web Presence
 
Devops kc meetup_5_20_2013
Devops kc meetup_5_20_2013Devops kc meetup_5_20_2013
Devops kc meetup_5_20_2013
 

En vedette

Ruby Gems and Native Extensions - Stas Volovyk
Ruby Gems and Native Extensions - Stas VolovykRuby Gems and Native Extensions - Stas Volovyk
Ruby Gems and Native Extensions - Stas VolovykRuby Meditation
 
Evident Secrets of Successful Application - Max Goncharov
Evident Secrets of Successful Application - Max GoncharovEvident Secrets of Successful Application - Max Goncharov
Evident Secrets of Successful Application - Max GoncharovRuby Meditation
 
Functional Web Apps with WebMachine Framework - Mikhail Bortnyk
Functional Web Apps with WebMachine Framework - Mikhail BortnykFunctional Web Apps with WebMachine Framework - Mikhail Bortnyk
Functional Web Apps with WebMachine Framework - Mikhail BortnykRuby Meditation
 
Rodauth: Clean Authentication - Valentine Ostakh
Rodauth: Clean Authentication - Valentine OstakhRodauth: Clean Authentication - Valentine Ostakh
Rodauth: Clean Authentication - Valentine OstakhRuby Meditation
 
Lets build a game (in 24 min) by Ivan Zarea
Lets build a game (in 24 min) by Ivan ZareaLets build a game (in 24 min) by Ivan Zarea
Lets build a game (in 24 min) by Ivan ZareaPivorak MeetUp
 
Say Goodbye to Procedural Programming - Nick Sutterer
Say Goodbye to Procedural Programming - Nick SuttererSay Goodbye to Procedural Programming - Nick Sutterer
Say Goodbye to Procedural Programming - Nick SuttererRuby Meditation
 

En vedette (6)

Ruby Gems and Native Extensions - Stas Volovyk
Ruby Gems and Native Extensions - Stas VolovykRuby Gems and Native Extensions - Stas Volovyk
Ruby Gems and Native Extensions - Stas Volovyk
 
Evident Secrets of Successful Application - Max Goncharov
Evident Secrets of Successful Application - Max GoncharovEvident Secrets of Successful Application - Max Goncharov
Evident Secrets of Successful Application - Max Goncharov
 
Functional Web Apps with WebMachine Framework - Mikhail Bortnyk
Functional Web Apps with WebMachine Framework - Mikhail BortnykFunctional Web Apps with WebMachine Framework - Mikhail Bortnyk
Functional Web Apps with WebMachine Framework - Mikhail Bortnyk
 
Rodauth: Clean Authentication - Valentine Ostakh
Rodauth: Clean Authentication - Valentine OstakhRodauth: Clean Authentication - Valentine Ostakh
Rodauth: Clean Authentication - Valentine Ostakh
 
Lets build a game (in 24 min) by Ivan Zarea
Lets build a game (in 24 min) by Ivan ZareaLets build a game (in 24 min) by Ivan Zarea
Lets build a game (in 24 min) by Ivan Zarea
 
Say Goodbye to Procedural Programming - Nick Sutterer
Say Goodbye to Procedural Programming - Nick SuttererSay Goodbye to Procedural Programming - Nick Sutterer
Say Goodbye to Procedural Programming - Nick Sutterer
 

Similaire à Funtional Ruby - Mikhail Bortnyk

Adopting Elixir in a 10 year old codebase
Adopting Elixir in a 10 year old codebaseAdopting Elixir in a 10 year old codebase
Adopting Elixir in a 10 year old codebaseMichael Klishin
 
Meta Programming in Ruby - Code Camp 2010
Meta Programming in Ruby - Code Camp 2010Meta Programming in Ruby - Code Camp 2010
Meta Programming in Ruby - Code Camp 2010ssoroka
 
Software Engineering Thailand: Programming with Scala
Software Engineering Thailand: Programming with ScalaSoftware Engineering Thailand: Programming with Scala
Software Engineering Thailand: Programming with ScalaBrian Topping
 
Functional programming techniques in regular JavaScript
Functional programming techniques in regular JavaScriptFunctional programming techniques in regular JavaScript
Functional programming techniques in regular JavaScriptPavel Klimiankou
 
Becoming a more Productive Rails Developer
Becoming a more Productive Rails DeveloperBecoming a more Productive Rails Developer
Becoming a more Productive Rails DeveloperJohn McCaffrey
 
Tackling Testing Telephony
Tackling Testing Telephony Tackling Testing Telephony
Tackling Testing Telephony Mojo Lingo
 
Different Ways of Integrating React into Rails - Pros and Cons
Different Ways of Integrating React into Rails - Pros and ConsDifferent Ways of Integrating React into Rails - Pros and Cons
Different Ways of Integrating React into Rails - Pros and ConsAmoniac OÜ
 
Different ways of integrating React into Rails - Mikhail Bortnyk
Different ways of integrating React into Rails - Mikhail BortnykDifferent ways of integrating React into Rails - Mikhail Bortnyk
Different ways of integrating React into Rails - Mikhail BortnykRuby Meditation
 
Scaling with swagger
Scaling with swaggerScaling with swagger
Scaling with swaggerTony Tam
 
Learn Ruby 2011 - Session 1
Learn Ruby 2011 - Session 1Learn Ruby 2011 - Session 1
Learn Ruby 2011 - Session 1James Thompson
 
Inside Wordnik's Architecture
Inside Wordnik's ArchitectureInside Wordnik's Architecture
Inside Wordnik's ArchitectureTony Tam
 
AJAX & jQuery - City University WAD Module
AJAX & jQuery - City University WAD ModuleAJAX & jQuery - City University WAD Module
AJAX & jQuery - City University WAD ModuleCharlie Perrins
 
Apache Solr - search for everyone!
Apache Solr - search for everyone!Apache Solr - search for everyone!
Apache Solr - search for everyone!Jaran Flaath
 
Erlang - Dive Right In
Erlang - Dive Right InErlang - Dive Right In
Erlang - Dive Right Invorn
 
Scala in the Wild
Scala in the WildScala in the Wild
Scala in the WildTomer Gabel
 

Similaire à Funtional Ruby - Mikhail Bortnyk (20)

Adopting Elixir in a 10 year old codebase
Adopting Elixir in a 10 year old codebaseAdopting Elixir in a 10 year old codebase
Adopting Elixir in a 10 year old codebase
 
Meta Programming in Ruby - Code Camp 2010
Meta Programming in Ruby - Code Camp 2010Meta Programming in Ruby - Code Camp 2010
Meta Programming in Ruby - Code Camp 2010
 
Software Engineering Thailand: Programming with Scala
Software Engineering Thailand: Programming with ScalaSoftware Engineering Thailand: Programming with Scala
Software Engineering Thailand: Programming with Scala
 
Functional programming techniques in regular JavaScript
Functional programming techniques in regular JavaScriptFunctional programming techniques in regular JavaScript
Functional programming techniques in regular JavaScript
 
Becoming a more Productive Rails Developer
Becoming a more Productive Rails DeveloperBecoming a more Productive Rails Developer
Becoming a more Productive Rails Developer
 
Polyglot Grails
Polyglot GrailsPolyglot Grails
Polyglot Grails
 
Lexing and parsing
Lexing and parsingLexing and parsing
Lexing and parsing
 
Tackling Testing Telephony
Tackling Testing Telephony Tackling Testing Telephony
Tackling Testing Telephony
 
Different Ways of Integrating React into Rails - Pros and Cons
Different Ways of Integrating React into Rails - Pros and ConsDifferent Ways of Integrating React into Rails - Pros and Cons
Different Ways of Integrating React into Rails - Pros and Cons
 
Different ways of integrating React into Rails - Mikhail Bortnyk
Different ways of integrating React into Rails - Mikhail BortnykDifferent ways of integrating React into Rails - Mikhail Bortnyk
Different ways of integrating React into Rails - Mikhail Bortnyk
 
Jquery2012 defs
Jquery2012 defsJquery2012 defs
Jquery2012 defs
 
Scaling with swagger
Scaling with swaggerScaling with swagger
Scaling with swagger
 
Learn Ruby 2011 - Session 1
Learn Ruby 2011 - Session 1Learn Ruby 2011 - Session 1
Learn Ruby 2011 - Session 1
 
Testing gone-right
Testing gone-rightTesting gone-right
Testing gone-right
 
3 years with Clojure
3 years with Clojure3 years with Clojure
3 years with Clojure
 
Inside Wordnik's Architecture
Inside Wordnik's ArchitectureInside Wordnik's Architecture
Inside Wordnik's Architecture
 
AJAX & jQuery - City University WAD Module
AJAX & jQuery - City University WAD ModuleAJAX & jQuery - City University WAD Module
AJAX & jQuery - City University WAD Module
 
Apache Solr - search for everyone!
Apache Solr - search for everyone!Apache Solr - search for everyone!
Apache Solr - search for everyone!
 
Erlang - Dive Right In
Erlang - Dive Right InErlang - Dive Right In
Erlang - Dive Right In
 
Scala in the Wild
Scala in the WildScala in the Wild
Scala in the Wild
 

Plus de Ruby Meditation

Is this Legacy or Revenant Code? - Sergey Sergyenko | Ruby Meditation 30
Is this Legacy or Revenant Code? - Sergey Sergyenko  | Ruby Meditation 30Is this Legacy or Revenant Code? - Sergey Sergyenko  | Ruby Meditation 30
Is this Legacy or Revenant Code? - Sergey Sergyenko | Ruby Meditation 30Ruby Meditation
 
Life with GraphQL API: good practices and unresolved issues - Roman Dubrovsky...
Life with GraphQL API: good practices and unresolved issues - Roman Dubrovsky...Life with GraphQL API: good practices and unresolved issues - Roman Dubrovsky...
Life with GraphQL API: good practices and unresolved issues - Roman Dubrovsky...Ruby Meditation
 
Where is your license, dude? - Viacheslav Miroshnychenko | Ruby Meditation 29
Where is your license, dude? - Viacheslav Miroshnychenko | Ruby Meditation 29Where is your license, dude? - Viacheslav Miroshnychenko | Ruby Meditation 29
Where is your license, dude? - Viacheslav Miroshnychenko | Ruby Meditation 29Ruby Meditation
 
Dry-validation update. Dry-validation vs Dry-schema 1.0 - Aleksandra Stolyar ...
Dry-validation update. Dry-validation vs Dry-schema 1.0 - Aleksandra Stolyar ...Dry-validation update. Dry-validation vs Dry-schema 1.0 - Aleksandra Stolyar ...
Dry-validation update. Dry-validation vs Dry-schema 1.0 - Aleksandra Stolyar ...Ruby Meditation
 
How to cook Rabbit on Production - Bohdan Parshentsev | Ruby Meditation 28
How to cook Rabbit on Production - Bohdan Parshentsev | Ruby Meditation 28 How to cook Rabbit on Production - Bohdan Parshentsev | Ruby Meditation 28
How to cook Rabbit on Production - Bohdan Parshentsev | Ruby Meditation 28 Ruby Meditation
 
How to cook Rabbit on Production - Serhiy Nazarov | Ruby Meditation 28
How to cook Rabbit on Production - Serhiy Nazarov | Ruby Meditation 28How to cook Rabbit on Production - Serhiy Nazarov | Ruby Meditation 28
How to cook Rabbit on Production - Serhiy Nazarov | Ruby Meditation 28Ruby Meditation
 
Reinventing the wheel - why do it and how to feel good about it - Julik Tarkh...
Reinventing the wheel - why do it and how to feel good about it - Julik Tarkh...Reinventing the wheel - why do it and how to feel good about it - Julik Tarkh...
Reinventing the wheel - why do it and how to feel good about it - Julik Tarkh...Ruby Meditation
 
Performance Optimization 101 for Ruby developers - Nihad Abbasov (ENG) | Ruby...
Performance Optimization 101 for Ruby developers - Nihad Abbasov (ENG) | Ruby...Performance Optimization 101 for Ruby developers - Nihad Abbasov (ENG) | Ruby...
Performance Optimization 101 for Ruby developers - Nihad Abbasov (ENG) | Ruby...Ruby Meditation
 
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...Ruby Meditation
 
The Trailblazer Ride from the If Jungle into a Civilised Railway Station - Or...
The Trailblazer Ride from the If Jungle into a Civilised Railway Station - Or...The Trailblazer Ride from the If Jungle into a Civilised Railway Station - Or...
The Trailblazer Ride from the If Jungle into a Civilised Railway Station - Or...Ruby Meditation
 
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27Ruby Meditation
 
New features in Rails 6 - Nihad Abbasov (RUS) | Ruby Meditation 26
New features in Rails 6 -  Nihad Abbasov (RUS) | Ruby Meditation 26New features in Rails 6 -  Nihad Abbasov (RUS) | Ruby Meditation 26
New features in Rails 6 - Nihad Abbasov (RUS) | Ruby Meditation 26Ruby Meditation
 
Security Scanning Overview - Tetiana Chupryna (RUS) | Ruby Meditation 26
Security Scanning Overview - Tetiana Chupryna (RUS) | Ruby Meditation 26Security Scanning Overview - Tetiana Chupryna (RUS) | Ruby Meditation 26
Security Scanning Overview - Tetiana Chupryna (RUS) | Ruby Meditation 26Ruby Meditation
 
Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...
Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...
Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...Ruby Meditation
 
Best practices. Exploring - Ike Kurghinyan (RUS) | Ruby Meditation 26
Best practices. Exploring - Ike Kurghinyan (RUS) | Ruby Meditation 26Best practices. Exploring - Ike Kurghinyan (RUS) | Ruby Meditation 26
Best practices. Exploring - Ike Kurghinyan (RUS) | Ruby Meditation 26Ruby Meditation
 
Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25
Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25
Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25Ruby Meditation
 
Concurrency in production. Real life example - Dmytro Herasymuk | Ruby Medita...
Concurrency in production. Real life example - Dmytro Herasymuk | Ruby Medita...Concurrency in production. Real life example - Dmytro Herasymuk | Ruby Medita...
Concurrency in production. Real life example - Dmytro Herasymuk | Ruby Medita...Ruby Meditation
 
Data encryption for Ruby web applications - Dmytro Shapovalov (RUS) | Ruby Me...
Data encryption for Ruby web applications - Dmytro Shapovalov (RUS) | Ruby Me...Data encryption for Ruby web applications - Dmytro Shapovalov (RUS) | Ruby Me...
Data encryption for Ruby web applications - Dmytro Shapovalov (RUS) | Ruby Me...Ruby Meditation
 
Rails App performance at the limit - Bogdan Gusiev
Rails App performance at the limit - Bogdan GusievRails App performance at the limit - Bogdan Gusiev
Rails App performance at the limit - Bogdan GusievRuby Meditation
 
GDPR. Next Y2K in 2018? - Anton Tkachov | Ruby Meditation #23
GDPR. Next Y2K in 2018? - Anton Tkachov | Ruby Meditation #23GDPR. Next Y2K in 2018? - Anton Tkachov | Ruby Meditation #23
GDPR. Next Y2K in 2018? - Anton Tkachov | Ruby Meditation #23Ruby Meditation
 

Plus de Ruby Meditation (20)

Is this Legacy or Revenant Code? - Sergey Sergyenko | Ruby Meditation 30
Is this Legacy or Revenant Code? - Sergey Sergyenko  | Ruby Meditation 30Is this Legacy or Revenant Code? - Sergey Sergyenko  | Ruby Meditation 30
Is this Legacy or Revenant Code? - Sergey Sergyenko | Ruby Meditation 30
 
Life with GraphQL API: good practices and unresolved issues - Roman Dubrovsky...
Life with GraphQL API: good practices and unresolved issues - Roman Dubrovsky...Life with GraphQL API: good practices and unresolved issues - Roman Dubrovsky...
Life with GraphQL API: good practices and unresolved issues - Roman Dubrovsky...
 
Where is your license, dude? - Viacheslav Miroshnychenko | Ruby Meditation 29
Where is your license, dude? - Viacheslav Miroshnychenko | Ruby Meditation 29Where is your license, dude? - Viacheslav Miroshnychenko | Ruby Meditation 29
Where is your license, dude? - Viacheslav Miroshnychenko | Ruby Meditation 29
 
Dry-validation update. Dry-validation vs Dry-schema 1.0 - Aleksandra Stolyar ...
Dry-validation update. Dry-validation vs Dry-schema 1.0 - Aleksandra Stolyar ...Dry-validation update. Dry-validation vs Dry-schema 1.0 - Aleksandra Stolyar ...
Dry-validation update. Dry-validation vs Dry-schema 1.0 - Aleksandra Stolyar ...
 
How to cook Rabbit on Production - Bohdan Parshentsev | Ruby Meditation 28
How to cook Rabbit on Production - Bohdan Parshentsev | Ruby Meditation 28 How to cook Rabbit on Production - Bohdan Parshentsev | Ruby Meditation 28
How to cook Rabbit on Production - Bohdan Parshentsev | Ruby Meditation 28
 
How to cook Rabbit on Production - Serhiy Nazarov | Ruby Meditation 28
How to cook Rabbit on Production - Serhiy Nazarov | Ruby Meditation 28How to cook Rabbit on Production - Serhiy Nazarov | Ruby Meditation 28
How to cook Rabbit on Production - Serhiy Nazarov | Ruby Meditation 28
 
Reinventing the wheel - why do it and how to feel good about it - Julik Tarkh...
Reinventing the wheel - why do it and how to feel good about it - Julik Tarkh...Reinventing the wheel - why do it and how to feel good about it - Julik Tarkh...
Reinventing the wheel - why do it and how to feel good about it - Julik Tarkh...
 
Performance Optimization 101 for Ruby developers - Nihad Abbasov (ENG) | Ruby...
Performance Optimization 101 for Ruby developers - Nihad Abbasov (ENG) | Ruby...Performance Optimization 101 for Ruby developers - Nihad Abbasov (ENG) | Ruby...
Performance Optimization 101 for Ruby developers - Nihad Abbasov (ENG) | Ruby...
 
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...
 
The Trailblazer Ride from the If Jungle into a Civilised Railway Station - Or...
The Trailblazer Ride from the If Jungle into a Civilised Railway Station - Or...The Trailblazer Ride from the If Jungle into a Civilised Railway Station - Or...
The Trailblazer Ride from the If Jungle into a Civilised Railway Station - Or...
 
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27
 
New features in Rails 6 - Nihad Abbasov (RUS) | Ruby Meditation 26
New features in Rails 6 -  Nihad Abbasov (RUS) | Ruby Meditation 26New features in Rails 6 -  Nihad Abbasov (RUS) | Ruby Meditation 26
New features in Rails 6 - Nihad Abbasov (RUS) | Ruby Meditation 26
 
Security Scanning Overview - Tetiana Chupryna (RUS) | Ruby Meditation 26
Security Scanning Overview - Tetiana Chupryna (RUS) | Ruby Meditation 26Security Scanning Overview - Tetiana Chupryna (RUS) | Ruby Meditation 26
Security Scanning Overview - Tetiana Chupryna (RUS) | Ruby Meditation 26
 
Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...
Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...
Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...
 
Best practices. Exploring - Ike Kurghinyan (RUS) | Ruby Meditation 26
Best practices. Exploring - Ike Kurghinyan (RUS) | Ruby Meditation 26Best practices. Exploring - Ike Kurghinyan (RUS) | Ruby Meditation 26
Best practices. Exploring - Ike Kurghinyan (RUS) | Ruby Meditation 26
 
Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25
Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25
Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25
 
Concurrency in production. Real life example - Dmytro Herasymuk | Ruby Medita...
Concurrency in production. Real life example - Dmytro Herasymuk | Ruby Medita...Concurrency in production. Real life example - Dmytro Herasymuk | Ruby Medita...
Concurrency in production. Real life example - Dmytro Herasymuk | Ruby Medita...
 
Data encryption for Ruby web applications - Dmytro Shapovalov (RUS) | Ruby Me...
Data encryption for Ruby web applications - Dmytro Shapovalov (RUS) | Ruby Me...Data encryption for Ruby web applications - Dmytro Shapovalov (RUS) | Ruby Me...
Data encryption for Ruby web applications - Dmytro Shapovalov (RUS) | Ruby Me...
 
Rails App performance at the limit - Bogdan Gusiev
Rails App performance at the limit - Bogdan GusievRails App performance at the limit - Bogdan Gusiev
Rails App performance at the limit - Bogdan Gusiev
 
GDPR. Next Y2K in 2018? - Anton Tkachov | Ruby Meditation #23
GDPR. Next Y2K in 2018? - Anton Tkachov | Ruby Meditation #23GDPR. Next Y2K in 2018? - Anton Tkachov | Ruby Meditation #23
GDPR. Next Y2K in 2018? - Anton Tkachov | Ruby Meditation #23
 

Dernier

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 DiscoveryTrustArc
 
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.pdfUK Journal
 
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 FresherRemote DBA Services
 
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 Processorsdebabhi2
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
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 CVKhem
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
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 TerraformAndrey Devyatkin
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
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...DianaGray10
 
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 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
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 WorkerThousandEyes
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
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 DevelopmentsTrustArc
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
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 organizationRadu Cotescu
 

Dernier (20)

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
 
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
 
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
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - 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...
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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
 

Funtional Ruby - Mikhail Bortnyk

  • 2.
  • 4. ABOUT ME • Mikhail Bortnyk • Too old for this shit
  • 5. ABOUT ME • Mikhail Bortnyk • Too old for this shit • Work for Amoniac OÜ
  • 6. ABOUT ME • Mikhail Bortnyk • Too old for this shit • Work for Amoniac OÜ • Ruby developer
  • 7. ABOUT ME • Mikhail Bortnyk • Too old for this shit • Work for Amoniac OÜ • Ruby developer • Language researcher
  • 8. ABOUT ME • Mikhail Bortnyk • Too old for this shit • Work for Amoniac OÜ • Ruby developer • Language researcher • kottans.org co-founder
  • 9. ABOUT ME • Mikhail Bortnyk • Too old for this shit • Work for Amoniac OÜ • Ruby developer • Language researcher • kottans.org co-founder • twitter @mikhailbortnyk
  • 12. SIDE EFFECTS PROBLEM 1.1 • your objects store state
  • 13. SIDE EFFECTS PROBLEM 1.1 • your objects store state • your code modifies state
  • 14. SIDE EFFECTS PROBLEM 1.1 • your objects store state • your code modifies state • your other code modifies state too
  • 15. SIDE EFFECTS PROBLEM 1.1 • your objects store state • your code modifies state • your other code modifies state too • summary: mess
  • 16. SIDE EFFECTS PROBLEM 1.1 • your objects store state • your code modifies state • your other code modifies state too • summary: mess
  • 17. DATA/CODE ENTITY SHARING PROBLEM 1.2 • your model stores both your logic and data
  • 18. DATA/CODE ENTITY SHARING PROBLEM 1.2 • your model stores both your logic and data • nuff said
  • 19. DATA/CODE ENTITY SHARING PROBLEM 1.2 • your model stores both your logic and data • nuff said
  • 22. HYPE PROBLEM 1.3 • Erlang • Haskell • Scala
  • 23. HYPE PROBLEM 1.3 • Erlang • Haskell • Scala • OCaml
  • 24. HYPE PROBLEM 1.3 • Erlang • Haskell • Scala • OCaml • Lisp
  • 25. HYPE PROBLEM 1.3 • Erlang • Haskell • Scala • OCaml • Lisp • Javascript (sic!)
  • 26. HYPE PROBLEM 1.3 • Erlang • Haskell • Scala • OCaml • Lisp • Javascript (sic!) • Ruby (sic!)
  • 27. PART TWO EASY (NOT REALLY) LEVEL
  • 28. LIMITS ARE FREEING CLEAN YOUR RUBY • David Copeland article “Adventures in functional programming with Ruby”
  • 29. LIMITS ARE FREEING CLEAN YOUR RUBY • David Copeland article “Adventures in functional programming with Ruby” • Loops are just functions
  • 30. LIMITS ARE FREEING CLEAN YOUR RUBY • David Copeland article “Adventures in functional programming with Ruby” • Loops are just functions • Data structures are just functions
  • 31. LIMITS ARE FREEING CLEAN YOUR RUBY • David Copeland article “Adventures in functional programming with Ruby” • Loops are just functions • Data structures are just functions • Objects are just functions
  • 32. LIMITS ARE FREEING CLEAN YOUR RUBY • David Copeland article “Adventures in functional programming with Ruby” • Loops are just functions • Data structures are just functions • Objects are just functions • Namespaces are just functions
  • 33. LIMITS ARE FREEING CLEAN YOUR RUBY • David Copeland article “Adventures in functional programming with Ruby” • Loops are just functions • Data structures are just functions • Objects are just functions • Namespaces are just functions • P.S. Ruby HAS Tail Call Optimization
  • 34. ROUGH HACK TAIL-CALL OPTIMIZATION def fact(n, acc=1) return acc if n <= 1 fact(n-1, n*acc) end RubyVM::InstructionSequence.compile_option = { tailcall_optimization: true, trace_instruction: false } fact(1000)
  • 35. FUNCTIONAL VS OBJECT-ORIENTED SIDE TO SIDE COMPARISON new_person = ->(name, birthdate, gender, title, id=nil) { return ->(attribute) { return id if attribute == :id return name if attribute == :name return birthdate if attribute == :birthdate return gender if attribute == :gender return title if attribute == :title nil } } class Person attr_reader :id, :name, :birthdate, :gender, :title def initialize(name, birthdate, gender, title, id=nil) @id = id @name = name @birthdate = birthdate @gender = gender @title = title end end
  • 36. SPECIAL KNOWLEDGE WHAT’S WRONG WITH OO-CODE? • WTF is “class”
  • 37. SPECIAL KNOWLEDGE WHAT’S WRONG WITH OO-CODE? • WTF is “class” • WTF are .new and initialize
  • 38. SPECIAL KNOWLEDGE WHAT’S WRONG WITH OO-CODE? • WTF is “class” • WTF are .new and initialize • API of class
  • 39. SPECIAL KNOWLEDGE WHAT’S WRONG WITH OO-CODE? • WTF is “class” • WTF are .new and initialize • API of class • WTF are @-variables
  • 40. SPECIAL KNOWLEDGE WHAT’S WRONG WITH OO-CODE? • WTF is “class” • WTF are .new and initialize • API of class • WTF are @-variables • difference between class and instance
  • 41. SPECIAL KNOWLEDGE WHAT’S WRONG WITH OO-CODE? • WTF is “class” • WTF are .new and initialize • API of class • WTF are @-variables • difference between class and instance • WTF is “attr_reader”
  • 42. NO HIDDEN MAGIC FUNCTIONAL PROGRAMMING CODE • how to define function
  • 43. NO HIDDEN MAGIC FUNCTIONAL PROGRAMMING CODE • how to define function • how to call function
  • 44. TO DON’T SHOOT YOUR LEG SAFETY RULES • do not modify, create new
  • 45. TO DON’T SHOOT YOUR LEG SAFETY RULES • do not modify, create new • BUY MORE RAM
  • 46. TO DON’T SHOOT YOUR LEG SAFETY RULES • do not modify, create new • BUY MORE RAM • functions should not depend on environment
  • 47. TO DON’T SHOOT YOUR LEG SAFETY RULES • do not modify, create new • BUY MORE RAM • functions should not depend on environment • BUY EVEN MORE RAM
  • 48. TO DON’T SHOOT YOUR LEG SAFETY RULES • do not modify, create new • BUY MORE RAM • functions should not depend on environment • BUY EVEN MORE RAM • avoid returns
  • 49. TO DON’T SHOOT YOUR LEG SAFETY RULES • do not modify, create new • BUY MORE RAM • functions should not depend on environment • BUY EVEN MORE RAM • avoid returns • use lambdas
  • 50. TO DON’T SHOOT YOUR LEG SAFETY RULES • do not modify, create new • BUY MORE RAM • functions should not depend on environment • BUY EVEN MORE RAM • avoid returns • use lambdas • DO NOT FORGET TO ORDER RAM RIGHT NOW
  • 51. SIDE TO SIDE RULES COMPARISON FUNCTIONAL VS OBJECT-ORIENTED • how to perform tasks and how to track changes
 • state changes are important • order of execution is important • flow controlled by loops, conditionals, function calls • instances of structures and classes • focus on what information is needed and what transformations required • state changes are non-existent • order of execution is low- important • flow controlled by function calls including recursion • functions are first class objects, data collections
  • 52. — Greenspun’s tenth rule of programming ANY SUFFICIENTLY COMPLICATED C OR FORTRAN PROGRAM CONTAINS AN AD-HOC, INFORMALLY-SPECIFIED, BUG-RIDDEN, SLOW IMPLEMENTATION OF HALF OF COMMON LISP. ” “
  • 53. PART THREE I AM DEVELOPER, I DON’T WANT TO LEARN, I WANT PATTERN MATCHING AND IMMUTABILITY
  • 54. STILL EVOLVING! FUNCTIONAL-RUBY GEM • created by Jerry D’Antonio
  • 55. STILL EVOLVING! FUNCTIONAL-RUBY GEM • created by Jerry D’Antonio • inspired by Erlang, Clojure, Haskell and Functional Java
  • 56. STILL EVOLVING! FUNCTIONAL-RUBY GEM • created by Jerry D’Antonio • inspired by Erlang, Clojure, Haskell and Functional Java • has records, unions and tuples
  • 57. STILL EVOLVING! FUNCTIONAL-RUBY GEM • created by Jerry D’Antonio • inspired by Erlang, Clojure, Haskell and Functional Java • has records, unions and tuples • has protocols
  • 58. STILL EVOLVING! FUNCTIONAL-RUBY GEM • created by Jerry D’Antonio • inspired by Erlang, Clojure, Haskell and Functional Java • has records, unions and tuples • has protocols • has Erlang-style pattern matching
  • 59. STILL EVOLVING! FUNCTIONAL-RUBY GEM • created by Jerry D’Antonio • inspired by Erlang, Clojure, Haskell and Functional Java • has records, unions and tuples • has protocols • has Erlang-style pattern matching • has function memoization
  • 60. STILL EVOLVING! FUNCTIONAL-RUBY GEM • created by Jerry D’Antonio • inspired by Erlang, Clojure, Haskell and Functional Java • has records, unions and tuples • has protocols • has Erlang-style pattern matching • has function memoization • supports MRI, JRuby and Rubinius
  • 62. PATTERN MATCHING AND TYPE CHECKING FUNCTIONAL-RUBY GEM class Yoga include Functional::PatternMatching include Functional::TypeCheck defn(:where_is_sun) do puts "o" end defn(:where_is_sun, 14) do puts "88!" end defn(:where_is_sun, _) do |name| puts "o, #{name}!" end defn(:where_is_sun, _) do |name| puts "Are you in wrong district, #{name.rude_name}?" end.when { |name| Type?(name, Moskal) } defn(:where_is_sun, _, _) do |name, surname| "o, #{name} #{surname}!" end end
  • 63. MEMOIZATION FUNCTIONAL-RUBY GEM class Factors include Functional::Memo def self.sum_of(number) of(number).reduce(:+) end def self.of(number) (1..number).select {|i| factor?(number, i)} end def self.factor?(number, potential) number % potential == 0 end memoize(:sum_of) memoize(:of) end
  • 64. RECORDS FUNCTIONAL-RUBY GEM Name = Functional::Record.new(:first, :middle, :last, :suffix) do mandatory :first, :last default :first, 'J.' default :last, 'Doe' end
  • 66. Q&A