views:

722

answers:

4

I always hear about UML being used in Java projects but never in Ruby ones. Is this just a cultural difference or is there less of a need for modeling in Ruby development because it's part of a more 'agile' culture?

+15  A: 

Call me crazy but UML isn't for me regardless of the application stack.

Andy Gaskell
You are not alone ;)
hiena
+30  A: 

Obviously you can't generalize this to everybody, but programmers in languages like Ruby and Python tend to be less drawn to large design documents and UML because they view their language of choice as being concise and expressive enough that it isn't always necessary. There's a feeling of, "I could spend time and plot all this out in UML...or I could just write some Python that actually implements the design and expresses it in a language I like to read and lots of people can read." Java programs tend to feel "heavier" than their Ruby or Python counterparts — it's part of the design of the language.

Note that I'm not saying this is true of your project or even that it's true at all as a whole — this is just what I've observed about these programming cultures.

Chuck
A kind of blunt way of expressing this would be to say that if your coworkers need a cartoon drawing of your code to understand it, then you need to either write better code or hire better coworkers.
Jörg W Mittag
+11  A: 

(Note, tongue sometimes placed in cheek.)

Probably one of the biggest cultural differences is that Java is often used in projects with large numbers of programmers, led by PHBs, where the high-level system design is done by people with the title "software architect". On these sort of projects the people in the "software architect" role will often generate a large amount of documentation (including UML relationship and state diagrams) during the initial planning phase of the project. These and other documentation artifacts are then expected to be implemented by the hordes of non-architect-programmers.

Ruby on the other hand, is the new hotness and is therefore more often chosen by people who want to program in it. Since the "architect" is the implementer, there is less need for complex upfront documentation. The implementers jot a few notes on general design guidelines and then sit down to program rather than designing upfront for others to program.

This isn't to say that you won't find a few scattered UML diagrams here or there in projects built in Ruby or other snazzy languages -- such as when someone is trying to describe a complex concept -- but such things just aren't needed as much if you are doing the work yourself.

Adam Franco
There is a story told that Walt Disney never used story boards. He would simply tell the story and then work work with the animators to make it happen. When Mr. Disney passed away the team tried to continue this approach since it had been so effective, but found that they could not makes things work without the storyboards. They reached the conclusion that they had always had storyboards, but that previously they had been embodied in Walt Disney himself.
John F. Miller
@john That's an awesome anecdote. Thanks!
Jamie Hale
@john Completely agree with the story. I usually say that "to model or not to model" is the wrong question (http://bit.ly/bOmEl). We all and always create a mental model of the system before coding it.the real discussion is whether the effort of making the models explicit is worth or not
Jordi Cabot
+4  A: 

One of the obvious reasons is that well-designed Ruby programs rely heavily on Mixins, which AFAIK simply cannot be modeled in UML at all. I know that Schärli et al developed an extension to UML that can represent Traits which given the close relationship between Traits and Mixins could probably be adapted or just reused for representing Mixins, but then it's not UML anymore.

Jörg W Mittag
Interesting point. Couldn't you use Mixins as if they were interfaces, in a sense?
Yar