SlideShare ist ein Scribd-Unternehmen logo
1 von 50
Downloaden Sie, um offline zu lesen
this is the 0.8 language you were looking for
class << self
def who Maurizio De Magnis
I’m a Developer,
trying to improve
*
http://olistik.me
@olistik
def what
def where
First things first
let's sculpt this presentation
What you're NOT going to see today
“C’mon, use Ruby so I can
eat meat this week”
“Pick me! Pick me!”
What I'm going to say
is a personal remix of
what I've experienced,
heard and read.
http://goo.gl/TPywyp
Will you see breakthrough concepts here?
http://goo.gl/4FhtgR
No.
I'll just give you another point of view
● Ruby is NOT a perfect language
● Ruby is NOT the best language for
every scenario
"a language can’t be
good for everyone and
every purpose, but we
can strive to make it
good for 80% of what is
needed in a
programming language"
The most important slide so far
Yukihiro ‘Matz’ Matsumoto
(creator of Ruby)
http://goo.gl/0p7tBv
so do good/great programming
languages (and frameworks)
http://www.ruby-lang.org/en/about/
"Ruby is a language of careful balance.
Its creator, Yukihiro “Matz” Matsumoto, blended
parts of his favorite languages
(Perl, Smalltalk, Eiffel, Ada, and Lisp)
to form a new language that balanced
functional programming with imperative
programming."
● everyone has good ideas
● BUT not everyone perform well
Let's talk about something that
matters
http://goo.gl/60awJp
How?
perform well := adaptability to changes
either in the early stages (prototype)
or in the subsequent evolutions
Recipe for success
people
(skilled and motivated)
processes
(agile!)
but also the tools
on the coding layer
Let’s focus
coding is a creative process
positive thoughts unleash creativity
if coders are happy then creativity boosts
Provide them tools that actually improves the
efficiency of their environment
(also, pay them well enough so that they
don't worry about the economic details)
A good way to make
coders happy
The code you have to actually type
is the code you wish you had.
Today’s definition for
EPIC WIN
Expressiveness #1
The language you use influences your thoughts
Expressiveness #2
What about a language that looks like written
english?
“In the 1970s, researchers found that
developers tend to write roughly the
same number of lines of code every
day, regardless of what language
they're working in.”
Terseness #1
B. Boehm, Software Engineering Economics, Prentice-Hall, ISBN 0-138-22122-7, 1981.
Terseness #2
"the first 10 book's title, ordered alphabetically"
(it’s actually shorter than the corresponding english sentence)
Immediate feedback
I want to be able to “play” with the data:
Don't limit my designing skills
(testing new ideas)
Don't limit my problem solving skills
(debugging)
Immediate feedback - IRB
.js: 1
.css: 1
.rb: 21
.erb: 1
.yml: 3
.ru: 1
.lock: 1
.log: 1
.html: 3
.ico: 1
.txt: 1
.rdoc: 1
Immediate feedback - Rails console
Immediate feedback - meet AREL
Immediate feedback - meet AREL #2
Ruby code that gets transparently translated
into (usually) boring/verbose SQL statements.
Regardless the DBMS you're using
(MySQL, Postgres, SQLite, etc.)
Why? Abstraction!
"perform well := adaptability to changes"
“My code does
something funky, let
me inspect its context
at runtime”
Immediate feedback - MOAR
Immediate feedback - MOAR
Better
Errors
Immediate feedback - MOAR
RailsPanel
The pitfall of most frameworks
“Be the best at all the things!”
It usually ends up for the framework to be less
than average.
Even worse: “Let's do it by configuring all
the things!” (every time, from scratch)
=> a lot of time effort
Rails is an opinionated framework
Conventions over
configurations
A lot of assumptions based on what are the
most common needs of web developers.
● console
● standalone app server (but you can
choose whatever you like)
Fully isolated development
environment
Code organization
Follows the MVC pattern:
The goal is to understand in almost zero time
where a file is or should be located.
app/
models/
views/
controllers/
Code organization #2
Tends to fight bad practices such as:
● single directory with hundreds of files
● few huge monolithic files
Data persistence: ActiveRecord
class Author < ActiveRecord::Base
end
The code above reflects this database
configuration:
- authors
id: integer
Data persistence: ActiveRecord #2
If the database table happens to contain
additional fields like "name" and "age" the
developer doesn't need to update any code in
order to perform these:
author = Author.take(name: 'PKD')
author.age # => 55
author.age = 53
author.save
Data persistence: ActiveRecord #3
Even relations are easily mapped with little
effort:
class Author < ActiveRecord::Base
has_many :books
end
class Book < ActiveRecord::Base
belongs_to :author
end
- authors
id: integer
- books
id: integer
author_id: integer
author.books.first
author.books.destroy_all
author.books << Book.create
Here are some of the tools that makes Ruby
shine.
The focus should not be placed into what
they do, but how they have been
architectured so that your effort consists only
in declaring your needs.
When you use Ruby, you
get the whole ecosystem
for free
$ irb
> require 'mini_magick'
> image = MiniMagick::Image.open("input.jpg")
> image.resize "100x100"
> image.write "output.jpg"
$ gem install mini_magick
$ irb
> require ‘nokogiri’
> require 'open-uri'
> doc = Nokogiri::HTML(open("http://www.nytimes.com"))
> puts doc.
css('.story h3').
map {|story| "- #{story.text.strip}"}
- Obama's Battle for Votes on Syria Strike Is Taut and Uphill
- In Egypt, a Welcome for Syrian Refugees Turns Bitter
- Facing Fury Over New Law, Stoli Says '€˜Russian? Not Really'
- Two Men, 58 Years and Counting
- Editorial: Banning a Pseudo-Therapy
- Loose Ends: My Adventures in Their Clutches
$ gem install nokogiri
"RSpec is testing tool
for the Ruby
programming language.
Born under the banner
of Behaviour-Driven
Development,
it is designed to make
Test-Driven
Development a
productive and
enjoyable experience"
Testing with RSpec
# spec/bowling_spec.rb
require 'bowling'
describe Bowling, "#score" do
it "returns 0 for all gutter game"
do
bowling = Bowling.new
20.times { bowling.hit(0) }
bowling.score.should eq(0)
end
end
$ rspec bowling_spec.rb --format nested
Bowling#score
returns 0 for all gutter game
Finished in 0.007534 seconds
1 example, 0 failures
Who uses Ruby?
● http://www.shopify.com/
● http://www.yellowpages.com/
● https://github.com/
● https://www.heroku.com/
● https://twitter.com
● http://www.hulu.com/
● http://www.scribd.com/
● http://www.slideshare.net/
● http://www.soundcloud.com/
● http://www.prada.com
Ruby is used for both web and system programming
Ruby is used by both startups and enterprise companies
(Someone you might know)
This brief introduction is just to be
considered as a teaser.
Have Fun & Happy Coding
festival ICT 2013: Ruby, the 0.8 language you were looking for

Weitere ähnliche Inhalte

Was ist angesagt?

Testing Storm components with Groovy and Spock
Testing Storm components with Groovy and SpockTesting Storm components with Groovy and Spock
Testing Storm components with Groovy and SpockEugene Dvorkin
 
Stop JavaScripting like it's 1999
Stop JavaScripting like it's 1999Stop JavaScripting like it's 1999
Stop JavaScripting like it's 1999Hunter Loftis
 
Hot and spicy Java with Lombok. Live!
Hot and spicy Java with Lombok. Live!Hot and spicy Java with Lombok. Live!
Hot and spicy Java with Lombok. Live!Vladimir Tsukur
 
Cucumber.js: Cuke up your JavaScript!
Cucumber.js: Cuke up your JavaScript!Cucumber.js: Cuke up your JavaScript!
Cucumber.js: Cuke up your JavaScript!Julien Biezemans
 
Introduce cucumber
Introduce cucumberIntroduce cucumber
Introduce cucumberBachue Zhou
 

Was ist angesagt? (6)

Testing Storm components with Groovy and Spock
Testing Storm components with Groovy and SpockTesting Storm components with Groovy and Spock
Testing Storm components with Groovy and Spock
 
Stop JavaScripting like it's 1999
Stop JavaScripting like it's 1999Stop JavaScripting like it's 1999
Stop JavaScripting like it's 1999
 
Hot and spicy Java with Lombok. Live!
Hot and spicy Java with Lombok. Live!Hot and spicy Java with Lombok. Live!
Hot and spicy Java with Lombok. Live!
 
Cucumber.js: Cuke up your JavaScript!
Cucumber.js: Cuke up your JavaScript!Cucumber.js: Cuke up your JavaScript!
Cucumber.js: Cuke up your JavaScript!
 
Introduce cucumber
Introduce cucumberIntroduce cucumber
Introduce cucumber
 
Intro to Rails
Intro to RailsIntro to Rails
Intro to Rails
 

Andere mochten auch

Alimentos transg nicos-presentacion-completada
Alimentos transg nicos-presentacion-completadaAlimentos transg nicos-presentacion-completada
Alimentos transg nicos-presentacion-completadaErikaPalaciosA
 
27 malakoff2semaines 30-sep-13-oct-13
27 malakoff2semaines 30-sep-13-oct-1327 malakoff2semaines 30-sep-13-oct-13
27 malakoff2semaines 30-sep-13-oct-13Malakocktail
 
Digital surya 02 oktober 2013
Digital surya 02 oktober 2013Digital surya 02 oktober 2013
Digital surya 02 oktober 2013Portal Surya
 
Military resume sample
Military resume sampleMilitary resume sample
Military resume sampledonaldburns
 
Kristien bonneure, trage post
Kristien bonneure, trage postKristien bonneure, trage post
Kristien bonneure, trage postpulsenetwerk
 
Msme expo 2013 broucher
Msme expo 2013 broucherMsme expo 2013 broucher
Msme expo 2013 brouchermianagpur
 
Solving the Puzzle of Crowdfunding in Sweden_Teigland et al
Solving the Puzzle of Crowdfunding in Sweden_Teigland et alSolving the Puzzle of Crowdfunding in Sweden_Teigland et al
Solving the Puzzle of Crowdfunding in Sweden_Teigland et alRobin Teigland
 

Andere mochten auch (12)

Argentina Tourism
Argentina TourismArgentina Tourism
Argentina Tourism
 
Transgen1
Transgen1Transgen1
Transgen1
 
Alimentos transg nicos-presentacion-completada
Alimentos transg nicos-presentacion-completadaAlimentos transg nicos-presentacion-completada
Alimentos transg nicos-presentacion-completada
 
27 malakoff2semaines 30-sep-13-oct-13
27 malakoff2semaines 30-sep-13-oct-1327 malakoff2semaines 30-sep-13-oct-13
27 malakoff2semaines 30-sep-13-oct-13
 
Digital surya 02 oktober 2013
Digital surya 02 oktober 2013Digital surya 02 oktober 2013
Digital surya 02 oktober 2013
 
Military resume sample
Military resume sampleMilitary resume sample
Military resume sample
 
Kristien bonneure, trage post
Kristien bonneure, trage postKristien bonneure, trage post
Kristien bonneure, trage post
 
Positium overview
Positium overviewPositium overview
Positium overview
 
Msme expo 2013 broucher
Msme expo 2013 broucherMsme expo 2013 broucher
Msme expo 2013 broucher
 
Solving the Puzzle of Crowdfunding in Sweden_Teigland et al
Solving the Puzzle of Crowdfunding in Sweden_Teigland et alSolving the Puzzle of Crowdfunding in Sweden_Teigland et al
Solving the Puzzle of Crowdfunding in Sweden_Teigland et al
 
Sistemas operativos
Sistemas operativosSistemas operativos
Sistemas operativos
 
Delitos tributarios
Delitos tributariosDelitos tributarios
Delitos tributarios
 

Ähnlich wie festival ICT 2013: Ruby, the 0.8 language you were looking for

Exploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQLExploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQLBarry Jones
 
You should Know, What are the Common mistakes a node js developer makes?
You should Know, What are the Common mistakes a node js developer makes?You should Know, What are the Common mistakes a node js developer makes?
You should Know, What are the Common mistakes a node js developer makes?Surendra kumar
 
An Introduction to ReactNative
An Introduction to ReactNativeAn Introduction to ReactNative
An Introduction to ReactNativeMichał Taberski
 
Building an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learnedBuilding an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learnedWojciech Koszek
 
On the path to become a jr. developer short version
On the path to become a jr. developer short versionOn the path to become a jr. developer short version
On the path to become a jr. developer short versionAntonelo Schoepf
 
The story of language development
The story of language developmentThe story of language development
The story of language developmentHiroshi SHIBATA
 
Culture And Aesthetic Revisited
Culture And Aesthetic RevisitedCulture And Aesthetic Revisited
Culture And Aesthetic RevisitedAdam Keys
 
The Gist of React Native
The Gist of React NativeThe Gist of React Native
The Gist of React NativeDarren Cruse
 
Ruby for .NET developers
Ruby for .NET developersRuby for .NET developers
Ruby for .NET developersMax Titov
 
C# and java comparing programming languages
C# and java  comparing programming languagesC# and java  comparing programming languages
C# and java comparing programming languagesShishir Roy
 
From Ant to Rake
From Ant to RakeFrom Ant to Rake
From Ant to Rakejazzman1980
 
Ruby on Rails - An overview
Ruby on Rails -  An overviewRuby on Rails -  An overview
Ruby on Rails - An overviewThomas Asikis
 
Gem That (2009)
Gem That (2009)Gem That (2009)
Gem That (2009)lazyatom
 
Powerful tools for building web solutions
Powerful tools for building web solutionsPowerful tools for building web solutions
Powerful tools for building web solutionsAndrea Tino
 
Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013Brian Sam-Bodden
 
The Future of library dependency management of Ruby
 The Future of library dependency management of Ruby The Future of library dependency management of Ruby
The Future of library dependency management of RubyHiroshi SHIBATA
 

Ähnlich wie festival ICT 2013: Ruby, the 0.8 language you were looking for (20)

Why Ruby?
Why Ruby? Why Ruby?
Why Ruby?
 
Exploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQLExploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQL
 
You should Know, What are the Common mistakes a node js developer makes?
You should Know, What are the Common mistakes a node js developer makes?You should Know, What are the Common mistakes a node js developer makes?
You should Know, What are the Common mistakes a node js developer makes?
 
An Introduction to ReactNative
An Introduction to ReactNativeAn Introduction to ReactNative
An Introduction to ReactNative
 
FGCU Camp Talk
FGCU Camp TalkFGCU Camp Talk
FGCU Camp Talk
 
Building an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learnedBuilding an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learned
 
On the path to become a jr. developer short version
On the path to become a jr. developer short versionOn the path to become a jr. developer short version
On the path to become a jr. developer short version
 
The story of language development
The story of language developmentThe story of language development
The story of language development
 
Culture And Aesthetic Revisited
Culture And Aesthetic RevisitedCulture And Aesthetic Revisited
Culture And Aesthetic Revisited
 
The Gist of React Native
The Gist of React NativeThe Gist of React Native
The Gist of React Native
 
Ruby for .NET developers
Ruby for .NET developersRuby for .NET developers
Ruby for .NET developers
 
C# and java comparing programming languages
C# and java  comparing programming languagesC# and java  comparing programming languages
C# and java comparing programming languages
 
From Ant to Rake
From Ant to RakeFrom Ant to Rake
From Ant to Rake
 
Ruby on Rails - An overview
Ruby on Rails -  An overviewRuby on Rails -  An overview
Ruby on Rails - An overview
 
Gem That (2009)
Gem That (2009)Gem That (2009)
Gem That (2009)
 
Powerful tools for building web solutions
Powerful tools for building web solutionsPowerful tools for building web solutions
Powerful tools for building web solutions
 
Fewd week4 slides
Fewd week4 slidesFewd week4 slides
Fewd week4 slides
 
Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013
 
The Future of library dependency management of Ruby
 The Future of library dependency management of Ruby The Future of library dependency management of Ruby
The Future of library dependency management of Ruby
 
Good Coding Practices with JavaScript
Good Coding Practices with JavaScriptGood Coding Practices with JavaScript
Good Coding Practices with JavaScript
 

Mehr von festival ICT 2016

Migliorare il cash flow della propria azienda e dei propri clienti: i benefic...
Migliorare il cash flow della propria azienda e dei propri clienti: i benefic...Migliorare il cash flow della propria azienda e dei propri clienti: i benefic...
Migliorare il cash flow della propria azienda e dei propri clienti: i benefic...festival ICT 2016
 
Criticità per la protezione dei dati personali connesse all’utilizzo di dispo...
Criticità per la protezione dei dati personali connesse all’utilizzo di dispo...Criticità per la protezione dei dati personali connesse all’utilizzo di dispo...
Criticità per la protezione dei dati personali connesse all’utilizzo di dispo...festival ICT 2016
 
Lo Zen e l'arte dell'UX Design Mobile - by Synesthesia - festival ICT 2015
Lo Zen e l'arte dell'UX Design Mobile - by Synesthesia - festival ICT 2015Lo Zen e l'arte dell'UX Design Mobile - by Synesthesia - festival ICT 2015
Lo Zen e l'arte dell'UX Design Mobile - by Synesthesia - festival ICT 2015festival ICT 2016
 
The Web Advisor: restare vivi e aggiornati nel business digitale - festival I...
The Web Advisor: restare vivi e aggiornati nel business digitale - festival I...The Web Advisor: restare vivi e aggiornati nel business digitale - festival I...
The Web Advisor: restare vivi e aggiornati nel business digitale - festival I...festival ICT 2016
 
Favorire lo sviluppo di applicazioni native Cloud: lo Smart SaaS Program - by...
Favorire lo sviluppo di applicazioni native Cloud: lo Smart SaaS Program - by...Favorire lo sviluppo di applicazioni native Cloud: lo Smart SaaS Program - by...
Favorire lo sviluppo di applicazioni native Cloud: lo Smart SaaS Program - by...festival ICT 2016
 
I vantaggi di un’infrastruttura unica nell’erogazione dei servizi IT networke...
I vantaggi di un’infrastruttura unica nell’erogazione dei servizi IT networke...I vantaggi di un’infrastruttura unica nell’erogazione dei servizi IT networke...
I vantaggi di un’infrastruttura unica nell’erogazione dei servizi IT networke...festival ICT 2016
 
LibreOffice: software libero e formati standard - by LibreItalia - festival I...
LibreOffice: software libero e formati standard - by LibreItalia - festival I...LibreOffice: software libero e formati standard - by LibreItalia - festival I...
LibreOffice: software libero e formati standard - by LibreItalia - festival I...festival ICT 2016
 
Come rendere più collaborative le tue riunioni - by Epson - festival ICT 2015
Come rendere più collaborative le tue riunioni - by Epson - festival ICT 2015Come rendere più collaborative le tue riunioni - by Epson - festival ICT 2015
Come rendere più collaborative le tue riunioni - by Epson - festival ICT 2015festival ICT 2016
 
Case Study TWT: North Sails ha rivoluzionato il modo di lavorare - by TWT - f...
Case Study TWT: North Sails ha rivoluzionato il modo di lavorare - by TWT - f...Case Study TWT: North Sails ha rivoluzionato il modo di lavorare - by TWT - f...
Case Study TWT: North Sails ha rivoluzionato il modo di lavorare - by TWT - f...festival ICT 2016
 
Il mio ufficio è sempre con me. E il tuo? - by TWT - festival ICT 2015
Il mio ufficio è sempre con me. E il tuo? - by TWT - festival ICT 2015Il mio ufficio è sempre con me. E il tuo? - by TWT - festival ICT 2015
Il mio ufficio è sempre con me. E il tuo? - by TWT - festival ICT 2015festival ICT 2016
 
Non adeguatevi al Cloud - by Clouditalia - festival ICT 2015
Non adeguatevi al Cloud - by Clouditalia - festival ICT 2015Non adeguatevi al Cloud - by Clouditalia - festival ICT 2015
Non adeguatevi al Cloud - by Clouditalia - festival ICT 2015festival ICT 2016
 
Impatto privacy della video analisi nei sistemi di video sorveglianza intelli...
Impatto privacy della video analisi nei sistemi di video sorveglianza intelli...Impatto privacy della video analisi nei sistemi di video sorveglianza intelli...
Impatto privacy della video analisi nei sistemi di video sorveglianza intelli...festival ICT 2016
 
Web reputation, le verità nascoste dell’identità digitale - festival ICT 2015
Web reputation, le verità nascoste dell’identità digitale - festival ICT 2015Web reputation, le verità nascoste dell’identità digitale - festival ICT 2015
Web reputation, le verità nascoste dell’identità digitale - festival ICT 2015festival ICT 2016
 
Privacy e non profit online: profilazioni digitali di donatori e aderenti nel...
Privacy e non profit online: profilazioni digitali di donatori e aderenti nel...Privacy e non profit online: profilazioni digitali di donatori e aderenti nel...
Privacy e non profit online: profilazioni digitali di donatori e aderenti nel...festival ICT 2016
 
L'importanza del controllo nelle operazioni di Data Wiping - Sprint Computer ...
L'importanza del controllo nelle operazioni di Data Wiping - Sprint Computer ...L'importanza del controllo nelle operazioni di Data Wiping - Sprint Computer ...
L'importanza del controllo nelle operazioni di Data Wiping - Sprint Computer ...festival ICT 2016
 
Il dato è tratto: il lato B della mobilità tra privacy e reati informatici - ...
Il dato è tratto: il lato B della mobilità tra privacy e reati informatici - ...Il dato è tratto: il lato B della mobilità tra privacy e reati informatici - ...
Il dato è tratto: il lato B della mobilità tra privacy e reati informatici - ...festival ICT 2016
 
Web e privacy, le nuove regole per i cookies - festival ICT 2015
Web e privacy, le nuove regole per i cookies - festival ICT 2015Web e privacy, le nuove regole per i cookies - festival ICT 2015
Web e privacy, le nuove regole per i cookies - festival ICT 2015festival ICT 2016
 
Il paradigma UCaaS: come migliorare i processi di business dell’azienda attra...
Il paradigma UCaaS: come migliorare i processi di business dell’azienda attra...Il paradigma UCaaS: come migliorare i processi di business dell’azienda attra...
Il paradigma UCaaS: come migliorare i processi di business dell’azienda attra...festival ICT 2016
 
Nuvole e metallo: Infrastruttura e servizi Cloud based - by Hosting Solution...
 Nuvole e metallo: Infrastruttura e servizi Cloud based - by Hosting Solution... Nuvole e metallo: Infrastruttura e servizi Cloud based - by Hosting Solution...
Nuvole e metallo: Infrastruttura e servizi Cloud based - by Hosting Solution...festival ICT 2016
 
Definire, configurare ed implementare soluzioni scalabili su sistemi di Cloud...
Definire, configurare ed implementare soluzioni scalabili su sistemi di Cloud...Definire, configurare ed implementare soluzioni scalabili su sistemi di Cloud...
Definire, configurare ed implementare soluzioni scalabili su sistemi di Cloud...festival ICT 2016
 

Mehr von festival ICT 2016 (20)

Migliorare il cash flow della propria azienda e dei propri clienti: i benefic...
Migliorare il cash flow della propria azienda e dei propri clienti: i benefic...Migliorare il cash flow della propria azienda e dei propri clienti: i benefic...
Migliorare il cash flow della propria azienda e dei propri clienti: i benefic...
 
Criticità per la protezione dei dati personali connesse all’utilizzo di dispo...
Criticità per la protezione dei dati personali connesse all’utilizzo di dispo...Criticità per la protezione dei dati personali connesse all’utilizzo di dispo...
Criticità per la protezione dei dati personali connesse all’utilizzo di dispo...
 
Lo Zen e l'arte dell'UX Design Mobile - by Synesthesia - festival ICT 2015
Lo Zen e l'arte dell'UX Design Mobile - by Synesthesia - festival ICT 2015Lo Zen e l'arte dell'UX Design Mobile - by Synesthesia - festival ICT 2015
Lo Zen e l'arte dell'UX Design Mobile - by Synesthesia - festival ICT 2015
 
The Web Advisor: restare vivi e aggiornati nel business digitale - festival I...
The Web Advisor: restare vivi e aggiornati nel business digitale - festival I...The Web Advisor: restare vivi e aggiornati nel business digitale - festival I...
The Web Advisor: restare vivi e aggiornati nel business digitale - festival I...
 
Favorire lo sviluppo di applicazioni native Cloud: lo Smart SaaS Program - by...
Favorire lo sviluppo di applicazioni native Cloud: lo Smart SaaS Program - by...Favorire lo sviluppo di applicazioni native Cloud: lo Smart SaaS Program - by...
Favorire lo sviluppo di applicazioni native Cloud: lo Smart SaaS Program - by...
 
I vantaggi di un’infrastruttura unica nell’erogazione dei servizi IT networke...
I vantaggi di un’infrastruttura unica nell’erogazione dei servizi IT networke...I vantaggi di un’infrastruttura unica nell’erogazione dei servizi IT networke...
I vantaggi di un’infrastruttura unica nell’erogazione dei servizi IT networke...
 
LibreOffice: software libero e formati standard - by LibreItalia - festival I...
LibreOffice: software libero e formati standard - by LibreItalia - festival I...LibreOffice: software libero e formati standard - by LibreItalia - festival I...
LibreOffice: software libero e formati standard - by LibreItalia - festival I...
 
Come rendere più collaborative le tue riunioni - by Epson - festival ICT 2015
Come rendere più collaborative le tue riunioni - by Epson - festival ICT 2015Come rendere più collaborative le tue riunioni - by Epson - festival ICT 2015
Come rendere più collaborative le tue riunioni - by Epson - festival ICT 2015
 
Case Study TWT: North Sails ha rivoluzionato il modo di lavorare - by TWT - f...
Case Study TWT: North Sails ha rivoluzionato il modo di lavorare - by TWT - f...Case Study TWT: North Sails ha rivoluzionato il modo di lavorare - by TWT - f...
Case Study TWT: North Sails ha rivoluzionato il modo di lavorare - by TWT - f...
 
Il mio ufficio è sempre con me. E il tuo? - by TWT - festival ICT 2015
Il mio ufficio è sempre con me. E il tuo? - by TWT - festival ICT 2015Il mio ufficio è sempre con me. E il tuo? - by TWT - festival ICT 2015
Il mio ufficio è sempre con me. E il tuo? - by TWT - festival ICT 2015
 
Non adeguatevi al Cloud - by Clouditalia - festival ICT 2015
Non adeguatevi al Cloud - by Clouditalia - festival ICT 2015Non adeguatevi al Cloud - by Clouditalia - festival ICT 2015
Non adeguatevi al Cloud - by Clouditalia - festival ICT 2015
 
Impatto privacy della video analisi nei sistemi di video sorveglianza intelli...
Impatto privacy della video analisi nei sistemi di video sorveglianza intelli...Impatto privacy della video analisi nei sistemi di video sorveglianza intelli...
Impatto privacy della video analisi nei sistemi di video sorveglianza intelli...
 
Web reputation, le verità nascoste dell’identità digitale - festival ICT 2015
Web reputation, le verità nascoste dell’identità digitale - festival ICT 2015Web reputation, le verità nascoste dell’identità digitale - festival ICT 2015
Web reputation, le verità nascoste dell’identità digitale - festival ICT 2015
 
Privacy e non profit online: profilazioni digitali di donatori e aderenti nel...
Privacy e non profit online: profilazioni digitali di donatori e aderenti nel...Privacy e non profit online: profilazioni digitali di donatori e aderenti nel...
Privacy e non profit online: profilazioni digitali di donatori e aderenti nel...
 
L'importanza del controllo nelle operazioni di Data Wiping - Sprint Computer ...
L'importanza del controllo nelle operazioni di Data Wiping - Sprint Computer ...L'importanza del controllo nelle operazioni di Data Wiping - Sprint Computer ...
L'importanza del controllo nelle operazioni di Data Wiping - Sprint Computer ...
 
Il dato è tratto: il lato B della mobilità tra privacy e reati informatici - ...
Il dato è tratto: il lato B della mobilità tra privacy e reati informatici - ...Il dato è tratto: il lato B della mobilità tra privacy e reati informatici - ...
Il dato è tratto: il lato B della mobilità tra privacy e reati informatici - ...
 
Web e privacy, le nuove regole per i cookies - festival ICT 2015
Web e privacy, le nuove regole per i cookies - festival ICT 2015Web e privacy, le nuove regole per i cookies - festival ICT 2015
Web e privacy, le nuove regole per i cookies - festival ICT 2015
 
Il paradigma UCaaS: come migliorare i processi di business dell’azienda attra...
Il paradigma UCaaS: come migliorare i processi di business dell’azienda attra...Il paradigma UCaaS: come migliorare i processi di business dell’azienda attra...
Il paradigma UCaaS: come migliorare i processi di business dell’azienda attra...
 
Nuvole e metallo: Infrastruttura e servizi Cloud based - by Hosting Solution...
 Nuvole e metallo: Infrastruttura e servizi Cloud based - by Hosting Solution... Nuvole e metallo: Infrastruttura e servizi Cloud based - by Hosting Solution...
Nuvole e metallo: Infrastruttura e servizi Cloud based - by Hosting Solution...
 
Definire, configurare ed implementare soluzioni scalabili su sistemi di Cloud...
Definire, configurare ed implementare soluzioni scalabili su sistemi di Cloud...Definire, configurare ed implementare soluzioni scalabili su sistemi di Cloud...
Definire, configurare ed implementare soluzioni scalabili su sistemi di Cloud...
 

Kürzlich hochgeladen

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
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...apidays
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
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
 
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 FMESafe Software
 
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 FMESafe Software
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
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
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
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 SavingEdi Saputra
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
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
 
"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 ...Zilliz
 
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, ...apidays
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 

Kürzlich hochgeladen (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
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...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
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
 
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
 
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
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
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
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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
 
"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 ...
 
+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...
 
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, ...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

festival ICT 2013: Ruby, the 0.8 language you were looking for

  • 1. this is the 0.8 language you were looking for
  • 2. class << self def who Maurizio De Magnis I’m a Developer, trying to improve * http://olistik.me @olistik def what def where
  • 3. First things first let's sculpt this presentation
  • 4. What you're NOT going to see today “C’mon, use Ruby so I can eat meat this week” “Pick me! Pick me!”
  • 5. What I'm going to say is a personal remix of what I've experienced, heard and read. http://goo.gl/TPywyp
  • 6. Will you see breakthrough concepts here? http://goo.gl/4FhtgR
  • 7. No.
  • 8. I'll just give you another point of view
  • 9. ● Ruby is NOT a perfect language ● Ruby is NOT the best language for every scenario
  • 10. "a language can’t be good for everyone and every purpose, but we can strive to make it good for 80% of what is needed in a programming language" The most important slide so far Yukihiro ‘Matz’ Matsumoto (creator of Ruby) http://goo.gl/0p7tBv
  • 11. so do good/great programming languages (and frameworks)
  • 12. http://www.ruby-lang.org/en/about/ "Ruby is a language of careful balance. Its creator, Yukihiro “Matz” Matsumoto, blended parts of his favorite languages (Perl, Smalltalk, Eiffel, Ada, and Lisp) to form a new language that balanced functional programming with imperative programming."
  • 13. ● everyone has good ideas ● BUT not everyone perform well Let's talk about something that matters http://goo.gl/60awJp
  • 14.
  • 15. How? perform well := adaptability to changes either in the early stages (prototype) or in the subsequent evolutions
  • 16. Recipe for success people (skilled and motivated) processes (agile!) but also the tools
  • 17. on the coding layer Let’s focus
  • 18. coding is a creative process positive thoughts unleash creativity if coders are happy then creativity boosts
  • 19. Provide them tools that actually improves the efficiency of their environment (also, pay them well enough so that they don't worry about the economic details) A good way to make coders happy
  • 20. The code you have to actually type is the code you wish you had. Today’s definition for EPIC WIN
  • 21. Expressiveness #1 The language you use influences your thoughts
  • 22. Expressiveness #2 What about a language that looks like written english?
  • 23. “In the 1970s, researchers found that developers tend to write roughly the same number of lines of code every day, regardless of what language they're working in.” Terseness #1 B. Boehm, Software Engineering Economics, Prentice-Hall, ISBN 0-138-22122-7, 1981.
  • 24. Terseness #2 "the first 10 book's title, ordered alphabetically" (it’s actually shorter than the corresponding english sentence)
  • 25. Immediate feedback I want to be able to “play” with the data: Don't limit my designing skills (testing new ideas) Don't limit my problem solving skills (debugging)
  • 26. Immediate feedback - IRB .js: 1 .css: 1 .rb: 21 .erb: 1 .yml: 3 .ru: 1 .lock: 1 .log: 1 .html: 3 .ico: 1 .txt: 1 .rdoc: 1
  • 27. Immediate feedback - Rails console
  • 28. Immediate feedback - meet AREL
  • 29. Immediate feedback - meet AREL #2 Ruby code that gets transparently translated into (usually) boring/verbose SQL statements. Regardless the DBMS you're using (MySQL, Postgres, SQLite, etc.) Why? Abstraction! "perform well := adaptability to changes"
  • 30.
  • 31. “My code does something funky, let me inspect its context at runtime” Immediate feedback - MOAR
  • 32. Immediate feedback - MOAR Better Errors
  • 33. Immediate feedback - MOAR RailsPanel
  • 34. The pitfall of most frameworks “Be the best at all the things!” It usually ends up for the framework to be less than average. Even worse: “Let's do it by configuring all the things!” (every time, from scratch) => a lot of time effort
  • 35. Rails is an opinionated framework
  • 36. Conventions over configurations A lot of assumptions based on what are the most common needs of web developers.
  • 37. ● console ● standalone app server (but you can choose whatever you like) Fully isolated development environment
  • 38. Code organization Follows the MVC pattern: The goal is to understand in almost zero time where a file is or should be located. app/ models/ views/ controllers/
  • 39. Code organization #2 Tends to fight bad practices such as: ● single directory with hundreds of files ● few huge monolithic files
  • 40. Data persistence: ActiveRecord class Author < ActiveRecord::Base end The code above reflects this database configuration: - authors id: integer
  • 41. Data persistence: ActiveRecord #2 If the database table happens to contain additional fields like "name" and "age" the developer doesn't need to update any code in order to perform these: author = Author.take(name: 'PKD') author.age # => 55 author.age = 53 author.save
  • 42. Data persistence: ActiveRecord #3 Even relations are easily mapped with little effort: class Author < ActiveRecord::Base has_many :books end class Book < ActiveRecord::Base belongs_to :author end - authors id: integer - books id: integer author_id: integer author.books.first author.books.destroy_all author.books << Book.create
  • 43. Here are some of the tools that makes Ruby shine. The focus should not be placed into what they do, but how they have been architectured so that your effort consists only in declaring your needs. When you use Ruby, you get the whole ecosystem for free
  • 44. $ irb > require 'mini_magick' > image = MiniMagick::Image.open("input.jpg") > image.resize "100x100" > image.write "output.jpg" $ gem install mini_magick
  • 45. $ irb > require ‘nokogiri’ > require 'open-uri' > doc = Nokogiri::HTML(open("http://www.nytimes.com")) > puts doc. css('.story h3'). map {|story| "- #{story.text.strip}"} - Obama's Battle for Votes on Syria Strike Is Taut and Uphill - In Egypt, a Welcome for Syrian Refugees Turns Bitter - Facing Fury Over New Law, Stoli Says '€˜Russian? Not Really' - Two Men, 58 Years and Counting - Editorial: Banning a Pseudo-Therapy - Loose Ends: My Adventures in Their Clutches $ gem install nokogiri
  • 46. "RSpec is testing tool for the Ruby programming language. Born under the banner of Behaviour-Driven Development, it is designed to make Test-Driven Development a productive and enjoyable experience" Testing with RSpec # spec/bowling_spec.rb require 'bowling' describe Bowling, "#score" do it "returns 0 for all gutter game" do bowling = Bowling.new 20.times { bowling.hit(0) } bowling.score.should eq(0) end end $ rspec bowling_spec.rb --format nested Bowling#score returns 0 for all gutter game Finished in 0.007534 seconds 1 example, 0 failures
  • 47. Who uses Ruby? ● http://www.shopify.com/ ● http://www.yellowpages.com/ ● https://github.com/ ● https://www.heroku.com/ ● https://twitter.com ● http://www.hulu.com/ ● http://www.scribd.com/ ● http://www.slideshare.net/ ● http://www.soundcloud.com/ ● http://www.prada.com Ruby is used for both web and system programming Ruby is used by both startups and enterprise companies (Someone you might know)
  • 48. This brief introduction is just to be considered as a teaser.
  • 49. Have Fun & Happy Coding