WoWInterface - View Single Post - Critique my code!
View Single Post
08-21-19, 07:41 AM   #2
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 6
Originally Posted by ChandlerJoseph View Post
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.
  Reply With Quote