Tutorials with pseudocode - Good idea?
#1

Hello again,

As some of you may know (probably not), I'm a student studying Computer Science, and have been around here for waaaay to long. In my time, I've seen a lot of tutorials come by, but I don't know if people actually learn something from them.

The issue is that, when someone makes a slight typo in their tutorial's code, I always see replies like this:
Quote:
Originally Posted by Random member
Help, I get errors, Why I get errors??
Which seems to indicate they haven't learned a thing. If they had, they would've actively read the code, understand what's happening and they would've seen the error, or at least understand why they get the error.


Now I'm planning on writing a few tutorials, but I'm thinking of using pseudo-code instead of normal pre-chewed scripts.
So instead of, for example
pawn Code:
SetPlayerHealth(1337, 100);
SendClientMessage(1337, #000000, "Infinity is rockz");
It would look like this:
Quote:

Set ID 1337's health to 100, and send the player the message "Infinity is rockz".

Of course I will take care that these pieces of pseudo-code are understandable.

So, what do you guys say about this? Do or don't?
Reply
#2

Do it and see what will happen.
You will never know what will happen before doing anything.
Reply
#3

You would first have to link people to the Wikipedia article since a majority of people here seem to think that it is a language in itself. Rather old example;

Quote:
Originally Posted by Vince
View Post
Ok, let me put this out in pseudo code:

Code:
new racepos[MAX_PLAYERS];

Max player loop
    if (current player checkpoint > current idx checkpoint) && racepos player != 1
        racepos playerid --
    else if current player checkpoint < current idx checkpoint
        racepos playerid ++
    else
        get pos of the active checkpoint
        get distance of player to checkpoint
        get distance of idx to checkpoint

        if (distance player < distance idx) && racepos player != 1
            racepos player --
        else
            racepos player ++
Quote:
Originally Posted by sameer419
View Post
pseudo code ??
i m working on pawn code, can u make that in pawn code??
Reply
#4

lol'd Vince

i always try to do that.. but then i get trolls repping me "Didnt read" or learn before posting

ontopic: no its not good idea because 'noobs' wont understand
Reply
#5

Well you know the community,
what do you think would happen?

I'm not sure but I doubt it will help decreasing the amount of people that get confused with it.
Reply
#6

Honestly, people on this forum won't take the time to follow the steps given and write out the code. People just want to be able to copy and paste. What you could do is make it you don't say ".. and this is what the final code is:" Instead, only give them the pieces of code and say "you have to put this in the respective place."
Reply
#7

Honestly, huge projects should be done/structured somewhere else and not be done directly in PAWN, I personaly use a paper and I do not pseudocode it get me confused and I find it hard to translate it into PAWN later :/
Reply
#8

Visual/Code blocks will also prove to be harder for 'those' people.

No matter what you do, there'll always be someone who who will click on your tutorial to only copy-paste lines of code.
Reply
#9

Quote:
Originally Posted by iPLEOMAX
View Post
Visual/Code blocks will also prove to be harder for 'those' people.
Example please?
Reply
#10

So psuedo code is kind of an algorithm written with major things coded out?
pawn Code:
new m_var;
if(m_var != some_value)
{
      get color of vehicle
      respawn vehicle
}
If yes, then I guess do go ahead, because then you actually force the reader to code (unless he closes the tab and ******s '<your tutorial> system samp download') !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)