Most of us look at other people's scripts and think, "I would've done it like this…".
For me, "this" usually means "with more tables and loops". Don't get me wrong, you shouldn't shoe-horn in coding structures that you don't need, but most of the time a redundantly lengthy script will be that way because it's either not using loops correctly, or because it's not using tables at all.
So I guess my advice is to get familiar with for/while/repeat, and experiment with tables (nested ones in particular). Once you've got these concepts down pat you'll generally be able to write much more complex bits of code within much smaller spaces.
Creating a loop out of functions is to be avoided. If you need to loop, use one of the keywords provided specifically for the task.
Basically, any piece of code you need to execute more than once should be a function.
Er, rather, any bit of code you want to run more than once should go into a
loop; any chunk of code you want to run from more than one
place should go in a function.
Some coders like to go overboard with functions. You end up having to read their scripts bottom-to-top, because every other line they're calling a new one and so you've got to constantly scroll the page around to keep track of where the execution order's going.
And these all tend to be one-shot functions, too - called from only one place. One-shots are indeed justified if they contain a great tract of code (eg - if you have a menu, then the code for the menu itself will be a dead nuisance to read if you don't bundle its options off into functions), but their numbers should be kept to the barest minimum.
I often get the impression that people hear the line "good code doesn't need comments" and decide to cheat, putting in a new function name every time they should really just be putting in a comment. Yes, a function's name
should describe what that function does, but that in itself is not an excuse to write one. If you feel you need a comment, then write a comment.
The code itself should also be thought of as somewhat akin to English. That means you should be using proper formatting - indentation is a given, but don't be shy to put in the occasional empty line here and there to break things up into "paragraphs". It makes it much easier for the human eye to hunt down specific sections.