3 ms·
These techniques seem to help code cleanliness in the small without attacking the root issue. Names and error handling help, but modularization requires more ca
by shoover 10y ago
These techniques seem to help code cleanliness in the small without attacking the root issue. Names and error handling help, but modularization requires more care than is demonstrated. The new module example separates the boilerplate, yes, but it also hides document selectors that assume page structure. So it's not actually modular. It's not reusable and it's brittle for the one page it was written for (if you change the markup and don't remember to change the module, the page breaks). It needs a way to pass in the elements queried in callbacks.