I am referring to the note from Richard and to our discussion about Contribution From The Community - expanding the developer base to "hundreds and thousands of users" -- even if only 10 will remain?.
Richard wrote: > At the bottom of the "Contributing" page for the LC code base there are > links to C++ style guides: > https://github.com/livecode/livecode/blob/develop/CONTRIBUTING.md These are just a few more links found with a quick search. http://www.fourthworld.com/embassy/articles/scriptstyle.html#Naming http://forums.livecode.com/viewtopic.php?f=7&t=22946 http://lessons.livecode.com/m/4603/l/284467-variables-in-livecode http://forums.livecode.com/viewtopic.php?f=7&t=5265 http://stackoverflow.com/questions/16746794/what-are-some-best-practices-for-function-naming-in-livecode-runrev http://use-livecode.runrev.narkive.com/ZPvn2z2N/object-naming-conventions http://use-livecode.runrev.narkive.com/8REAd9JD/any-convention-on-naming-conventions I kind of find it very important for joint work and contributions. Maybe there should be a page from LiveCode offering at least a semi-official Community Standards Guide (or whatever it would be called) for LiveCode Script. Or will we all switch to LCB and slowly forget about LCS? (I am not sure here.))) For local variables, I also do not like long expressions for simple counters which are created "on the fly". The most widely adopted standard is using i, j, k, l ... (not x and not tCount) -- but otherwise, local variables in LCS start with "t" in LCS as tSomething. But something should be recommended for all others to follow, and not just say "do as you like" -- if there is any joint community effort expected. Yes, I am using pSomething for parameters even though there could be arguments against it. But I find them quickly in my script and know what they mean. And when I put something into the messages box, I ALWAYS type "put ... into msg" instead of simply "put ..." because then I can find such instances with the search and disable or enable such instructions. There are too many "puts" to search for otherwise. Little things that make life easier. But more important, an adopted COMMUNITY standard should be widely available and prominently placed to allow new users and everyone to access it at any time - maybe even as a separate section in the dictionary? I suggest a section discussing the STANDARD way of naming, writing code, naming functions, naming keywords, ways of commenting, what to avoid, what to care for, warning from pit holes, how to publish to the community, how to open new projects to the community, best way of debugging, best way of implementing error detection in general, best way of avoiding the script editor to open when users are using our app, single/multi user approaches with a rights management, best way implementing a database management system with remote databases depending on security issues and number of concurrent users considerations, how to implement design concepts (such as Googles material design), etc. And it could also be argued that data-driven applications use a lot of databases, and the naming conventions for such databases should be maintained, for example not to use the "_" underscore as a first char for field names, or not to use upperLower (camel case) naming when the database distinguishes between upper and lower characters, because easily, simple typing mistakes can create hours of searching the problem. The best STANDARD here is to look for the LOWEST COMMON DENOMINATOR when interfacing with other languages and systems. And we will interface sooner or later. The document should also talk about best practice in general, and for specific cases. Let us not reinvent the wheel when others before us already have found the optimal solution for a given problem. Yes, things can be done in different ways, but then it would be up to the community to test and do benchmarking and detect the better and decide for the best (rating with stars?). There could be a competition to beat the benchmarks and a gold medal for the best contribution. What really means "quality" code here? Who can guide me, others, everyone? Again, how can we (could I) contribute making this a reality? Who can answer?) Roland _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode