Coffeehouse Thread

5 posts

Planning ahead

Back to Forum: Coffeehouse
  • User profile image
    tsunami

    At some point in nearly all semi-big programming projects I undertake I find myself "lost" and unsure of how to proceed without blowing it all up in little pieces. So I was wondering if anyone had any suggestions on how to plan ahead properly before sitting down and typing the first line of code.

    (This coming from a poor programmer who works alone, developing C# applications using VS .NET)

  • User profile image
    JAnderson

    I like to flow the program out on a piece of paper first.  I draw up a flowchart to illustrate how the program may flow.

    Doing so usually helps me point out what type of error checking needs to be included in the process.  And/Or identify each piece of the program that is required.

    Probably like most developers here over the years you begin to "think" like a computer.

    I also work alone.

  • User profile image
    miies

    I don't like methods like UML, they overcomplicate the often medium-complex applications we're building. Just like JAnderson, I prefer just getting a piece of paper and draw out the workflow as *my* mind sees it, using symbols (c) me Smiley

    For relatively small fragments of code (functions, routines, algorithms), I often use a quasi-programming language that describes 'what' happens 'when', like this:

    retrieve value (int); is it > 0?
      - no ->
        error
      - yes ->
        do this, blah, lookup using sql query
          any records?
            - no ->
              goto foo()
            - yes ->

    etc. etc. It helps me see the logic, and then I just fill in the gaps with real code, and add comments to clarify it for other devs - as likely no one but me will understand this Smiley

  • User profile image
    KevinClement

    I highly recommend looking into Test Driven Development (TDD).  This method of programming has drastically reduced how I code and the end product is 10x better than before.  It's actually quite amazing how the design comes out of the work. 

    Combining this method with other parts of extremem programming has made me grow as a developer leaps and bounds.  In the end I am much happier with the code that I produce.  Regression testing is a snap which is a god send.

    For more information check out http://www.testdriven.com as well as http://www.nunit.org/ for your start. 

    For more info on XP see http://www.xprogramming.com/

    There have recently been some really good MS press books on the subject.  Ward Cunningham who is also a member of channel 9 has been behind alot of these.

  • User profile image
    Deactivated User

    Comment removed at user's request.

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.