Timeline for Should I use modules here? Could someone explain objects?
Current License: CC BY-SA 3.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 17, 2014 at 14:29 | vote | accept | Starkers | ||
Mar 29, 2014 at 15:56 | comment | added | megawac | @Starkers what you decide to expose is your API | |
Mar 21, 2014 at 20:55 | comment | added | megawac | What you want other modules/programmers to be allowed to access from your code | |
Mar 21, 2014 at 20:54 | comment | added | Starkers |
Cool...I'll admit I don't really know what you mean by exposed ?
|
|
Mar 21, 2014 at 20:54 | comment | added | megawac |
Variable names should be descriptive.. I don't know what they mean but I'm assuming id probably call o config or something and a options
|
|
Mar 21, 2014 at 20:53 | comment | added | megawac | Global variables are poor practice for various readability, maintainability, performance, etc. see this SO post. As far as the last point is concerned theres plenty of resources I can point you to if the linked one is insufficent (its my personal favourite) but I'm not going to write your code as I don't know whats supposed to be exposed | |
Mar 21, 2014 at 20:13 | comment | added | Starkers |
Also, could you emphasize a lot more on your last point? An example using my code would be of great help :) And globals are just variables declared at the global scope? So what is the benefit of using var ? Stop strange bugs by not letting them get inside functions?
|
|
Mar 21, 2014 at 19:57 | comment | added | Starkers |
Thanks, are the only bad variable names o and a ? Is this because they don't describe what they contain?
|
|
Mar 21, 2014 at 17:50 | history | edited | megawac | CC BY-SA 3.0 |
added 449 characters in body
|
Mar 21, 2014 at 17:44 | history | answered | megawac | CC BY-SA 3.0 |