Loading ...
Sorry, an error occurred while loading the content.

Re: Procedure for writing a computer program

Expand Messages
  • Jim Hall
    Bill, ... Some thoughts regarding your query. Bear with me for a moment too Your wall building example is typical of the way most people learn to write
    Message 1 of 6 , Nov 30, 2000
    • 0 Attachment
      Bill,

      At 01:54 AM 11/28/00, you wrote:

      >Hi All:
      >I have a question ... and I can never seem to get an answer for it
      >
      >bear with me for a moment....
      >
      >the proceedure for framing a wall is ....
      >
      >pour the slab foundation
      >bottom and top plate the foundation
      >mark the stud locations, doors and windows
      >cut the cripples and headers
      >lay the plates on the slab
      >distrubute the studs on the layout marks ect ect ...
      >then nail the studs,cripples and headers to the plate ...
      >wall ahhh ... a wall
      >
      >My Question :
      >is there a systemmatic way to start a computer programing project
      >...
      >I cannot seem to find a" how do you design a programing
      >project" book or tutorial ... anyone know of such an animal
      >every perl tutorial I have read starts out with .. Hello World
      >and the next thing you know we are doing scalar or hash arrays
      >with curly brackets and such ... I want to know how to decide
      >what I want to do first and flow chart it and then figure out
      >whether to use a stud or a cripple ...
      >
      >Bill






      Some thoughts regarding your query.

      Bear with me for a moment too <G>

      Your wall building example is typical of the way most people learn to write
      programs (and maybe even clips).

      If I may also use your example then it wouldn't surprise me if the finished
      wall was 12 feet high, 133 feet long, with 4 x 12 studs, 17 windows and 5
      doors (or some other such foolishness).

      In other words, what might be the most important part seems to be missing here.

      That is the results of the Planning and Engineering phase.

      Examples of the questions that one needs answered to build the correct
      wall, in the correct manner, the first time, might be (among many others):


      What is the purpose of this wall (why do we even need to build it?)

      Is it for a house, a barn, a garage, a shed?

      Is it a single story wall, or a double story wall
      ( for a 10 story barn perhaps?? <G>)

      Is it a bearing wall or a partition?

      Is it a fire wall

      Is it to be insulated


      etc. etc.



      Good Programming requires good Planning and Engineering too.

      Just as there needs to be tools (drawings and bills of materials) to
      communicate the wall specifications to the person who is going to build it,
      so too should there be tools to communicate the Program Specifications
      (General Description, annotated flow chart, list of defined Variables,
      annotated coding, help files, perhaps a tutorial) to the person doing the
      coding and also to the seller/buyer/user of the program.

      Now it is true that a person can write a program to perform a desired task
      without creating these communication tools, if.....

      The person codes it themselves, uses it themselves, and never needs to go
      back a year later and try to remember what it was they did.

      Perhaps one should think of a "PROGRAM" as simply a human readable list of
      specific tasks to be performed by the computer, to a specific list of
      things, using a specific list of temporary names/values in the process plus
      some human UNreadable text added on at the bottom (the code).

      A major mistake is to get so involved with the coding & programming
      language that we forget to actually WRITE the program, THEN code it.

      This means that we try to WRITE the program WHILE we code it and that is
      just like trying to dig the footer ahead of the guy pouring the concrete.

      A well written program can be coded in several different languages by
      several different people, and ran on different platforms on different types
      of computers and still come up with the correct value for the sum of 1 + 3.
      (Or perhaps correctly print "Hello World" to the screen)

      I believe that a well written program should include (but by no means be
      limited to) all necessary tools (regardless of format) to accomplish the
      following.


      List and define for the person who is going to code the program (even if it
      is yourself) as well as for the person who is going to maintain and perhaps
      later revise the program :

      The specific reason(s) for the existence of the program

      What specific task(s) it is supposed to perform

      How specifically it is to do it.

      What specific Constants are to be used and for what

      What specific Variables are to be used and for what

      What specific Parameters are to be used and for what

      What additional files are needed


      (The person(s) selling /buying/using the program also need to know some of
      these things.)


      Generally all of these (and more) are the ";COMMENTS" at the very beginning
      and throughout the source code for the program.


      Usually there is other information included such as:

      Creation Date

      Copyright date/info

      Revision date/info

      Disclaimers and other legal info

      List of participating programmers

      etc. etc.



      Now we all know that a Stud is just another name for a long cripple (don't we?)

      In programming, we can often use either a long routine or a short routine
      to accomplish the same thing.

      We can also make a "Subroutine" or maybe a "macro" (user defined command)
      which will work as both a stud and a cripple (adjustable height jack)
      depending on a given set of circumstances and not have to have a routine
      for each.

      Knowing that there is a short/quick routine/command instead of the long
      version or when it is best to create a macro, are tricks of the trade
      learned only by hitting your thumb/forehead with the hammer/mouse enough
      times to know that it hurts.

      They come with experience.

      The one thing unique to computers that is different from all other trades
      (save perhaps medicine) is that it IS OKAY to ask for help and to admit
      FREELY that you don't know what to do (or what you are doing).

      Since we have all been taught from birth to never show our ignorance, this
      goes against our natural grain and requires some definite attitude adjustment.

      There are just too many applications/languages/platforms/computers for any
      one person to know them all so........

      If there is something about computers/programming that you don't know, you
      look in your code book (e-mail address book entries under "Guru") and see
      who does and ask them.

      I don't know if I answered your specific question in a specified manner or
      not but hopefully I have provided you with some specific food for thought.

      After thought.

      Maybe a more specific answer would be:

      Step 1. Take a pencil and paper (NoteTab Pro and NoName01.txt) and start
      PLANNING/ENGINEERING/WRITING your program.

      Step 2. CODE Your program

      Step 3. DEBUG your program

      Step 4. BETA TEST your program

      Step 5. REVISE your program

      Step 6. USE/SHARE/SELL/SUPPORT your program

      Hope it helps.

      Regards,

      Jim
    • Marco Bernardini
      *This message was transferred with a trial version of CommuniGate(tm) Pro* Alle 23.01 Thursday 30/11/2000 -0800, Jim Hall ha mandato a Marco questo ... It s
      Message 2 of 6 , Dec 1, 2000
      • 0 Attachment
        *This message was transferred with a trial version of CommuniGate(tm) Pro*

        Alle 23.01 Thursday 30/11/2000 -0800, Jim Hall ha mandato a Marco questo
        messaggio:

        >If I may also use your example then it wouldn't surprise me if the finished
        >wall was 12 feet high, 133 feet long, with 4 x 12 studs, 17 windows and 5
        >doors (or some other such foolishness).

        It's true!
        We architects call it "spontaneous architecture"... it becomes "typical"
        after a 200 years on so, and you can't modify it, in the same way you can't
        modify a spaghetti-coded program :-)

        Bye!

        Marco Bernardini
      • Bill Scott
        A major mistake is to get so involved with the coding & programming language that we forget to actually WRITE the program, THEN code it. Bill *||: )
        Message 3 of 6 , Dec 3, 2000
        • 0 Attachment
          A major mistake is to get so involved with the coding &
          programming
          language that we forget to actually WRITE the program, THEN code
          it.

          Bill *||:>) wrote:

          That is exactly what I am looking for how do you write a program
          before you
          code it or even decide what language will be the best to use ...
          *||:^) A wee bit of
          help.tips or ideas on how to start ... planning ... a project ...
          you know.a jump start ... with the obvious ..... so the light
          goes on .... a hint ... so more people get the joke ... *||:^)

          I work with animals allot border collies ..... when some college
          guy comes out to learn to do some training ... what is obvious to
          me is not always so obvious to him ... you might tell him five
          times and he just does not get it ... but if I take the time to
          give him a hint they will usually suprise you .. what you thought
          was dumb was just ignorant of animals ..... ignorance is curable
          in most cases ... *||:^) I had a male nurse that came to me about
          5 years ago for help he just won the Nursery Nationals ... but
          when I first met him he was comical ... he couldn't even spell
          border collie ..and I thought to myself what a dumb head ... but
          he stuck it out and ... there you have it ......

          Bill (off topic) Scott.
        Your message has been successfully submitted and would be delivered to recipients shortly.