News for hackers. Stuff that matters.
Re:Pickadate.js by armandososa on Tuesday November 20, 2012 @04:30PM (#4811442)
https://github.com/amsul/pickadate.js/blob/gh-pages/pickadat... the code is a giant var statement. I don't know why, but somehow that bothers me.
Re:Pickadate.js by jontro on Tuesday November 20, 2012 @04:54PM (#4811562)
The lack of semicolons and the use of jshint bothers me.
Re:Pickadate.js by tinco on Tuesday November 20, 2012 @05:22PM (#4811675)
The fact that the code is very neat and is well documented bothers me.

Also the fact that javascript is a lot more readable when you put a blank line between every two lines bothers me (a lot!).

And that it works perfectly and looks great, man that bothers me.

Re:Pickadate.js by devinus on Tuesday November 20, 2012 @08:18PM (#4812264)

    // If datePassed is true
    else if ( datePassed === true ) {
Yes, very well documented. >.>
Re:Pickadate.js by thezilch on Tuesday November 20, 2012 @09:51PM (#4812530)
Indeed. In fact, I'd posture that the comments, after the first, are wrong; the lines' intents are to _set_!

    // Set the element as readonly
    element.readOnly = true

    // Get the date today
    DATE_TODAY = P.getDateToday()

    // Get the date to select
    DATE_SELECTED = P.getDateSelected()

    // Get the month to focus
    MONTH_FOCUSED = P.getMonthFocused()

    // Get the date ranges
    DATE_MIN = P.getDateRange( SETTINGS.date_min )
    DATE_MAX = P.getDateRange( SETTINGS.date_max, 1 )
Re:Pickadate.js by Stratoscope on Wednesday November 21, 2012 @01:50AM (#4813161)

  // Return the calendarObject
  return calendarObject
It's like this all the way through the code!
Re:Pickadate.js by insin on Tuesday November 20, 2012 @08:33PM (#4812309)
It doesn't lack semicolons, it's only using them where necessary.
Re:Pickadate.js by kurrent on Tuesday November 20, 2012 @05:46PM (#4811788)
looks like a single var pattern inside an immediately invoked function expression to me. works well and great for readability
Re:Pickadate.js by kevincennis on Tuesday November 20, 2012 @09:32PM (#4812478)
Thank you for not calling it a "self-executing anonymous function".
Re:Pickadate.js by jackmoore on Wednesday November 21, 2012 @01:05AM (#4813056)
I'm a proponent of simply calling them 'immediate functions'.
Re:Pickadate.js by rymith on Tuesday November 20, 2012 @06:25PM (#4811927)
Yea, I'm not a fan of this pattern, it's a pain to step through with a debugger.
Re:Pickadate.js by city41 on Tuesday November 20, 2012 @08:20PM (#4812271)
Sometimes I feel like the JS community is more concerned with "style" than practicality. I always do one variable per var, so much more readable and much easier to debug.