Javascript semicolon flamewar



  • I'll just give you the writeup as I found it, since I don't know who any of these people are:

    Githup pull request flame war continued in Hacker News comments. About automatic semicolon insertion in Javascript. Starring one of the famous experts on the language (wrote the book on writing good JS, sits on the technical committee) versus a pair of tyros at Twitter.

    All started because code like this:

    clearMenus()
    !isActive && $parent.toggleClass('open')

    may or may not need semicolons.



  • Good grief, people actually rely on Javascript's ASI for anything more than code golf? That's ridiculous.



  • Arguing against Crockford on Javascript is like arguing against Torvald on the Linux kernel. Even if you're correct (slim chance) you're not going to get your way, ever...
    (for those who don't know him, he's the one who invented JSON and JSLint and is one of the main forces behind the current ECMAscript standard body)

    If you want to hear some of his explanation on the bad/good parts of javascript, watch his Google Tech Talk. He even points at the insanely stupid "feature" called semicolon insertion.



  • Jesus Christ, Open Sores is a clusterfuck of immature stupidity. Then again, what kind of idiot is going to use code from fucking Twitter?



  • @morbiuswilters said:

    Jesus Christ, Open Sores is a clusterfuck of immature stupidity. Then again, what kind of idiot is going to use code from fucking Twitter?

    Oh, OK. I'll use Visual Studio instead of Eclipse, Windows instead of Linux, and Windows Phone instead of Android. Let me just drill a couple of superfluous holes into my skull first so that I'll fit in better with the other people using that crap.

    Seriously, I don't always follow the people with high IQs, but I do tend to follow their lead on important things like selecting an OS or electing a representative government.





  • Yeah, a language where a potentially syntax-changing element gets applied for you is a massive WTF all on its own. Arguing over whether or not to add the clarifying semicolon - yeah, that programmer's going to have lots of fun any place where code goes through compilers and the "treat warnings as errors" flag is on.



  • Gu3st, I don't watch movies about computer programming. It's just not a job that translates well to the film medium.



  • @bridget99 said:

    Gu3st, I don't watch movies about computer programming. It's just not a job that translates well to the film medium.

    The defence calls Office Space!
    Please don't tell me you've never seen this splendidly entertaining movie?

    And being a Brit, I also have to mention the excellent TV series The IT Crowd, which is more over-the-top and surreal than dead-on realistic, but still very funny IMHO. http://www.youtube.com/show/theitcrowd. (The episodes on that page may not be viewable in countries other than the UK, of course.)



  • @bridget99 said:

    Gu3st, I don't watch movies about computer programming. It's just not a job that translates well to the film medium.

    You've obviously seen the opening scenes to Firewall. I don't program my work's one anything like they do!!



  • @Cad Delworth said:

    The episodes on that page may not be viewable in countries other than the UK, of course
     

    The Elders of the Internet have decreed!


  • Trolleybus Mechanic

    @lrucker said:

    may or may not need semicolons.
     

    Solution: change Javascript to use a VB.Net syntax, so that semicolons aren't used.

    War over.



  • @bridget99 said:

    Oh, OK. I'll use Visual Studio instead of Eclipse, Windows instead of Linux, and Windows Phone instead of Android.

    Good, you'll probably be a lot happier avoiding that shit.



  • @Cad Delworth said:

    And being a Brit, I also have to mention the excellent TV series The IT Crowd, which is more over-the-top and surreal than dead-on realistic, but still very funny IMHO.

    What the shit, is the UK completely lacking in decent television? Not that American television is great but I hear so many people going on about The IT Crowd. It's crap. It's unbearably unfunny.



  • @morbiuswilters said:

    I hear so many people going on about The IT Crowd. It's crap. It's unbearably unfunny.
     

    Yeah, almost as bad as Big Bang Theory and Community.



  • @morbiuswilters said:

    What the shit, is the UK completely lacking in decent television? Not that American television is great but I hear so many people going on about The IT Crowd. It's crap. It's unbearably unfunny.

    I'm sure this flame war already played out in some other thread around here.



  • I strongly suspect that this is the situation where interpretation of humour relies upon cultural assumptions, therefore doesn't translate well.

    I never understood Seinfield, Friends or Cheers but I understand they're amongst the most successful series in the USA. Similarly many non-UK residents may not "get" Monty Python , The Goodies and Fawlty Towers.

    Many attempts to translate UK programmes to USA have also failed: Coupling, Cracker, Being Human... all of these are based strongly upon personalities and situations that people identify with in UK but may not exist in USA (and vice-versa for Friends/Cheers).


  • Discourse touched me in a no-no place

    @Cassidy said:

    I strongly suspect that this is the situation where interpretation of humour relies upon cultural assumptions, therefore doesn't translate well.
    I don't. I never found it funny either.



  • My mom (who is british) raised me on british shows so I have a good appreciation for both American and UK comedy, both are good but they are different.  I can see in the case of Seinfeld how you could not understand the humor, but come on the soup nazi how can you not laugh at that?



  • NO SOUP FOR YOU.

    but i— GET OUT.



  • @Anketam said:

    My mom (who is british) raised me on british shows so I have a good appreciation for both American and UK comedy, both are good but they are different.  I can see in the case of Seinfeld how you could not understand the humor, but come on the soup nazi how can you not laugh at that?

    I think Seinfeld is more of a cult classic these days. I still have a soup nazi inspired sig on slashdot, for example. But a lot of other us comedy I don't like: uk comedy is generally more witty rather than falling back on toilet humour. Cross-culture comedy is very hard, and can even cause offence. My (heavily pregnant) wife and I went to a comedy festival and one of the comedians told jokes about pregnant women - some might be offended at that but you got to laugh.

    I'm going to do a dhromed and mention my avatar: Elliot Goblet. How does his humour translate?



  • @Cassidy said:

    all of these are based strongly upon personalities and situations that people identify with in UK but may not exist in USA (and vice-versa for Friends/Cheers).
     

    People like the characters from Friends don't really exist in significant numbers in the US, but many people want to be like them: happy all the time, wearing designer clothes, and never having money problems despite being basically unemployed.

     People like the characters from Cheers?  Well, as far as Norm & Cliff (the "regulars"), they're all over the place.

     



  • @Anketam said:

    I can see in the case of Seinfeld how you could not understand the humor
    There was no humor there. It was just a bunch of people endlessly complaining about the choices they made. Kramer was the only character that actually had the balls to own his own life. (However I was disappointed when I saw Michael Richards in a movie and he was basically doing his Kramer character over again).

    But as has been noted, cross cultural humor is hard to do as most regions around the world have their own sense of humor.

    • English, USA, Canadian and Australian humor are all different, yet we (supposedly) share the same language.
    • My experience of Russian humor is that it is closer to Australian than English, Canadian or USA
    • Japanese humor is out there on its own
    • I once spent a 3 hour bus trip in Egypt watching what could only be described as a local version of Benny Hill
    • I've got no strong recollection of Latin American humor, but then all I have really seen are tele novellas and other shows where they have lots women dancing around in bikinis


    @Zemm said:
    My (heavily pregnant) wife and I went to a comedy festival and one of the comedians told jokes about pregnant women - some might be offended at that but you got to laugh.
    Years ago I heard a comedian telling a story about a gig he did at the Adelaide Fringe festival. He was doing a routine based on someone being taken by shark and while almost the entire house was laughing he could see that a couple in the front row weren't laughing at all. So being comedian, he stopped the show to ask hem why. Their answer was that their son had recently been taken by a shark. Not the sort of answer he was looking for. The only thing he could come up with on the spot was "Well hopefully he got taken somewhere nice".



  • @Zemm said:

    I'm going to do a dhromed and mention my avatar: Elliot Goblet. How does his humour translate?

    Forget him, how would you even start to explain Aunty Jack?????? (Although you might be able to blame it partly on the '70's)



  • The behavior of auto-inserting statement separators in JavaScript appears to have been implemented as a form of fault tolerance: for the neophytes who come to programming via HTML markup, better to interpret so that it "just works," rather than puzzle them with fatal syntax errors, right?

    JavaScript's syntax is derived from C.  C requires semicolons to terminate statements.  For the sanity of every programmer who deals with code written in multiple C-derived languages, always use semicolons.

    It's not a question of whether the language spec allows it or not.  It's a question of whether it's good practice to exploit bugs that exist in the language spec.

     

     

     



  • @Anketam said:

    My mom (who is british) raised me on british shows so I have a good appreciation for both American and UK comedy, both are good but they are different. I can see in the case of Seinfeld how you could not understand the humor, but come on the soup nazi how can you not laugh at that?

    Seinfeld, you need to watch about 5-6 episodes before it starts getting funny. Each episode has a few actual jokes, and a few have good surreal humor (poisoned envelopes, the whole plotline about making "Jerry") but the vast majority of jokes are based on watching the characters' personality. If you don't know the personality, you don't get the jokes. If you watch from beginning to end, it's fucking hilarious.

    Hell, for most of its run it was "the show about nothing". I think TV Guide called it that originally. The writers loved it so much, they made the in-universe spoof of themselves "the show about nothing", when George pitched it.



  • @blakeyrat said:

    Seinfeld, you need to watch about 5-6 episodes before it starts getting funny. Each episode has a few actual jokes, and a few have good surreal humor (poisoned envelopes, the whole plotline about making "Jerry") but the vast majority of jokes are based on watching the characters' personality. If you don't know the personality, you don't get the jokes. If you watch from beginning to end, it's fucking hilarious.

    Sorry, I beg to differ. I've watched many episodes of Seinfeld, and the more I watched it, the more I got tired of the endless repetition. I know what George is like, and how he will react. I know how Kramer will, and Elaine, etc. I like the occasional witty line, but that's not enough to hold my attention.

    I do like other sit-coms. Actually, you know what my favourite sitcoms don't have, but Seinfeld does? A laugh track. Maybe that's the thing that irritates me to the point of changing the channel. I can't think of a single program that I enjoy, that has a laugh track. Okay, Fawlty Towers, but that's it.



  • I liked Kramer and that's about it. Though his humor was always very slapstick and physical, or just way out there. I rarely found Jerry funny and Elaine was just annoying. Watching George is like watching a trainwreck that's about to happen and is just too painful. But watching Kramer's schemes always got a laugh out of me.



  • @blakeyrat said:

    @Anketam said:

    My mom (who is british) raised me on british shows so I have a good appreciation for both American and UK comedy, both are good but they are different. I can see in the case of Seinfeld how you could not understand the humor, but come on the soup nazi how can you not laugh at that?

    Seinfeld, you need to watch about 5-6 episodes before it starts getting funny. Each episode has a few actual jokes, and a few have good surreal humor (poisoned envelopes, the whole plotline about making "Jerry") but the vast majority of jokes are based on watching the characters' personality. If you don't know the personality, you don't get the jokes. If you watch from beginning to end, it's fucking hilarious.

    Hell, for most of its run it was "the show about nothing". I think TV Guide called it that originally. The writers loved it so much, they made the in-universe spoof of themselves "the show about nothing", when George pitched it.

    It's the most meta thing in the whole world. They pitch "Jerry" to NBC, produce a pilot, and would have had a successful series, had the former CEO not gone looney tunes because of Elaine.

    Then the characters that are in "Jerry" (Other than Seinfeld himself) are half-ass lookalikes of the actual characters. It's throughly self-referencial which makes it hilarious.



  • @gramie said:

    Actually, you know what my favourite sitcoms don't have, but Seinfeld does? A laugh track. Maybe that's the thing that irritates me to the point of changing the channel. I can't think of a single program that I enjoy, that has a laugh track. Okay, Fawlty Towers, but that's it.

    Canned laughter used to get on my tits. I felt that Brit sitcoms used it as an indicator, so those that didn't get the joke could still blend in, and some Croft sitcoms (Are You Being Served, Some Mothers Do Have 'Em, Dad's Army) seemed to use the same predictable loop.

    The laughter track from a live audience observing improvised stuff doesn't bother me - stand-up comedians and live comedy shows (Mock The Week, Who's Line, HIGNFY) - are all okay, but now scripted productions with a laughter track just feel false, given that most scripted comedy I now watch actually lacks it.



  • G@dhromed said:

    @morbiuswilters said:

    I hear so many people going on about The IT Crowd. It's crap. It's unbearably unfunny.
     

    Yeah, almost as bad as Big Bang Theory and Community.

     

    God, how can you mention Community and Big Bang theory in the same sentence? Big Bang Theory is awful.  At least the few episodes I watched.  Even the highlights that they show in commercials, which should be the funniest parts, are terrible.

     Community is one of the funniest and most subtle shows I've ever seen.



  • @dhromed said:

    @morbiuswilters said:

    I hear so many people going on about The IT Crowd. It's crap. It's unbearably unfunny.
     

    Yeah, almost as bad as Big Bang Theory and Community.

    Actually, it's a lot like Big Bang Theory--both are awful. I haven't seen Community so I can't comment.



  • @Cassidy said:

    I never understood Seinfield, Friends or Cheers but I understand they're amongst the most successful series in the USA. Similarly many non-UK residents may not "get" Monty Python , The Goodies and Fawlty Towers.

    Seinfeld is brilliant, as is Monty Python. Fawlty Towers is good. I don't care for Friends or Cheers. Never heard of The Goodies.



  • @Zemm said:

    But a lot of other us comedy I don't like: uk comedy is generally more witty rather than falling back on toilet humour.

    Hmm.. I would say UK comedy tends to rely more on toilet humor (including extreme sexual humor). I don't think it's a bad thing. I don't think it's more witty, but it does tend to be goofier. In other words it doesn't try so hard to be cool and seems more willing to take risks on oddball jokes that might fizzle.



  • Community is a mix of straight comedy and very subtle stuff.

     My two favorite examples of the subtle stuff are as follows.

     One of the main characters is Abed.  In one episode, he is not present for the almost the entire episode.  At the very end, he shows up and his friend says something to the effect of "Haven't seen you in a while.  What have you been up to?" to  which he replies "Nothing much."  But if you were paying close attention, or in my case heard about it and rewatched the episode, throughout the episode, in about half the scenes, he was way off in the background helping a pregnant woman deliver a baby.

    The other is that they took episodes in three different seasons for one joke.  http://tv.yahoo.com/blogs/the-set/fan-discovers-amazing-3-season-secret-beetlejuice-joke-145305317.html



  • @OzPeter said:

    There was no humor there. It was just a bunch of people endlessly complaining about the choices they made. Kramer was the only character that actually had the balls to own his own life.

    What the fuck? It's not a documentary. You're not supposed to admire the characters. It's funny because the characters are whiny and shiftless and end up in all sorts of ridiculous situations because of it. I don't watch The Office (UK or US version) and say "Oh, this boss just isn't a very pleasant man. There's nothing funny about unpleasant people."



  • @morbiuswilters said:

    @OzPeter said:
    There was no humor there. It was just a bunch of people endlessly complaining about the choices they made. Kramer was the only character that actually had the balls to own his own life.
    What the fuck? It's not a documentary. You're not supposed to admire the characters. It's funny because the characters are whiny and shiftless and end up in all sorts of ridiculous situations because of it. I don't watch The Office (UK or US version) and say "Oh, this boss just isn't a very pleasant man. There's nothing funny about unpleasant people."

    Why wife does >.<  Luckily (for her) Micheal left so she could continue to watch the show.  Hopefully Andy comes back and takes his job back...


  • @Zemm said:

    Elliot Goblet. How does his humour translate?
    Most of it translates just fine... it just isn't funny.  Did you know his name backwards is toille telbog?!



  • @Cassidy said:

    I strongly suspect that this is the situation where interpretation of humour relies upon cultural assumptions, therefore doesn't translate well.

    I never understood Seinfield, Friends or Cheers but I understand they're amongst the most successful series in the USA. Similarly many non-UK residents may not "get" Monty Python , The Goodies and Fawlty Towers.

    Many attempts to translate UK programmes to USA have also failed: Coupling, Cracker, Being Human... all of these are based strongly upon personalities and situations that people identify with in UK but may not exist in USA (and vice-versa for Friends/Cheers).

    ...and then you have The Office, which, Ricky Gervais's incessant and obnoxious reminders that he really was the guy who created it notwithstanding, is much more successful (and funnier!) in the American version.

     



  • @Mason Wheeler said:

    ...and then you have The Office, which, Ricky Gervais's incessant and obnoxious reminders that he really was the guy who created it notwithstanding, is much more successful (and funnier!) in the American version.

    When he started doing cameos in the American version I was like "Fuck you, you aren't cameo-worthy". Not that I dislike him or the UK version, it's just that the whole cameo thing reeks of desperation on his part. It's painful when a creator ham-fistedly inserts himself into the universe he created, like that Futurama episode with Matt Groening and David X. Cohen.



  • @morbiuswilters said:

    It's painful when a creator ham-fistedly inserts himself into the universe he created, like that Futurama episode with Matt Groening and David X. Cohen.
     

    Stan Lee, on the other hand, can pull it off pretty well...



  • @morbiuswilters said:

    What the fuck? It's not a documentary. You're not supposed to admire the characters. It's funny because the characters are whiny and shiftless and end up in all sorts of ridiculous situations because of it. I don't watch The Office (UK or US version) and say "Oh, this boss just isn't a very pleasant man. There's nothing funny about unpleasant people."
    For any show to be entertaining you have to care about the characters in some manner - whether that be liking/admiring or wanting to see them screw up. This is basically because pretty well every plot device has already been re-hashed in every show, so that the only new things left are the characters. I don't find endlessly whiny people interesting or amusing or worthy of some punishment. You do. Therefore I say Seinfeld is mostly crap, and you say the opposite.

    And I don't care for the Office either.



  • @Sutherlands said:

    @Zemm said:

    Elliot Goblet. How does his humour translate?
    Most of it translates just fine... it just isn't funny.  Did you know his name backwards is toille telbog?!

    I never was too impressed with Goblet either but he was big in Oz for a while. But if you want something that is almost a 5 minute Australian in-joke, and thus less translatable for foreigners there is Austen Tayshus with Australiana. This version comes with a transcript, but I think that reading it takes away from the comedy.



  • "IT Crowd" is better than "Big Bang" but that's not much of an endorsement.

    "Community" was OK at first but it became weird. A certain portion of shows will do that.

    "Seinfeld" could have been called "Costanza." George was the source of the best humor on that show: a pathetic, weasely little social climber with nothing to offer but his limitless ambition. THAT is America in a nutshell.



  • @bridget99 said:

    "IT Crowd" is better than "Big Bang"

    Agreed, every season is worse than the last.

    @bridget99 said:

    a pathetic, weasely little social climber with nothing to offer but his limitless ambition. THAT is America in a nutshell.

    I liked Better Off Ted, perhaps because of some commonalities.

    On the brit side I liked The Black Adder.

    I do like a few others but most of them not in english



  • @serguey123 said:

    @bridget99 said:
    "IT Crowd" is better than "Big Bang"
    Agreed, every season is worse than the last.@bridget99 said:
    a pathetic, weasely little social climber with nothing to offer but his limitless ambition. THAT is America in a nutshell.
    I liked Better Off Ted, perhaps because of some commonalities.

    On the brit side I liked The Black Adder.

    I do like a few others but most of them not in english

    The Black Adder was awesome.  Big Bang is different enough from IT Crowd that I would not recommend comparing them directly.  However, Big Bang beats the IT Crowd in shear number of episodes.  Take all The IT Crowd episodes and you get just 1 season of The Big Bang Theory.  That has bothered me about a number of british shows recently that they have so few episodes per season.



  • @bridget99 said:

    George was the source of the best humor on that show: a pathetic, weasely little social climber with nothing to offer but his limitless ambition. THAT is America in a nutshell.

    That's HUMANITY in a nutshell, numbnards. George Costanza is a paragon of virtue compared to the hilariously awful people that populate some of the best britcoms.



  • @Anketam said:

    The Black Adder was awesome.

    Agreed.

    @Anketam said:

    Big Bang is different enough from IT Crowd that I would not recommend comparing them directly.

    Disagree. They're both sitcoms revolving around flimsy stereotypes about nerds. All of the characters are one-dimensional props. "Oh, hey, that nerdy guy is bad with girls, LOL." "Oh hey, that nerdy IT guy is rude, LOL". They are the worst kind of unsubtle pandering; replace the characters with black people and the writers would have them saying "I gots to head to the welfare office to pick up my check for not working, but firs' I gonna finish this fine meal of fried chicken and Olde English, as well as avoiding one of the mothers of my numerous illegitimate chil'rens." And that's what they'd say in every single episode, ad infinitum. It's not even that I find it offensive, it's just that it's so predictable and derivative.

    @Anketam said:

    However, Big Bang beats the IT Crowd in shear number of episodes.  Take all The IT Crowd episodes and you get just 1 season of The Big Bang Theory.

    So Big Bang is a bigger pile of shit than IT Crowd; they're still shit. Honestly, I think that counts against Big Bang. Also, I have to seek out IT Crowd but it's likely I'll encounter Big Bang on American TV. For those reasons, I think Big Bang is slightly worse.

    @Anketam said:

    That has bothered me about a number of british shows recently that they have so few episodes per season.

    Most British shows have much shorter runs than US shows. There are times I wish it wasn't so (I wish-wish-wish there were more than 18 episodes of Black Books) but most of the time I think American shows just drag on far past their prime. Seinfeld quit in its prime. The US Office should have quit after Season 5; it's clear at the start of Season 6 they are out of ideas so they resort to shit like "Let's make Jim a co-manager" and "Let's have Michael have sex with Pam's mom for no conceivable reason". I'm still convinced that the whole "Michael falling into the koi pond" thing was the writers making a veiled reference to jumping the shark, but maybe I'm crazy..


  • ♿ (Parody)

    @morbiuswilters said:

    There are times I wish it wasn't so (I wish-wish-wish there were more than 18 episodes of Black Books) but most of the time I think American shows just drag on far past their prime. Seinfeld quit in its prime. The US Office should have quit after Season 5; it's clear at the start of Season 6 they are out of ideas so they resort to shit like "Let's make Jim a co-manager" and "Let's have Michael have sex with Pam's mom for no conceivable reason". I'm still convinced that the whole "Michael falling into the koi pond" thing was the writers making a veiled reference to jumping the shark, but maybe I'm crazy..

    Yes, most shows go on too long. I can understand why they do, of course, and I often have a hard time stopping watching shows once they're in decline, usually because I've grown to like the characters, and just want to see what happens next, even though it's not nearly as good as it used to be.

    I think that perhaps the worst show for this was Buffy the Vampire Slayer. They had to top themselves several times, coming up with worse and worse bad guys, after the last round were supposedly the End of the World.

    I've never liked Seinfeld. It has the fatal flaw, for me, that most sitcoms have. The neurotic characters and the plots that rely on stupid miscommunications or someone trying to get away with something stupid by hoping nobody notices something obvious.



  • @boomzilla said:

    I think that perhaps the worst show for this was Buffy the Vampire Slayer.

    I have not seen that one but Supernatural does the same, it should have ended seasons ago.


Log in to reply