Slashdot Mirror


Software Diagramming In Embedded Systems?

afd100 writes "I work for a medium-sized company building embedded systems using C. As of yet, we do not have a great design methodology, but it is something we're working on. For the last 7 years now, we've been documenting our embedded software in an IEEE'esque Software Detailed Design, and using a very cryptic block diagram to explain our software. What does the embedded software community at large currently use to graphical represent their software or do they even try this? Since the programming is functionally decomposed, is UML the right way to go?"

52 comments

  1. Real Time UML by H0p313ss · · Score: 2, Interesting

    There are a number of commercial UML solutions for embedded and real-time systems. e.g. Rhapsody which with IBM's acquisition of telelogic becomes the natural upgrade path for system development with UML.

    --
    XML is a known as a key material required to create SMD: Software of Mass Destruction
  2. Experiment by cerberusss · · Score: 1

    Since the programming is functionally decomposed, is UML the right way to go?
    UML is what everybody uses (in my environment at least). A lot of aspects of UML assume object-oriented programming, but nobody stops you from cherry-picking whatever is in UML.

    Of course you can think of objects as structs in C, and you can go a long way. However, I found that thinking in objects requires exercise. At first, you'll have people on your hands that will think of your regular C API as an object -- which is not always a good fit to say the least.

    So if you go this way, prepare for some education. And don't start the new way of working with an important project.
    --
    8 of 13 people found this answer helpful. Did you?
  3. Unique diagrams by JCSoRocks · · Score: 3, Funny

    Personally, I just refer to this diagram. It's the 42 of diagrams. You don't need any others.

    --
    You are using English. Please learn the difference between loose and lose; they're, there, and their; your and you're.
    1. Re:Unique diagrams by axlr8or · · Score: 0

      OMG hahahaaaa. That site is great...

  4. Architecture diagrams by dissipative_struct · · Score: 3, Insightful

    If you've got a reasonably small code base you might want to keep the documentation style you've got. I'm not sure what a "very cryptic block diagram" looks like, but a simple drawing showing the functional blocks of your software may be good enough. For smaller embedded projects I've done in C or assembly (2-4 people on the team, 10K lines of code, minimal use of 3rd party code other than maybe the C std lib) this is the design/documentation style I've used:

    1) Create an architectural design. Identify the main functional blocks of software in a drawing, include a one-paragraph explanation of what each block does.
    2) Define the external interfaces, from the physical level on up. Define any internal interfaces necessary to support development, but don't go crazy, internal interface documentation is hard to maintain.
    3) Code to the design. The "detailed documentation" is the comments you put in the code. Every file, function and most globals should have a brief comment describing what it contains or what it's for.

    For a simple embedded system I've found this is a good approach. Things that will require a higher level of documentation: large code size, library-type code that will be heavily reused in the future, a large number of developers. Embedded systems are often a very different animal than applications, and some embedded software is inherently not reusable.

    The real question you should ask yourself is "What extra help am I getting from my new documentation format, and does it justify the extra time I'm going to be putting into it?".

  5. Ditch diagrams. I'm serious. by Cyberax · · Score: 4, Interesting

    Ditch your diagrams. They're far too often used to:
    1) As a thing to show boss that you're working.
    2) Unnecessary cruft which no one uses.

    About the only case where diagrams are helpful are FSM diagrams.

    1. Re:Ditch diagrams. I'm serious. by H0p313ss · · Score: 2, Informative

      About the only case where diagrams are helpful are FSM diagrams.

      UML includes state machines, real-time UML is all about state machines.
      --
      XML is a known as a key material required to create SMD: Software of Mass Destruction
    2. Re:Ditch diagrams. I'm serious. by arotenbe · · Score: 1

      The only time I've ever had diagrams help me is when I am designing complicated data structures, particularly self-balancing trees and the like. Other than that, they're pretty useless.

      --
      Tomato wedge sperm darts that are Republican.
    3. Re:Ditch diagrams. I'm serious. by ericlj · · Score: 3, Insightful

      In my experience, the only time diagrams are worthwhile (unless required to get paid) are if you manage to find a tool that will generate usable code from the diagrams. Otherwise, the diagram and the code will always disagree in any system complex enough to be useful.

    4. Re:Ditch diagrams. I'm serious. by Evanisincontrol · · Score: 1, Redundant

      2) Unnecessary cruft which no one uses.

      I disagree completely. If you have ever walked blindly into a system with nothing but code and diagrams to help you through, you'd know that those diagrams are invaluable. Unless you want to waste man power by having another architect hand-hold your way through the system for hours/days/weeks until you've got a firm grasp on it, there's just no substitute for well-made design docs.

      I think the notion of "diagrams are useless" spawns from system architects who don't have the foresight to realize that diagrams aren't meant for themselves, but rather everyone else who has to deal with the system thereafter.

    5. Re:Ditch diagrams. I'm serious. by Cyberax · · Score: 2, Informative

      I did this many times. UML class, use-case and sequence diagrams were NEVER helpful - it's just much easier to explore code with a good IDE.

      The argument that a new architect will have to spend days familiarizing with the code is moot. Architects are arguably THE main people in a project - their mistakes can cost A LOT. So I'd rather let him/her spend some time and get acquainted with the code and code 'style' then let him/her rush into drawing more diagrams.

      Also, diagrams have a very nasty habit to fall out of sync from the real code.

      FSM diagrams are very useful, though. Especially if they are automatically generated.

    6. Re:Ditch diagrams. I'm serious. by BiggerIsBetter · · Score: 1

      Seconded, regardless of whether the project is embedded ASM, JEE, Ada, or whatever. I've walked into a number of projects, either late-in-the-game when the project needs saved, or well afterwards when changes need made, and invariably the code is badly commented, buggy, and may or may not do what was intended. In situations like this, people go into ass-covering mode, so information is hard to get anyway... You just don't have time to sift through thousands of lines of code, figure the intent, find the bugs, quietly talk to each of the devs, compare notes with the architect(s), and finally get the work done. Accurate and comprehensive design docs can easily be the difference between project success or failure.

      Maybe that's why so many software projects fail - people still don't treat it as a math and/or engineering discipline. Would you take someone seriously when they said they've written a proof that's mostly correct? Or someone who tries to build a two hundred thousand dollar span without blueprints and load analysis? Of course not, so why do guys who can string some computer code together persist in doing this in commercial projects?

      --
      Forget thrust, drag, lift and weight. Airplanes fly because of money.
    7. Re:Ditch diagrams. I'm serious. by Spy+der+Mann · · Score: 1

      I did this many times. UML class, use-case and sequence diagrams were NEVER helpful - it's just much easier to explore code with a good IDE.

      The argument that a new architect will have to spend days familiarizing with the code is moot.

      I disagree. I've found that whenever I join a project where they have UML diagrams, it's much easier for me to understand the code - specially if it's a big project.
    8. Re:Ditch diagrams. I'm serious. by AuMatar · · Score: 4, Informative

      And uses all the wrong ideas. EEs had a drawing standard for state machines for decades, UML ignored all of it. Yet another reason to ignore UML.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    9. Re:Ditch diagrams. I'm serious. by JCSoRocks · · Score: 1

      As someone who has stepped into an extremely large project with no diagrams - I can say that I really, really wished there had been some. Instead, what I got were really awesome hand-drawn scribblings on my whiteboard and notepads by senior developers. Better than nothing, but not nearly as useful as a comprehensive diagram of the whole system.

      I now make it a habit to write documentation and use diagrams to help others in my group as well as anyone coming after me. I think we all know we won't be working at our job forever and I'd prefer not to be the kind of guy that leaves a mess for the poor sod taking my position.

      --
      You are using English. Please learn the difference between loose and lose; they're, there, and their; your and you're.
    10. Re:Ditch diagrams. I'm serious. by lysse · · Score: 1

      And then, presumably, only to those who have been Touched by His Noodly Appendage...

    11. Re:Ditch diagrams. I'm serious. by jythie · · Score: 1

      I don't know, as a 'someone else' I find diagrams pretty useless for understanding a system. A good API document, spec, or header file directory does wonders.

    12. Re:Ditch diagrams. I'm serious. by jythie · · Score: 1

      Might have something to do with learning style. Some people seem to benefit from the way UML lays things out, other people find them more frustrating then just looking over the headers or example code.

    13. Re:Ditch diagrams. I'm serious. by Cyberax · · Score: 1

      Actually, a lot of FSM diagrams do look like the FSM!

      Ahhhhhhhhhh!!!!

    14. Re:Ditch diagrams. I'm serious. by raddan · · Score: 3, Informative

      Since I am currently in the middle of drawing one (and yes, I'm kinda spacing out, reading /.), I would also argue that ER diagrams are useful. Just the drawing of them makes you think through some things that might never have occurred to you if you just started creating tables in a database.

    15. Re:Ditch diagrams. I'm serious. by Cyberax · · Score: 1

      Yes, you are absolutely right.

      I forgot about ER-diagrams and they are very useful.

    16. Re:Ditch diagrams. I'm serious. by jamie(really) · · Score: 1

      Like this one, though I suppose I should get the bloody installer working if I'm going to slashdot myself: http://www.statesharp.net/

      FSM diagram tool that generates code.

      I wrote it because if your diagram doesn't generate your code, or vice versa, then they *will* get out of sync, and the only thing worse than no documentation is *wrong* documentation.

    17. Re:Ditch diagrams. I'm serious. by jgrahn · · Score: 3, Informative

      Ditch your diagrams. They're far too often used to: 1) As a thing to show boss that you're working. 2) Unnecessary cruft which no one uses.

      And/or 3) something everyone except the boss knows is out-of-date and dangerous to refer to for anything important.

      It's strange that the question explicitly asked for diagrams. What if this particular system is better described in plain text -- should there still be diagrams instead?

      Apart from that I only have three pieces of advice:

      • Any documentation which isn't under revision control together with the software is doomed to fail. That means among other things it has to be inside the source code, or in separate plain text files (so your changes can be merged with my changes, and so they can be reviewed alongside the source code).
      • Spend a day or two with doxygen. Make sure you enable its graph-rendering capabilities, and then play with different settings. You can get quite a lot of overview and insight from its output, and it supports plain C.
      • Doxygen cannot capture the architectural decisions and rules. Those that change rarely should, I think, be written down in plain text by someone who knows a lot about the system and who can write readable technical documentation. But for the volatile details, I'd rather trust the source code (and the views of the source code which doxygen, emacs, various IDEs ... can offer).
    18. Re:Ditch diagrams. I'm serious. by cleatsupkeep · · Score: 1

      About the only case where diagrams are helpful are FSM diagrams.

      Flying Spaghetti Monster Diagrams?

      His noodly appendages don't take kindly to being diagrammed you insensitive clod.

    19. Re:Ditch diagrams. I'm serious. by Anonymous Coward · · Score: 0

      Mod parent UP UP UP!

      I'm sick of that blowhard Grady Booch, et al.

      If you want to see how FSM's are best described, consult Jeffrey D. Ullman's contributions to the field.

    20. Re:Ditch diagrams. I'm serious. by Anonymous Coward · · Score: 0

      2) Unnecessary cruft which no one uses.

      ... until some poor blighter needs to reverse-engineer a diagram from source code?

      You should separate the What (high level diagrams) from the How (inline source level docs).
      You probably have these already when doing the sw design.

    21. Re:Ditch diagrams. I'm serious. by Zet · · Score: 1

      > Ditch your diagrams.

      This is simply wrong. A good diagram will clearly
      reflect your actual design. And the exercise of
      creating one will often highlight problems in what
      you are doing. Not only that, it will show, in a
      non-code representation, what your intent is, and
      this allows others to verify it (and makes sure they
      are thinking what you are thinking).

      Documentation is a fundamental part of good design.
      Skipping it is evidence of weak engineering
      discipline.

    22. Re:Ditch diagrams. I'm serious. by Anonymous Coward · · Score: 0

      Ditch your diagrams. They're far too often used to:
      1) As a thing to show boss that you're working.
      2) Unnecessary cruft which no one uses.

      About the only case where diagrams are helpful are FSM diagrams.

      Hear hear!

      The only useful diagrams are State Charts and Interaction Charts.

      There may also be a use for Deployment Diagrams.

      The whole point of this stuff is to communicate. Not to archive thoughts.

    23. Re:Ditch diagrams. I'm serious. by snarfies · · Score: 1

      omg, undoing incorrect moderation! I meant to mod my "enemy" down!

  6. Interfaces and Timing Diagrams by Keick · · Score: 4, Insightful

    I too work in embedded systems, more specifically aircraft controls. In most of our design documents we tend to keep the design to the interface level of each software component (CSC), and the interaction between them. Drawing this is usually down using more simple drawing elements than that of UML. Draw a couple of boxes to show your major components, and label the interfaces of those. In subsequent sections, show only one of the components at a time, with a drawing of its sub-components if applicable. Only go about 3 levels deep if at all possible here. The attention span of most reviews will get lost after that. Besides, your requirements already specify WHAT has to happen, your only job here is to specify WHERE those requirements happen.

    While UML is nice, I have found that most of the reviewers of these types of documents are not UML savvy. The one drawing mechanism of UML that I do find invaluable in this line of work is the sequence diagrams. Large amounts of requirements can often be shown more precisely by a sequence diagram, detailing the interactions between a handful of component interfaces at a time.

  7. Maybe Try Formal Modeling? by Shade+of+Pyrrhus · · Score: 5, Informative

    Take it a step up and evaluate some modeling languages and tools, such as AADL and OSATE.

    http://www.aadl.info/

    This stuff is MADE for real-time, embedded systems. The ultimate goal is to use it through design and analysis, and then go ahead and generate code. It does take some getting used to, and there is a lot to it so keep that in mind.

    It's not perfect, and still under development, but very cool. So give it a try, see if you can pick it up. I'm generally a supporter of UML, but after being introduced to AADL and OSATE in an architecture course I was eventually convinced that it could be better than UML for this field.

  8. Statecharts by Dr.Who · · Score: 5, Informative

    Most times when people think about using flowcharts, they really should create state transition diagrams http://en.wikipedia.org/wiki/State_diagram/ to discuss, describe, and document behavior. Statecharts are an improvement on earlier state transition diagrams and are included in the latest UML specification.

    Some Statechart references:

    1. Samek, Miro; Montgomery, Paul: State-Oriented Programming. Embedded.com. 2000-08. http://www.embedded.com/2000/0008/0008feat1.htm/
    2. Samek, Miro: Practical Statecharts in C/C++: Quantum Programming for Embedded Systems. CMP Books. 2002-07. http://www.amazon.com/exec/obidos/tg/detail/-/1578201101/002-2659023-9156009/
    1. Re:Statecharts by DrEasy · · Score: 1

      I'd say the opposite is true too: most times when people draw a state transition diagram, they're really drawing a flowchart.

      State transition diagram are exactly that: to show the transitions between states in a system. You first need to determine what are the events that your system responds to, and then, for EACH state in the system, determine what happens in response to such events. "What happens" can be, but isn't always, a transition to another state. The benefit of such a diagram is that you make sure you didn't miss any kind of reaction of the system to any event that can occur at any state.

      There is a good reason why in a tool like Rational Rose you find (or at least used to find, I haven't used that atrocity in years) the statechart diagram when you select a particular class (I mean "class" in the OO sense). You should use that diagram to determine how/when method calls on instances of that class can change its state (i.e. modify the value of one or many instance variables to the extent that its future behavior is changed). Think for example of how increasing the temperature of an object can make it change states (literally: from solid to liquid to gas) and therefore obey different mechanical laws.

      But what I come across most often is diagrams that try to capture the flow of a system, with conditionals, loops etc. If you're trying to document an algorithm, don't use a state transition diagram, either use a flowchart or just write pseudo-code!
       

      --
      "In our tactical decisions, we are operating contrary to our strategic interest."
  9. SysML by NealAbq · · Score: 1

    You might also want to look into SysML, which is a lot like UML with a few extra diagrams for modeling systems.

  10. UML doesn't solve all problems by UTF-8 · · Score: 1

    UML can be helpful at times. The tricky part is keeping the design in sync with the current state of code. You may design a system a certain way initially, but as you fix bugs and improve functionality, the original design documents become stale. I find the javadoc and doxygen (http://doxygen.org/) way of API documentation to be very helpful. Even Visual C# has integrated helpful API documentation techniques into the environment. This allows you to keep the documentation with the code, and it allows you to generate readable API documentation without all the fuss of keeping separate files in sync. Doxygen does work on C and C++ headers, and it has the ability to automatically generate C++ derivation trees and other helpful features. UML can be okay from a high level perspective, but like any hammer, you don't have to use it for everything.

  11. Doing Hard-Time (with UML) by two+basket+skinner · · Score: 2, Informative

    by Bruce Powel Douglass explains how to use UML to model real-time embedded systems. I picked it up when i needed to come up with graphical designs for my senior thesis a couple of years ago. I had never once worked on a real-time system but this book helped me a lot in that it stresses the importance of the state and sequence diagrams (as many previous posters are also). Douglass does a good job of showing how to use the state diagram and nested states for multi-threading which helped me on my specific project. With this book i was able to catch a lot mistakes in my initial "swag" design and better able to understand how all the multi-threading parts would need to fit together. And why wouldn't UML work for decomposed functions? Use case, sequence, and state diagrams are not limited to any level of abstraction/detail, right?

  12. The code is the design, documentation the intent by danielstoner · · Score: 1

    Use well commented clear code. On top of it use technical notes to explain the design and implementation of the system at a moment in time along with the requirements at that moment in time. Concerning UML, there was a recent thread on slashdot: Is UML Really Dead, Or Only Cataleptic?

    --
    www.littletutorials.com
  13. Anonymous Coward by Anonymous Coward · · Score: 0

    Don't under estimate the power of models.

    Our C developers build a 3D model with spaghetti.

  14. Fully agree by EmbeddedJanitor · · Score: 1
    I've been building embedded systems for a very long time now and find that pen + paper or whiteboard diagramming is often the best. Big paper: A1 (American D). If you want to write it up in a document then photograph it and put the picture in the document.

    This approach has given the best bang for bucks that I have seen.

    --
    Engineering is the art of compromise.
    1. Re:Fully agree by bhima · · Score: 1

      I've been doing it for a while now, too. I use post-it notes and highlighters. You'd be amazed how many sizes and colors people are selling post-it note in.

      --
      Nothing in the world is more dangerous than sincere ignorance and conscientious stupidity.
  15. Process Process Process by Anonymous Coward · · Score: 2, Insightful

    My background is close to 20 years in embedded software in the aerospace environment. Most of the time, the process by which we got to SDR, including prior SSR and PDR, was dictated by higher management (read: pointy haired types), often based on a MIL2167A-like scheme, and generally ignored after CDR.

    What you need is:

    1) Written system requirements that are formally controlled, precise, unambiguous and testable. The precise format doesn't matter much as long as it's consistent inside the project and there is as little ambiguity as possible.

    These requirements need to include a precise and unambiguous description of the interface with the outside world and a precise and unambiguous description of the required functionality - ie. what the software does. This is what should come out of the SRR (Software Requirements Review) process. In my experience it rarely does.

    2) A written description of the top level CSCIs (or whatever you want to call the first level of design decomposition) that is formally controlled, precise and unambiguous . This should include both internal interface and functionality descriptions for each CSCI. These descriptions should explicitly include how they will satisfy the top level requirements. This is what should come out of the PDR (Preliminary Design Review) process. In my experience it rarely does.

    As for charts, there are lots of chart types you might use. Which is most appropriate depends mainly on the problem at hand. It seems as if there are as many different types of chart as there are consultants trying to sell their take on it. There is no shortage of chart types from which to choose.

    Note that formal software design processes that require specific charts with no flexibility will invariably be found to be covered with the fingerprints of someone with pointy hair.

    You will likely want to use several different chart types. Some of the alternatives include traditional flow charts (while useful for design, after the design is done they are close to worthless), state-transition diagrams, control flow diagrams, hierarchy diagrams, N**2 diagrams as well as many other types.

    3) A written description of each CSC that is formally controlled, precise, unambiguous, including interfaces and functionality. To the set of charts available from the PDR level, to this level one may add pseudo code. Some languages (Ada is notorious for this) may serve as pseudo code, but this technique may needlessly restrict some options. This, along with the design documentation from SRR and PDR, is what should come out of the CDR process. In my experience it rarely does.

    Good luck. You will need it.

  16. State Diagrams by Aging_Newbie · · Score: 1

    If you are thinking of using the diagram as a means to share your design concepts and inner workings of the system for review then State Diagrams are the way to go. They are conceptually simple, so it is easy to explain them even to users. They are very close to the reality of the environment and machine, and when you begin to model the design on events then you get (IMHO) a minimized, stable, and functional design.

  17. Go Agile by s31523 · · Score: 1

    Yes, I know, another fanboy touting how great Agile/Lean is... But seriously, I am an embedded developer for Flight Management Systems. I have been doing a lot of soul searching in this area. I have to tell everyone that the principle of Lean and Agile really do make sense, in particular for design documents. For the development we do, we are bound by DO-178B so we have to have some design "documentation" because there are objectives defined that require proof of compliance. The rub is that out of the 60+ objectives defined only 3 pertain to "design" (40 are for verification).
    If you take the primary principle of Lean, which is "if work does not contribute to the final product it is muda {waste}", the exception to that "if work is required by an authority and does not contribute to the final product, do the minimum".
    Now, take the Agile Manifesto into account which states "working software OVER comprehensive documentation" and to me, design documentation is a waste. We generate tons of useless design documents. We have tribal diagrams that supposedly tell me something about the system, but get out of date and require me to go to the tribal elder to decipher them. No, here is what I say (sorry it took so long to get to the point)

    Design diagrams and documentation is needed, but only when you are crafting a new architecture and most importantly should only be used to get a code class/package architecture or development plan (which set of design patterns are going to be used, interfaces, etc.) Once the software takes form THROW OUT THE DOCUMENTATION and use a good tool to auto generated documentation from your software. Be vigilant about refactoring. If something breaks the design don't bolt on a fix. Refactor it, then regenerate the design.
    Whenever possible, use self-documenting code or something that can auto generate code. We have a lot of interfaces and we get a little "ICD" happy (that's Interface Control Document). We have yet to realize ICDs can take any form and we should be using a form that can be used to generate a code module that represents the interfaces.
    So in short (yeah right), design diagrams and documentation is a good place to start, but it is a means to an end. The end is good quality, well architected code. Oh, and spend your time doing some form of unit testing or something rather than creating useless design documents.

    1. Re:Go Agile by Discoflamingo13 · · Score: 1

      For the development we do, we are bound by DO-178B so we have to have some design "documentation" because there are objectives defined that require proof of compliance. The rub is that out of the 60+ objectives defined only 3 pertain to "design" (40 are for verification).

      I am genuinely curious how your Agile methodology satisfies the independence criteria for design and verification for DO-178B - I believe it can be done, but it seems very tricky (And I understand if you are not able to talk about it). This is a consistent sticking point for us when considering Agile methods for design/verification. To what criticality level is an FMS largely designed? I work inertial nav mostly, so we are at Level A for almost everything.

      Design diagrams and documentation is needed, but only when you are crafting a new architecture and most importantly should only be used to get a code class/package architecture or development plan (which set of design patterns are going to be used, interfaces, etc.) Once the software takes form THROW OUT THE DOCUMENTATION and use a good tool to auto generated documentation from your software. Be vigilant about refactoring. If something breaks the design don't bolt on a fix. Refactor it, then regenerate the design.

      Table A-4 and A-5 of DO-178B have 6 criteria which apply to software's compliance to architecture - it seems like it would be difficult to satisfy these criteria without design artifacts created independently of the software code. I would also argue that design documentation is necessary for the longevity of a project; if it ever needs to be modified down the line, what will describe the intent of the requirements when the engineers who wrote them are not there?

    2. Re:Go Agile by s31523 · · Score: 1

      First I will say that my current situation does not embrace all the Agile techniques I suggest. I have been party to organizations that have.

      Without going into all the dirty details here are some general answers.

      With respect to independence the only area where independence is required is for verification activities. Independence can be achieved by using a different person OR tool. Nothing prevents one from calling out a process in an SDP that uses a throw away prototype lifecycle model for an architecture followed by a reverse engineering lifecycle model for generating the final "for credit" architecture. Doing this actually has an advantage in that by definition, several verification objectives for architecture are satisfied, e.g. A4-10, A5-2

      I think I covered the concern about needing independent generation of a software architecture, as no software development objective has a requirement for independence. The only requirement is that you work the details out in a good SDP, IMHO.

      With respect to needing design documentation for the longevity of a project, I don't disagree, but I do disagree with generating and maintaining design documentation. In my process, the code represents the design once an iteration or two of on paper designs have taken place. The new design document will come from the code and is simply there to aid in the understanding of the code in order to maintain it, but was generated from it. This also helps analyze the design of the code better since it is a more accurate reflection of the code and makes it easier to satisfy objective A4-9.
      I maintain a lot of large legacy systems and we NEVER use the design documentation. In fact we don't even maintain it. The process for the most part calls the design a snapshot of what was at one time. Very useless and wasteful.
      The systems I work on now are Level B/C, but I have worked on Level A. I believe some of the techniques I describe are perfectly valid for any Level, so long as the SDP clearly calls out what is being done so the DER and FAA can review and agree to it.

    3. Re:Go Agile by Discoflamingo13 · · Score: 1

      Thank you very much! Sometimes, I get myself confused by the words "verification", "review", and "validation" - I think I understand now what you mean by verification. It's a very compelling argument - I had not considered working out the details of the design generation in the SDP.

    4. Re:Go Agile by s31523 · · Score: 1

      I had not considered working out the details of the design generation in the SDP.

      Many people don't! They write a SDP that is generic and simply regurgitate DO-178B, i.e. use DO178B as a plan rather than guidance for coming up with a plan.
      You should check out the Yahoo group on DO178B. I started that a few years back when I was toiling with DO178b and seeking ways to do things "faster, better, cheaper" while still meeting the objectives. The group never took off as much as I wanted, but there is still hope.

  18. Many companies are trying; there is no standard by Discoflamingo13 · · Score: 1

    Straight-up UML seems to be a bad match for most embedded systems - embedded systems tend to be built on procedural design principles, and matching them to object-oriented principles is often an exercise in frustration. Bruce Powell Douglas ( Doing Hard Time , Real Time UML ) seems to have the best handle on which core diagram types make sense for most of the embedded systems out there - I can't recommend his work highly enough.

    There is no definitive diagram standard for the embedded systems industry - the industry is still trying things out. In my corner of aerospace, Matlab Simulink is rapidly becoming our de facto standard for low-level algorithm requirements and design, with Rhapsody UML diagrams used everywhere else.

    Whatever you decide on, make sure it is a technology that will be around when you need to re-visit your code. Many legacy programs are littered with the remnants of the diagrams from the SASD movement (structured analysis, structured design) which paved the way to UML. If you need to maintain your diagram system in-house, that's fine - the only reason I see people gravitating towards UML-type diagrams is the warm fuzzy feeling that UML is a well-documented diagram system that will be understood in two decades' time.

  19. WINE for OS X by QuickBible · · Score: 1

    As a windows developer, I'd like to run my software on Apple hardware. I am trying to get my services established and being able to run on Apple would be such a boon. Is there a concise set of instructions that I can follow to configure WINE for OS X? Ideally I would be able to do "agile" installation with my Apple friend to guide him through the process. Assuming that is successful, what is the process for copying my software over to OS X to test if it runs? (please don't flame me, I come in peace)

  20. Illustration, not representation by Alex+Belits · · Score: 1

    I use diagrams. Usually two per subsystem. However when I do it, I do pretty much everything in a way, opposite to what diagram-lovers are accustomed to.

    The principles are:

    1. Diagram is an illustration. It does not represent the code because any diagram properly representing any kind of real-life code would be too complex to be readable. It only makes sense to use diagrams to illustrate documentation where some part of it are more readable in a graphical form.

    2. Diagram should be very clear about what it actually represents. If it's a state, make sure that it captures a moment in time and maybe possible outcome -- for the new state draw another diagram. If it represents dependencies, make sure that all dependencies can be derived from it. If it represents relationships, communications, data structures, etc. make sure that types of objects, relationships, etc. are clearly distinguished from each other. If an arrow represents pointer, reference or mapping, another arrow that represents data flow or message transfer SHOULD BETTER LOOK NOWHERE CLOSE to the first one. No one cares if they are all one-to-one or one-to-many -- what is important, they are fundamentally different things. If you ran out of arrow types, draw a line with a penis on its end -- it means your diagram is too complex to be helpful to other people anyway.

    3. Despite all this clarity, it should be clear that diagram is an informal drawing that illustrates your specification or code. It is not a language. It does not contain everything necessary for implementation of your software. You can't use it to generate anything. It does not matter what tool generated it -- it's a picture. You still have to write clear documentation.

    4. If it makes sense (it usually does), represent multiple entities in lists as 2-3 examples with an ellipsis between them, add torn edges to tables, etc. to show a usable example of how your system deals with complex data, communications, etc.

    5. Finite state machines usually have more states than you thought. Much more. Last two times I have seen proper representation of a finite state machine as a diagram were diagrams of TCP connection states and example diagrams of language scanners for compilers. If everything was FSM, people would never invent dynamic memory allocation. In reality you most likely have to deal with objects participating in a complex systems of relationships with other objects, each such relationship having its own state, and object as a whole having its "state" derived from all of them. An attempt to draw a "FSM" diagram for this kind of system usually creates a very misleading view of how things behave in reality, encouraging wrong data models, race conditions, severe underestimation of resources usage, memory leaks, etc.

    6. Last time people had any hope to use flowcharts for something useful was in 70's. And those were people who programmed exclusively in assembly language and Fortran. And by Fortran I mean Fortran IV. Have you tried to understand an algorithm implemented in Fortran IV? You would think, flowchart is a better representation, too, but it's actually wrong -- a better representation would be pseudocode. Procedural languages such as C and Pascal, and later object-oriented languages made pseudocode unnecessary.

    7. There are really a lot of things that no one cares about, and even less so wants to see in a diagram form. Imagine a large ractangle labeled "libc", with a tree growing out of it with include files, groups of functions, functions and arguments attached to them. Have you seen it when studying C and libc? Do you know why you didn't? That's right, because it would be a confusing mess, distracting from both syntax and functionality, emphasizing superficial over essential. Your project does not need it any more than libc does.

    8. Use simple tools that allow you to concentrate on readability, not completeness or compliance with a standard that makes you pretend that your diagram is formal and not informal part of documentation. XFig, Inksc

    --
    Contrary to the popular belief, there indeed is no God.