This blog post explains that generating code from UML can be very useful, although the usefulness of the result depends on what type of UML diagrams you use. For structural models, the autor prefers UML class diagrams as he thinks feel that they convey information in a much better way than pure textual DSLs.