<p>In college I've had numerous design and <a href="http://en.wikipedia.org/wiki/Unified_Modeling_Language" rel="noreferrer">UML</a> oriented courses, and I recognize that UML can be used to benefit a software project, especially <a href="http://en.wikipedia.org/wiki/Use_case" rel="noreferrer">use-case</a> mapping, but is it really practical?  I've done a few co-op work terms, and it appears that UML is not used heavily in the industry.  Is it worth the time during a project to create UML diagrams?  Also, I find that class diagrams are generally not useful, because it's just faster to look at the header file for a class.  Specifically which diagrams are the most useful?</p>

<p><strong>Edit:</strong> My experience is limited to small, under 10 developer projects.</p>

<p><strong>Edit:</strong> Many good answers, and though not the most verbose, I belive the one selected is the most balanced.</p>

[{'answer_id': 18811, 'author': 'Stu', 'author_id': 414, 'author_profile': 'https://Stackoverflow.com/users/414', 'pm_score': 4, 'selected': False, 'text': '<p>Generic work-flow and DFDs can be very useful for complex processes. All other diagramming (ESPECIALLY UML) has, in my experience, without exception been a painful waste of time and effort.</p>\n'}, {'answer_id': 18819, 'author': 'Vaibhav', 'author_id': 380, 'author_profile': 'https://Stackoverflow.com/users/380', 'pm_score': 1, 'selected': False, 'text': '<p>UML has its place. It becomes increasingly important as the size of the project grows. If you have a long running project, then it is best to document everything in UML.</p>\n'}, {'answer_id': 18827, 'author': 'popopome', 'author_id': 1556, 'author_profile': 'https://Stackoverflow.com/users/1556', 'pm_score': -1, 'selected': False, 'text': '<p>UML is just one of methods for communication within people. \nWhiteboard is better.</p>\n'}, {'answer_id': 18828, 'author': 'samjudson', 'author_id': 1908, 'author_profile': 'https://Stackoverflow.com/users/1908', 'pm_score': 4, 'selected': False, 'text': "<p>I'd have to disagree, UML is used all over the place - anywhere a IT project is being designed UML will usually be there.</p>\n\n<p>Now whether it is being used <em>well</em> is another matter.</p>\n\n<p>As Stu said, I find both Use Cases (along with the use case descriptions) and activity diagrams to be the most helpful from a developer point of view.</p>\n\n<p>Class diagram can be very useful when trying to show relationships, as well as object attributes, such as persistence. When it comes to adding ever single attribute or property they are usually overkill, especially as they often become out of date quickly once code is written.</p>\n\n<p>One of the biggest problems with UML is the amount of work required to keep it up to date once code is being generated, as there are few tools that can re-engineer UML from code, and few still that do it well.</p>\n"}, {'answer_id': 18829, 'author': 'Kristopher Johnson', 'author_id': 1175, 'author_profile': 'https://Stackoverflow.com/users/1175', 'pm_score': 2, 'selected': False, 'text': '<p>I see sequence diagrams and activity diagrams used fairly often.  I do a lot of work with "real-time" and embedded systems that interact with other systems, and sequence diagrams are very helpful in visualizing all the interactions.</p>\n\n<p>I like to do use-case diagrams, but I haven\'t met too many people who think they are valuable.</p>\n\n<p>I\'ve often wondered whether Rational Rose is a good example of the kinds of applications you get from UML-model-based design.  It\'s bloated, buggy, slow, ugly, ...</p>\n'}, {'answer_id': 18839, 'author': 'Pascal', 'author_id': 1311, 'author_profile': 'https://Stackoverflow.com/users/1311', 'pm_score': 7, 'selected': True, 'text': "<p>In a sufficiently <strong>complex system</strong> there are some places where some <code>UML</code> is considered useful.  </p>\n\n<p>The useful diagrams for a system, vary by applicability.<br>\nBut the most widely used ones are: </p>\n\n<ul>\n<li>Class Diagrams</li>\n<li>State Diagrams</li>\n<li>Activity Diagrams</li>\n<li>Sequence Diagrams</li>\n</ul>\n\n<p>There are many enterprises who swear by them and many who outright reject them as an utter waste of time and effort.  </p>\n\n<p>It's best not to go overboard and think what's best for the project you are on and pick the stuff that is applicable and makes sense.</p>\n"}, {'answer_id': 18859, 'author': 'Seibar', 'author_id': 357, 'author_profile': 'https://Stackoverflow.com/users/357', 'pm_score': 4, 'selected': False, 'text': '<p>I will qualify my answer by mentioning that I don\'t have experience in large (IBM-like) corporate development environments.</p>\n\n<p>The way I view UML and the <a href="http://en.wikipedia.org/wiki/IBM_Rational_Unified_Process" rel="noreferrer">Rational Unified Process</a> is that it\'s more <em>TALKING</em> about what you\'re going to do than actually <em>DOING</em> what you\'re going to do.</p>\n\n<p>(In other words it\'s largely a waste of time)</p>\n'}, {'answer_id': 19042, 'author': 'Jason Sparks', 'author_id': 512, 'author_profile': 'https://Stackoverflow.com/users/512', 'pm_score': 3, 'selected': False, 'text': "<p>I co-taught a senior-level development project course my last two semesters in school. The project was intended to be used in a production environment with local non-profits  as paying clients. We had to be certain that code did what we expected it to and that the students were capturing all the data necessary to meet the clients' needs.</p>\n\n<p>Class time was limited, as was my time outside of the classroom. As such, we had to perform code reviews at every class meeting, but with 25 students enrolled individual review time was very short. The tool we found most valuable in these review sessions were ERD's, class diagrams and sequence diagrams. ERD's and class diagrams were done only in Visual Studio, so the time required to create them was trivial for the students.</p>\n\n<p>The diagrams communicated a great deal of information very quickly. By having a quick overview of the students' designs, we could quickly isolate problem areas in their code and perform a more detailed review on the spot.</p>\n\n<p>Without using diagrams, we would have had to take the time to go one by one through the students' code files looking for problems.</p>\n"}, {'answer_id': 19052, 'author': 'Michael Stum', 'author_id': 91, 'author_profile': 'https://Stackoverflow.com/users/91', 'pm_score': 2, 'selected': False, 'text': '<p>I found UML not really useful for very small projects, but really suitable for larger ones.</p>\n\n<p>Essentially, it does not really matter what you use, you just have to keep two things in mind:</p>\n\n<ul>\n<li>You want some sort of architecture planning</li>\n<li>You want to be sure that everyone in the team is actually using the same technology for project planning</li>\n</ul>\n\n<p>So UML is just that: A standard on how you plan your projects. If you hire new people, there are more likely to know any existing standard - be it UML, Flowchard, Nassi-Schneiderman, whatever - rather than your exising in-house stuff.</p>\n\n<p>Using UML for a single developer and/or a simple software project seems overkill to me, but when working in a larger team, I would definitely want some standard for planning software.</p>\n'}, {'answer_id': 19110, 'author': 'Marcus Downing', 'author_id': 1000, 'author_profile': 'https://Stackoverflow.com/users/1000', 'pm_score': 5, 'selected': False, 'text': "<p>Using UML is like looking at your feet as you walk. It's making conscious and explicit something that you can usually do unconsciously. Beginners need to think carefully about what they're doing, but a professional programmer already knows what they're doing. Most of the time, writing the code itself is quicker and more effective than writing about the code, because their programming intuition is tuned to the task.</p>\n\n<p>The exception is why you find yourself in the woods at night without a torch and it's started to rain - then you need to look at your feet to avoid falling down. There are times when the task you've taken on is more complicated than your intuition can handle, and you need to slow down and state the structure of your program explicitly. Then UML is one of many tools you can use. Others include pseudocode, high-level architecture diagrams and strange metaphors.</p>\n"}, {'answer_id': 19310, 'author': 'Mario Marinato', 'author_id': 431, 'author_profile': 'https://Stackoverflow.com/users/431', 'pm_score': 2, 'selected': False, 'text': '<p>UML is useful, yes indeed!  The main uses I\'ve made of it were:</p>\n\n<ul>\n<li>Brainstorming about the ways a piece of software should work.  It makes easy to communicate what you are thinking.</li>\n<li>Documenting the architecture of a system, it\'s patterns and the main relationships of its classes.  It helps when someone enters your team, when you\'re leaving and want to make sure your successor will understand it, and when you eventually forget what the hell that little class was meant for.</li>\n<li>Documenting any architectural pattern you use on all your systems, for the same reasons of the dot above</li>\n</ul>\n\n<p>I only disagree with <a href="https://stackoverflow.com/users/91/michael-stum">Michael</a> when he says that <em>using UML for a single developer and/or a simple software project seems overkill</em> to him.  I\'ve used it on my small personal projects, and having them documented using UML saved me a lot of time when I came back to them seven months later and had completely forgotten how I had built and put together all those classes.</p>\n'}, {'answer_id': 19368, 'author': 'graham.reeds', 'author_id': 342, 'author_profile': 'https://Stackoverflow.com/users/342', 'pm_score': 1, 'selected': False, 'text': "<p>UML seems to good for large projects with large teams of people.  However I've worked in small teams where communication is better.</p>\n\n<p>Using UML-esque diagrams is good though, especially in the planning stage. I tend to think in code, so I find writing large specs hard. I prefer to write down the inputs' and outputs' and leave the developers to design the bit in the middle.</p>\n"}, {'answer_id': 20898, 'author': 'David Koelle', 'author_id': 2197, 'author_profile': 'https://Stackoverflow.com/users/2197', 'pm_score': 0, 'selected': False, 'text': '<p>In my experience:</p>\n\n<p>The ability to create and communicate meaningful code diagrams is a necessary skill for any software engineer who is developing new code, or attempting to understand existing code.</p>\n\n<p>Knowing the specifics of UML - when to use a dashed line, or a circle endpoint - is not quite as necessary, but is still good to have.  </p>\n'}, {'answer_id': 20956, 'author': 'Adam Mika', 'author_id': 2329, 'author_profile': 'https://Stackoverflow.com/users/2329', 'pm_score': 1, 'selected': False, 'text': '<p>I believe UML is useful just for the fact that it gets people to think about the relationships between their classes.  It is a good starting point to start thinking about such relationships, but it is definitely not a solution for everybody.</p>\n\n<p>My belief is that the use of UML is subjective to the situation in which the development team is working.</p>\n'}, {'answer_id': 20966, 'author': '17 of 26', 'author_id': 2284, 'author_profile': 'https://Stackoverflow.com/users/2284', 'pm_score': 7, 'selected': False, 'text': "<blockquote>\n  <p>Using UML is like looking at your feet as you walk. It's making conscious and explicit something that you can usually do unconsciously. Beginners need to think carefully about what they're doing, but a professional programmer already knows what they're doing. Most of the time, writing the code itself is quicker and more effective than writing about the code, because their programming intuition is tuned to the task.</p>\n</blockquote>\n\n<p>It's not just about what you're doing though.  What about the new hire who comes in six months from now and needs to come up to speed on the code?  What about five years from now when everyone currently working on the project is gone?</p>\n\n<p>It's incredibly helpful to have some basic up to date documentation available for anyone who joins the project later.  I don't advocate full blown UML diagrams with method names and parameters (WAY too difficult to maintain), but I do think that a basic diagram of the components in the system with their relationships and basic behavior is invaluable.  Unless the design of the system changes drastically, this information shouldn't change a lot even as the implementation is tweaked.</p>\n\n<p>I've found that the key to documentation is moderation.  No one is going to read 50 pages of full blown UML diagrams with design documentation without falling asleep a few pages in.  On the other hand, most people would love to get 5-10 pages of simple class diagrams with some basic descriptions of how the system is put together.</p>\n\n<p>The other case where I've found UML to be useful is for when a senior developer is responsible for designing a component but then hands the design to a junior developer to implement.</p>\n"}, {'answer_id': 20972, 'author': 'Quibblesome', 'author_id': 1143, 'author_profile': 'https://Stackoverflow.com/users/1143', 'pm_score': 4, 'selected': False, 'text': '<p>Throw away only in my opinion. UML is a great tool for communicating ideas, the only issue is when you store and maintain it because you are essentially creating two copies of the same information and this is where it usually blows.\nAfter the initial round of implementation most of the UML should be generated from the source code else it will go out of date very quickly or require a lot of time (with manual errors) to keep up to date.</p>\n'}, {'answer_id': 24950, 'author': 'Sean Kearon', 'author_id': 2608, 'author_profile': 'https://Stackoverflow.com/users/2608', 'pm_score': 3, 'selected': False, 'text': '<p>UML has worked for me for years. When I started out I read Fowler\'s <a href="http://books.google.co.uk/books?id=nHZslSr1gJAC&amp;dq=uml+distilled&amp;pg=PP1&amp;ots=V62_FWLAaB&amp;sig=l2cDHm61Egu4qgUwTXVPYYeeU_g&amp;hl=en&amp;sa=X&amp;oi=book_result&amp;resnum=1&amp;ct=result" rel="noreferrer">UML Distilled</a> where he says "do enough modelling/architecture/etc.". Just use what you <em>need</em>! </p>\n'}, {'answer_id': 131532, 'author': 'fooledbyprimes', 'author_id': 20714, 'author_profile': 'https://Stackoverflow.com/users/20714', 'pm_score': 2, 'selected': False, 'text': '<p>I believe there may be a way to utilize Cockburn style UML fish,kite, and sea-level use cases as described by Fowler in his book "UML Distilled."  My idea was to employ Cockburn use cases as an aid for code readability.  </p>\n\n<p>So I did an experiment and there is a post here about it with the Tag "UML" or "FOWLER."   It was a simple idea for c#.  Find a way to embed Cockburn use cases into the namespaces of programming constructs (such as the class and inner class namespaces or by making use of the namespaces for enumerations).  I believe this could be a viable and simple technique but still have questions and need others to check it out.   It could be good for simple programs that need a kind of pseudo-Domain Specific Language which can exist right in the midst of the c# code without any language extensions.   </p>\n\n<p>Please check out the post if you are interested.  Go <a href="https://stackoverflow.com/questions/117401/is-it-possible-to-embed-cockburn-style-textual-uml-use-case-content-in-the-code">here</a>.</p>\n'}, {'answer_id': 131552, 'author': 'Trent', 'author_id': 9083, 'author_profile': 'https://Stackoverflow.com/users/9083', 'pm_score': 2, 'selected': False, 'text': "<p>One of the problems I have with UML is the understandability of the specification.  When I try to really understand the semantics of a particular diagram I quickly get lost in the maze of meta-models and meta-meta-models.  One of the selling points of UML is that it is less ambiguous than natural language.  However, if two, or more, engineers interpret a diagram differently, it fails at the goal.</p>\n\n<p>Also, I've tried asking specific questions about the super-structure document on several UML forums, and to members of the OMG itself, with little or no results.  I don't think the UML community is mature enough yet to support itself.</p>\n"}, {'answer_id': 131558, 'author': 'Daniel Honig', 'author_id': 1129162, 'author_profile': 'https://Stackoverflow.com/users/1129162', 'pm_score': 2, 'selected': False, 'text': '<p>I think the UML is useful thought I think the 2.0 spec has made what was once a clear specification somewhat bloated and cumbersome.  I do agree with the edition of timing diagrams etc since they filled a void...</p>\n\n<p>Learning to use the UML effectively takes a bit of practice.  The most important point is to communicate clearly, model when needed and model as a team.  Whiteboards are the best tool that I\'ve found.  I have not seen any "digital whiteboard software" that has managed to capture the utility of an actual whiteboard.</p>\n\n<p>That being said I do like the following UML tools:</p>\n\n<ol>\n<li><p>Violet - If it were any more simple it would be a piece of paper</p></li>\n<li><p>Altova UModel - Good tool for Java and C# Modeling</p></li>\n<li><p>MagicDraw - My favorite commercial tool for Modeling</p></li>\n<li><p>Poseidon - Decent tool with good bang for the buck</p></li>\n<li>StarUML - Best open source modeling tool</li>\n</ol>\n'}, {'answer_id': 224613, 'author': 'Ted Johnson', 'author_id': 30231, 'author_profile': 'https://Stackoverflow.com/users/30231', 'pm_score': 3, 'selected': False, 'text': '<p>I am coming to this topic a little late and will just try an clarify a couple minor points.  Asking if UML is useful as far too broad.  Most people seemed to answer the question from the typical/popular UML as a drawing/communication tool perspective.  Note: Martin Fowler and other UML book authors feel UML is best used for communication only.  However, there are many other uses for UML.  Above all, UML is a modeling language that has notation and diagrams mapped to the logical concepts.  Here are some uses for UML:</p>\n\n<ul>\n<li>Communication</li>\n<li>Standardized Design/Solution documentation</li>\n<li>DSL (Domain Specific Language) Definition</li>\n<li>Model Definition (UML Profiles)</li>\n<li>Pattern/Asset Usage</li>\n<li>Code Generation</li>\n<li>Model to Model transformations</li>\n</ul>\n\n<p>Given the uses list above the posting by Pascal is not sufficient as it only speaks to diagram creation.  A project could benefit from UML if any of the above are critical success factors or are problem areas that need a standardized solution.</p>\n\n<p>The discussion should expanded out from how UML can be over kill or applied to small projects to discuss when UML makes sense or will actually improve the product/solution as that is when UML should be used.  There are situations where UML for one developer could sense as well, such as Pattern Application or Code Generation.</p>\n'}, {'answer_id': 224628, 'author': 'Nick Stinemates', 'author_id': 4960, 'author_profile': 'https://Stackoverflow.com/users/4960', 'pm_score': 2, 'selected': False, 'text': "<p>From a QA Engineer's perspective, UML diagrams point out potential flaws in logic and thought. Makes my job easier :)</p>\n"}, {'answer_id': 439092, 'author': 'alepuzio', 'author_id': 45745, 'author_profile': 'https://Stackoverflow.com/users/45745', 'pm_score': 0, 'selected': False, 'text': '<p>UML is useful in two ways:</p>\n\n<ul>\n<li><p>Technical side: a lot of people (manager and some functional analyst) think that UML is a luxury feature because <i>The code is the documentation: you start coding, after you debug and fix</i>. The sync of UML diagrams with code and analisys force you to understand well the requests of the customer;</p></li>\n<li><p>Management side: the UMl diagrams are a mirror of the requires of the customer who is inaccurate: if you code without UML, maybe you can find a bug in requires after a lot of hours of work. The diagrams UML allow you to find the possible controversal points and to resolve before the coding =>help your planning.</p></li>\n</ul>\n\n<p>Generally, all the projects without UML diagrams have a superficial analysis or they have short size.</p>\n\n<p>if you\'re in linkedin group <b>SYSTEMS ENGINEERS</b>, see <a href="http://www.linkedin.com/groupAnswers?viewQuestionAndAnswers=&amp;gid=36892&amp;discussionID=408898&amp;sik=1231856229269&amp;trk=ug_qa_q&amp;goback=.ana_36892_1231856229269_1" rel="nofollow noreferrer">my old discussion</a>.  </p>\n'}, {'answer_id': 482356, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 2, 'selected': False, 'text': '<p>Coming from a student, I find that UML has very little use.  I find it ironic that PROGAMERS have yet to develop a program that will automatically generate the things that you have said are necessary.  It would be extremely simple to design a feature into Visual Studio that could pull pieces of the data, seek for definitions, and product answers sufficent so that anyone could look at it, great or small, and understand the program.  This would also keep it up to date because it would take the information directly from the code to produce the information.  </p>\n'}, {'answer_id': 745450, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': -1, 'selected': False, 'text': '<p>UML definetly has its place in the industry. Imagine you are building software for Boing aircraft or some other complex system. UML and RUP would be great help here.</p>\n'}, {'answer_id': 746343, 'author': 'mP.', 'author_id': 56524, 'author_profile': 'https://Stackoverflow.com/users/56524', 'pm_score': -1, 'selected': False, 'text': '<p>In the end UML only exist because of RUP. Do we need UML or any of its related stuff to use Java/.Net ? The practical answer is they have their own documenation (javadoc etc) which is sufficient and lets us get our job done!</p>\n\n<p>UML no thanx.</p>\n'}, {'answer_id': 1251099, 'author': 'programmernovice', 'author_id': 149141, 'author_profile': 'https://Stackoverflow.com/users/149141', 'pm_score': 2, 'selected': False, 'text': "<p>UML is used as soon as you represent a class with its fields and methods though it's just a kind of UML diagram.</p>\n\n<p>The problem with UML is that the founders book is too vague. </p>\n\n<p>UML is just a language, it's not really a method.</p>\n\n<p>As for me, I really find annoying the lack of UML schema for Opensource Projects. Take something like Wordpress, you just have a database schema, nothing else. You have to wander around the codex api to try to get the big picture.</p>\n"}, {'answer_id': 2300835, 'author': 'Esther Fan - MSFT', 'author_id': 275715, 'author_profile': 'https://Stackoverflow.com/users/275715', 'pm_score': 2, 'selected': False, 'text': '<p>UML diagrams are useful for capturing and communicating requirements and ensuring that the system meets those requirements. They can be used iteratively and during various stages of planning, design, development, and testing.</p>\n\n<p>From the topic: <strong>Using Models within the Development Process</strong> at <a href="http://msdn.microsoft.com/en-us/library/dd409423%28VS.100%29.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/dd409423%28VS.100%29.aspx</a> </p>\n\n<blockquote>\n  <p>A model can help you visualize the world in which your system works, clarify users\' needs, define the\n  architecture of your system, analyze the code, and ensure that your code meets the requirements.</p>\n</blockquote>\n\n<p>You might also want to read my response to the following post: </p>\n\n<p><strong>How to learn “good software design/architecture”?</strong> at <a href="https://stackoverflow.com/questions/268231/how-to-learn-good-software-design-architecture/2293489#2293489">https://stackoverflow.com/questions/268231/how-to-learn-good-software-design-architecture/2293489#2293489</a></p>\n'}, {'answer_id': 2300900, 'author': 'fastcodejava', 'author_id': 184730, 'author_profile': 'https://Stackoverflow.com/users/184730', 'pm_score': -1, 'selected': False, 'text': "<p>UML is definitely helpful just as junit is essential. It all depends how you sell the idea. Your program will work without UML just as it would work without unit tests. Having said that, you should create do UML as along it is connected to your code, i.e when you update UML diagrams it updates your code, or when you update your code it auto generates the UML. Don't do just for the sake of doing it.</p>\n"}, {'answer_id': 5990454, 'author': 'Thug', 'author_id': 713096, 'author_profile': 'https://Stackoverflow.com/users/713096', 'pm_score': 2, 'selected': False, 'text': '<p>Though this discussion has long been inactive, I have a couple of -to my mind important- points to add.</p>\n\n<p>Buggy code is one thing. Left to drift downstream, design mistakes can get <strong>very</strong> bloated and ugly indeed. UML, however, is self-validating. By that I mean that in allowing you to explore your models in multiple, mathematically closed and mutually-checking dimensions, it engenders robust design.</p>\n\n<p>UML has another important aspect: it "talks" directly to our strongest capability, that of visualisation. Had, for example, ITIL V3 (at heart simple enough) been communicated in the form of UML diagrams, it could have been published on a few dozen A3 foldouts. Instead, it came out in several tomes of truly biblical proportions, spawning an entire industry, breathtaking costs and widespread catatonic shock.</p>\n'}, {'answer_id': 6224831, 'author': 'BobTurbo', 'author_id': 629417, 'author_profile': 'https://Stackoverflow.com/users/629417', 'pm_score': -1, 'selected': False, 'text': '<p>No it isn\'t. Code is the best form of communication. Everything else is for people who got into the wrong industry and decided to change it to suit their brain.</p>\n\n<p>Interfaces are vastly superior to  class diagrams. Use case diagrams mash user requirements into a form that destroys them and tells you how to design the product. Data flow diagrams and ER diagrams complicate the process of creating a database. Sometimes you might want to draw diagrams to communicate your point, but there is no reason they have to be UML diagrams or conform to any standard other than that the other person can understand them.</p>\n\n<p>In the end, these are all forms of documentation for large, useless, bureaucratic "software" companies that make terrible products laiden with XML. That is, if they ever finish documenting. Really, most of the employees don\'t care about their job and are just waiting for the person above them to die so that they can get a promotion.</p>\n'}]
['https://Stackoverflow.com/questions/18803', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2134/']