Obviously, the second code block is confusing. If we break it down by documenting, it looks like this:
/**
* This is legacy code, it should be removed in Version 0.3.1
*/import{Action,FormElement}from'@internal-package/ui-workflow/tools/Actionables/Elements';/**
* This class was used to enhance the button actions, we wanted nested button actions, now these are not required
*/exportdefaultclassUxEnhancementActionextendsAction{/** This is a form element **/private_v:FormElement=newFormElement(this);/** Set the node, build the node's DOM tree (n.build), write it by passing in the FormElement's write function, and inherit the properties (props: true), then set the success value of the FormElement's write value (wv). REFACTOR NOTE: This should be renamed for clarity if we need to keep this method alive. - DEVNAME **/publicset(n:Action.Node):void{this._set(n.build()).write(this._v.__setter.write,{props:true,val:!this._v.__getter._wv});}}
My attitude: If your code is self explanatory, you don't need long documentation. If it's confusing, write some longer docs. but, don't write no documentation, always document even if it's minimal
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I've always done development like so, take this inherited code:
This is pretty self explanatory, but then take this example:
Obviously, the second code block is confusing. If we break it down by documenting, it looks like this:
My attitude: If your code is self explanatory, you don't need long documentation. If it's confusing, write some longer docs. but, don't write no documentation, always document even if it's minimal