News for hackers. Stuff that matters.
Re:JavaScript Programming Patterns by haydenchambers on Tuesday October 06, 2009 @08:28AM (#863967)
nice... except for the semicolons... i guess you're not minifying your code afterwards?
Re:JavaScript Programming Patterns by thegrossman on Tuesday October 06, 2009 @08:35AM (#863983)
I tend to use minified libraries (JQuery, effects libraries, etc), but unminified application-specific code. Been burned too many times having to root out some obscure error on the live server, and not being able to do so because of minification.

However, I've never had a problem in the cases where I have indeed minified unsemicoloned code. Has anyone else, or is the problem just theoretical? If others have encountered an actual problem, I might have to rethink this strategy for larger codebases.

Re:JavaScript Programming Patterns by sprsquish on Tuesday October 06, 2009 @10:07AM (#864112)
I've been burned several times by missing semicolons when minifying my code. Now I make sure they're always there. I'm also running everything through JSLint.
Re:JavaScript Programming Patterns by ejs on Tuesday October 06, 2009 @05:52PM (#865392)
I think JSLint can be a big help, especially with semicolons so I made a quick jQuery plugin to run things through it on page load. So I know exactly when something may be wrong.

http://github.com/ejschmitt/AutoLint

Re:JavaScript Programming Patterns by sprsquish on Wednesday October 07, 2009 @09:48AM (#866683)
I'm using the Javascript Tools bundle for TextMate. It runs JSLint every time I save a javascript file.

http://github.com/subtleGradient/javascript-tools.tmbundle