Skip to content

Instantly share code, notes, and snippets.

@yckart
Last active August 29, 2015 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yckart/33df24c2dfd5dc5d0813 to your computer and use it in GitHub Desktop.
Save yckart/33df24c2dfd5dc5d0813 to your computer and use it in GitHub Desktop.
Fast property naming, by hand.

Try to rename these properties, right in this kind of fashion:

this._x = this.x;  =>  this.x = this._x;
this._y = this.y;  =>  this.y = this._y;
this._w = this.w;  =>  this.w = this._w;
this._h = this.h;  =>  this.h = this._h;

Read and sort horizontal, as usually.

 this._x = this.x;
 this._y = this.y;
 this._w = this.w;
 this._h = this.h;

Read and sort vertical, as a chinese.

              
this._x = this.x;
this._y = this.y;
this._w = this.w;
this._h = this.h;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment