Slashdot Mirror


Should JavaScript Get More Respect?

An anonymous reader points out an article in IBM's Crossing Borders series about the language features of JavaScript, surely the Rodney Dangerfield of scripting languages. But with increasing use in such technologies as Ajax, Apache Cocoon, ActionScript, and Rhino, some industry leaders are taking a fresh look at the language. From the article: "Nearly every Web developer has cursed JavaScript at one time or another. Until recently, many developers had all but written off JavaScript as a necessary evil at best or a toy at worst... But JavaScript is becoming increasingly important, and it remains the most broadly available scripting language for Web development."

20 of 439 comments (clear)

  1. Re:Dense != Good by MichaelSmith · · Score: 4, Funny
    The author seems to equate dense with good, not an association I make

    By that standard APL would be hard to beat.

  2. Re:JS by CmdrGravy · · Score: 2, Funny

    25,000 lines of Javascript ? What could you possibly be doing which requires that level of Javascript interaction ?????

  3. Re:Dense != Good by D-Cypell · · Score: 5, Funny

    The author seems to equate dense with good

    The irony of this is so elegantly compact I am concern a singularity may form around the vacinity of this article.

  4. Re:JS by ignavus · · Score: 4, Funny

    "25,000 lines of Javascript ? What could you possibly be doing which requires that level of Javascript interaction ?????"

    document.write('25,000 bottles of beer on the wall, 25,000 bottles of beer. Take one down and pass it around - 24,999 bottles of beer on the wall');
    document.write('24,999 bottles of beer on the wall, 24,999 bottles of beer. Take one down and pass it around - 24,998 bottles of beer on the wall');
    document.write('24,998 bottles of beer on the wall, 24,998 bottles of beer. Take one down and pass it around - 24,997 bottles of beer on the wall');

    etc ...

    --
    I am anarch of all I survey.
  5. 25000 lines: by hummassa · · Score: 4, Funny

    Any serious Ajax application.

    --
    It's better to be the foot on the boot than the face on the pavement. ~~ tkx Kadin2048
  6. Overlord by Dude163299 · · Score: 2, Funny

    I for one Hate our new Javascript writing overlords.

    And for the record im suppose to be writing various Javascript programs at this moment.

  7. Re:JS by mikek3332002 · · Score: 4, Funny
    document.write('25,000 bottles of beer on the wall, 25,000 bottles of beer. Take one down and pass it around - 24,999 bottles of beer on the wall');

    A much better form for 25000 lines would be having, 12499 bottles of beer on the wall lines, an initlization statment, and a decremeant function after every write line. That way you can easily modify the code to start off with what ever number you want.
  8. Re:JS by Anonymous Coward · · Score: 4, Funny

    Also, it's a good idea to Write and Save your JavaScript a Word document (eg in an editor like Notepad), not scrawled in Paintbrush and saved as a Bitmap File. It's funny how the Internet can't compile my Paintbrush Javascripts lol! My fried says thats how all the best programmers do it, but I can't get it work. maybe I don't get something? something vital? I think that must be it

  9. Re:Dense != Good by Rufty · · Score: 3, Funny

    Dense *is* good. Suck all the bugs out of your code, you just need a perl regex with an event horizon.

    --
    Red to red, black to black. Switch it on, but stand well back.
  10. Re:JS by Anonymous Coward · · Score: 4, Funny

    My sarcasm detector exploded. ow.

  11. Re:JS by walt-sjc · · Score: 5, Funny

    25,000 lines of Javascript ? What could you possibly be doing which requires that level of Javascript interaction ?????

    1000 lines of application code, and 24,000 lines of browser compatibility code.

  12. Re:JS by TheNinjaroach · · Score: 2, Funny

    Maybe you could write a few more to catch the joke for you as well. =)

    --
    I went to eat some animal crackers and the box said, "Do not eat if seal is broken." I opened the box and sure enough..
  13. Re:Dense != Good by x2A · · Score: 2, Funny

    Absolutely. Everytime I need a new variable, I use the md5 checksum of the file at its current point. If I ever forget a variable name, I simple undo until the first time I put the variable in (I keep vim open ALL the time, and never exit) and run md5 on it again. Simple.

    --
    The revolution will not be televised... but it will have a page on Wikipedia
  14. Re:JS by Anonymous Coward · · Score: 1, Funny

    Super, that will loop forever printing out i as 1 ;)

  15. Re:JS by CastrTroy · · Score: 4, Funny

    try{
    tellJoke();
    }
    catch(JokeException e)
    {
    printf("joke wasn't funny");
    }

    --

    Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
  16. Re:JS by hobo+sapiens · · Score: 4, Funny
    I only had 3 lines.
    Yeah, 3 lines and an endless loop. You meant:

    for(var i=25000;i>0;i--)
    document.write((i + ' bottles of beer on the wall,' + i + ' bottles of beer. Take one down and pass it around ' + (i-1) + ' bottles of beer on the wall\n');

    Dude, this is slashdot. You can't be posting endless loops like that, that could be dangerous! Have you any idea how many geeks will be frozen in front of their computers until they involuntarily fall asleep?
    --
    blah blah blah
  17. Javascript is the BB gun of Christmas Toys. by Twixter · · Score: 2, Funny
    Man is it fun; and useful! But sooner or later, you end up shooting your eye out.

    //Create new Human
    var human = new Object();
    var ass = new Object();
    var head = new Object();

    //Assign properties to human
    human.ass = ass;
    human.head = head;

    //Elect human to office.
    human.ass.head = head;

    Perfectly valid in Javascript, and in the real world.

    --

    -Todd

    Put down the sig, and step away from the computer.

  18. Re:JS by dlim · · Score: 2, Funny

    dude. you're putting the bottles back on the wall. that makes no sense at all...

  19. Re:JS by Anonymous Coward · · Score: 1, Funny

    Did you remember to include the ocr object into your workspace before attempting to compile?

  20. Re:Security is a problem by chudnall · · Score: 2, Funny

    You're welcome to all the thousands of lines of JS code our company produces, where would you like me to mail it to? darlmcbryde@sco.com
    --
    Disclaimer: Evolution comes with NO WARRANTY, except for the IMPLIED WARRANTY of FITNESS FOR A PARTICULAR PURPOSE.