Advertisement
Guest User

Untitled

a guest
Aug 12th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.56 KB | None | 0 0
  1. ################# CONVENTIONS ##############################
  2. # always use a correct structured parent order, first define names/elements and finally actions or values, example: city_car_wheel_pressure
  3. ## Variables:
  4. # CAPITALIZED_VARS environment/global variables
  5. # is_* for booleans
  6. # flag_* for mark dynamic states
  7. # ignore_* ignore methods of work
  8. # force_* force things
  9. # mode_* generic modes of work (verbose, debug, update)
  10. # edit_* interactive modes
  11. # clean_* to clean things while working
  12. # *_ suffix for all the local variables
  13. # *_array for array variables
  14. # *_list for a list of data
  15. # *_CONST for constant (fixed) variables
  16. # *_found for "found" marks variables
  17. # *_snap for snapshoted/freezed states or values
  18. # *_reg for registering variables (logs)
  19. # *_n for vars representing numbers
  20. # *_No same, for the full number
  21. # *_cursor for "looping" type variables (uni-dimensional)
  22. # i,j,k.._* for iterator variables (multi-dimensional)
  23. # plural names for a collection of objects
  24. # large variables for long-scope (usage), small names ones for low scope
  25. # avoid negative values for a easier read: if ! [[ ! -z is_Not_ignored ]]...
  26. # smallest name possible but important to use a unique meaning
  27. # short time of use as possible for every variable
  28. ## Functions:
  29. # _* everything which purpose is to compute or evaluate, that return a result
  30. # __* very-temporal functions for help useful the development of the application, like __step_checkme
  31. # is_* run a unique test/evaluation in boolean return (FIXME: change verify_ one's to this one)
  32. # do_* for actions, should return result of the action
  33. # check_* which purpose is to process one or more evaluations of data
  34. # reg_* the ones that does register things (logs, debug, statistics, etc)
  35. # finish_* terminate processes, executions, forks or tasks
  36. # compute_* compute something, find, search, etc...
  37. # show_* functions that are meant to show something
  38. # build_* build or generate big things
  39. # run_* launch something, if requires check of variables or computations of data first
  40. # initalize_* initialize things, variables, flags, constants, etc
  41. # *_update update actions
  42. # *_manage working / tools
  43. # *_new creating new elements
  44. # *_get get values
  45. # *_set set values
  46. # *_put actions of sending
  47. # *_find look up things
  48. # *_begin first events
  49. # *_end last events
  50. # *_clean make clean
  51. # *_ui user-interfaces (interactive)
  52. # complement names reduce complexity by symmetry: get/set, add/remove, create/destroy, start/stop, insert/delete, increment/decrement, old/new, begin/end, first/last, up/down, min/max, next/previous, open/close, show/hide, suspend/resume, etc.
  53. #############################################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement