4 ms·
This is really scary. Hidden features?? Was this posted to show just how much misinformation and dumbing down there is at stackoverflow? As if we need more mi
by axod 18y ago
This is really scary. Hidden features??
Was this posted to show just how much misinformation and dumbing down there is at stackoverflow?
As if we need more misinformation about javascript on the net.
- jrockway 18y agoYou know, it's kind of sad. Before reading the article, I was going to post a reply to your comment like "but omg, javascript has functions that are values!!1". Then I read the article, and found that that's the first "hidden feature". I guess "hidden feature" means "something that's not in PHP". I also like how people use terms like "null coalescing operator" when everyone else calls it "short circuiting". They are so smart!!11!
- jaf656s 18y agoshort circuiting is only half of why this example works. The other half is that boolean operators in javascript don't implicitly cast the result as a boolean type.
- deleted 18y ago[deleted]
- anthonyb 18y agoThe "Hidden features of PHP" section is pretty damn funny actually, but not in a good way. I can summarise it for you if you're lazy: "ZOMG - PHP has arrays! Arrays are like, super cool!"
- johns 18y agoYou know what's great about StackOverflow though...you can go fix it if you want. Go post a better answer, get upvoted, misinformation is minimized.
- axod 18y agoYou assume the people there would be able to recognize a "better answer". Just saying...
- johns 18y agoThere are A LOT of really smart people there. They're outnumbered by the idiots, but they're there. More importantly though, a well thought out answer with explanations and references can be very convincing to even the biggest idiot.
- DougBTX 18y ago> They're outnumbered by the idiots So if your aim is to get upvoted, that's your target market. Better to sound right than to be right in that environment.
- omouse 18y agoWhat's sad is that the Mozilla wiki has all the info on the features of JavaScript from version 1.5 to 1.8 (which Rhino doesn't support but Firefox3 does? something like that). Oh and there's also the possibility of, you know, reading the language spec. /me sighs
- axod 18y agoI hang out a bit in #javascript on freenode and it's always surprising how many people come in with a "guesswork" attitude to programming. They just think up how they expect something should work, or what they think something should be called, and try it. Then come in and ask why it's not working. They often exchange misinformation with each other without either party realizing it's false. Then if you suggest to them they read up on the API for what they're trying to do, they won't... they'll just keep trying random things, trying to get someone to feed them the answer. I think javascript is particularly bad for this, even though there are some really good books and references out there now.
- stcredzero 18y agoIs this the usual way of figuring something out in other contexts? It sounds like the "trying to get my WiFi to work" crowd is doing Javascript. Those folks wouldn't know what to do with a language spec, nor have ever entertained the concept of a universe that works like that. ("You mean there's something that explains precisely what everything in Javascript does?")
- iigs 18y agoI think that a lot of people from other walks of life somehow end up working on HTML projects learn that in order to make their mouseover menus work they need something called JavaScript, so they search for cut and paste something that someone says is what they want and then start hunting for someone to get them over the hump to make it work. This is not meant to disparage people like web designers who come at things from an artistic angle, but a lot of people who write Javascript are doing it in a tertiary role -- in support of HTML in support of producing a visual design that they envision. That these people don't have a solid foundation in programming shouldn't be alarming or disconcerting. Ten years ago Javascript had a reputation of being a crap/toy language, largely for this reason. It really wasn't until GMail, IMO, when people started saying "Look, a JS app that doesn't suck!" and things kind of went forward from there.
- dionidium 18y agoTo be fair, what is it you think the phrase "hidden feature" could possibly mean other than "frequently misunderstood" or "available, but often unused by beginners"? Surely you weren't expecting "hidden" features in any literal sense?
- DougBTX 18y ago> Surely you weren't expecting "hidden" features in any literal sense? Personally, I expected something more hidden than core features of the language.
- sfk 18y agoTo paraphrase Greenspun: Any expert website is an ad hoc, ugly, slow implementation of Usenet featuring inferior comments.
- jrockway 18y agoFWIW, Usenet is a collection of posts answering the same questions again and again and again and again. Maybe tagging will help people find existing answers more quickly. The good thing about Usenet is the barrier to entry. Stack Overflow has already shown that it's wayyyy too easy to get and account and start incorrectly answering questions.