Critique my code!
View Single Post
08-21-19, 07:41 AM
A Murloc Raider
Join Date: Apr 2009
Originally Posted by
I am new to lua and coding in general so any feedback on these 2 small addons is appreciated.
Context: Hides minimap buttons until mouseover.
Context: Hides the enitre micro menu until mouseover.
You have variables named things like "DHMB" and "DHMM" which aren't clear until you read the code and see they're a timer table way down near the bottom. Same with "Ignore" in the Micro Button one. Ignore WHAT? I shouldn't have to find where the variable is used in order to know what its purpose is.
So, come up with "better", clearer names for them. It'll probably be hard, because the two hardest things in software development are regular expressions, naming things, and off-by-one errors.
Also, I believe convention for local variables/functions and function params is camelCase. Not that that point matters much, as long as you're consistent in which casing you use.
View Public Profile
Send a private message to fusionpit
Find More Posts by fusionpit