Re:W3schools.dev Redirects to Mozilla Developer Network
by TheRealPomax on Tuesday March 05, 2019 @12:42AM
(#19308369)
No, the console API is a handy thing to learn. Alert is not handy, it's an ancient function that (a) blocks your page thread, (b) can't show anything except `.valueOf`, (c) can't be selectively ignored, (d) it's an obsolete API from way back when javascript 1.5 was hot stuff.
If you're teaching, teach people to use console.log because that's where they're going to get REAL insight into what the code's doing (console.table you say? amazing!) and never look back. And if you're learning, demand people teach you modern practices. Not ridiculous things from 20 years ago.
Re:W3schools.dev Redirects to Mozilla Developer Network
by jimsmart on Friday March 01, 2019 @12:39PM
(#19283269)
> proper context.
That's not 'tests' — tests would be something like Mocha, or Jasmine — what you're actually talking about here is one of the many forms of ad hoc in-browser debugging.
Re:W3schools.dev Redirects to Mozilla Developer Network
by yorwba on Friday March 01, 2019 @01:02PM
(#19283554)
Automatic tests are not the only way to test software, nor are they sufficient. Whether some software can actually be used is not something that's completely formalizable and so you can't test it automatically. You always need a human in the loop in the end, and alert is a legitimate tool to effortlessly display some additional information on internal state during an interactive user test.
You just have to give proper context.