SA-MP scripting as the best beginner programming course
#1

Hello, everyone!

I personally think SA-MP scripting is one of the best ways to dive into programming.

Here are few main features:

1. Simple language.
PAWN is a language that easy to study. Unlike modern programming languages as C++, Java, C# and some others, in PAWN there's small, but a sufficient functional. One doesn't have to explore such definitions as pointers, runnable interface, reflection.

2. PAWN is a C-family programming language.
PAWN syntax is similar to C. When studying PAWN, at the same time you're studying each other C-family language a bit: C++, Java, C#, Javascript, Scala, Perl, Objective C, PHP etc.

3. PAWN is a compiled language.
Quote:

The compiler is your best friend

They can say the compiler confines a programmer's imagination, but a programmer's imagination in searching his errors in code could be unconfined. The compiler marks your mistakes pointing lines and shows you its reasons if you do something wrong.

4. PAWN is a strongly-typed language.
So a user must describe variables its data types. Usually, programmers start from PHP, Javascript, and other weakly-typed languages. Some of them could not care about what type of data his variables are. Thereby integer-variables easily take float values, the same time string-variable now uses as an integer, but it's still a string. After PAWN a programmer will always take care about what type of data he is using.

5. Working with databases.
One of the SA-MP scripting features is the ability to work with databases as SQLite and MySQL. Scripter has a good chance to study SQL.

6. High loaded zone.
SA-MP server is constantly loaded, scripter is forced to find ways to optimize his code. Coupled with the one-stream mode, huge online, plenty of often called functions and checks, scripter realizes how fast and resource-intensive his code will work.

7. Meeting with real users.
One can make a bunch of console applications, that solves math equation well, but nothing will save them, when, instead of an integer, user type a string. Opposite applications for himself, you make scripts for different users, from just fools to bad hackers.

8. Looking after memory usage.
Quote:

What if I told you, the string doesn't exist?

PAWN store strings in arrays, which have a size matched a size of its stored string at best. 256 bytes became a meme. Nobody should fear it, the situation is easier indeed. The necessity of caring about memory becomes a well-learned habit. Despite the fact that in modern language it's not necessary to set bytes, that 640GB of ram is enough, scripter will always look up to his machine's resources.

9. Production.
Another calculator by some beginner scripter could not find any usage, in contradistinction to gamemodes, filterscripts, includes. You can make it and publish to some SA-MP forum, where it will be found by users, so someone could use your script, rate it, give you some advice for future developments.

10. Future horizons.
With opening SA-MP server comes the need to open its site, create applications, work with FTP, hostings, other programming languages, by then scripter will have good programming basics and development experience.

Thanks for reading!
Reply
#2

Biggest disadvantage: If you try to 'learn' by editing (or even looking at) existing work here, you'll be picking up a lot of bad habits.

I also don't think you can count SQL as an advantage to Pawn. It's just enabled through a plugin, something which is possible in just about every language you'll run in to.
Reply
#3

I'm more in favor of object-oriented languages right now. Pawn now feels very rigid and static and everything is predefined. I've grown accustomed to using lists of objects, which Pawn simply does not have.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)