Open tdd opened 9 years ago
I'm really not a fan of strict-mode myself, I prefer leaning on jshint to pick up my garbage .. the most compelling part of strict mode now is its interaction with es6 features so I may come around.
I'm also weary of adding extra overhead to the learning here, it's just another thing to explain, adding more text and distracting people from the main text.
I get your drift. I'm thinking, perhaps a dedicated workshop then :smile: There are a number of great safeguards in Strict Mode that JSHint won't pick up, which is why I rely on both. It's kinda belt & suspenders :wink:
I wonder whether this could be part of the javascripting workshopper? Perhaps it could go towards the end as a separate exercise, or multiple exercises focused on linting, checking and best practices.
I wondered about this, but because strict mode shouldn't be global client-wide, and javascripting
is not Node-specific, hence not necessarily in-module, I'm a bit wary of adding it there, plus it's beefy already (and it's adventure
-based, which I dislike :wink:).
A separate workshop has the opportunity to put many new exercises in (we could mix strict mode and linters, probably JSHint, maybe an intro to ESLint and customized plugins as well; stuff like jscs and generally check-build could be cool, too), and also has the benefit of "freshness" on it, attracting people who did javascripting
already: it's more attractive if it's entirely new than if it's an update to something one already went through, I'd guess.
Hey guys,
At NodeSchool Paris 1 yesterday, I got a couple mentors suggesting it'd be nice to have this workshop get people into the good habit of systematically using module-wide strict mode. So, starting all modules (ie exercise programs) with a
"use strict";
.As a strict-mode super-fan myself, and because this is Node and remains module-scoped, thereby not breaking third-party code, this rings true to me. I figure an early exercise demonstrating strict mode and linking to good online explanations (e.g. MDN's page on it), then perhaps an extra check on exercise texts in later exercises, would be sweet.
Does that sound like a good idea? @rvagg, @martinheidegger?
If that appeals to you, I could create a branch and PR for this so we could hash the details out.