What are "Best Practices"? In general terms it refers to an approach to quality and efficiency based on rules developed through experience. In essence it means developing good habits that will make your work better and more efficient in the long run. In the context of software development it refers to using techniques in a disciplined way that will make your development process more efficient, and ensure that your project is easier to modify in the future, both for yourself and others. (It also makes it easier for your teacher to evaluate!)
if-then-else
control structure to avoid ambiguity. Each if
structure should have the form:
if condition then
statements
else -- (if you need an else clause)
statements
end if
put the number of lines in field "questions" into numberOfQuestions
if numberOfQuestions < 10 then
put "You only have" && numberOfQuestions && "left to answer!" into field "progress"
end if
is much easier to read than this
put the number of lines in field "q1" into nqs
if nqs < 10 then
put "You only have" && nqs && "left to answer!" into field "prg"
end if
The small amount of extra time it takes to type longer but meaningful names will be more than offset by the time you will save later in debugging and commenting your handlers.