2 ms·
"And what's your bad first project for javascript?" Since I'm trying to target not hypothetically bad things, but things I've specifically seen numerous people
by jerf 8y ago
"And what's your bad first project for javascript?"
Since I'm trying to target not hypothetically bad things, but things I've specifically seen numerous people try, I don't have an answer because I'm not involved enough in that community.
Ten years ago I would have said "anything involving a massive, browser-freezing computation", where "why did this O(n^3) code freeze the browser?" being very common, but I'm not sure if that's current. I'd suspect a newbie armed with a fresh tutorial is more likely to overuse promises nowadays rather than underuse them (i.e., very similar to the Go example I gave; yes, if you're doing a huge computation you may want to break it up but you do not want to literally yield a promise for every integer addition). But those with experience in the community may be able to speak to that.
Twenty years ago it would have been trying to do too much purely in the client side. That's definitely out of date.
(Single Page Apps kinda have an interesting history. They're difficult, and by modern standards, impossible in 1999, and today merely one established option in an array of options, but I wouldn't say it was any one browser advance that changed it... it was a long series of incremental advances. I remember trying to take some relatively intelligent for the time client code for IE4, which at least in theory had a dynamic HTML engine much like today's browsers (albeit one that crashed very, very, very frequently) and make it work in Netscape 4's "layers". Yeowch.)
- nicoburns 8y agoThe really big enabling feature was XmlHttpRequest (released with IE 5), which allowed client side JavaScript to make HTTP requests for the first time. And then, as you say the improvements in performance, reliability and consistency of the APIs between browsers made a big difference.
- jerf 8y agoI agree that was the biggest individual piece, but even XmlHttpRequest had to grow up over time. After all... just look at the name... it was not initially a generic "run a web request without a page refresh" object. :)