We see a lot of examples submitted by users but rarely do we see threads about good coding practice. Post below if you have an example which exhibits the "dos and don'ts" of coding in AutoIt.
Why using Dim over Local/Global is not always a good option:
#include <MsgBoxConstants.au3>
Dim $vVariableThatIsGlobal = "This is a variable that has ""Program Scope"" aka Global."
MsgBox($MB_SYSTEMMODAL, "", "An example of why Dim can cause more problems than solve
DRY and KISS, fail fast, SoC and single responsibility... Most of those are common sense and apply not just to programming. This on the other hand is a bit like the bible. You aren't expected to always follow it literally, stoning is generally frowned upon by modern society.
Single entry and exit (SESE). Usually overlooked with good reason but can be important, a GUI loop that looks like this is not good:
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Exit
En