Posted 09 June 2012 - 02:57 AM
Definition of pseudocode: Pseudocode is an informal high-level description of the operating principle of a computer program or other algorithm.
–Taken directly from wikipedia.
This basically says it's code, but simple as it's not ACTUAL code but rather words meant to make programming or understanding code easier. An example:
Program Code
Pseudocode
So how often do you guys use pseudocode? Do you use it at all? Give one example of when pseudocode helped you find a bug or design a part of code. I'll go first:
About a week ago, I had no knowledge of the FileSystemAPI and in-game help just did not help so I did what anyone should do, go to Ask a Pro (a rather nice place where MysticT answers all your questions, seriously, I should just start PM'ing him instead.) He gave me a few examples on how to use the fsAPI and I was on my way to making an updater for BossChat. Soon I ran into a problem, I've never used fsAPI! So I typed out what I wanted my updater to do in pseudocode before painstakingly "translating" into program code. Thus, it was completed. Took maybe an hour because I write code slow and pretty much debug every line as I write it, which probably causes more bugs than if I just wrote the entire block of code.
–Taken directly from wikipedia.
This basically says it's code, but simple as it's not ACTUAL code but rather words meant to make programming or understanding code easier. An example:
Program Code
local x = 0
if x == 0 then
x = 1
end
Pseudocode
if variable x equals 0 then
set x to 1
So how often do you guys use pseudocode? Do you use it at all? Give one example of when pseudocode helped you find a bug or design a part of code. I'll go first:
About a week ago, I had no knowledge of the FileSystemAPI and in-game help just did not help so I did what anyone should do, go to Ask a Pro (a rather nice place where MysticT answers all your questions, seriously, I should just start PM'ing him instead.) He gave me a few examples on how to use the fsAPI and I was on my way to making an updater for BossChat. Soon I ran into a problem, I've never used fsAPI! So I typed out what I wanted my updater to do in pseudocode before painstakingly "translating" into program code. Thus, it was completed. Took maybe an hour because I write code slow and pretty much debug every line as I write it, which probably causes more bugs than if I just wrote the entire block of code.