Slashdot Mirror


The JavaScript Juggernaut Rolls On

JThaddeus writes "An article in TechWorld Australia summarizes the latest opinions on JavaScript from ThoughtWorks: 'There is no end in sight to the rise of JavaScript... "I think JavaScript has been seen as a serious language for the last two or three years; I think now increasingly we're seeing JavaScript as a platform," said Sam Newman, ThoughtWorks' Global Innovation Lead.' The article touches on new additions to JavaScript tools, techniques, and languages built on JavaScript. As the fuller report (PDF) says, 'The ecosystem around JavaScript as a serious application platform continues to evolve. Many interesting new tools for testing, building, and managing dependencies in both server- and client-side JavaScript applications have emerged recently.'"

306 of 505 comments (clear)

  1. SubjectsInCommentsAreStupid by lesincompetent · · Score: 5, Insightful

    Great... more single-core-hogging fun ahead...

    1. Re:SubjectsInCommentsAreStupid by Anonymous Coward · · Score: 1

      Yeah I hate the fact that none of the Javascript implementations actually scale past one core, and this is a serious problem. Yes there is the ability to use threads, but it's so useless since it's equal to forking a new process that has no access to anything of the parent process.

      Same with WebGL, it's not going anywhere, anything that can be done with WebGL will produce something barely any better than a DS/N64/Playstation 1 game. This is not a problem with the hardware, but the fact that there's way too many cruft layers:
      Hardware
      Driver
      OS
      Browser
      Javascript
      half dozen Jquery plugins or other framework crap
      then the actual app/game.

      If there was a way to write Javascript directly against the hardware, then it might be a viable use as a game platform, but that's generally not the issue. The issue is that the raw calls needed to manipulate the GPU are going to be just too slow to ever use. This is why the majority of web and flash games stick to making ripoffs of NES and SNES games just with higher resolutions. They can't make a Duke3D or a DOOM clone because the underlying cruft won't let them do clever things with hardware that 3D games require.

      Basically the best you can hope for, game-wise is Late SNES or PS1 (Think FF8 or FF9.) Applications that do not invoke sound may be able to get away with doing more (eg a HTML5 spreadsheet app would be slower than a native app, but 90% of that slowness will be the network transfers and not the browser.)

      With 4 and 8 core computers, I'm just baffled at why anyone would want to use Javascript to create a game beyond using it as a scripting engine. Build a game engine that already knows how to read 3D models and textures, and just expose the game engine's state through javascript, not try to render the game state itself.

    2. Re:SubjectsInCommentsAreStupid by beelsebob · · Score: 1

      Yeah I hate the fact that none of the Javascript implementations actually scale past one core, and this is a serious problem. Yes there is the ability to use threads, but it's so useless since it's equal to forking a new process that has no access to anything of the parent process.

      Good!

      Anyone with even 5 minutes of experience writing multithreaded code will realise that no shared memory, and message passing is far superior as a method of thread synchronisation.

    3. Re:SubjectsInCommentsAreStupid by MillionthMonkey · · Score: 1

      Anyone with even 5 minutes of experience writing multithreaded code will realise that no shared memory, and message passing is far superior as a method of thread synchronisation.

      Anyone with even 5 days of experience will come up against a task where it isn't an option.

    4. Re: SubjectsInCommentsAreStupid by Joce640k · · Score: 1, Funny

      Experienced engineers wil indeed be able to properly use thread-shared state.

      True, but we're talking about Javascript programmers.

      --
      No sig today...
    5. Re: SubjectsInCommentsAreStupid by Pino+Grigio · · Score: 1

      Nobody really talks about false sharing and fine grained control of cache lines that you really need to make multicore actually perform in the kind of scenarios a game makes use of, most of which are totally beyond the scope of a Javascript app anyway.

    6. Re:SubjectsInCommentsAreStupid by phaggood · · Score: 1
  2. Peak "platform" by PCM2 · · Score: 4, Insightful

    Is the word "platform" officially over? My fucking toaster is a bread-browning platform.

    --
    Breakfast served all day!
    1. Re:Peak "platform" by wonkey_monkey · · Score: 3, Funny
      --
      systemd is Roko's Basilisk.
    2. Re:Peak "platform" by Lumpio- · · Score: 3, Interesting

      Not as bad a "solution". I've seen knives marketed as "cutting solutions".

    3. Re:Peak "platform" by hey! · · Score: 3, Funny

      And once we've done in "platform", we can start the campaign against "system". By the time we're done engineers will only be able to talk about software using mime.

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    4. Re:Peak "platform" by swb · · Score: 2

      So which is the parent? Do we have solution platforms or platform solutions?

      Or do we have nested combinations, like platform solution platforms?

    5. Re:Peak "platform" by Lumpio- · · Score: 4, Funny

      We could also add "service". SPaaS - Solution Platform as a Service.

    6. Re:Peak "platform" by ArcadeMan · · Score: 1

      Count yourself lucky. My toaster is a bread-burning platform.

    7. Re:Peak "platform" by swb · · Score: 1

      ...platform solution..

    8. Re:Peak "platform" by ArcadeMan · · Score: 1

      I'm launching a new company that will offer an operating system, platform-based solution services hosted in the cloud. Our first server will have a capacity of 1000 Megabitcoins per Doge/Watts.

    9. Re:Peak "platform" by Bing+Tsher+E · · Score: 1

      We have platform precipitates.

      And precipitate platforms.

    10. Re: Peak "platform" by cyber-vandal · · Score: 1, Insightful

      COBOL is a far better language than JS. JS is more likely to be the next VB6.

    11. Re:Peak "platform" by SunTzuWarmaster · · Score: 2, Insightful

      Words have meaning and purpose. What words would you use to express the following concepts?

        - a collection of tools which allow you to build a new component through their leverage, while not contributing significantly to the overall effectiveness of the tools (or won't particularly be used in operation)

        - a collection of functional components which you will use as part of the operation of a new component

      Currently, the words are "platform" and "system". I'm happy to switch to other words if they express the concept better.

    12. Re:Peak "platform" by S.O.B. · · Score: 1

      You guys don't know anything.

      Clearly Javascript is a super-tangential component of the solution platform meta-space.

      --
      Some of what I say is fact, some is conjecture, the rest I'm just blowing out my ass...you guess.
    13. Re:Peak "platform" by hicksw · · Score: 1

      ...My fucking toaster is a bread-browning platform....

      I use my other toaster for that.
      --
      And, please STOP thinking about the children!

    14. Re:Peak "platform" by cwsumner · · Score: 1

      Different specialties have different dialects of "technish", If you want to say something that someone will understand, then you need to find out what dialect they talk. And translate.

      We need Google Translate to work on Javascript to SQL to C++ to Clarion !
      ( to Salesman to Manager to Politian !!) 8-)

  3. How about a generic scripting engine? by Anonymous Coward · · Score: 4, Interesting

    Why don't browsers come with a generic scripting engine (in addition to, or replacing, the JavaScript virtual machine) that runs some sort of intermediate language a la .NET CIL, or LLVM IR, etc.?

    Then we could use pretty much any scripting language we wanted with the content.

    1. Re:How about a generic scripting engine? by tepples · · Score: 5, Insightful

      The last time that was tried, it was called Java applets, and Oracle's incompetence at keeping its virtual machine secure led to browsers blocking Java applets by default.

    2. Re:How about a generic scripting engine? by qpqp · · Score: 5, Informative

      Why don't browsers come with a generic scripting engine

      They do, it's called JavaScript.

      LLVM IR? Here you go
      Your other request inverted, compile CIL to JS: jsil.org

    3. Re:How about a generic scripting engine? by Anonymous Coward · · Score: 2, Insightful

      It really says something about JavaScript that the "hottest" technologies are ingenious ways to avoid actually CODING in JavaScript!

    4. Re:How about a generic scripting engine? by ebno-10db · · Score: 1

      But did that really have anything to do with it being a byte code interpreter, as opposed to a lousy implementation of one? Or perhaps applets having access to library functions that were too difficult to make secure?

      In other words, is a byte code interpreter necessarily less secure than say a JavaScript interpreter? I honestly don't know, and would be interested if anyone can explain this.

    5. Re:How about a generic scripting engine? by jbolden · · Score: 2

      Why don't browsers come with a generic scripting engine (in addition to, or replacing, the JavaScript virtual machine) that runs some sort of intermediate language a la .NET CIL, or LLVM IR, etc.?

      You mean like: Java applets, Active-X, flash or quicktime?

    6. Re:How about a generic scripting engine? by jbolden · · Score: 2

      It isn't the byte code interpreter that's the problem. It is running in a low level state. Let's take a simple example division by zero. If you send a division by zero to an x86 processor something has to catch that exception or the entire system crashes. So either:

      a) You have to have a wrapping layer which prevents virtual instructions from causing exceptions in the kernel or OS (Javascript) which is slow
      b) You have to have a complex system where things move up and down abstractions layers freely (C++ / Active-X)
      c) You have to have a high speed specifically tuned VM that offers services of all types and that is big and complex (Java)
      d) You have to have a family of high speed specifically tuned VMs that each offer only some services (flash, movie players, reader...)

      etc...

    7. Re:How about a generic scripting engine? by Anonymous Coward · · Score: 1

      Yep, it says millions of dollars have been invested in making javascript run fast.

    8. Re:How about a generic scripting engine? by backspaces · · Score: 1

      Any language compiler that will emit LLVM rather than machine code can run in the browser via Emscripten to asm.js. So C/C++ is already ready to run in the browser. Other languages use different strategies such as in-browser translation to JS. Python has several stunts for running in the browser now.

      Asm.js was the game changer by getting within 1.5x the C/C++ perf numbers.

    9. Re:How about a generic scripting engine? by BZ · · Score: 1

      For what it's worth, "millions of dollars" is a pretty low bar. A million dollars in the US will get you _maybe_ 5 person-years worth of work from anyone at all competent (using the normal rule of thumb that an employees cost to the employer is about 2x salary once you take into account benefits, employer taxes, equipment, office space, etc).

      So 10 million dollars will get you a 10 years worth of work from 5 developers. As an example, the PyPy project is 10 years old....

      For JS, between the various browser vendors, the right number is probably closer to 300-500 person-years (see https://news.ycombinator.com/i... for an attempted breakdown). Figure $100 million as a low estimate. Chances are, the people involved are being paid more than $100k a year, so adjust the estimate up accordingly...

    10. Re:How about a generic scripting engine? by shutdown+-p+now · · Score: 1

      JavaScript has very wonky semantics that make it poorly suited for an intermediate representation for another scripting language. Sure, you can pull it off, but it's not trivial and perf is pretty bad.

    11. Re:How about a generic scripting engine? by shutdown+-p+now · · Score: 1

      asm.js is a neat hack, but doesn't it require you to preallocate the entire heap? It really needs to have some more flexible memory managing policies.

    12. Re:How about a generic scripting engine? by shutdown+-p+now · · Score: 1

      Google keeps pushing for this with Portable Native Client (where LLVM bitcode is the portable low-level language).

    13. Re:How about a generic scripting engine? by shutdown+-p+now · · Score: 1

      PNaCl is not precompiled - that's the whole point; it's compiled to the target architecture only once it is delivered to the browser.

      And there's no reason why it couldn't be used for scripts on the page.

    14. Re:How about a generic scripting engine? by shutdown+-p+now · · Score: 1

      PNaCl does run in the browser The only step missing there right now is exposing the entire DOM API to it, but that is a minor thing and relatively easy to do should some browser want to.

      The big deal would be making it an accepted standard...

    15. Re:How about a generic scripting engine? by shutdown+-p+now · · Score: 1

      The point is to avoid having to write a complete interpreter - front and back-end - for every language you might want to use on the page, not in a separate sub-process.

      "On the page" and "in a separate subprocess" are not contradictory - in fact, I would argue that "in a separate subprocess" is good sandboxing practice in any case. And it's certainly quite possible to set up IPC such that the subprocess can manipulate the page in the same way JS does today.

      I don't see anything wrong with "having to write a complete interpreter" - after all, that's the same requirement that we already have for desktop and server-side development, why should browser be any different? And we already have many languages targeting LLVM IR, so, really, it's not such a big deal.

      Now the fact that if it is an interpreter, then it has to be delivered to the client alongside with the actual code, is somewhat inconvenient. The entire Lua interpreter is just under 100 Kb gzipped - for comparison, minified & gzipped jQuery is around 30 Kb. So I would expect this system to favor AOT compilers, which would only have to ship, at most, a minimal VM alongside the actual code. If the host would furthermore provide some common services, such as compacting GC, the VMs could be made even smaller if not completely avoided in many cases.

  4. Replusive by gweihir · · Score: 3, Funny

    Why do the worst technologies that are just barely able to solve the problem always make it? Is the developer community collectively really this stupid? I fear it is...

    --
    Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    1. Re:Replusive by Nkwe · · Score: 4, Insightful

      Why do the worst technologies that are just barely able to solve the problem always make it? Is the developer community collectively really this stupid? I fear it is...

      Because technologies that just barely solve a problem allow people who can just barely do the job to barely solve the problem. People that can barely do the job are less expensive than people who do the job right. Unfortunate enough people are willing to live with "just barely".

    2. Re:Replusive by Anonymous Coward · · Score: 1

      Having been a developer for nearly 20 years, I can confidently say that yes, the vast majority of developers really are this stupid. It doesn't help that because of retarded corporate policies the mean age of developers is something like 23 years of age.

    3. Re:Replusive by hibiki_r · · Score: 5, Interesting

      They don't always make it: Many do not make it at all. Survivor bias and all that.

      JavaScript thrived because the alternatives were arguably far worse. Java applets were terrible. ActiveX a platform specific disaster. Flash is heavy. JavaScript allowed you to do the very minor things most web developers wanted at the time without having to turn your website into a plugin that disregarded base web technologies.

      Yes, the language design is pretty silly. The function declaration syntax is silly. It tries to look like a member of the Algol tree, but its internals behave more like Lisp. The automatic type conversion system is the source of many jokes. But it still beat it competition at the time, because it was built into the browser, it talked directly to the page's DOM, and the competition did not. Today we'd have little trouble designing a better language than JavaScript for what we currently do with it, but our best bet to get something like that working is to build a language that compiles to JavaScript and then hoping browsers start building VMs for that language directly, skipping the JavaScript step. Still, not bloody likely.

    4. Re:Replusive by Anonymous Coward · · Score: 1

      If users are happy with bloated and buggy scripts that never report and handle failures properly, then let them have it!

      Compilers are great, because they reduce errors even before execution. Javascript just runs and you never know the correctness of the state.
      Errorhandling and exceptions are great, because they don't ignore errors, but force you to deal with them. Javascript just runs and you never know the correctness of the state.

      If someone knowledgeable complains about something, it's usually because there is a great point in it less knowledgeable people don't recognize.

    5. Re:Replusive by Skinny+Rav · · Score: 3, Insightful

      Good enough is perfect.

      You can endlessly polish your elegant solutions for decades (see Hurd) while the rest of the world happily uses "technologies that are just barely able to solve the problem".

    6. Re:Replusive by ebno-10db · · Score: 1

      a/k/a the Race to the Bottom

    7. Re:Replusive by Kremmy · · Score: 1

      You sound like someone who's never dealt with users.

    8. Re:Replusive by leptons · · Score: 2

      If that is how you think about Javascript, then you have just illustrated your own stupidity. Or maybe it's fear that you are displaying?

      Javascript is far from "the worst technologies", and your quip about being "barely able to solve the problem" is pretty ignorant.

      I'll get off your lawn now.

    9. Re:Replusive by hey! · · Score: 5, Interesting

      Because it's easy to mistake one's personal biases for sound judgment about what is "good".

      I won't sit here and defend every design decision in javascript, but it's a lot more sophisticated than meets the eye. I think of it more like Lisp than Java; it encourages (among skilled programmers) a functional programming style, which turns out to be both under-used as a programming paradigm and very nicely fitted to the kind of event-driven tasks people use javascript for.

      If you aren't writing higher order functions in javascript (functions that take functions as values or return them as values) you aren't fluent in javascript and aren't qualified to pass judgment on it.

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    10. Re:Replusive by BurfCurse · · Score: 2

      Why is it that everytime I see a truly insightful post, its always the day after my mod points expire?

    11. Re:Replusive by jbolden · · Score: 3, Insightful

      Because "worst language" is generally a compromise between competing ideas and interests of various stakeholders. Compromise is rarely pretty.

    12. Re:Replusive by Crudely_Indecent · · Score: 1

      Write once - deploy everywhere.

      Name one other language that is as well supported and as broadly implemented as JavaScript?

      With technologies like Node.js - it can run on both the client and the server.

      Sure, there are inconsistencies in implementation - but the bulk of functionality is supported in every implementation.

      --


      "Lame" - Galaxar
    13. Re:Replusive by jbolden · · Score: 1

      Actually users care a great deal. Especially as we start moving to touch. There is nothing in nature that causes your visual image of your finger to lag your finger. Latency over 1ms are distressing to human subconscious under those conditions. They experience negative emotions. 0% of the current systems are that fast even using low level languages.

    14. Re:Replusive by westlake · · Score: 2

      Why do the worst technologies that are just barely able to solve the problem always make it?

      They are the first to reach critical mass and they get the job done.

    15. Re:Replusive by ebno-10db · · Score: 1

      Latency over 1ms are distressing to human subconscious under those conditions.

      Do you have more info on that? Seriously, no snark, but I'll admit that I'm skeptical. I've never heard of human perception time being less than 30ms. I hate slow responses in UI's with a passion, but 1ms?

    16. Re:Replusive by TheGratefulNet · · Score: 2

      I am not a java guy (I have the basics, but I still don't 'get' java like some fans do). I asked a guy who works at a hardware company (that does some java accel stuff) what the big draw was. his reply - pertaining to server-java code in business, at least - was that it could tolerate bad programming and still 'run ok enough' for business use. lots of cheap *very bad* programmers in the world and java works well for them. malloc and no free - wow! you can be as stupid as you want and your app will still run 'fine'.

      of course, java is also big on phones and embedded devices. but on servers, I never quite understood what the draw was. I'm a C guy (from quite a long time ago) and still prefer C, but I realize that the new breed of programmers mostly don't even know or care about C anymore and its always java this and java that for any new project that starts.

      --

      --
      "It is now safe to switch off your computer."
    17. Re:Replusive by Jane+Q.+Public · · Score: 3, Interesting

      "Why are some developers obsessed with performance? The user probably isn't. They don't care whether something loads 2 seconds quicker, or whether something has beautifully concise code."

      Although I am a programmer, I am also a "user". And from purely a user perspective: I sure as hell DO care.

      Slow programs are slow. Computers are supposed to wait on people, not the other way around.

    18. Re:Replusive by StripedCow · · Score: 1, Interesting

      You are modded funny, but if this really is a joke, then there certainly is some melancholic undertone to it.

      The web is being developed for "the average" developer that just wants to get things done. This is a pity. Because if the web were developed for the advanced developer (read: computer scientist), those developers could lift the web to a higher level, and there would be much more traction.

      We just have to wait until Javascript gets sufficiently powerful to function as an intermediate language.
      From that moment on, we can have other languages targeted to the web. E.g., Python, Haskell, you name it.

      Right now, it is possible to use Javascript as an intermediate language using the ASM.js subset (what a name, what a concept), and there are actually projects that do stuff along these lines, but still, performance suffers a lot in this area. Perhaps a better approach is Google's NaCl, where intermediate code is translated more directly to native code, while putting security guarantees in place. But here, of course, cross-platform support is an issue.

      Perhaps then a hybrid between NaCl and ASM.js would be the best approach. That is, a compiler back-end that can target both NaCl *and* ASM.js.

      Time will tell...

      --
      If Pandora's box is destined to be opened, *I* want to be the one to open it.
    19. Re:Replusive by TheloniousToady · · Score: 1

      Good enough is perfect.

      That's a concise and interesting twist on the old adage Perfect is the enemy of good. Well done!

    20. Re:Replusive by TheloniousToady · · Score: 1

      You can endlessly polish your elegant solutions for decades (see Hurd) while the rest of the world happily uses "technologies that are just barely able to solve the problem".

      Which got me thinking...since the Mythbusters recently proved that you can polish a "Hurd", I guess the GNU folks can retire their experiment now.

    21. Re:Replusive by Areyoukiddingme · · Score: 2

      Do you have more info on that? Seriously, no snark, but I'll admit that I'm skeptical. I've never heard of human perception time being less than 30ms. I hate slow responses in UI's with a passion, but 1ms?

      See, for instance, John Carmack's analysis of head mounted display latency. Under 20 ms is acceptable for most people. 30 ms is too high, and leads to motion sickness.

      For ~1 ms latencies, experiment with a mouse on an old CRT running at 180Hz. Try out a hardware rendered mouse, then a software rendered mouse. You can indeed see the difference.

      Also for time perception that accurate, see a competent analysis of a fighting game. Many fighting games feature reaction windows no more than 5 ms wide, and some have windows ~1 ms wide. And players can hit them.

      Human visual perception and motor reaction is a very complex, multipath system with a lot of variance between individuals. Some of those paths are very slow. Some of them are suprisingly fast. Touch screen systems are some of the worst high latency offenders, in a visual perceptive/motor reactive realm that is least tolerant of it. When you touch something in the real world, it responds instantly. Push a marble and it rolls, no delay. Touch screens can't do that. Not even close. It's really really jarring, and it makes the choice of scripting languages on mobile devices particularly unfortunate, since they're not capable of executing fast enough to solve the problem. Your entire reaction and perception system is definitely slower than it feels, but it is also equipped with compensation for that slowness. Your brain conceals the lag from you when interacting with the real world. That process of concealment has a lot to do with expectations. Touch screens especially have a tendency to violate those expectations.

      There's a lot of work yet to be done in human-computer interaction, and getting touch screen responsiveness down to the equivalent of the venerable mouse is seriously important, at this point. Unfortunately, it doesn't seem to be much of a priority. See complaints about hipster programmers elsewhere in this thread.

    22. Re:Replusive by bearinboots · · Score: 1

      What does Java have to do with JavaScript -- besides the stupid naming decision, that is?

    23. Re:Replusive by quetwo · · Score: 1

      Actually, the human eye can really only perceive images with 16ms at the very fastest. Most people's cognitive recognition is at about 50ms, and auditory recognition is about 70ms.

    24. Re:Replusive by Billly+Gates · · Score: 1

      Worse?!

      Javascript is bad ass rockstart and webscale language. It invents this new thing called threading that no one has ever thought of before and introduces non-blocking async i/o. Wow this is sooo new and cool and writting it in javascript is a pleasure of all the languages.

    25. Re:Replusive by SnowZero · · Score: 1

      Perhaps a better approach is Google's NaCl, where intermediate code is translated more directly to native code, while putting security guarantees in place. But here, of course, cross-platform support is an issue.

      You might find Portable Native Client interesting, which is built out of LLVM+NaCl.
      http://www.chromium.org/native...

      I'm hoping that eventually browsers, mobile phones, and cloud hosting will just become sandboxed LLVM targets. Then people could use whatever language they like, wherever they want.

    26. Re:Replusive by matthewv789 · · Score: 2

      if the web were developed for the advanced developer (read: computer scientist), the "web" as we know it would be confined to a few geek niche markets and the rest of us would be using some Microsoft- or Adobe-pushed proprietary technology instead.

      FTFY.

    27. Re:Replusive by StripedCow · · Score: 1

      The problem with PNaCl and NaCl is that it is not really portable to platforms like Firefox and IE.

      Sadly, I don't believe even that Mozilla will ever adopt NaCl, judging from these responses (wikipedia):

      Mozilla's vice president of products, Jay Sullivan, said that Mozilla has no intention of running native code inside the browser, as "These native apps are just little black boxes in a webpage. [...] We really believe in HTML, and this is where we want to focus."[31]
      Mozilla's Christopher Blizzard criticized NaCl, claiming that native code cannot evolve in the same way that the source code-driven web can. He also compared NaCl to Microsoft's ActiveX technology, plagued with DLL hell.[4] Mozilla currently employs the inventor of JavaScript, Brendan Eich as chief technological officer.

      The best approach, therefore, is to build a compiler back-end that targets *both* ASM.js *and* (P)NaCl.

      The performance benefits of NaCl will, in time, become clear, and hence other platforms will be more or less forced to either improve their Javascript implementation, or adopt NaCl.

      --
      If Pandora's box is destined to be opened, *I* want to be the one to open it.
    28. Re:Replusive by Wolvey · · Score: 1

      Why are some developers obsessed with performance? The user probably isn't. They don't care whether something loads 2 seconds quicker, or whether something has beautifully concise code.

      You sir, are part of the problem. Thinking like this leads to layers upon layers of inefficiencies and the user experience often suffers dramatically. Why don't people just code efficiently? Is it too hard or are you just too lazy?

    29. Re:Replusive by jbolden · · Score: 1

      Microsoft labs is the best source for this. Here is a quick video where they introduce the concept: https://www.youtube.com/watch?...

    30. Re:Replusive by jbolden · · Score: 1

      Where are you getting those numbers from? For example in lip-sinking 2.9ms errors are routinely detected even with distracting visuals.

    31. Re:Replusive by Hewligan · · Score: 1

      Why do the worst technologies that are just barely able to solve the problem always make it? Is the developer community collectively really this stupid? I fear it is...

      Because the people who spend their time worrying about which is the theoretically superior solution rarely come up with a practically useful solution.

      --

      "If God created us in his own image, we have more than reciprocated"

    32. Re:Replusive by smellotron · · Score: 2

      Many fighting games feature reaction windows no more than 5 ms wide, and some have windows ~1 ms wide. And players can hit them.

      I've heard of fighting games (e.g. Street Fighter) with 1 frame windows, but the games were 60 fps ~ 16.67ms. That is more in line with your figures from John Carmack's experimentation. Your 1ms figure does not sound credible, can you provide a reference?

    33. Re:Replusive by smellotron · · Score: 2

      Name one other language that is as well supported and as broadly implemented as JavaScript?

      C is ubiquitous.

    34. Re:Replusive by PCM2 · · Score: 1

      The best approach, therefore, is to build a compiler back-end that targets *both* ASM.js *and* (P)NaCl.

      Or just compile your code twice, using two different back ends? I don't see much wisdom in building a compiler that tries to do two things at once.

      --
      Breakfast served all day!
    35. Re:Replusive by StripedCow · · Score: 1

      Well that's what I meant actually.

      Also note that some aspects of the target intermediate languages may limit the actual programming language in certain ways.

      For example, the language from which you are compiling may support some primitive types that the back-end languages do not support. Then, to stay efficient, it may be necessary to find a common denominator of primitive types in ASM.js and NaCl, and introduce these as new primitive types in the original language.

      --
      If Pandora's box is destined to be opened, *I* want to be the one to open it.
    36. Re:Replusive by Darinbob · · Score: 1

      Because it's not how good the salesman is, it's how much of his foot he can get in the door (and how much pain he can withstand when they try to slam the door shut).

      Basically, Javascript got the foot in the door very early on with browsers; not for applets (which really never worked that well with Java), but as just some simplistic things to do like pop up windows (with ads!) or move windows around (with ads!) and so forth. So when people wanted a bit more complexity with the scripting they could either evolve what was already present, or try to get a different language into every browser.

    37. Re:Replusive by gweihir · · Score: 1

      I am currently working on a problem where the user is "obsessed with performance", because the JavaScript monster created for them by some other people is so slow, it markedly affects user performance and satisfaction. Unfortunately, this being JavaScript, nothing can be done to help them.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    38. Re:Replusive by gweihir · · Score: 1

      Makes sense. What I have seen in code-reviews is atrociously bad, despite being touted as "quality development".

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    39. Re:Replusive by Darinbob · · Score: 1

      Originally Java was supposed to be platform independent (there's that nasty "platform" word again). That is it didn't matter what type of CPU you had, it would run on your computer, PC, Mac, Sun, minicomputer, mainframe, etc. The it was quickly diverted to run on the web so it cobbled together some security features ala safe sandboxing, although it didn't really work out there.

      These are great goals by the way. Except for me at least, Java was a moving target, it never stood still long enough to learn it well, with frameworks becoming popular and then discarded a few years later. As a language it's pretty nice (or was in version 1.0 anyway), bringing together tried and true features that really hadn't gotten into the mainstream. However the early implementations were not very good, Microsoft sabotaged it pretty well keeping it off the PC. Everything that is .NET today could have been Java instead and be portable.

    40. Re:Replusive by gweihir · · Score: 1

      "Barely good enough" is not "good".

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    41. Re:Replusive by gweihir · · Score: 1

      And it happens to weed out all those cretins that cannot program to save their lives pretty fast. Mind, it is nice to embed it in, e.g. Python, for simple glue-code.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    42. Re:Replusive by gweihir · · Score: 1

      This is far too simplistic. Sure, your first version may be there earlier, but I have seen large projects where the people cannot move forward anymore and cannot even fix essential issues because JavaScript does not allow them to. They cannot even rip it out anymore.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    43. Re:Replusive by tepples · · Score: 1

      C is ubiquitous.

      Except on platforms that ban third-party native applications. For example, third-party applications for Chrome OS and Firefox OS are written in JavaScript, as are iOS applications that contain prohibited behaviors. Applications for Windows Phone 7 and the Xbox Live Indie Games are written in .NET Compact Framework bytecode, which in practice means C#.

    44. Re:Replusive by tepples · · Score: 1

      In the Groove (arcade) polls the controllers more than once per frame and can resolve step timing to within 10 ms. The PS2 version has slightly wider timing windows because it polls the controllers only once per frame (16.7 ms).

    45. Re:Replusive by Crudely_Indecent · · Score: 1

      and you must compile for every platform.

      --


      "Lame" - Galaxar
    46. Re:Replusive by smellotron · · Score: 1

      C is ubiquitous.

      Except on platforms that ban third-party native applications.

      Even if the walled gardens don't permit software implemented in C, it is extremely likely that some part of the walled garden's own software stack is still written in C—because C is ubiquitous.

    47. Re:Replusive by smellotron · · Score: 1

      and you must compile for every platform.

      Yes, deployment requires compilation once per target. How many platforms exist which have a javascript interpreter but no C compiler? I believe my point stands.

      Since nobody has offered any other languages to your challenge, I'll suggest Lua as a trivial alternative: the core language is implemented in ANSI C, so it is likely that Lua is portable to any platform that supports C. However, the core functionality of Lua is ridiculously hamstrung (ANSI C doesn't support sockets, for example) so the language is not well-suited for general-purpose programming.

    48. Re:Replusive by Anonymous Coward · · Score: 1

      that was a really long way of saying "no"

    49. Re:Replusive by rycamor · · Score: 1

      Exactly. I'm sick of all this talk of how bad Javascript is. What were the alternatives in 1997? Brendan Eich had to solve a problem quickly and actually get something into production. Same with Tim Berners-Lee and HTML. Not perfect or elegant technologies, BUT they actually solved a problem within a finite time without expending ridiculous amounts of brainpower in design-by-committee cycles. The real world directly benefited from these solutions.

      Really, Javascript only has two major problems: 1. The security model (freezing of libraries so they can't be modified by other code loaded in the browser) and 2. A few ugly aspects of how the language handles this or that type of expression... most of which have been solved in latest versions of Javascript (Harmony). Most of the other problems are just questions of implementation and add-on technologies (WebGL, Websockets, etc.. expanding the scope of a scripting language into areas that may... not... just... be the wisest)

      Yes, there are all sorts of esoteric reasons why Javascript is a Terrible Lisp, and a Downright Horrible Scheme, and an Ugly Hybrid of Object-Oriented and Functional, blah blah blah... So what? It's meant to solve small finite problems in the front end. Let's keep it that way, and just clean it up. Fortunately, it is a fairly simple language.

      To all those who want a type-checked, compiled language running in the browser... Uh no. I don't want to allow any site to run code I can't inspect.

    50. Re:Replusive by Crudely_Indecent · · Score: 1

      Yes, I understand that C is virtually everywhere, but requires much more to deploy an application everywhere.

      Javascript: write once - deploy everywhere
      C: Write once, compile for every target, deploy everywhere.

      See the difference?

      And how often is it necessary to alter a compiled application for nuances on specific targets? Javascript is often written wifh fallbacks for targets that don't support a specific feature.

      I'm not saying Javascript is superior or inferior to C. They have different strengths and weaknesses. Why must there be a "best language" or arguments over "my language is better than yours"? It's all a personal preference when more than one language can perform a given task. What about tasks that are possible in one language and not in another? Apples and oranges comparing C and Javascript.

      Thursday I was writing Objective-C, Friday I was writing Java, today I was replacing the fuel-injectors in my truck, sometime next week I expect to be writing some PHP. Personally, I enjoyed replacing the fuel-injectors more than the work I did Thursday or Friday - and now my truck is running better. Because fuel-system work makes my truck run better, does that make auto-repair better than Objective-C or Java - because neither of them make my truck run better? Objective-C and Java pay the bills while working on my truck does not - does that make programming better than auto-repair? Apples and oranges.

      I think it's safe to say that you prefer C to the exclusion of everything else.

      --


      "Lame" - Galaxar
    51. Re:Replusive by smellotron · · Score: 1

      I'm not saying Javascript is superior or inferior to C.

      I'm not trying to argue that any language is better, either. I originally responded to this:

      Name one other language that is as well supported and as broadly implemented as JavaScript?

      and your subsequent reply moved the goalposts by arguing about deployment effort. Yes, you're right, C software requires more work to deploy to N platforms, but that is irrelevant to the presence of broad multi-platform support. I'm really not trying to say that C is better than Javascript. But surely it has a larger footprint across platforms!

      I think it's safe to say that you prefer C to the exclusion of everything else.

      Actually, no. I can read C fine, but I don't code fluently in it. I usually switch between C++, Python, and bash depending on the task.

    52. Re:Replusive by Crudely_Indecent · · Score: 1

      OK. Unlike the Dos Equis "Most Interesting Man" - it occasionally is "my bad"

      Frequently these types of threads turn into bashing contests between different language enthusiasts. Usually things go downhill for my contributions to the thread when I mention that I enjoy my (infrequent) opportunities to code in the first language I learned - COBOL.

      (cue the COBOL haters in 3, 2, 1)

      Javascript is one of those languages that I love to hate and hate to love.

      --


      "Lame" - Galaxar
    53. Re:Replusive by trenobus · · Score: 1

      JavaScript thrived because the alternatives were arguably far worse. Java applets were terrible. ActiveX a platform specific disaster. Flash is heavy. JavaScript allowed you to do the very minor things most web developers wanted at the time without having to turn your website into a plugin that disregarded base web technologies.

      No, JavaScript survived because it wasn't seen to threaten corporate interests until it was too late to stop it. Java applets failed because Microsoft did everything in their power to kill them. Yes, there were problems with the technology, but early versions of JavaScript offered far less functionality. The only reason people still talk about how bad applets are/were is because they actually got used to solve problems which JavaScript could not. Flash was also used heavily and is still hanging on, though probably not for much longer.

      JavaScript is the result of the major players of that time, Microsoft, Sun, Netscape, and Adobe, failing to realize that an open standard would be in their best interests. It is unfortunately the case that corporations tend not to endorse open standards until no alternative is left. This happened with TCP/IP - by the time corporations like IBM and DEC got around to collaborating on ISO/OSI as the future replacement of their proprietary network protocols, it was too late. Network companies like Cisco and many others were bringing products to market based on TCP/IP. The ISO/OSI protocol got to the party just a little too late.

      So we have TCP/IP with its NAT and its ever-so-drawn-out migration to IPv6, when we could have had something better. And we have JavaScript, which was a cute solution to making live widgets on a web page when it was invented, but like TCP/IP has been pushed far, far beyond what it was designed to do. The inevitable fate of such technologies is to become a victim of their own success. So it will be with JavaScript. I don't know whether that will be because it is replaced by some language that compiles into JavaScript, or whether some new browser runtime such as Dart will do it. Or perhaps the mobile device market will make browsers themselves obsolete, in favor of some mobile O/S.

      What will not change is that corporations will continue to try to own the next standard. That will inevitably fail, and the software industry will be the poorer for it.

    54. Re:Replusive by PCM2 · · Score: 1

      My understanding is that the most common use case for both NaCl and ASM.js is to write your code in, of all things, C.

      --
      Breakfast served all day!
    55. Re:Replusive by spongman · · Score: 1

      Java applets failed because Microsoft did everything in their power to kill them.

      Really? For a long time the MS JVM was the fastest and most compatible (according to Sun's own verification suite) VM available for any browser on any OS.

    56. Re:Replusive by trenobus · · Score: 1

      Really? For a long time the MS JVM was the fastest and most compatible (according to Sun's own verification suite) VM available for any browser on any OS.

      MEMORANDUM OF THE UNITED STATES IN SUPPORT OF MOTION FOR PRELIMINARY INJUNCTION

      The whole thing makes interesting reading, but just search for Java and JVM to see what I'm talking about. Microsoft was following their "embrace, extend, and extinguish" strategy, which had worked well for them many times before. They had a Java-like language, J++ that was not compatible with Sun Java.

      Sun's has to share some of the blame for Java failing to become a browser standard, as they did everything they could to maintain control of Java, rather than turn it over to an open standards body. But in fairness they did invent it, and Microsoft had the resources to dominate any open standards effort through sheer numbers of representatives. In contrast, Netscape did turn JavaScript over to Ecma (a very wily choice, I think), and I don't think we'd still be discussing it if they had not.

    57. Re:Replusive by spongman · · Score: 1

      yeah, hardly an unbiased source, that.

      the truth is that MS's JVM was more compatible and faster than any other VM (although the Semantec VM eventually caught up) at running 100% java-compatible applet code. sure, it was also capable of running non-compatible code but you could say the same about the browser, the OS and the machine in general.

    58. Re:Replusive by shutdown+-p+now · · Score: 1

      In what sense does it work "more like Lisp"? Just because a language has first-class functions and closures doesn't make it "more like Lisp". Every single mainstream language these days also has closures, with the sole exception of Java which is getting them in the next release.

    59. Re:Replusive by tigersha · · Score: 1

      Agree. I always thought Brendan Eich's decision to base his scripting language on Self and make it a functional language instead of the Algol-like mediocre dreariness of PHP and Java and Python was a brilliant idea. Javascript has been held back for many years because of the DOM and browser wars. It also has a somewhat limited (and silly at places) standard library, but the base language is not bad at all.
      The fact that compiling technology for Imperative languages was 20 years ahead of anything functional and dynamic did not help either.

      Higher-order functions? Quit advanced object system? In 1996? The language was waaaaay ahead of its time. And Brendan Eich is a genius. I wish I will have the opportunity to meet him one day.

      --
      The dangers of excessive individualism are nothing compared to the oppressiveness of excessive collectivism
    60. Re:Replusive by cwsumner · · Score: 1

      Latency over 1ms are distressing to human subconscious under those conditions.

      Do you have more info on that? Seriously, no snark, but I'll admit that I'm skeptical. I've never heard of human perception time being less than 30ms. I hate slow responses in UI's with a passion, but 1ms?

      I can read a line on a screen that is only there for 1/10,000 of a second.
      And so can you, with a little practice and assuming the background light is not too bright.
      Of course, it's not a computer screen, they can't do that.
      Human senses are not very good, but they are a lot better than people think.

    61. Re:Replusive by cwsumner · · Score: 1

      Actually, the human eye can really only perceive images with 16ms at the very fastest. Most people's cognitive recognition is at about 50ms, and auditory recognition is about 70ms.

      Those numbers are from the wrong kind of measurement. They were a test of how long the image would remain in the visual cells if a black background was presented. Like for avoiding flicker in a video.
      They have nothing to do with how fast an image can be percieved, which is several orders of magnitude faster depending on light level and contrast.

  5. jscript by Horshu · · Score: 5, Interesting

    I just started on a web project that is heavily javascript (even though it's an ASP.Net app). It feels like I stepped back in time 10 years. I'd have code not execute. Why? Some error somewhere in the code that was ignored. I had a typo on a property set somewhere else. No error. Why? Because javascript created a new property with the typo and set *that*. And every change requires me to run the app to see if it works, because I don't have a compiler to check the basics out ahead of time. And then, because I'm debugging an app in one window, when I'd open a new one to read the news, I'd hit other, non-ignored errors on those pages (advertisements) because 90% of commercial pages these days have error-laden javascript because people rarely check for error conditions. Horrible language.

    1. Re:jscript by Anonymous Coward · · Score: 5, Informative

      JavaScript is a horrible language because you haven't heard of things like jslint and your team doesn't develop with TDD using one of the numerous testing frameworks that exist for JavaScript?

    2. Re:jscript by Anonymous Coward · · Score: 1, Informative

      Yes, javascript is a horrible language. The fact that there exists tools and practices that make it almost, but not quite, tolerable does not change this fact.

    3. Re:jscript by Anonymous Coward · · Score: 1

      Yes, but why is it a horrible language? Do you really think it is horrible just because (1) it isn't compiled, (2) you don't understand all the concepts, and (3) people can write code that has errors in it? This describes a lot of languages. Personally I think it's a case of PEBCAK.

    4. Re:jscript by timmyd · · Score: 2, Informative

      You might want to look at TypeScript if you're already using Visual Studio. It infers types, type checks your code, is open source, and supports writing plain JavaScript. When using Visual Studio, you can do the things you're used to doing like "go to definition" and "find all references". If you decide to annotate your definitions with types, it can do type checking and catch errors which is really useful when you need to refactor a lot of code. The video at the bottom of http://www.typescriptlang.org/ is a really good tutorial. It compiles to JavaScript and accepts plain JavaScript so you can use it without having to rewrite all your code.

    5. Re:jscript by Laxori666 · · Score: 1

      Try getting a good IDE, like PyCharm (which does javascript as well). It gives you pretty good static checks on things like var name and property name typos. Not 100% of course since that's undecidable.

    6. Re:jscript by leptons · · Score: 1

      Oh you're such a big, brave programmer because you aren't a "Script Kiddie", and hiding behind "Anonymous Coward". Give me a break. slashdot seems to be filled with people with narrow vision such as yourself.

    7. Re:jscript by Bite+The+Pillow · · Score: 1, Insightful

      Sounds like you are not using the correct tools and environment, which makes debugging harder. And using that same setup to read news with a coding environment is just stupid. I don't read news with my development database or web server, so why would I risk infecting my development environment from known malware vectors of even legit advertising?
      You conclude with "horrible language", but your comments support "horrible programmers" all the way around.
      I'm making no defense here, only pointing out that your opinion is not based on objective consideration. Were it otherwise, you would support your conclusion better, naturally.

    8. Re:jscript by ebno-10db · · Score: 1

      my monkey programming in C is going to leave at least one dangling pointer. Does that make C a horrible language?

      The difference is that there are good reasons for that design tradeoff in C. The point of C is that it's fast as hell and gives you almost complete control. You need that to implement a kernel, which is what C was originally designed for. The downside is that you have to watch out for things like dangling pointers.

      The GP's complaints are a result of what tradeoffs in JS?

    9. Re:jscript by laffer1 · · Score: 1

      From a developer perspective:
      JavaScript is a pain in the ass to debug.

      From a user perspective:
      JavaScript can be slow. -- this one is getting better and may not matter in time.

      Full stack JavaScript is insane. There are faster languages for server side and everyone pushing for it didn't live through the first try with classic ASP which was VBScript or JScript. There was even an implementation that ran on top of Java for netscape servers called chillisoft or something like that. It was even worse than running on windows with IIS. I don't want to go to the bad old days.

      NodeJS is an attempt to get cheaper backend programmers because everyone has extra front end developers lying around for projects. The problem is that most front end developers I know don't know shit about big data or working on real problems. Their biggest fear is if a button is pretty and the popup works in IE8 and the latest jQuery UI.

      It's stupid.

    10. Re:jscript by matthewv789 · · Score: 1

      There are faster languages for server side

      Such as what? Well sure, you can write your web apps in C using G-WAN if sheer performance is your primary concern, as opposed to PHP, Perl, Python, Ruby, Java, C#, etc. But there's a reason people moved from C to other languages: quite simply, developer time is waaaaay more expensive than server time for all but the heaviest uses. (On the other hand, Node.js is very fast for high concurrency transactions and can cut server costs as a result, so you can have both.)

      NodeJS is an attempt to get cheaper backend programmers because everyone has extra front end developers lying around for projects.

      From this statement it seems you don't know much about NodeJS or why it exists. One thing that's different is that Node.js IS the server, and its pervasively asynchronous, non-blocking, event-driven IO is not something other web servers or language ecosystems offer. JavaScript is a good match for that kind of programming, there are many developers with experience in asynchronous JavaScript programming from the web front end (not all of whom are completely stupid), and Google's V8 engine (which compiles to machine code) is not exactly slow. People are using Node because it is faster than other web backends for transactional responses with high concurrency - AND it happens to be easy to develop for too, compared to, say, Java (at least according to PayPal and others working with it).

      It is certainly not anything like ASP.

    11. Re:jscript by Nivag064 · · Score: 1

      How about putting the following line at the start?
      'using strict';

    12. Re:jscript by Tablizer · · Score: 1

      There are times and places for scriptish languages and times and places for anal-retentive languages (AKA strong typing). The problem is that JavaScript being the browser's only built-in language tends to result in trying to make one-language-fit-all. It practically removes choice of tools to fit a specific need.

    13. Re:jscript by ebno-10db · · Score: 1

      you can run through a minefield at high speed if you know where the mines are!

      That doesn't sound like a very enticing analogy for a programming language. Then again I use a lot of C++, so who am I to talk?

    14. Re:jscript by PCM2 · · Score: 1

      The point of C is that it's fast as hell and gives you almost complete control.

      No, assembly language is fast as hell and gives you complete control. The point of C is that it gives you almost as much control but makes it easier to build and maintain large systems without you being some kind of semirobotic idiot savant. In other words, C IS a "dumbed down" language, just like some of the other ones people are complaining about.

      --
      Breakfast served all day!
    15. Re:jscript by PCM2 · · Score: 1

      To clarify your last statement a bit, TypeScript is designed as a superset of JavaScript. All valid JavaScript is valid TypeScript. All you have to convert your project is say "my project is in TypeScript now," and you can then start adding TypeScript features to your code -- or not -- as you see fit. That's as opposed to Dart, which really is a different language with a different syntax and you have to start over.

      --
      Breakfast served all day!
    16. Re:jscript by Jeremi · · Score: 1

      The point of C is that it gives you almost as much control but makes it easier to build and maintain large systems without you being some kind of semirobotic idiot savant.

      I think the other real point of C is that it allows you to write portable code. With assembly, if you wanted to port from one CPU architecture to another, the only option was to throw all the code away and rewrite from scratch.

      --


      I don't care if it's 90,000 hectares. That lake was not my doing.
    17. Re:jscript by XcepticZP · · Score: 1

      The javascript project is not my primary target, so I don't have, nor do I wish to have, special tools specific to JS.

      That's just silly. "This is my only project in language A. Therefore I won't get any tools that help me program in language A". If you're too lazy to download a free IDE and install it for the single project you are working on, then you deserve to suffer trying to use that programming language. Right tools for the right job, and if you can't bother to work smarter then you're just screwing yourself over.

    18. Re:jscript by joss · · Score: 1

      > NodeJS is an attempt to get cheaper backend programmers because everyone has extra front end developers lying around for projects. The problem is that most front end developers I know don't know shit about big data or working on real problems. Their biggest fear is if a button is pretty and the popup works in IE8 and the latest jQuery UI.

      No, it really isn't and nobody with any experience of it believes that. It's for when performance requirements are such that you want to control your own threading rather than letting the operating system do it for you. It's more like programming in assembly than in a high level language and as such requires a much higher level of knowledge on behalf of the server side programmers than something relatively straightforward like java let alone python or php.

      Just for the record, I was a c++ programmer for 15 years an EJB (curse its fucking name) programmer for 6 years, and have been doing a lot of front end javascript stuff for 6 years plus some node.js for the last 2 years. I just delivered the server end of a project which deals with more data than youtube ( http://www.manything.com/ ). Get off your fucking high horse about front end web development. Big data is a fucking walk in the park compared to delivering a decent user experience on web platforms.

      I'm not here to praise node.js: many environments have pitfalls, but node.js greases the sides, put stakes at the bottom and threw down a bunch of venomous snakes just to be on the safe side. Plus, you're working in a language where
      [1, 2] + [3,4] === '1,23,4'

      However, having said all that, it has its place, its just not where you think it is.

      --
      http://rareformnewmedia.com/
    19. Re:jscript by PCM2 · · Score: 1

      Well, that's true, too.

      --
      Breakfast served all day!
    20. Re:jscript by shutdown+-p+now · · Score: 1

      Because it is poorly designed. There are already lengthy essays written on the subject, so it's not worth the bother rehashing all the arguments - they are too numerous, anyway.

    21. Re:jscript by shutdown+-p+now · · Score: 1

      To clarify this even further, TypeScript is, for the most part, ES6 with (optional, compile-time-only) type annotations and modules tackled on top. Everything else in it is directly from the ES6 draft spec, like the arrow functions and even classes. If you take a TS program, strip out all the type annotations, and replace import statements with require() or your local equivalent, you'll get an ES6 program.

    22. Re:jscript by jlowery · · Score: 1

      [1,2].join([3,4]) === '13,42';

      FTFY

      --
      If you post it, they will read.
  6. I has a sad by Snotnose · · Score: 4, Funny

    In my 35 years of professional programming, getting good at dozens of languages, I've only run across 2 I've actively disliked. Javascript is one of them (tcl was the other). JS is a crap language that IMHO can't be fixed. If they ever add an honest garbage collector to the base language then most programs will delete themselves upon execution.

    1. Re:I has a sad by anchovy_chekov · · Score: 2

      In my 35 years of professional programming, getting good at dozens of languages, I've only run across 2 I've actively disliked. Javascript is one of them (tcl was the other). JS is a crap language that IMHO can't be fixed. If they ever add an honest garbage collector to the base language then most programs will delete themselves upon execution.

      Lol. And the garbage collector would then send out an email to every web designer who says "I know how to code in Java" when they mean Javascript and clean up that confusion once and for all.

      I've been forcing myself to get good at writing JS lately (if only because Node looks like it'll make all my other skills irrelevant in the web development market). It.. just.. feels.. wrong. Nothing in the language lends itself to building architectured solutions. Maybe the testing tools have caught up with other languages now, but you're still testing ugly code.

      Javascript is the smallpox of coding languages. Maybe once it's finally eradicated Brendan Eich will only be remembered for this, the equally damaging Rust language and attempting to remove the marriage rights of same-sex couples in California. Hey, did I just politicise Javascript there? Flame on.

    2. Re:I has a sad by narcc · · Score: 1, Insightful

      So... What's wrong with the language? Or were you just repeating the meme?

    3. Re:I has a sad by anchovy_chekov · · Score: 4, Informative

      The fact that there is a need for a book like this: http://shop.oreilly.com/produc...

      Maybe? :) Still haven't found a "C - Just the Good Parts" book, but still looking.

    4. Re:I has a sad by PolygamousRanchKid+ · · Score: 1

      I've only run across 2 I've actively disliked.

      . . . oh, then you need to meet IBM mainframe JCL . . . it's a hoot and a half . . . then you can ++ your count up to three . . .

      --
      Schroedinger's Brexit: The UK is both in and out of the EU at the same time!
    5. Re:I has a sad by dr_blurb · · Score: 1

      The fact that there is a need for a book like this: http://shop.oreilly.com/product/9780596517748.do

      Needed, perhaps, but that is a good book, recommended for anyone who wants to delve a little deeper into Javascript.

    6. Re:I has a sad by wiredlogic · · Score: 1

      TCL has a nice simplicity to it in that is has essentially no grammar. Compared to Lisp, Forth, or Postscript it is a nice small language. It's not my go to for everyday scripting but I still appreciate its flexibility. You can redefine everything. You want infix assignment expressions? A simple handler for unknown commands will do that for you. Want a new control structure? Make a command for it and roll.

      --
      I am becoming gerund, destroyer of verbs.
    7. Re:I has a sad by Snotnose · · Score: 1

      It's been 20 years, but in '94 I spent 6 months writing something in TCL. I don't remember why I ended up hating it so much, but I seem to recall I was never sure if I wanted to use *foo, foo, or &foo in any given situation.

    8. Re:I has a sad by Tablizer · · Score: 1

      Why is that book only 3 pages?

    9. Re:I has a sad by ndykman · · Score: 1

      Some would argue the book you seeking is this: The C Programming Language (2nd Edition)

    10. Re:I has a sad by Pherdnut · · Score: 1

      That book is written by a guy with a love/hate relationship with JavaScript. I do much appreciate Doug's contributions in regards to Monkey Island and JSON but beyond that I wish he'd just butt out of the vast majority of JS conversations given some of the truly inane stuff he's said about it.

    11. Re:I has a sad by wirelessduck · · Score: 1

      It's called K&R?

      --
      "Every man has a right to his own opinion, but no man has a right to be wrong in his facts." - Bernard Baruch
  7. Just goes to show... by Foresto · · Score: 2, Insightful

    ...a programming language (still) doesn't have to be good in order to see widespread use.

    1. Re:Just goes to show... by jones_supa · · Score: 1

      What would be good?

    2. Re:Just goes to show... by anchovy_chekov · · Score: 1

      Oh, you're no fun.. why can't we get all jihaddy from time to time. "The sports team from my general geographical location is better than yours" works for the general public. What's wrong with a bit of rough and tumble over each other's favourite programming language?

    3. Re:Just goes to show... by Tony+Isaac · · Score: 1

      What makes a language good?

      French is a language that is kept pure by the tight control exercised by the French Academy. It has a unique, pleasant sound. It does have weaknesses, such as the lack of phonetic spelling. But is it good? By many measures, yes. Is it successful? Well, it's not dying, but it's not exactly taking over the world, either.

      English is nearly the opposite of French. English is promiscuous, allowing in words from any language that is convenient at the time, and even new made-up words. New words and syntaxes become standard just by being used by enough people. Is it good? Well, it does the job. Is it successful? Yes, certainly, it is a language considered essential in many countries. It may be that the very lack of purity of English is what has made it so successful.

      JavaScript is more like English than French. It's not pretty, but it works, and it's everywhere. Many people are trying different things with it, different ways to construct useful software. The very lack of enforcement of structure and looseness of the language may be what accounts for its success.

      So is JavaScript good? There is already a massive amount of JavaScript software out there. Much of it is shoddy, but there is a steadily growing amount of high-quality software as well. Measured by that standard of how useful it is, I'd say it certainly is good.

    4. Re:Just goes to show... by XcepticZP · · Score: 1

      I thought that was long ago proven by PHP? If you even want to call it a programming language, that is.

  8. Web Workers by tepples · · Score: 2

    single-core-hogging

    I don't see how that needs to be the case. Everything except IE pre-10 supports Web Workers. Firefox is moving toward the process-per-tab model popularized by Chrome, and the refactoring project is codenamed Electrolysis.

    1. Re:Web Workers by jones_supa · · Score: 2

      Maybe he meant that it's ridiculous to begin with that a simple JS application can hog an entire core.

    2. Re:Web Workers by fast+turtle · · Score: 2

      yet, any god damn thread that hogs a CPU still locks the entire god damn UI of Firefox because it's not multi-thread capable. Fix the fucking UI and other bugs that sill haven't been fixed insted of trying to keep up with Googles insane numbering.

      --
      Mod me up/Mod me down: I wont frown as I've no crown
    3. Re:Web Workers by Anonymous+Brave+Guy · · Score: 2

      Why should having many tabs open in separate processes cause any problem? No modern operating system will actually require the entire browser codebase to be loaded 20 or 200 times in that situation, and any overheads for context switches should be imperceptible with this kind of application.

      In general, the code itself should automatically be shared between those processes. The main things kept separate would be the data in each tab/process and the system resources and permissions.

      Those are things you really want to be kept separate, for security and robustness reasons, for example if a process crashes or if the OS kills it for security reasons. Firefox is now many years behind the curve on this issue.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    4. Re:Web Workers by robsku · · Score: 1

      Oh phlueez, I've had similiar tab counts for several (>=5) years now and it hasn't been a problem, though nowdays it does help to be selective about domains you allow scripts from.

      --
      In capitalist USA corporations control the government.
    5. Re:Web Workers by hairyfeet · · Score: 5, Insightful

      I'll get hate from the programmers but fuck it, truth is truth. Wanna know what is wrong with JavaScript? The entire damned concept, that is what!

      I mean think about it, if I told you "I have an idea! Just to get some information you are gonna have to run strange code from over a dozen places, you don't know these places, if they have malware, you have to trust ALL these places or you can't have the information" you'd say that is seriously fucking STUPID, wouldn't you? That is how modern ad driven web works, calling shit from God knows where with zero control or fine grained permissions, its all run by default....STUPID.

      What we need is either a new language built from the ground up with the realization that there are seriously nasty people out there trying to fuck your systems up, or JavaScript seriously needs a rewrite with the modern situation in mind. As it is now everybody keeps trying to fix the bullet wounds of failed design with bandaids like sandboxing, low rights mode, but at the end of the day the very concept of clicking on a link and suddenly getting code from a dozen sites you don't know and executing that code? its just a dumb idea.

      --
      ACs don't waste your time replying, your posts are never seen by me.
    6. Re:Web Workers by Tough+Love · · Score: 1

      Why should having many tabs open in separate processes cause any problem?

      A process has a far bigger resource footprint than a thread, with its own page tables, heap, fd table, etc, etc. It's a pretty big multiplier. Against that, we have improved robustness, it better be worth the bloat.

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    7. Re:Web Workers by Anonymous+Brave+Guy · · Score: 1

      A process has a somewhat bigger footprint than a thread, but it's really not a big multiplier at all in this kind of context, where we're talking about RAM measured in GB and running any modern operating system. Right now, Firefox typically grabs hundreds of megabytes of RAM just to start up with a handful of popular plug-ins and load a few simple pages, so I don't think a bit of process overhead is where they need to be worried.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    8. Re:Web Workers by Darinbob · · Score: 1

      I would prefer that every single tab except the visible one by 100% idle, no background loading, no updating of message counts in web mail, etc. It's my computer, I don't want some web developer taking control of it in order to serve me ads.

    9. Re:Web Workers by Darinbob · · Score: 1

      They're pushing ads at you, so to them it is working. It's futile to resist, because HTML5 standardized on that ridiculous underpinning, turning the browser into an application platform (sorry, "app" platform, I didn't mean t to insult real applications with the association).

    10. Re:Web Workers by Tough+Love · · Score: 1

      Could it be possible that you are not clear on the concept of "multiplier"? In this case, it means the per-task overhead for a process is a multiple of that for a thread. Of course, the code and data of the application itself may be bloated, but that is a another story.

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    11. Re:Web Workers by Mitchell314 · · Score: 1

      "Multiplier" is meaningless without some kind of context (no pun intended).

      --
      I read TFA and all I got was this lousy cookie
    12. Re:Web Workers by WaywardGeek · · Score: 3, Insightful

      Heck, you're right and didn't even have to go into how f-ed up JavaScript is as a language... "dynamic scoping"... really??? That idea sucked in Lisp and I thought we got past it in the 60's after that cock-up. And now we're supposed to take this bastard child serisouly?

      --
      Celebrate failure, and then learn from it - Nolan Bushnell
    13. Re:Web Workers by FuzzNugget · · Score: 2

      To be fair, that isn't really the fault of JavaScript in and of itself, it's more of a failing of browser security policies.

      If a same-domain-only policy was enforced similarly to as with frames, that would remove a *lot* of the issues you're taking about. Of course, that would introduce quite a number of problems, but I think it would solve more (like, for example, sites don't take ten fucking minutes to load a single page because it's reliant upon a thousand different ad servers, tracking systems... seriously, there are times when my 1080p screen can't contain the NoScript blocked list menu, it's absolutely absurd)

      Yeah, you could still do some server trickery to load external scripts, but it would be a pretty big roadblock for incompetent developers who include a million external scripts to deal with a simple task that could handled by... well, not being incompetent.

    14. Re:Web Workers by Anonymous+Brave+Guy · · Score: 1

      In this case, it means the per-task overhead for a process is a multiple of that for a thread.

      If the overheads in question are fixed and non-zero, that is self-evidently true.

      However, it isn't very interesting, because what actually matters is the resources required to run the overall Firefox application. It appears that those resources are typically a few orders of magnitude larger than the scale of the thread vs. process overheads, so the important multiplier will be very close to 1 here.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    15. Re:Web Workers by nitehawk214 · · Score: 1

      You are right, it shouldn't be a problem. However chrome hogs an unbearable amount of memory on my linux system.

      The good news is that when (not if, when) individual tabs crash, either due to html5 sound/video support being shit on linux or my own abuse of the chrome javascript debugger (it still crashes less than firebug)... you can almost always end the single tab's process and continue on without crashing the entire browser. (almost... it still occasionally leaves dead visual artifacts on the screen or hogs up enough memory/cpu to bring a rather powerful multicore machine to its knees)

      I can only imagine how horrifyingly bad developing javascript would be on windows. Perhaps chrome's multithreading works fine there, but I don't expect to ever have to find out by doing development on windows.

      --
      I'm a good cook. I'm a fantastic eater. - Steven Brust
    16. Re:Web Workers by Anonymous+Brave+Guy · · Score: 1

      FWIW, my main development machine is a Windows one, and I find it's refreshingly straightforward to use the built-in developer tools in all the major browsers these days. Mercifully, the age of relying on bloated and bug-ridden add-ons like Firebug is over. :-)

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    17. Re: Web Workers by bloggerhater · · Score: 1

      Chrome might have "process per tab," but Firefox creates container processes for plugins. All isolated from the page they are rendering to so if they go down they don't take out Firefox. Might not be as robust, but it works. Also, time to update your knowledge, kittlings. Electrolysis has been in development for almost a year and is available in Firefox nightly builds right now. Still buggy but FF is well on its way.

      https://wiki.mozilla.org/Elect...

    18. Re: Web Workers by bloggerhater · · Score: 1

      Chrome might have "process per tab," but Firefox creates container processes for plugins. All isolated from the page they are rendering to so if they go down they don't take out Firefox. Might not be as robust, but it works. Also, time to update your knowledge, kittlings. Electrolysis has been in development for almost a year and is available in Firefox nightly builds right now. Still buggy but FF is well on its way.

      https://wiki.mozilla.org/Elect...

    19. Re: Web Workers by CockMonster · · Score: 1

      It doesn't work, Flash can still take down Firefox pretty regularly

    20. Re:Web Workers by ultranova · · Score: 1

      In this case, it means the per-task overhead for a process is a multiple of that for a thread. Of course, the code and data of the application itself may be bloated, but that is a another story.

      No, it isn't. As is, Firefox with 200 tabs open will consume about 2GB+ (and is unusably slow and on the verge of crashing, presumably due to address space exhaustion). A multi-processed Firefox with 1 MB of overhead per process and one process per tab will consume 2.2GB (and likely still crash in a chain reaction if any of the tabs goes, but that's life with perpetual beta). That's 10% increase in memory use for an absurd amount of assumed overhead. So yes, code and data bloat absolutely matter by making everything else shrink into insignificance by comparison.

      --

      Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

    21. Re:Web Workers by shutdown+-p+now · · Score: 1

      To be fair, they did realize that dynamic scoping of "this" was a hilariously bad idea. It'll have to stay in the language for method calls to work as they do, but ES6 introduces a new syntax for lambdas that makes it lexically scoped as god intended.

    22. Re: Web Workers by nitehawk214 · · Score: 1

      It doesn't work, Flash can still take down Firefox pretty regularly

      My Linux machine does not suffer from this... flash does not work at all. And nothing of value was lost.

      --
      I'm a good cook. I'm a fantastic eater. - Steven Brust
    23. Re:Web Workers by Tough+Love · · Score: 1

      Wow, 10% more memory usage is significant in my books. Maybe that's just me. No wonder nobody cares about light and tight any more.

      --
      When all you have is a hammer, every problem starts to look like a thumb.
  9. If only Guido hadn't blown it with Python. by Animats · · Score: 5, Interesting

    Arguably, it should have been Python, which is a better language. But Python has a problem. Python's little tin god, Guido von Rossum, is in love with his own implementation, CPython. CPython is a naive interpreter. (A "naive interpreter" is one which does the specified operations in the specified order, with little optimization across operations.) In CPython, everything is a dictionary and a lot of time is spent doing lookups. This allows everything to be dynamic. In Python, one thread can patch objects in another thread while both are running. Objects can gain or lose elements on the fly. Even running code can be "monkey-patched".

    The price paid for that excessive dynamism is that a Python compiler is hard to write, and an optimizing Python compiler can't optiimize much. Google tried in-house to make Python faster, and their "Unladed Swallow" failed humililatingly. (A different group at Google then developed Go, aimed at the same problem of producing something good for server-side processing.) The PyPy crowd has tried, hard, to make an optimizing Python compiler, and with an incredible amount of complexity under the hood, has made considerable progress, but not enough that PyPy is used much in production.

    Pascal went down for a similar reason. Wirth was in love with his elegant recursive-descent compiler. But it didn't optimize, couldn't handle separate compilation, and had no way to handle errors other than aborting. Python seems to be headed for similar irrelevance. It hasn't even been able to replace Perl, which ought to be as marginal as "awk" by now.

    1. Re:If only Guido hadn't blown it with Python. by sourcerror · · Score: 1

      Javascript has the same dynamism as Python, why is Javascript still much faster?

    2. Re:If only Guido hadn't blown it with Python. by StripedCow · · Score: 1

      IMHO, Python is a complicated mess compared to Javascript.
      And a complicated mess is only warranted if at least it adds type checking.

      --
      If Pandora's box is destined to be opened, *I* want to be the one to open it.
    3. Re:If only Guido hadn't blown it with Python. by dkf · · Score: 1

      Javascript has the same dynamism as Python, why is Javascript still much faster?

      I suspect it is because it is easier to identify a consistent low-level type interpretation — including clearly delineated points where you need to throw the code away and recompile — with Javascript than with Python. That's what you need to do a decent compiler.

      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
    4. Re:If only Guido hadn't blown it with Python. by jbolden · · Score: 1

      Interesting points. I agree that Python is missing the window regarding Perl. What are your thoughts on Ruby's approach?

    5. Re:If only Guido hadn't blown it with Python. by sourcerror · · Score: 1

      I don't see how that is true. In Javascript you can add new methods to objects during runtime, so that's the same problem that prevents Python to be properly compiled, isn't it?

    6. Re:If only Guido hadn't blown it with Python. by Animats · · Score: 1

      In Javascript you can add new methods to objects during runtime...

      In Python you can do that from another thread. Not that you'd ever want to. But the code has to be prepared for that. In Javascript, you can tell at compile time if the code is doing that to itself.

      The optimization killer in Python is that the compiler can never look at a block of code and decide "X can't happen between these two statements". Because in Python, it can. That kills most loop-related optimizations.

    7. Re:If only Guido hadn't blown it with Python. by Nivag064 · · Score: 1

      From memory: Pascal was a language meant for training, not for production use!

    8. Re:If only Guido hadn't blown it with Python. by smellotron · · Score: 2

      It hasn't even been able to replace Perl

      Python has definitely replaced Perl where I work. It's also very quickly catching up to R (statistical/quantitative analysis), but from what I hear there is still a network effect keeping R on top for bleeding-edge research.

    9. Re:If only Guido hadn't blown it with Python. by Pherdnut · · Score: 1

      You think type checking is more complicated than dynamic?

    10. Re:If only Guido hadn't blown it with Python. by Animats · · Score: 1

      From memory: Pascal was a language meant for training, not for production use!

      Most of the original Macintosh applications were written in a slightly modified version of Pascal. Turbo Pascal had wide usage in the DOS era. But the UNIX compilers for Pascal sucked. The Berkeley one was a hack on the C compiler, and made a subroutine call for every subscript check. So it was too slow to use.

    11. Re:If only Guido hadn't blown it with Python. by shutdown+-p+now · · Score: 1

      Adding methods is a minor ability. In Python, you can do things like get a dictionary of the local variables of the current frame. Or even walk all the frames on the stack and patch them up. Or mutate the bytecode of a running method.

    12. Re:If only Guido hadn't blown it with Python. by shutdown+-p+now · · Score: 1

      Python is certainly more complicated than JS. But it's also much more consistent. And, ironically, usually less verbose, as well.

    13. Re:If only Guido hadn't blown it with Python. by vilanye · · Score: 1

      That isn't where he screwed up.

      The problem is that there are two current, incompatible versions.

      Ruby EOL'ed 1.8 and Python should have done the same for the 2.x branch.

  10. Worse is better by tepples · · Score: 4, Insightful

    Read the essay "Worse is better" and you might understand more about what causes this

    1. Re:Worse is better by gweihir · · Score: 1

      This is not "worse is better", what I see. It is "utter crap gets into production and causes serious issues".

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    2. Re:Worse is better by Hatta · · Score: 2

      Funny, "worse is better" describes the phenomenon in your signature as well.

      --
      Give me Classic Slashdot or give me death!
  11. Load fast, or user will click Back by tepples · · Score: 5, Insightful

    Why are some developers obsessed with performance? The user probably isn't. They don't care whether something loads 2 seconds quicker

    I thought loading faster was the difference between the user staying on a document and the user hitting the Back button to return to someone else's document. Web search engines have recognized this and have started to penalize slow-loading documents.

    1. Re:Load fast, or user will click Back by TubeSteak · · Score: 1

      If I hit a slow loading site, I immediately try for the google cache because it is almost always responsive.

      --
      [Fuck Beta]
      o0t!
    2. Re:Load fast, or user will click Back by reikae · · Score: 1

      The back button rarely works on modern Javascript-heavy sites, so that's not a problem.

    3. Re:Load fast, or user will click Back by Billly+Gates · · Score: 1

      yeah like 99% of the rest of the internet users, regardless of having a boss who only cares what the SEO ranking by week is when doing performance evaluations.

  12. Kinda Suprised...but I guess I shouldn't be... by neorush · · Score: 2, Insightful

    I'm kind of surprised that there is not one good comment about the benefits of javascript up above this yet. I mean you can off load sooo much data to the client cpu. With the latest in webstorage and the sqlite port to JS I can actually create a friggen database server running on the client. WebRTC and WebSockets are seriously about the change everything in the next 1-2 years....I'm curious how many of the above posts are done by folks who actually do web development? It is pretty much indispensable these days, and really pretty awesome, so get used to it.

    --
    neorush
    1. Re:Kinda Suprised...but I guess I shouldn't be... by jeffb+(2.718) · · Score: 4, Informative

      Yes, and thank you for dropping my laptop's battery life from 5 hours to 2 hours.

      Tell me, do you work at Gawker?

    2. Re:Kinda Suprised...but I guess I shouldn't be... by rubycodez · · Score: 1

      people like you need to die in a fire. we don't appreciate your rubbish bogging down our machines and opening a multitude of channels for marketing scum's wet dreams

    3. Re:Kinda Suprised...but I guess I shouldn't be... by Jartan · · Score: 1

      Any language can do that. You're just impressed that javascript has come so far.

      The only reason to "get used to it" is that web browsers still aren't supporting other languages.

    4. Re:Kinda Suprised...but I guess I shouldn't be... by iONiUM · · Score: 2

      All the features in JS that the parent is talking about are very important. But they're important and good for web applications, not web sites. Everyone here seems to assume that all people do with HTML/CSS/JS is write web sites, but that's no longer the case. Application which were traditionally written in WinForms/WPF/C++/Mobile apps are starting to get offloaded to web, which means we need those features in JS. I mean, why do you think the canvas tag and others were introduced?

      The problem is advertisers/annoying websites are also using them.

    5. Re:Kinda Suprised...but I guess I shouldn't be... by Admiral_Bob2000 · · Score: 1

      If you want to offload more bloated bulky Javascript onto my own CPU, you can chip in to my electricity bill. Deal?

    6. Re:Kinda Suprised...but I guess I shouldn't be... by neorush · · Score: 1

      ...and poorly written python sucks up server resources. You can't say a language is bad because there are people out there who don't know how to efficiently leverage it. The reality is it uses less power / network to say calculate an md5 hash in-browser than to send a json or a full http request to the server. Despite that "bulky" inclusion of Crypto.js

      --
      neorush
    7. Re:Kinda Suprised...but I guess I shouldn't be... by jeffb+(2.718) · · Score: 1

      If you're writing and executing sloppy code on your server, it's your problem.

      If you're writing sloppy code and executing it on my machine, along with hundreds of thousands of others, you're wasting my resources and theirs.

      No, calculating one md5 hash isn't going to make any difference to anyone, no matter where you do it. Doing whatever it is that Gawker's code-bonobos are doing cuts my battery life in half. That's kind of a big deal to me -- enough to make me avoid their sites when I'm running unplugged. And it turns out to be easier just to avoid the sites entirely.

  13. javaScript is okay. by Kremmy · · Score: 2

    Platform is the wrong word. Something like node.js might be considered a platform, but not JavaScript itself. JavaScript is flexible, C-like, has first class dictionaries and JSON makes them super simple to serialize. It's one of those languages whose flexibility can actually be a hindrance because you have end up having to get pretty deep to find the structure ... maybe it is a platform.

    1. Re:javaScript is okay. by TheRealMindChild · · Score: 1

      Node.js isn't anything close to a platform. It just serializes/deserialized objects.

      --

      "When life gives you lemons, don't make lemonade. Make life take the lemons back!" -- Cave Johnson
    2. Re:javaScript is okay. by Kremmy · · Score: 1

      Yup, and JavaScript is just a programming language.

    3. RE:javaScript is okay. by Pherdnut · · Score: 1

      How, beyond syntax is JS C-like?

  14. Lisp M-expressions by tepples · · Score: 2

    [ECMAScript] tries to look like a member of the Algol tree, but its internals behave more like Lisp.

    In other words, it implements the original plan for "M-expressions" in Lisp.

  15. use strict by tepples · · Score: 1

    Errorhandling and exceptions are great, because they don't ignore errors, but force you to deal with them. Javascript just runs and you never know the correctness of the state.

    Have you tried to use strict? That should turn more silent failures into the "error handling and exceptions" that you prefer.

    1. Re:use strict by ebno-10db · · Score: 1

      From your link:

      Browsers don't reliably implement strict mode yet, so don't blindly depend on it. Strict mode changes semantics. Relying on those changes will cause mistakes and errors in browsers which don't implement strict mode.

      It sounds like adding a source of errors more than removing one.

    2. Re:use strict by Billly+Gates · · Score: 1

      Doesn't work in IE 6 so it is a no go.

    3. Re:use strict by shutdown+-p+now · · Score: 1

      Even Microsoft websites no longer support IE6.

    4. Re:use strict by cwsumner · · Score: 1

      Even Microsoft websites no longer support IE6.

      And you know what we think of Micro$oft !

  16. JS is a C..P Language - see here why by Anonymous Coward · · Score: 4, Interesting

    My beef with JS is that it is a regression from the time of PASCAL or Ada (or should I say ALGOL ?) where good programs are nicely structured by means of proper data structures.
    This means:
    1.) Reliability is unecessarily low. You never know how many feet an object in variable "monkey" might have. Usually two and sometimes just one, zero or 312.
    2.) Security: A lack of type-safety regularly results in insecure programs. Plus, it is quite difficult to reason about program safety in absence of strong typing.
    3.) Hard to optimize: Strongly typed languages result in programs which can be quite easily optimized for execution efficiency. Compare that to JS, where the optimizer has to "infer" "typical runtime type" and then optimize for that "dynamic" type constellation. Of course, exception code must handle the "differently typed corner cases", too.
    That implies: Bloated optimizer/JIT compiler plus all the nice zero-day exploits which result from this. Donning my tinfoil hat I would say JS is a godsend for the TLAs.

    In summary: JS is a regression from the state of the art of 1970s. "IT" is actually forgetting the great achievements in Software Engineering that resulted in Algol. With JavaScript, computing has gone even further down the path of sloppiness and anti-reliability. Let's face it: 99% of people are in this profession for the love of money, not for the love of constructing reliable and correct systems.

    Dipl.-Ing.(BA) Informationstechnik Frank Gerlach
    Gäufelden
    Germany

    As a counter-concept, look at this invention of mine:http://sourceforge.net/p/sappeurcompiler/code-0/HEAD/tree/trunk/doc/manual.pdf?format=raw

    1. Re:JS is a C..P Language - see here why by jbolden · · Score: 2

      If you are going to argue for a serious counter proposal you may want to get an account.

      Regardless the battle between typed and untyped languages on the web was lost during the CGI days when Perl replaced C. Too much of the data coming in is untyped. http://happstack.com/docs/cras...

      As for Saupper reading the manual you don't seem to be considering the problem domain at all just creating an alternative strongly typed language with some different features than C++ or Java.

    2. Re:JS is a C..P Language - see here why by Anonymous Coward · · Score: 1

      Sappeur aims to be as type-safe as Java/C# while retaining all the efficient features of C++ (e.g. stack allocation, arrays of objects instead of arrays of references, synchronous destructors,smartpointers/ref counting. ...)

      Regarding a SD handle - I had one and used it until the PC brigade modded the handle into oblivion.

    3. Re:JS is a C..P Language - see here why by Nivag064 · · Score: 1

      ALGOL, COBOL, FORTRAN, Java, C, C++?

      Nah! Too hard, their compilers throw too many errors...

      Now JavaScript, I don't need no stinking discipline! Good lets go for it...

      I'm having to master JavaScript/AngularJS as part of a JEE7 App. JavaScript is great in some ways, but the lack of rigorous static type and error reporting is a massive handicap for serious development. But then, I understand the value of coding discipline from experience - as I have programmed in all the languages of the first line - mostly COBOL (in the distant past) & Java (since 1997).

  17. Javascript is paradigm-free by mark-t · · Score: 5, Insightful

    One thing I personally like about Javascript is that it covers all three of the currently most popular programming paradigms.

    You want an imperative style of development? Javascript can do that, check.

    You want an object-oriented style of development? Javascript can do that, check.

    You want a functional style of development? Javascript can do that too, check.

    Some would argue that by covering so many different paradigms, it ends up covering none of them as well as languages that are designed for a specific paradigm from the ground up, and I wouldn't really refute this point... but it easily does all three of them well enough to still be profoundly productive when developing in any of them, and this means that a programmer is relatively free to pick the paradigm that best models the original problem when designing a solution. This, in my experience, results in shorter development cycles, and frequently much less buggy code.

    1. Re:Javascript is paradigm-free by anchovy_chekov · · Score: 4, Insightful

      Why pick one when you can pick all three in the same application? :)

      No, you're absolutely right - being able to choose a mode of programming is neat and Java does lend itself to doing neat things. But it still feels like a language that someone quickly hacked together. And the freedom to pick a paradigm means your fellow coders get to pick whatever happens to be in their clue bucket for the day. At least with a language that focuses on imperative or functional coding you can be reasonably sure that the guy sitting next to you has a similar view of reality as you do. "Multi-paradigm" is a bit like saying "post modern", with all the positive and negative connotations. I prefer my languages neo-classical :)

    2. Re:Javascript is paradigm-free by stox · · Score: 1

      Does everything, none of them well.

      --
      "To those who are overly cautious, everything is impossible. "
    3. Re:Javascript is paradigm-free by mark-t · · Score: 1

      It does them well enough to still be useful... which was my point.

    4. Re:Javascript is paradigm-free by Tablizer · · Score: 1

      When you want imperative, you get object-oriented. When you want object-oriented, you get functional. When you want functional, you get.....bugs.

    5. Re:Javascript is paradigm-free by ndykman · · Score: 1

      This is an excellent point. It doesn't pick any particular paradigm to be structured around.

      Languages like C# and Java have added functional features, but they integrate with their primary object oriented focus. Compare this to Scheme/LISP, whose object oriented features were integrated with its primary functional focus.

      JavaScript is showing the signs of it's hasty development. Things like programming language semantics, type theory and more exist for a reason. Programming language benefit from careful design and analysis of tradeoffs.

    6. Re:JavaScript is paradigm-free by mark-t · · Score: 1

      What does C# have to do with Javascript?

      Also, writing strictly imperative code in Javascript is as straightforward as writing it in plain C.

  18. Run to the hills! by KraxxxZ01 · · Score: 2

    Try this in your favorite console: [ 10 , 1, 5].sort()
    You cringe you lose.

    1. Re:Run to the hills! by leptons · · Score: 2

      The default sort coerces the array items into strings before sorting. If you want to sort integers, use the sort function like this:

      [ 10 , 1, 5].sort(function(a,b){
      if(a>b){return 1};
      if(a<b){return -1};
      return 0
      })


      The sort method in javascript gets it done, but you have to know how it works. Maybe you just don't really know javascript if you cry about this.

    2. Re:Run to the hills! by JDG1980 · · Score: 2

      This is an incredibly non-intuitive way to do things. Sorting an array of numbers shouldn't require jumping through special hoops. This is one of the many reasons why non-typed languages suck.

    3. Re:Run to the hills! by leptons · · Score: 1

      Look, javascript has sort method. In its default use, it sorts strings because that's how it works. If you need to sort other things like complex objects in an array, that can be done too using the same function with logic you supply.

      Just saying the whole language "sucks" because it doesn't have x y and z features is a bit disingenuous. Any language you name probably is also missing some things when compared to javascript, so you can't make everyone happy all the time.

      Only noobs cry bloody murder when they get the wrong sort order back. It's that way for a reason, and it isn't impossible to sort an array of numbers. Everyone just needs to calm down and maybe learn how something works before declaring "it sucks".

    4. Re:Run to the hills! by Krishnoid · · Score: 1

      The default sort coerces the array items into strings before sorting.

      Which then leads to this point. Admittedly, this is a cross-language issue, but considering Javascript's origins are in the browser, it's hard to argue that this was a decision and not an omission.

    5. Re:Run to the hills! by smellotron · · Score: 2

      If you need to sort other things like complex objects in an array

      Oh god help us all, complex objects like integers?

    6. Re:Run to the hills! by kauaidiver · · Score: 1

      If you don't like that you won't like:

      > [] + []
      ""

      Hmm, I wonder what [] - [] is?
      > [] - []
      0

      How about adding an element to array?
      > [1,2,3] + 4
      "1,2,34"
      And subtracting?
      > [1,2,3] - 1
      NaN

      Come on, jeeze

    7. Re:Run to the hills! by leptons · · Score: 1

      Your ignorance is on display.

    8. RE:Run to the hills! by Pherdnut · · Score: 1

      That's the default behavior in a language that can mix numbers and strings and then convert them to match dynamically for purposes of comparison in the same array, yes. Not a very hard problem to solve:

      [10,1,5].sort(sortNumeric);

      function sortNumeric(a,b){ return a-b; }

      So what you in ignorance thought was a flaw is actually a demonstration of one of JS's most powerful features. We've been writing functional code long before F# showed up.

    9. Re:Run to the hills! by shutdown+-p+now · · Score: 1

      All other dynamically typed languages get this right. If you sort a list of strings, they are compared as strings. If you sort a list of numbers, they are compared as numbers. If you have a mix of both, the behavior varies, but e.g. Python will basically always compare two different types in the same way, with no meaningful semantics but guaranteed stability - so you'll get sorted strings followed by sorted numbers, or vice versa, but never interleaving.

      The only reason why JS does not do this right because the way its sort method is designed is, well, retarded.

    10. Re:Run to the hills! by shutdown+-p+now · · Score: 1

      it sorts strings because that's how it works.

      "because that's how it works" is not a valid rationale or even excuse. Clearly, the way it works is not the way any sane person would expect it to work. It's also not the way it works in any other language out there.

      And it's not just the sort order. It's all the various useless but bug-inducing automatic type conversions that let you do things with obvious semantics but give non-obvious results, like trying to apply + to two arrays - most languages would reject it, some would concatenate them, but only in JS the arrays are stringified and the resulting strings are concatenated. It's just useless, no-one ever wants that or expects that, why is it in the language?

      Ditto everything else. Why can you declare a variable anywhere inside the function with "var" (including e.g. inside a loop), but its scope is always the entire function? That's plainly retarded - if you only want function-scoped locals, then only allow "var" at top-level scope. If you allow "var" inside a loop, then it should be scoped to the body of the loop.

      Or the dynamic scoping of "this", which makes using closures an exercise in frustration.

      Or ...

      It's just too many things to list. It's a bad language, period.

    11. Re:Run to the hills! by shutdown+-p+now · · Score: 1

      For a language that was originally intended to be run in a browser along with HTML(text) sorting by string makes perfect sense.

      No, it doesn't. For one thing, even when you're rendering text to the user, you want to sort numbers as numbers, not text. Some file managers actually jump through hoops to get this right with file names like "1.txt, 5.txt, 10.txt", so that they're sorted by numeric order.

      In any case, this is completely irrelevant here, because JS the language has the notion of data types, including two separate ones for text and numbers. The whole point of having types is to clarify this kind of ambiguous semantics. If I have a bunch of values that I want to be sorted as text, I'll make them be of string type. If what I have are numbers, then I expect them to be treated as numbers in all respects. And they are - if I say 1+2 I get 3, not 12, and if I use regular comparison operators they compare them as numbers, not strings. It's only sort that insists on doing its own way. It's not only inconsistent with sanity; it's inconsistent with the rest of the language.

  19. Re:The hipsters need to go. Now. by jbolden · · Score: 4, Informative

    As someone who actually has 2 decades in the industry you don't sound like someone with that kind of time at all. Us middle aged folks look at NoSQL and think "Network database" or CODASYL databases are coming back. We weren't attached to Java-EJBs and expected a lighter weight version, Ruby seems like a scripting language...

    Stop trying to pretend to be older. Older people saw shit when you were young that isn't used anymore and that's hard to fake.

  20. Why isn't it PEBKA**M** by zippthorne · · Score: 2

    PEBCAK itself is an example of PEBCAK

    It implies that the user is a filter that takes input from the chair to input it into the computer, and does not use the monitor feedback system at all. Go ahead and draw the control flow diagram some time.

    --
    Can you be Even More Awesome?!
    1. Re:Why isn't it PEBKA**M** by Fwipp · · Score: 1

      It's talking about physical location. Between the keyboard and the chair, the user is sitting.

      Besides, between Keyboard & Monitor, from a control flow diagram, is the computer. :)

    2. Re:Why isn't it PEBKA**M** by zippthorne · · Score: 1

      Both, really. User sees the results of his actions, makes input to change the results to match what he wants. In a sense, the user transforms the screen output into keyboard input with additional input from "imagination." And the computer also transforms the keyboard into into monitor output.

      Then there's a wider feedback loop from the results of the user's input affecting the real-world in some way and that information or effect reaching the user who transforms that into a desire for the computer to perform some task, and re-running the computer > monitor > person > keyboard > computer loop.

      But putting the chair in the control flow mix implies an open-circuit input from the chair itself. I'm not sure that a chair is wise enough to make good computing decisions.

      --
      Can you be Even More Awesome?!
  21. Re:I wrote the front and backend by ebno-10db · · Score: 2

    I think you should stop using computers for a year and meanwhile try to get laid by an actual homo sapiens woman.

    Why are you in favor of inter-species mating?

  22. Re:The hipsters need to go. Now. by zieroh · · Score: 3, Insightful

    I have decades of industry experience in Silicon Valley as well. And really, your post comes off more as a bunch of whining than an actual critique. There are always going to be new technologies, and the people who are heavily invested in the previous generation of technologies will always groan about these dag-gone kids with all their newfangled ways of doing things. Heck, I've been guilty of this kind of thinking myself.

    But you know what? When we entered the industry as young whippersnappers, the previous generation of programmers said the exact same kinds of things about us.

    And somehow, despite all that, progress marches on.

    --
    People who say "sheeple" have about as much sophistication as an AOL user, and in fact are probably actually AOL users.
  23. Re:The hipsters need to go. Now. by Jane+Q.+Public · · Score: 4, Interesting

    "We would truly be better off without JavaScript, without NoSQL, without Ruby on Rails, and without the hipsters."

    It's all very well and good to have opinions, but you make some strong specific complaints here without actually giving reasons for those opinions. Many people disagree with you.

    What is your problem with JavaScript? JavaScript DOES, in fact, have some very serious problems. For a classic example that was linked to here just yesterday, try

    [5, 10, 1].sort();

    I happen to share your dislike for JavaScript, but I can give actual reasons for having that opinion.

    NoSQL has its problems as well. While for some narrow uses it does offer great performance, if you step outside those narrow bounds even a little bit, you are forced to code many of the functions normally handled by a relational database, manually. I have never had to implement a huge distributed high-performance database, so in my case the NoSQL use-case is limited to very simple local non-relational data stores. But again, I can articulate a reason for not caring for it: the theoretical basis for it is weak, what actually constitute proper use-cases for it are rare, and it creates a lot of manual coding that relational databases handle on their own.

    But now we come to Ruby and Rails (which are 2 different things). Yes, Ruby is a dynamic language, with all the (well-known) shortcomings of dynamic languages. But other than that, what do you have against them? Please be specific. We already know you don't like them. The question is: why?

  24. Re:The hipsters need to go. Now. by Joce640k · · Score: 2

    It's not just the hipsters, it's also people like Joel Spolsky - the god of hipster programmers.

    eg. I've lost count of the number of times I've seen this article referenced on the web and every time I see it I want to bash his head against something solid.

    "Making Wrong Code Look Wrong"? Really? How about making wrong code *be* wrong? How about not having it compile at all? How about an SQL library that doesn't accept unsafe strings as parameters?

    If you really want to, you could get the compiler to convert unsafe strings to safe strings on the fly ("implicit type conversion") to avoid having to educate the junior programmers.

    All SQL injection problems could be eliminated at a stroke, now and forever. How is possible that people aren't doing it?

    They're not though, because that would require a strongly typed language...and that's not fashionable.

    Joel also rants endlessly against languages with exceptions (there's some of in that article), fails to grok very basic C++ concepts every time they're mentioned (eg. stack unwinding), but the hipsters worship him as some sort of a guru. /rant over

    --
    No sig today...
  25. why don't browsers block the popups anymore? by Anonymous Coward · · Score: 1

    Remember when checking the "block popups" box actually worked? there is these annoying new kind of javascript popup that doesn't technically open a new window but just takes focus of the browser and puts itself over the content, actually worse than a old style popup! can't browser block this crap? and even the "old school popup" is making a comeback...why are browsers no longer able to stop sites from opening new windows? i'm sure there are plugins that can do it but why should i need a plugin when most browsers claim to "block popups"? what's next blinking text making a comeback? also, how is it that those circular javascrip dialogs "are you sure you want to leave the site?" that go in a circle and make it impossible to close the window should be easy enough to block but for some reason i get stuck with those regularly enough which requires me to open a console and kill the process. The continued rise of javascipt wouldn't suck so bad browser would actually stay on top of blocking the garbage.

    1. Re:why don't browsers block the popups anymore? by wiredlogic · · Score: 1

      The in-browser popups are rendered using DHTML floating regions. Since there are legitimate uses for the technology it isn't easy for browsers to identify the offending cases. The only guaranteed way to block them is with noscript.

      --
      I am becoming gerund, destroyer of verbs.
  26. "Progress" by Anonymous Coward · · Score: 1

    Knowing the internals of the JS optimizers leaves me unable to think of JS being "progress" as compared to stronly typed, imperative languages.
    Rather the word "clusterfuck" comes to mind.

    Frank Gerlach (see my other posts here)

    1. Re:"Progress" by zieroh · · Score: 1

      And that very well may be. The main fallacy of your argument, though, is that "progress" can only be limited to a single metric.

      --
      People who say "sheeple" have about as much sophistication as an AOL user, and in fact are probably actually AOL users.
  27. JavaScript is not a first class language by techfilz · · Score: 1

    End of story.

    1. Re:JavaScript is not a first class language by PolygamousRanchKid+ · · Score: 1

      Abraham Lincoln said of someone he detested: "He's a first class, second class, man."

      You could rephrase that to say of JavaScript: "It's a first class, second class, language."

      My gripe with JavaScript is that it enables people who shouldn't be programming to produce code. And this leads to negative productivity. It takes one of your good programmers a long time to debug something written by one of your bad programmers.

      With JavaScript, you can create pretty mock-ups and prototypes very fast. Then the sales executive screams, "Ship it!" And then it takes you a long time to convince the executive that this app would break, fall over and die in production. And that a robust version of the app will take some more serious work.

      --
      Schroedinger's Brexit: The UK is both in and out of the EU at the same time!
  28. Re:The hipsters need to go. Now. by tranquilidad · · Score: 4, Interesting

    I started back in 1978 and I remember someone coming in to pitch a database technology in 2006 for which they had patents pending and it would replace relational databases. They kept describing it using catch phrases and turning rows into columns and I just couldn't grasp WTF they were talking about. I finally asked them to draw a picture and they mapped it out on the white board.

    I then asked if they had ever read about IMS and hierarchical databases. They had not. I wished them good luck on their patents and sent them packing.

  29. Browser bytecode engine instead of a language by kervin · · Score: 1

    It's sad we're still using a single client side language instead of having the option of running bytecode in the browser. Obscurated JS is just as difficult to read as bytecode, and the browser can also have an automatic bytecode to text "viewer".

    Browers should get behind pNaCL or something similar.

  30. Re:Javascript haters need to let it go. by anchovy_chekov · · Score: 1

    You are wise and correct. A master programmer understands his place within the Tao.

    http://www.canonical.org/~krag...

    "Though a program be but three lines long, someday it will have to be maintained.''

  31. Only game in town by JoshuaRose · · Score: 1

    Javascript is certainly leagues behind many other languages in terms of ellegance but it has one overwhelming advantage. It's the only option on the client that is generally supported. The javascript juggernaut rolls on because we can't write modern web applications any other way. Since most developers are getting forced into writing their client application almost entirely in javascript, it isn't too much of a stretch to throw in node and mongo to take it full stack, the performance and ease becomes pretty compelling at that point.

    1. Re:Only game in town by rubycodez · · Score: 2

      people are learning to turn that rubbish off

  32. Re:With Java, there's a lot of checking... by rubycodez · · Score: 1

    that has nothing to do with the security exploits, privacy invading and cpu wasting marketing technology, very low bar for coder proficiency that the rubbish known as javascript enables.

  33. Re:not correct by Joce640k · · Score: 1

    you can easily have sql injections in your c or c++ code if you are lazy.

    Not if your SQL API only accepts parameters of type "sql_safe_string" (or whatever you want to call them)

    sql_safe_string would be like std::string but all assignment to it will run the string through a sanitizer.

    Passing any other type of string to the API would give an error when you compile the program. The compiler doesn't have a bad hair day or need you to be constantly alert in case a std::string slips though.

    (PS: None of this applies to C, obviously, and your continued grouping of C with C++ is revealing...)

    --
    No sig today...
  34. Re:The hipsters need to go. Now. by Oligonicella · · Score: 1

    Heh, the database version of the recent computer sciences grad that applied for a position and was sure he could write a better compiler for us. Probate Court, K.C., IBM mainframe. He took a walk as well.

  35. Re:not correct by beelsebob · · Score: 1

    No idea why you say none of this applies to C, this can trivially be done there too.

  36. Java will soon die a horrible death! by Anonymous Coward · · Score: 1

    Nobody here seems to be talking about the hacking and vulnerabilities that JavaScript brings to the table. Even slashdot had an article about what some security researchers are seeing - and they point out that JavaScript is part of the security problem. As more hacks like Target, Neiman Marcus, Yahoo and many others come to light, then the role of JavaScript in the hacks will also come to light. The general public will respond with a push towards more security conscious behaviour and JavaScript will be out the door.

  37. Re:not correct by Joce640k · · Score: 2

    OK, *some* of it applies to C.

    C can't do it as anywhere near as neatly or safely as C++ though because it has no concept of privacy or encapsulation.

    You also couldn't do things like implicit conversions to sql_safe_string to make it more friendly (assuming you want that).

    (And Joel is still wrong and Javascript still rubbish, which is more important than starting a C vs. C++ thread...)

    --
    No sig today...
  38. Re:The hipsters need to go. Now. by Billly+Gates · · Score: 3, Funny

    But Node.js invented threading and is a webscale and a rockstar language!! non blocking async/IO was invented by javascript. I can get code and can piece it together in parts and run it in parallel. Amazing this was never invented before.

  39. Re:The hipsters need to go. Now. by StripedCow · · Score: 1

    But Node.js allows only threading without a shared address space.
    This means that in order to communicate between threads, you must serialize all your data (!)
    Think about the overhead...

    --
    If Pandora's box is destined to be opened, *I* want to be the one to open it.
  40. Re:The hipsters need to go. Now. by jbolden · · Score: 1
  41. Re:The hipsters need to go. Now. by jbolden · · Score: 1

    That's a good story. I've had similar experiences. For example someone who was creating extensions to .pdf to essentially reinvent PostScript.

  42. Without hipsters, we would be using Mainframes by Marrow · · Score: 1

    And hating every minute of it. I have as much time in as anyone, and I am thankful for people who think outside the box. Heck, free software and linux are "hip" and the only thing that kept MS from gobbling the world.
    The non-hipster people wrote OS/2, and maybe it was fine, but it was stagnant and smelled that way. So thanks for your opinion, but I will still give props where they are due to the girl with the glasses and the guy with the fedora hat.
    Thanks.

  43. Re:The hipsters need to go. Now. by Billly+Gates · · Score: 1

    But it is FAST AS HELL?!

  44. Re:The hipsters need to go. Now. by Billly+Gates · · Score: 2

    NoSQL has a great future. The article posted with true ACID will be a blessing.

    Here is the problem with a crappy ultra expensive solution from Oracle or Microsoft. It can't scale and prices go up on an expontential basis if you try to make it do so. Zdnet a few years ago put in a price tag for running youtube.com on Oracle's database instead of Google's NoSQL solution. The price tag was almost $8,000,000,000!!

    NoSQL does not mean no sql. It means not only sql. For quick webscale performance you need low latency in the milliseconds. SQL is not designed for this. Joins slow things incredible and so do threads with blocking I/O which is the appeal of node.js and ngix that use event driven technologies.

    It is nice when you have small data and an employer who already has a license but outside of this for a startup traditional relational databases can't cut it for big data on a shoe string budget.

  45. Re:The hipsters need to go. Now. by colinrichardday · · Score: 1

    What if one needs joins?

  46. Re:The lowest common denominator by leptons · · Score: 1

    You mean, scorned by anonymous cowards who haven't learned a bit of the language? Yeah, sounds about right.

  47. Where is the solution? by MichaelHunter · · Score: 2

    If in a room full of developers, I am an "average" developer, but I also tend to approach things logically. I do my research and choose the appropriate tool to get the job done efficiently, with code that is generally accepted by the greatest user base. My clients would not want me to hand them over a product that could not be easily understood and modified by other average developers, "Anyone know a Python developer?", "No, but I know someone that works with Ruby"... In the real world this is incredibly ridiculous. The term "average developer" is also looked upon poorly on this board, and unfortunately, this being 2014, people should not require a 4 year degree to code, code should have evolved enough by now that average people should be able to put words and thoughts into simple code and have it do what is intended. It is the hardcore developers that overcomplicate what should be incredibly simple. A business term, "Where there is pain, there is opportunity", and I hear all of the time, so-called hard-core programmers with their noses up complaining about JS. I come from a world where you do not complain about something without presenting a solution, and of all these posts there is hardly anything worthy of a "solution". Apparently there is a lot of pain towards JS, so maybe one of you smart people should chase the opportunity to build a solution; just understand that no matter how perfect you think your alternative is, if no one uses it, it is useless. I use JS as a carpenter would use his hammer, I don't complain about the hammer, but if one of you smart folk were to build a better hammer that saved me time and money, I would surely use it.

    1. Re:Where is the solution? by Todd+Knarr · · Score: 2

      The complaint, though, is that people aren't using Javascript as a carpenter uses a hammer. They're using it like a carpenter would use a hammer to mill and tool a high-performance aluminum engine block. Of course your first thought would be "DUH! A carpenter's hammer's the wrong tool for that job, you need a CNC mill for that.". Which is the complaint's point. And we already have plenty of the right tools for that job, the problem is that Javscript developers go "But those tools are too complicated!". No, it's not the tools that're complicated, it's the job that's complicated. That's not what they want to hear, though.

      Bear in mind that if you can approach a problem and work through it logically, you are not an average developer, not by a long shot. The ability to do that puts you in the top 25% of developers right off. Witness the question over on Ars Technica where a developer seriously asked, in essence, why we divide applications into modules with defined APIs and hide the implementation details of a module from the components that use it. This... should have been covered way back in introductory programming classes, and anyone who's been developing software for any length of time should be able to rattle off the reasoning behind it. Yet here we have Jason Swett writing Web applications without enough understanding of the concept to know why we do it that way. He's typical of at least half the developers out there today: they do cargo-cult programming, following a set of directions without understanding what it is exactly that they're doing.

  48. Re:JavaScript is FUCKING AWFUL by leptons · · Score: 1

    Says the anonymous coward.

  49. Re:The hipsters need to go. Now. by tomhath · · Score: 2

    NoSQL is just a cache, except if it gets messed up you're screwed, unlike a cache which can be reinitialized. But if you want to use it, skip the overhead and use BDAM

  50. Who cares? by Guspaz · · Score: 1

    Seriously, does it really matter anymore? You want to write in JavaScript? Do it. You want to write in something else? Most other languages can be compiled down to Javascript without any major performance penalties. Basically, these days you can do whatever you want in whatever language you want, so what does it matter in the end?

  51. Not what it was designed for by Anonymous Coward · · Score: 2, Interesting

    The problem is JavaScript was only really designed to do small simple things, but just like the shitpile that is X86 it's been extended and kludged in ways that I'm sure the creators never intended or imagined and nowadays it is being used to run game engines, database engines, emulators and virtual machines!

    The fact that you NEED a browser with a good JIT to visit JavaScript-heavy pages without responsiveness turning to molasses just shows how out of control things have gone.

    It's only because we have such a ridiculous excess of CPU power that people can get away with this; It's bad enough that the web is so polluted with crap that it would take several minutes for the average web page to load over a modem or non-G3/LTE phone, but that we need accelerated or highly clocked CPUs and craptons of memory just to be able to render and run many pages makes me want to scream!

  52. Re:JavaScript is FUCKING AWFUL by Guspaz · · Score: 1

    So don't use Javascript. Treat it like assembly and write it in something else like C++ that gets compiled down to Javascript.

  53. That's why I use NoScript of FireFox by Paul+Fernhout · · Score: 1

    http://noscript.net/

    But it still is a bit of a kludge, compared to your broader insightful point. Chrome has something similar, but I don't think it is as good.

    --
    A 21st century issue: the irony of technologies of abundance in the hands of those still thinking in terms of scarcity.
    1. Re:That's why I use NoScript of FireFox by Joce640k · · Score: 1

      Chrome's Javascript blocking is a joke. It's almost as if Google doesn't want you to block it....

      --
      No sig today...
  54. Re:The hipsters need to go. Now. by Joce640k · · Score: 1

    Do they know what denormalizing is?

    --
    No sig today...
  55. Re:The hipsters need to go. Now. by Joce640k · · Score: 1

    Please be specific. We already know you don't like them. The question is: why?

    Because they trade away everything good computer science strives for in exchange for being easy to type and so that uneducated people can call themselves programmers without having to educate themselves. It's Visual Basic and Excel Macros all over again.

    --
    No sig today...
  56. Re:not correct by Joce640k · · Score: 1

    Realistically you use what your PHB decides and that is usually ado.net or some Oracle api. My info might be outdated by this sql_safe_string stuff is not part of SQL Server or Oracle and therefore doesn't exist in the eyes of the business world.

    My bad. The "SQL" example required you to follow a link and read something.

    It's not about SQL, it's about how weak languages lead to problems like (for example) SQL injection vulnerabilities. Read the page and weep over the method being proposed to "solve" this program.

    --
    No sig today...
  57. Strong types by MichaelSmith · · Score: 1

    Please give this language strong types. When you have megabytes of code and thousands of functions you can not rely on run time type checking. Its just too dangerous to do that.

  58. QWERTY by Tablizer · · Score: 1

    It's the QWERTY of programming languages: you can't toss it because everyone would have to toss it at the same time for the transition to work, and that requires either sorcery or an apocalypse.

  59. Re:The hipsters need to go. Now. by Jane+Q.+Public · · Score: 1

    "Here is the problem with a crappy ultra expensive solution from Oracle or Microsoft. It can't scale and prices go up on an expontential basis if you try to make it do so. Zdnet a few years ago put in a price tag for running youtube.com on Oracle's database instead of Google's NoSQL solution. The price tag was almost $8,000,000,000!!"

    You don't have to use Oracle's paid version. Almost all you're getting for your money is tech support. (Well, maybe a BIT more, but not much.) MariaDB is plug-and-play compatible (plus some enhanced features) and is free and open-source.

    "NoSQL does not mean no sql. It means not only sql. For quick webscale performance you need low latency in the milliseconds."

    You mean "for quick, massive-scale performance". Lots of modern, large web businesses use MySQL or PostgreSQL and have no complaints.

    And yes, "NoSQL" does mean "no SQL". It is not appropriate to say "SQL is not designed for this", because SQL has nothing to do with that. You were referring to the database engine. SQL is just a query language and has about zero to do with the database engine. But in general, by popular usage, when most people say "NoSQL" what they actually mean is "non-relational", like for example key-value data stores. But while most "NoSQL" databases are non-relational, using "NoSQL" to mean non-relational is just plain technically wrong. I admit it has been a popular thing to do, but so what? Astrology is popular too.

    "It is nice when you have small data and an employer who already has a license but outside of this for a startup traditional relational databases can't cut it for big data on a shoe string budget."

    Anybody who is trying to design for genuinely "big data" on a "shoestring budget" is an idiot. Amazon is big data. Ebay is big data. Joe's Surplus Warehouse is not big data. If the company becomes wildly successful, it might get to BE big data someday... but for the vast majority of startups, a relational database works just fine.

    All this was part of my point: while non-relational databases might be all the rage, their actual justified use-cases are relatively rare. I can easily find you lots of articles by folks telling everybody how their decision to go with a non-relational database turned out to be a very bad decision. But then you can find them yourself easily enough.

    Fads are fads, and recognizing them when they come around is a learned skill. Nobody is perfect at it, but getting caught up in one can be costly.

  60. Re:The hipsters need to go. Now. by Jane+Q.+Public · · Score: 1

    "Because they trade away everything good computer science strives for in exchange for being easy to type and so that uneducated people can call themselves programmers without having to educate themselves."

    That's not really an answer. It's as vague as the GP to whom I was replying. What "things"?

    Using Ruby as an example (because it was already used here): please explain what "things" it trades away? I am not aware of any. Not counting raw performance. That is one of the mentioned "known issues" with dynamic languages.

    But what else? I am interested to know what "things" these are.

  61. Re:That's why I use NoScript on FireFox by Paul+Fernhout · · Score: 1

    I had something like "NotScript" for Chrome in mind as opposed to Chrome's block all JavaScript option. But "NotScript" for Chrome does not have all the same features of NoScript (which inspired it) for FireFox. Related: http://hackademix.net/2009/12/...

    --
    A 21st century issue: the irony of technologies of abundance in the hands of those still thinking in terms of scarcity.
  62. Amazing JavaScript stuff by same sql.js author by Paul+Fernhout · · Score: 1

    Lua: http://kripken.github.io/lua.v...
    "Lua is implemented in portable C. It is possible to run C compiled to JavaScript at speeds approaching that of a native build (using the asm.js subset of JavaScript), which means that you can in principle run C code that happens to implement a VM at high speed as well. Of course this is theoretical until it is actually attempted - that is the point of this project."

    A Sql.js demo: http://kripken.github.io/sql.j...

    3D, just amazing Doom-clone: https://developer.mozilla.org/...
    "BananaBread is a 3D first person shooter that runs on the web. It takes the Cube 2: Sauerbraten engine, which is written in C++ and OpenGL, and compiles it using Emscripten into JavaScript and WebGL so that it can run in modern browsers using standards-based web APIs and without the need for plugins. The project has several goals. First, to serve as a testcase for running a demanding 3D game in browsers: Having a working testcase lets us try out new browser features and to profile performance in order to make browsers faster. Another goal is to prove that games of this nature can run in JavaScript and WebGL, which many people are skeptical about. Finally, all the code in this project is open (and practically all the art assets), so others can learn from this effort and use this code to create their own browser games. The latest update of this demo uses asm.js for additional speed, and WebRTC for multiplayer."

    The author's GitHub site, where there is a tool to compile LLVM output like from C to JavaScript: https://github.com/kripken
    https://github.com/kripken/ems...

    By others (MineCraft-like): http://voxeljs.com/

    It's been said JavaScript is much better than we deserved... It's great to see all these advances. And I think you are right, the next two years will see the further spread of all this.

    My own JavaScript experiments towards a social semantic desktop, with the idea that you could have a simple backend and do most of the heavy lifting of processing and displaying information locally in the browser.
    https://github.com/pdfernhout/...

    --
    A 21st century issue: the irony of technologies of abundance in the hands of those still thinking in terms of scarcity.
  63. Re:The hipsters need to go. Now. by Darinbob · · Score: 1

    Actually, Ruby's not a bad language. Though I'd avoid Ruby on Rails like a plague ridden rat carcass.

  64. Re:The hipsters need to go. Now. by Darinbob · · Score: 1

    I once interviewed for a job at a company that made a compiler. They claimed to use techniques borrowed from holography to make their compilation better and faster. They even had a laser lab in the building, and I am not making this up. But I could never get any actual information about what this actually meant without an NDA... Half of me thought it sounded interesting, and the other half thought it was snake oil, and I was never really sure.

  65. 41.7 ms timebase of film by tepples · · Score: 1

    In motion pictures, each frame is displayed for 41.7 ms. How can lip sync even be expressed to a precision of less than one frame?

    1. Re:41.7 ms timebase of film by jbolden · · Score: 1

      The sound has to be clicking at a minimum of 0.05ms and generally is more like .02ms. The eye is filling in the picture and the sound needs to be synchronized with the position of the lips as it is filled in. So for example if a character starts speaking and the frame on the screen has his lips closed that's going to be noticeable. If the lips are varying their positions in line with the sound then the brain will accept the illusion.

  66. When JavaScript is your hammer... by jeffb+(2.718) · · Score: 1

    I use JS as a carpenter would use his hammer...

    And most posters here feel that, to paraphrase the old saw about C++, "When JavaScript is your hammer, everything looks like a thumb."

  67. Re:The hipsters need to go. Now. by CrashNBrn · · Score: 1

    Because "Web Developers" can't code, since they don't use the Holy C.

    Of course one might also consider that "Web Developers" might actually be able to code better than those that "strive for all that is good about coding" since they have to deal with the bullshit that is HTML+CSS and get work done :-)
    My favorite usage of C was LPC via DGD. A technically interpreted "Object" C language. It was very elegant compared to many languages that were "invented" to run crap with html. I always felt it was a downright shame that DGD/LPC didn't find that niche. I don't think there would of been a need for JavaScript, PHP, and possibly many other languages that were created (primarily) to deal with HTML.

  68. Re: The hipsters need to go. Now. by bloggerhater · · Score: 1

    "[5, 10, 1].sort();"

    You are going to throw down a basic sorting issue as a reason to hate JavaScript??? JS sorts alphabetically. Big deal. Frankly I think one of the biggest problems with JS is teaching people about prototypes and prototype chains. It can be a serious mind fuck for everyone from newbies to experienced programmers who have spent their lives coding in say, C++. I've had better luck teaching binary to six year olds.

    Also...why is everyone hating on Rails so bad? It's been fantastic in the few places I've deployed it.

  69. Re:SD handle? by colinrichardday · · Score: 1

    SlashDot?

  70. Re:Nope, not repulsive by leptons · · Score: 1

    I started on 6502 and I've been coding for 35 years. I love javascript and have written 100s of thousands of lines of javascript. I don't really need it to change to get useful things done with it.

  71. Re:The hipsters need to go. Now. by Zontar+The+Mindless · · Score: 1

    perl -e 'print join(", ", sort(1,5,10)) . "\n"'

    You were saying...? :)

    --
    Il n'y a pas de Planet B.
  72. Re:I'm not the poster, but... by syockit · · Score: 1

    I hope not. I consider myself a rabid Julia fan, and for the past month I've been doing mostly Julia daily. But I don't want to see the language get dumbed down in order to accomodate general purpose programming, as it's proved to be stellar in what it's made for: numerical/technical computing.

    --
    Democracy is for the people; you only vote once per season and we'll do the rest of the work for you don't have to.
  73. That's a little harsh... by ralphtheraccoon · · Score: 1

    That's a little harsh. Javascript, as as language, isn't *that* bad. It's got plenty of annoying things, and plenty of warts, but as a language, it's workable with.

    The problems you mention are mostly solvable. "use strict" solves a bunch of them, and then use jslint (or similar) to catch the bugs your compiler normally would.

    If you really want a compiler, and to get away from some of JS's more annoying bits, then switch to coffeescript (which compiles to JS).

  74. Re:The hipsters need to go. Now. by ultranova · · Score: 1

    But in general, by popular usage, when most people say "NoSQL" what they actually mean is "non-relational", like for example key-value data stores. But while most "NoSQL" databases are non-relational, using "NoSQL" to mean non-relational is just plain technically wrong. I admit it has been a popular thing to do, but so what? Astrology is popular too.

    The meaning of words are defined by their popular usage, while the correctness of astrology is determined by whether its predictions are correct to a statistifically significant degree, therefore your analogy is false.

    --

    Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

  75. Re:The hipsters need to go. Now. by Jane+Q.+Public · · Score: 1

    The meaning of words are defined by their popular usage, while the correctness of astrology is determined by whether its predictions are correct to a statistifically significant degree, therefore your analogy is false.

    The meaning of words is eventually determined by popular usage. But it doesn't vary as much as you seem to think.

    It is quite possible -- even common -- for popular usage to be different from the technical meaning of a word.

    Even though current popular slang may say otherwise, NoSQL means "No SQL". Non-relational and "key-value store" mean non-relational. They are NOT the same things.

    Further, my last sentence was not intended as "an analogy". It was simply an observation that popularity does not indicate correctness.

  76. Thank you Apple by frankenpc510 · · Score: 1

    for killing the browser plug-in. It's not that javascript was a good option. It's the ONLY option.

  77. Re:The hipsters need to go. Now. by Flere+Imsaho · · Score: 1

    Sounds like you're saying you were a coder before being a coder was cool. Typical hipster attitude...

    --
    It gripped her hand gently. 'Regret is for humans,' it said.
  78. Speaking as a JS dev with no relevant degree... by Pherdnut · · Score: 1

    You sound very threatened. Like those Java devs (not all Java devs, but I've run into lot of these guys) that they've been producing by the metric ton for about oh, twenty years (or decades if you wish) who deeply resent having to learn anything new after graduation. As any JS dev can tell you, that's a really bad hangup to have in web technology, which I'm sorry to report to you has started to touch on just about everything.

    You really don't need a compiler or static types to write decent maintainable code and believe me, I've seen enough Java and C# code bases from hell to tell you that they certainly don't protect from writing complete procedural spaghetti horseshit wrapped in meaningless classes either. If people would just be bothered to understand what the whole point of OOP was in the first place, they wouldn't sweat the lack of a compiler when doing anything non-trivial in a different style of execution environment.

    Have you ever learned a lisp-like language or gotten very far with C#'s first class functions? If you haven't, give those a whirl and then come back to JS and stop throwing tantrums every time it doesn't behave like Java or C or C++ just because it looks like them.

  79. Hottest toys you mean. by Pherdnut · · Score: 1

    I don't know about you but I won't be trusting anybody to maintain their down-compiler as JS continues to evolve. That would be short-sighted to say the least.

  80. RE:Repulsive by Pherdnut · · Score: 1

    Speaking as a JS dev who's had to put with some pretty ugly Java, I'd be happy if the average Java developer would content themselves with simply actually understanding what OOP is supposed to do for them rather than assuming that the 18-method-calls-to-retrieve-some-static-data-for-a-basic-web-service mess they've made is actually OOP just because it's all wrapped in classes by default.

  81. See also node-webkit by Pherdnut · · Score: 1

    For cross-platform desktop OS apps with node handling the file I/O and JS and web technology handling all UI concerns inside a window. Only the Python community does cross-platform as well, IMO.

  82. Or you could learn to write maintainable in JavaSc by Pherdnut · · Score: 1

    I'm sorry, but the whining in this industry is getting pretty epic. Learn the !@#$ing tool. It's not Java or C#. You CAN write maintainable code without static types. JS and Python devs have been doing it for some time now. And believe you me, it would really help C# and Java devs with their primary languages if they learned how to.

  83. JavaScript is paradigm-free by Pherdnut · · Score: 1

    I would actually disagree with the statement that it's paradigm free. While I respect C# as a feat of language design, one thing I don't like about its implementation of every language feature it can get its hands on is that it doesn't have a very strong opinion and there's just a crap-ton of syntax you have to learn as you work with it (although given the alternative I'd rather have first-class funcs in any language at the expense of bonus syntax). JS encourages OOP and functional used together and has strived to do a lot with a little syntax. Strictly imperative isn't really possible if you're using it for web UI as much of the DOM relies on event handlers and you can't really escape the topics of closure or OOP when you start doing non-trivial stuff from there. Functions can be classes or methods or in many cases both.

  84. Re: The hipsters need to go. Now. by shutdown+-p+now · · Score: 1

    JS sorts alphabetically. Big deal.

    It is kind of a big deal when the common sense dictates that it should work otherwise, and every single other language gets that right.

  85. Re:not correct by beelsebob · · Score: 1

    OK, *some* of it applies to C.

    C can't do it as anywhere near as neatly or safely as C++ though because it has no concept of privacy or encapsulation.

    Sure there's a concept of privacy –simply don't let the compiler see the private stuff (i.e. don't put it in your header), and of course there's a concept of encapsulation – it's called writing functions that accept a data structure as their first argument, and only exposing the public ones via headers. C actually does a much *better* job of privacy and encapsulation than C++, as C++ requires you to write about private implementation details in public places (the header).

    You also couldn't do things like implicit conversions to sql_safe_string to make it more friendly (assuming you want that).

    You certainly can't do an implicit conversion, no. You can of course do an explicit one, but this is true of C++ too, and of course the programmer is a moron if they do this.

    (And Joel is still wrong and Javascript still rubbish, which is more important than starting a C vs. C++ thread...)

    Agreed, this is literally the example I use to demonstrate to people why they want a more strongly typed language than the one they're using. People seem not to realise that the type system can prove a lot more things than simply "you're passing a boolean to that if statement", and when exploited correctly can be made to prove some seriously important safety properties of your program. Another example that I use (which is very similar) is having a file transmitted over the network, and requiring verification that the file is actually valid, and is not giving all kinds of crazy values we don't expect, and may crash us. We can then trivially use the type system to prove that that verification actually happens before doing any real work with the file.

  86. Re:The hipsters need to go. Now. by Tablizer · · Score: 1

    Some suggest the idea of a database is against the very philosophy of OOP. Databases tend to be attribute-centric, where-as OOP tends to want custom behavioral wrappers around each object: you don't "share verbs" in OO unless an object wants to.

    If each object has its own little interface, then you have no standard database operations that apply to all objects, at least not without some sticky compromises. Databases are essentially about standardizing operations on things/entities/objects. OO doesn't like that: each object is "special".

  87. Re: The hipsters need to go. Now. by bloggerhater · · Score: 1

    Whose common sense? Someone that is so thoroughly entrenched in their ways that they are unable to embrace change? Please.

  88. Re: The hipsters need to go. Now. by shutdown+-p+now · · Score: 1

    Common. You know, that's why it's called "common sense".

    There's nothing wrong with change in principle, but only when the change achieves some positive objective, not change for the sake of change. In this particular case, sorting numbers as if they were strings is 1) a change, that 2) serves no useful purpose, and 3) is actively harmful. Why would anyone want to embrace that?

  89. Re: The hipsters need to go. Now. by cwsumner · · Score: 1

    There are a finite number of ways to improve things. There is an infinate number of ways to make them worse. People who pick something at random and expect the change to make things better, do not have a good "track record" !