Ruby Conf 2016 An Overview
Ruby Conf 2016 An Overview
How busy we were for Ruby Conf?
Where are we lagging behind?
Let’s Start ...
N.B. No question will be entertained
Yukihiro (Matz) MatsumotoCreator of Ruby, Heroku
Ruby Typing
Understanding the philosophy of Matz
Don’t care about small things
Static vs Dynamic
Dynamic typing leads to a design policy
Duck Typing
If it walks like a duck
Quack like a duck
It is a duck
We don’t care about the structure
We just care about how it behaves
Duck typing allow us to ignore the internals
Lower mental cost in development
Duck typing enhances flexibility
But there are some drawbacks of dynamic
typing
Drawbacks of dynamic typing1. Errors only found in run time
2. Bad error messages
3. Without proper coverage, you may miss some kind of type error
4. Less documentation
Matz don’t want to specify types
But we also need better documentation
Contradiction!
We want something similar to static typing, that allows
duck typing
Static Typing with Duck Typing
Static Typing with Duck Typing
GO
Matz is calling it ‘Soft Typing’
Typing mechanism that provides reasonable
feedback to programmers accustomed to dynamically
typed-languages.
We will have it in Ruby 3!
Release date of Ruby 3?
Grzegorz WitekLead Software Engineer, Kaligo
Your API is too slow!
Is lack of speed a bug?
Long way of request
Where are your users?
Dynamic content acceleration
Determine what is slow!
Measure Performance
gem ‘ruby-prof’gem ‘rack-mini-profiler’
Measure always in production mode
Rely on database
Where is your cache?
Redis on separate machine - FastRedis on same machine - Faster
Application memory - Fastest
Upgrade the libraries
Move processing to background
Desperate Measure - Extract part of the
applicationRewrite in GO
Goodies
Thank you all!