1       © 2005  Nokia 	V1-Filename.ppt / yyyy-mm-dd / Initials<br /> Why do we need coding standards?<br />
2       © 2005  Nokia 	V1-Filename.ppt / yyyy-mm-dd / Initials<br /> Broken windows theory.<br />“One broken window, left ...
3       © 2005  Nokia 	V1-Filename.ppt / yyyy-mm-dd / Initials<br /> Examples of broken windows in javascript :<br />Missi...
4       © 2005  Nokia 	V1-Filename.ppt / yyyy-mm-dd / Initials<br /> How to test before you check-in?<br />Run “mvn valida...
Upcoming SlideShare
Loading in …5
×

Js coding standards

393 views
243 views

Published on

why JavaScript coding standards are important to us.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
393
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Js coding standards

  1. 1. 1 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials<br /> Why do we need coding standards?<br />
  2. 2. 2 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials<br /> Broken windows theory.<br />“One broken window, left unrepaired for any substantial length of time, instills in the inhabitants of the building a sense of abandonment—a sense that the powers that be don’t care about the building. So another window gets broken. People start littering. Graffiti appears. Serious structural damage begins. In a relatively short space of time, the building becomes damaged beyond the owner’s desire to fix it, and the sense of abandonment becomes reality.”<br />
  3. 3. 3 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials<br /> Examples of broken windows in javascript :<br />Missing semi-colons.<br />Missing commas.<br />Undefined variables<br />Console & alert debug statements<br />Explicit equality checks<br />As a matter of priority we need to make sure these basic errors are not checked in to the codebase.<br />
  4. 4. 4 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials<br /> How to test before you check-in?<br />Run “mvn validate” at the command line<br /> Play with the JSLintconfig.<br /><ul><li>/static-resources/jslint.xml</li></ul>Let’s clean house and then organically adjust our coding standards as needed.<br />

×