The BEST Naming Strategy for Any Programming Language

Readily Logo
Example of Readily Features

Naming Conventions != Naming Strategy

High-Level Overview

Prefixes, Why?

Prefix Table
[1] The commands object most closely resembles a stack. A command is pushed to the object to be at the top. However, when undoing, the top command is just popped and discarded. The undone commands are kept until a redo is executed or the user applied a new command to overwrite the popped commands. The popped commands could be stored in another stack.

Example Flow

/**
* The following chain will increment the this.state.current
* value to indicate that the next sentence should be
* highlighted.
*/
userMoveNextSentence() // Calls the command function to
// record the action
- commandMoveNext() // Calls the execute to apply state change
= executeMove(commandProps) // Causes the re-render
- (state-change re-render)
- componentDidUpdate() // Calls the do functions to
// remove the previous
// highlight and add the next one
- doRemoveHighlight(prevN), doAddHighlight(nextN)

Conclusion

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store