Win a copy of Transfer Learning for Natural Language Processing (MEAP) this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

Ruby Design Patterns and Testing

 
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Peter,

Welcome to Java Ranch!
Can you let us know if in your book you demonstrate the use of design patterns and Testing (Test Driven Development) in Ruby.

Thanks,
Himalay
 
Author
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Testing is covered but there are not extensive sections where test driven development is practiced (there's a short section when developing a library). Beginning Ruby covers a breadth of topics in a reasonable depth but not any specific things in intense depth. Design patterns, similarly, are not covered specifically. I consider these things to be useful once you reach the proficiency that Beginning Ruby will get a developer to, but then they can move on to Design Patterns in Ruby (which is an awesome book suitable for anyone who's finished BR!)
 
Himalay Majumdar
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Peter.. I have read your previous posts as well. BR is the book that suits me the most.
 
Ranch Hand
Posts: 235
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where testing is covered, is it TestUnit, or some other testing framework like Rspec?

 
Peter Cooper
Author
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Test::Unit. Mostly because that's the "standard" even if the trend has moved on elsewhere (although Rails creator David Heinemeier Hansson recently said he still uses Test::Unit)

I believe that once you have an idea of what testing is, regardless of the library, you'll find it easy to move on to something else. But, no, this isn't an RSpec book, etc.
 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A friend of mine once told me that Design Patterns exist mostly as a way to get around limitations in the language. One of the great things about Ruby (and Groovy, since I'm a zealot) is that you don't tend to have those limitations. There might be some performance improvements you can eek out, or more readable ways to write your code, but those tend to come from experience in my opinion.
 
Michael Sullivan
Ranch Hand
Posts: 235
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What we can understand about design patterns is that (for the most part) they are language independent. Design patterns help solve recurring design problems, not necessarily language shortcomings.
 
Himalay Majumdar
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I personally dont think we use design patterns in Java due to limitations in the language itself. For any (esp OO language) language it would be needed at some point while building a large enterprise application. Ruby being completely object oriented am sure people follow variety of design patterns in it as well.

Having said that, many design patterns applied for namesake and are not justified, but I think they are almost equally used in every object oriented language.

Its hard to defend this topic by example, but please share your thoughts and correct me if needed.
 
The two armies met. But instead of battle, they decided to eat some pie and contemplate this tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic