Design before Coding

In the “real world”, it is a rare occurrence that a developer encounters a problem and starts to solve that problem with a blank project.  Often times, a dev is working as part of a much larger contingent of folks on a much more massive software project.  It doesn’t really make sense that you’d just walk in to that space and start hacking away on code without first attempting, at least in some small way, to wrap your brain around what’s going on with the design of the project.

Let me propose an analogy that may make more sense at this point.  A municipality wants a bridge built.  Would you want to drive over that bridge if the following things were to occur?

  • Municipality hires someone to lay out the footings for the bridge.
  • Municipality hires concrete contractor to come in and pour the footings and the major structural elements.  This contractor drives about a quarter mile away, and looks intently in the direction of the bridge to “plan” what he/she is going to do.  Contractor then commences pouring concrete.
  • Municipality hires some other people to do some other things.  These other people aren’t coordinated and don’t talk to each other.

Raise your hand if you would want to drive over that bridge?  If you do, let me know so I don’t ever get in a car with you!

Software Design

When writing code, you, as the programmer, have to keep two different threads of thought in your at one time:  the syntax of the language (where semicolons go, how to structure a for loop, etc.) and the semantics of what you’re trying to write (I need to make a decision now (if stmt), we need 10 iterations of this function, etc.).  To lower the cognitive load, it is helpful to break those two threads apart.  Enter Software design!

The first thing we’ll look at is the Activity Diagram.  It is one of the diagrammatic structures of the Unified Modeling Language (UML).  It is like a flow chart, but the structure is a little different.  However, there is a specific structure that one should follow so that activity diagrams are readable by other developers.

Check out these docs related to Activity Diagrams:

Speak Your Mind



This site uses Akismet to reduce spam. Learn how your comment data is processed.