SlideShare a Scribd company logo
1 of 54
Java is from Mars,
Ruby is from Venus




        @nusco
   (paolo perrotta)
why Ruby
expressive
fast feedback
great community
fun
why Java
powerful tools
automated refactoring
rock-solid
fun
learn both
difficult
- tools__
- values_
- design_
tools
learning a library
the static workflow
   1.   open the IDE
   2.   set up a project
   3.   read the docs
   4.   write/run code
   5.   repeat from 3...
the dynamic workflow
 1.   open the interpreter
 2.   import the library
 3.   introspect the library
 4.   try code
 5.   repeat from 3...
the command line
functional fixedness

 “A mental block against using
an object in a new way that is
 required to solve a problem.”
the dynamic workflow
 1.   open the interpreter
 2.   import the library
 3.   introspect the library
 4.   try code

 6. repeat from 3...
the dynamic workflow
 1.   open the interpreter
 2.   import the library
 3.   introspect the library
 4.   try code
 5.   read the source
 6.   repeat from 3...
values
“do it right”
       vs.
“keep it simple”
ethnocentrism

“The viewpoint that one’s own
    group is the center of
everything, against which all
  other groups are judged.”
design
bumblebees
good design in Java
small interfaces
many small classes
limited inheritance
few class methods
ActiveRecord
require 'active_record'

class User < ActiveRecord::Base
end

user = User.find(:first)
user.name = "Nusco"
user.save
require 'active_record'

ActiveRecord::Base.ancestors.count          # => 42
ActiveRecord::Base.instance_methods.count   # => 240
ActiveRecord::Base.methods.count            # => 508
require 'active_record'

ActiveRecord::Base.ancestors.count          # => 42
ActiveRecord::Base.instance_methods.count   # => 240
ActiveRecord::Base.methods.count            # => 508
modules
small interfaces
    small classes
limited inheritance
 few class methods
readability
  “once and only once”
        decoupling
shared responsibilities
the Saphir-Worf hyphotesis

“Our language influences our way
          of thinking.”
- functional fixedness______
- ethnocentrism_____________
- the Sapir–Whorf hypothesis
learning a new language
1. be aware
2. get uncomfortable
3. think generalist
1. be aware__________
2. get uncomfortable_
3. think generalist__
thank you.
Google: metaprogramming perrotta

More Related Content

Similar to Java is from Mars, Ruby is from Venus

Charles Nutter Presentations
Charles Nutter PresentationsCharles Nutter Presentations
Charles Nutter Presentations
webuploader
 
Tldr solr-courseload
Tldr solr-courseloadTldr solr-courseload
Tldr solr-courseload
mattdeboard
 
festival ICT 2013: Ruby, the 0.8 language you were looking for
festival ICT 2013: Ruby, the 0.8 language you were looking forfestival ICT 2013: Ruby, the 0.8 language you were looking for
festival ICT 2013: Ruby, the 0.8 language you were looking for
festival ICT 2016
 
Unit 1 Core Java for Compter Science 3rd
Unit 1 Core Java for Compter Science 3rdUnit 1 Core Java for Compter Science 3rd
Unit 1 Core Java for Compter Science 3rd
prat0ham
 

Similar to Java is from Mars, Ruby is from Venus (20)

Charles Nutter Presentations
Charles Nutter PresentationsCharles Nutter Presentations
Charles Nutter Presentations
 
Adsa u4 ver 1.0
Adsa u4 ver 1.0Adsa u4 ver 1.0
Adsa u4 ver 1.0
 
Tldr solr-courseload
Tldr solr-courseloadTldr solr-courseload
Tldr solr-courseload
 
The Enterprise Strikes Back
The Enterprise Strikes BackThe Enterprise Strikes Back
The Enterprise Strikes Back
 
ppt_on_java.pptx
ppt_on_java.pptxppt_on_java.pptx
ppt_on_java.pptx
 
festival ICT 2013: Ruby, the 0.8 language you were looking for
festival ICT 2013: Ruby, the 0.8 language you were looking forfestival ICT 2013: Ruby, the 0.8 language you were looking for
festival ICT 2013: Ruby, the 0.8 language you were looking for
 
Unit 1 Core Java for Compter Science 3rd
Unit 1 Core Java for Compter Science 3rdUnit 1 Core Java for Compter Science 3rd
Unit 1 Core Java for Compter Science 3rd
 
The Why and How of Scala at Twitter
The Why and How of Scala at TwitterThe Why and How of Scala at Twitter
The Why and How of Scala at Twitter
 
Scala in the Wild
Scala in the WildScala in the Wild
Scala in the Wild
 
Library Managemnet System
Library Managemnet SystemLibrary Managemnet System
Library Managemnet System
 
Hybrid concurrency patterns
Hybrid concurrency patternsHybrid concurrency patterns
Hybrid concurrency patterns
 
Ruby on the JVM
Ruby on the JVMRuby on the JVM
Ruby on the JVM
 
Advanced Reflection in Pharo
Advanced Reflection in PharoAdvanced Reflection in Pharo
Advanced Reflection in Pharo
 
Write code that writes code! A beginner's guide to Annotation Processing - Ja...
Write code that writes code! A beginner's guide to Annotation Processing - Ja...Write code that writes code! A beginner's guide to Annotation Processing - Ja...
Write code that writes code! A beginner's guide to Annotation Processing - Ja...
 
Write code that writes code!
Write code that writes code!Write code that writes code!
Write code that writes code!
 
JRuby 6 Years in Production
JRuby 6 Years in ProductionJRuby 6 Years in Production
JRuby 6 Years in Production
 
Quarkus tips, tricks, and techniques
Quarkus tips, tricks, and techniquesQuarkus tips, tricks, and techniques
Quarkus tips, tricks, and techniques
 
Java Notes: Effective Programming and Interview
Java Notes: Effective Programming and InterviewJava Notes: Effective Programming and Interview
Java Notes: Effective Programming and Interview
 
Abusing Java Remote Interfaces
Abusing Java Remote InterfacesAbusing Java Remote Interfaces
Abusing Java Remote Interfaces
 
Javascript classes and scoping
Javascript classes and scopingJavascript classes and scoping
Javascript classes and scoping
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
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
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
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 - 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
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
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
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
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
 
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)
 

Java is from Mars, Ruby is from Venus

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n