Slideshow transcript
Slide 2: The Top 10 Reasons The Ruby Programming Language Sucks!
Slide 3: 10. Too young
Slide 4: No Libraries
Slide 5: No Libraries A collection of good libraries, especially in something like Perl’s CPAN, means less work to achieve better results, faster
Slide 6: No Libraries A collection of good libraries, especially in something like Perl’s CPAN, means less work to achieve better results, faster Ruby libraries:
Slide 7: No Libraries A collection of good libraries, especially in something like Perl’s CPAN, means less work to achieve better results, faster Ruby libraries: 96 standard libraries
Slide 8: No Libraries A collection of good libraries, especially in something like Perl’s CPAN, means less work to achieve better results, faster Ruby libraries: 96 standard libraries Ruby Application Archive (RAA) catalogs over 1,200 applications and libraries
Slide 9: No Libraries A collection of good libraries, especially in something like Perl’s CPAN, means less work to achieve better results, faster Ruby libraries: 96 standard libraries Ruby Application Archive (RAA) catalogs over 1,200 applications and libraries RubyForge is hosting over 800 open source projects
Slide 10: No Libraries A collection of good libraries, especially in something like Perl’s CPAN, means less work to achieve better results, faster Ruby libraries: 96 standard libraries Ruby Application Archive (RAA) catalogs over 1,200 applications and libraries RubyForge is hosting over 800 open source projects RubyGems has served over 900,000 gems
Slide 11: No support
Slide 12: No support Documentation
Slide 13: No support Documentation Core 100% documented
Slide 14: No support Documentation Core 100% documented Standard library documentation in progress
Slide 15: No support Documentation Core 100% documented Standard library documentation in progress Tutorials available for various skill levels
Slide 16: No support Documentation Core 100% documented Standard library documentation in progress Tutorials available for various skill levels Facets of Ruby book series
Slide 17: No support Documentation Core 100% documented Standard library documentation in progress Tutorials available for various skill levels Facets of Ruby book series Community
Slide 18: No support Documentation Core 100% documented Standard library documentation in progress Tutorials available for various skill levels Facets of Ruby book series Community Mailing lists in multiple languages
Slide 19: No support Documentation Core 100% documented Standard library documentation in progress Tutorials available for various skill levels Facets of Ruby book series Community Mailing lists in multiple languages Usenet groups (with ML gateway)
Slide 20: No support Documentation Core 100% documented Standard library documentation in progress Tutorials available for various skill levels Facets of Ruby book series Community Mailing lists in multiple languages Usenet groups (with ML gateway) Web forums
Slide 21: No one using it
Slide 22: No one using it Companies using Ruby
Slide 23: No one using it Companies using Ruby HP, Intel, NASA, and NOAA
Slide 24: No one using it Companies using Ruby HP, Intel, NASA, and NOAA Uses for Ruby
Slide 25: No one using it Companies using Ruby HP, Intel, NASA, and NOAA Uses for Ruby Simulation, data munging, code generation, image processing, prototyping, and more
Slide 26: No one using it Companies using Ruby HP, Intel, NASA, and NOAA Uses for Ruby Simulation, data munging, code generation, image processing, prototyping, and more “Killer app”
Slide 27: No one using it Companies using Ruby HP, Intel, NASA, and NOAA Uses for Ruby Simulation, data munging, code generation, image processing, prototyping, and more “Killer app” Ruby on Rails
Slide 28: No one using it Companies using Ruby HP, Intel, NASA, and NOAA Uses for Ruby Simulation, data munging, code generation, image processing, prototyping, and more “Killer app” Ruby on Rails Already being used in profitable web applications like Basecamp and Blinksale
Slide 29: 10. Too young
Slide 30: e! im t ts i 10. Toof young o d ea h A
Slide 31: 9. Useless in obfuscation contests
Slide 32: Optional Syntax No ;s needed Drop the “ ” characters Optional ()s
Slide 33: Objectified Syntax obj.attribute = methods dangerous! and query? methods
Slide 34: Simple, flexible syntax Simple declarations: local_var = ... @instance_var = ... $global_var = ... do...end or {...} Real exception handling, like Java String interpolation: any Ruby code inside #{...}
Slide 35: Compare with other languages
Slide 36: Compare with other languages Ruby: puts “Hello world!”
Slide 37: Compare with other languages Ruby: puts “Hello world!” Java: threeVeryLongLines.weHopeWork...
Slide 38: Compare with other languages Ruby: puts “Hello world!” Java: threeVeryLongLines.weHopeWork... Perl: #$<!&;
Slide 39: Compare with other languages Ruby: puts “Hello world!” Java: threeVeryLongLines.weHopeWork... Perl: #$<!&; Lisp: ((a(((b)))(c)))
Slide 40: 9. Useless in obfuscation contests
Slide 41: ! x ta n y s 9. Useless in obfuscation n ea contests l C
Slide 42: 8. Object Oriented
Slide 43: Ruby is object oriented Everything is an object Numbers, code blocks, everything Baked-in, not bolted-on No need to use “self” everywhere, like Python
Slide 44: Ruby has many object orientation shortcuts Automatic constructor generation, unlike Perl Easy accessors Define methods to interact with Core Ruby
Slide 45: Procedural code allowed You can ignore the class system as needed You can even mix and match objects with procedural code
Slide 46: 8. Object Oriented
Slide 47: e! l ib x eOriented fl 8. Object o o T
Slide 48: 7. Uses “Mix-ins”
Slide 49: You can’t win with multiple inheritance
Slide 50: You can’t win with multiple inheritance Multiple inheritance allows a class to inherit from more than one parent
Slide 51: You can’t win with multiple inheritance Multiple inheritance allows a class to inherit from more than one parent The good: Makes modeling complex object trees easier
Slide 52: You can’t win with multiple inheritance Multiple inheritance allows a class to inherit from more than one parent The good: Makes modeling complex object trees easier The bad: The diamond inheritance problem
Slide 53: You can’t win with multiple inheritance Multiple inheritance allows a class to inherit from more than one parent The good: Makes modeling complex object trees easier The bad: The diamond inheritance problem You can’t please both sides
Slide 55: Ruby uses single inheritance...
Slide 56: ...and “Mix-ins” Similar to Java’s interfaces, plus implementation No limit to how many you use The benefits of multiple inheritance, without the minuses
Slide 57: 7. Uses “Mix-ins”
Slide 58: e! s n se h c u m o 7. Uses “Mix-ins” to es k a M
Slide 59: 6. No loops
Slide 60: The well-known loops
Slide 61: The well-known loops Most languages Ruby
Slide 62: The well-known loops Most languages Ruby while { ... } while ... end until { ... } until ... end
Slide 63: The well-known loops Most languages Ruby while { ... } while ... end until { ... } until ... end do { ... } while begin ... end while do { ... } until begin ... end until
Slide 64: The well-known loops Most languages Ruby while { ... } while ... end until { ... } until ... end do { ... } while begin ... end while do { ... } until begin ... end until foreach { ... } each do ... end
Slide 65: The well-known loops Most languages Ruby while { ... } while ... end until { ... } until ... end do { ... } while begin ... end while do { ... } until begin ... end until foreach { ... } each do ... end for(...;...;...) { ... }
Slide 66: The well-known loops Most languages Ruby while { ... } while ... end until { ... } until ... end do { ... } while begin ... end while do { ... } until begin ... end until foreach { ... } each do ... end for(...;...;...) { ... }
Slide 67: The well-known loops Most languages Ruby while { ... } while ... end until { ... } until ... end do { ... } while begin ... end while do { ... } until begin ... end until foreach { ... } each do ... end for(...;...;...) { ... }
Slide 68: Aren’t loops proven to work by now?
Slide 69: Aren’t loops proven to work by now? “N + 1” errors
Slide 70: Aren’t loops proven to work by now? “N + 1” errors foreach { ... } is conceptually backwards
Slide 71: Aren’t loops proven to work by now? “N + 1” errors foreach { ... } is conceptually backwards Objects should manage their own traversal
Slide 72: Iterators Objects manage their own traversal No more “N + 1” errors Code blocks still allow customizing behavior
Slide 73: 6. No loops
Slide 74: s! u io l el 6. No loops b e R
Slide 75: 5. Code blocks everywhere
Slide 76: What is a code block? Any method can accept a block Blocks can be called immediately or stored for later use Blocks are closures
Slide 77: What are they for? Blocks can allow your code to react in according to user code Blocks are a great way to pass around behavior Blocks are ideal for transactions
Slide 78: 5. Code blocks everywhere
Slide 79: l! fu r e w 5. Code blocks o p oo everywhere T
Slide 80: 4. Wide open, even at runtime
Slide 81: Dynamic tools Strong reflection eval() instance_eval() class_eval() and module_eval() Hooks for runtime events
Slide 82: Classes are open Add methods to a class at any time Even a core class Customize individual objects Overload operators Hook into Ruby’s math and conversion operations
Slide 83: 4. Wide open, even at runtime
Slide 84: ! at seven es l 4. Wide open, w a runtime L
Slide 85: 3. Ruby gurus are obsessed with ducks
Slide 87: “If it walks like a duck and talks like a duck, it’s a duck!”
Slide 88: The “Duck Typing” philosophy We define an object by what it can do, not its type Most of the time, you shouldn’t even check for methods
Slide 89: 3. Ruby gurus are obsessed with ducks
Slide 90: ! eare g n ra ducks 3. Ruby gurus t obsessedswith o o T
Slide 91: 2. Includes too many great toys
Slide 92: 96 standard libraries
Slide 93: 96 standard libraries Read/Write CSV XML YAML
Slide 94: 96 standard libraries Read/Write CSV XML YAML Talk to Email FTP Web
Slide 95: 96 standard libraries Read/Write CSV XML YAML Talk to Email FTP Web Serve Code Servlets XML-RPC
Slide 96: 96 standard libraries Read/Write CSV XML YAML Talk to Email FTP Web Serve Code Servlets XML-RPC Work with Math Templates Threads
Slide 97: 96 standard libraries Read/Write CSV XML YAML Talk to Email FTP Web Serve Code Servlets XML-RPC Work with Math Templates Threads Tools for Debugging Docs Testing
Slide 98: 2. Includes too many great toys
Slide 99: ! g n ti many 2. Includesrac too t toys is d great o o T
Slide 101: 1. “It's entirely too fun and productive for most people.” — Mike Clark




Add a comment on Slide 1
If you have a SlideShare account, login to comment; else you can comment as a guest- Favorites & Groups
Showing 1-50 of 36 (more)