CSC203 Week 2 Discussion

 

Discuss best practices for working with pseudo code.

 Date Posted: 05 Apr 2009 @ 09 26 PM
Last Modified: 05 Apr 2009 @ 09 26 PM
Posted By: Ryan Bridglal
E-mail | Permalink
 

Responses to this post » (4 Total)

 
  1. Ryan Bridglal said...
    9:42 pm - April 5th, 2009

    Originally posted: 3 Mar 09 5:06 PM MST

    Pseudo code is fake code. It’s a language and code that appears to have been written in a computer programming language, but does not follow all the rules of any specific language.

    One best practice while using pseudo code is to follow my statement. As you are composing it, always stick to the rules of it. Don’t get carried away and use statements like:

    one plus one is two.

    With pseudo code, the statements should be:

    //being the program
    start

    //declare variables
    get inputnumber1
    get inputnumber2
    answer

    //calculate work
    compute answer equals inputnumber1 plus inputnumber2

    //print the output
    print answer

    //finish the program
    end

    Another good thing to follow while writing pseudo code is to write it as you are writing down the steps the code and program should take. Such as “get inputnumber1;” that code is stating, no matter which programming language you use, it will be converted to the proper code that will make the machine or program receive input from a source and assign it to number1.

  2. Ryan Bridglal said...
    9:43 pm - April 5th, 2009

    Originally posted: 3 Mar 09 5:17 PM MST

    So, without the comments, here’s my code:

    start

    get inputnumber1
    get inputnumber2
    answer

    compute answer equals inputnumber1 plus inputnumber2

    print answer

    end

  3. Ryan Bridglal said...
    9:44 pm - April 5th, 2009

    Then I didn’t agree with another student’s post, so I responded with:

    Originally posted: 3 Mar 09 5:16 PM MST

    I don’t agree but, at the same time, I can understand how this can be considered Pseudo code to some people. It is providing instruction, but not machine language instruction.

    As I read your post, it sounded like Human Pseudo code. As if you were giving instruction to another person. Pseudo code is a programming language itself and should be written as such.

    Yes, i understand Pseudo code can be applied to anything. But you have to follow the rules of general programming. Take a look at my post and you’ll get a look at what I’m trying to say about Pseudo code.

  4. Ryan Bridglal said...
    9:45 pm - April 5th, 2009

    The instructor commented:

    Originally posted: Brooke Estabrook-Fishinghawk 4 Mar 09 4:57 AM MST

    Response to Ryan

    So you are saying there might be different types of pseudo code—you are on the right track.

 

Leave A Comment ...

 


You must be logged in to post a comment.


 XHTML:
You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
\/ More Options ...
Change Theme...
  • Role »
  • Posts »
  • Comments »
Change Theme...
  • VoidVoid (Default)
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LiteLightweight
  • No Child Pages...
  • No Child Pages...
  • No Child Pages...
  • No Child Pages...
  • No Child Pages...
  • No Child Pages...
  • No Child Pages...
  • No Child Pages...