> things like variables and such do not quite work in the way you would expect from a programmers point of view.
I'm a novice at OpenSCAD still despite doing a bunch of small projects with it recently. Can you give an example of this happening? Most of the confusing stuff so far has been geometry breaking my brain and not some kind of scope issue.