Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2008
    Posts
    23

    Problem writing Pseudocode

    How can I write a structured English Pseudocode for matching two – to extract matching data record from the table called “tblState” to update called tblCity. Below are the fields. I wan to extract NPI number from the tblState and update into tblCity. I am looking for Pseudocode for (a) matching, (b) validation, (c) update the record to tblCity table. Please really need somebody’s help.

    tblState
    NPI
    Org_Name
    Practice Address
    Zip
    State code
    Identifer ID
    Primary Taxanomy


    tblCity
    Org_Name
    Practice Address
    Zip
    State code
    Identifier_ID
    Primary Taxanomy

  2. #2
    Join Date
    Dec 2007
    Location
    London, UK
    Posts
    741
    Are you familiar with relational algebra? If so you shouldn't find it too difficult to write an expression for this. Then you can transform that into plain English.

  3. #3
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    I would suggest using a keyboard and computer, although purists seem to do all of their pseudo-code using paper and pencil. I prefer the neater appearance and the ease of editing offered by a computer.

    Either way, the process of writing the pseudo-code is just to take the steps that you'd give your grandpa to do the task and write them so clearly that even your little siste would understand them. Break the process down into simple, repeatabe steps then write the words needed to describe those steps so that even someone with limited language skills could understand them.

    Voila! It doesn't really matter whether you use a pencil or a keyboard, the logical process is exactly the same with minor differences in the physical details.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  4. #4
    Join Date
    Oct 2002
    Location
    Baghdad, Iraq
    Posts
    697
    Here's the way I might start writing the pseudocode for matching:

    Code:
    Procedure Matching({{What are the inputs?}})
        {{Do I have to do anything with the inputs right away?}}
        PROBABLY START HERE: {{What steps do I do for matching?}}
        {{What are the outputs?}}
        {{Do I have to do any cleanup?}}
    End Procedure
    The trick to writing pseudocode is to start at a very high level and then fill in the details until your algorithm is complete.

    If I were writing pseudocode for sorting, I might start with:

    1. Sort some numbers.

    Okay, what are my inputs and outputs?

    1. Procedure SortNumbers(List of Integers unsortedList)
    2. Sort unsortedList
    3. Return unsortedList -- which is now sorted
    4. End Procedure

    Okay, maybe it's a bubble sort:

    Code:
    Procedure SortNumbers(List of Integers unsortedList)
      Count with Counter from 1 to Length of unsortedList
         Bubble Sort elements from Counter to end of unsortedList
      End Count
      Return unsortedList -- which is now sorted
    End Procedure
    And so forth until you've got it to the level of detail you need.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •