wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Debugging and code quality Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Debugging and code quality" Watch "Debugging and code quality" New topic
Author

Debugging and code quality

Don Schaefer
Greenhorn

Joined: Jan 22, 2002
Posts: 16
Looking (briefly) at the TOC for the book it is not clear if there is a sections on best practices, debugging, code organiztion etc. Lately I have been using JSLint for improving code and would like to know what else people use.

Thanks!
Christophe Porteneuve
Author
Ranch Hand

Joined: Jan 28, 2008
Posts: 43
Hey Don,

The book is concerned with code quality insofar as it attempts to provide a best-practice approach for every task it tackles, and highlights related decisions in the explanation page.

However, as the book is task-oriented, it doesn't have a dedicated part about general principles. You'll have to look at other JS resources for that; I'm a fan of EloquentJavascript.net. A lot of people abide by Douglas Crockford's every principle, as outlined in his "JavaScript: the Good Parts" talks and book.

JSLint is certainly a good tool to use (particularly bound to Command+S in TextMate ;-)) as it promotes good habits, although some of them are not about code design or code quality per se, but more about making sure your code minifies well :-)

In general, the quality principles for JS are much the same as for other languages: clarity (e.g. meaningful identifiers, pertinent use of comments…), conciseness (which is not just brevity, but brevity without losing readability; 5 readable lines running adequately fast are better than half a line running at lightspeed but being unfathomable), modularity, etc.


Christophe Porteneuve aka TDD
"They did not know it was impossible, so they did it." --Mark Twain
Pragmatic Guide to JavaScript: http://books.pragprog.com/titles/pg_js/
Prototype and script.aculo.us: http://books.pragprog.com/titles/cppsu/
Don Schaefer
Greenhorn

Joined: Jan 22, 2002
Posts: 16
Thanks for your response! "JavaScript: the Good Parts" is a book that I use for my work and think it is a fine book. Its discussion on modules is a good one when consider good practices. Likewise I use JSLint from within Textmate!

Another source I follow is the google group - JSMentors.

Thanks,
Don.

Christophe Porteneuve
Author
Ranch Hand

Joined: Jan 28, 2008
Posts: 43
JSMentors is pretty good, and the intent and guidelines for it are commendable. Good resource!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Debugging and code quality
 
Similar Threads
J2ee debug
Spring Annotation
Is GWT build of Custom Tags?
Question about debugging .class file
what do the parameters mean for multipartrequest?