Thread: What do we think about JavaScript?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    O_o

    I like the Javascript language fine, and a few features which have been seriously discussed could see me moving to Javascript for most development.

    However, I am specifically referring to the language. The standard library and DOM related components are, being generous, obnoxious cruft.

    Soma
    “Salem Was Wrong!” -- Pedant Necromancer
    “Four isn't random!” -- Gibbering Mouther

  2. #2
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    Quote Originally Posted by phantomotap View Post
    O_o

    I like the Javascript language fine, and a few features which have been seriously discussed could see me moving to Javascript for most development.
    This is kind of how I feel.

    I didn't really appreciate the beauty of JavaScript until they introduced generators and then I really fell in love with it once the library "co" was written.

    Honestly, the async code that I've written looks absurdly awesome but that might also be because I've never really played with a language that supports generators, let alone full coroutines. And even then, it's not like generators or coroutines are even unique to JS, they just happened to port them over.

    I like the C-style syntax and I appreciate the degrees to which you can implement functional programming concepts.

    But there's very many silly things that JS does that I feel keeps it from being a true powerhouse, such as it's allowance of comparing a string to a date object or a number to a string without so much as a warning, it just evaluates to false. This leads to bugs that are incredibly hard to track down.

  3. #3
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    Web Assembly is just over the horizon, and it's likely that there will be tools that compile real languages into Web Assembly, reducing the world's dependence on JS.
    What can this strange device be?
    When I touch it, it gives forth a sound
    It's got wires that vibrate and give music
    What can this thing be that I found?

  4. #4
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    I did at a professional level for almost 15 years. A time when ASP.Net was all the rage and ColdFusion this new kid on the block. When client-side cripting was practically non existing. I saw the CoffeeCup Editor taking the world by storm, followed by Dreamweaver. Moved into PHP, witnessed the birth of 3 CSS versions and the struggle to make HTML 4 a widely used standard. Witnessed the birth of Ajax and how it brought javascript from the ashes as Microsoft unwillingly contributed to its widespread use. I remember when Javascript was accused of being a poorly developed language and the major contributor to browser incompatibility. The latter has indeed changed, but people seem to have forgotten the former.

    For almost 15 years, I breathed the poisonous fumes of web development, server and client side. I have no wish of going back. It would be like going back to prison.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  5. #5
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    Quote Originally Posted by Mario F. View Post
    For almost 15 years, I breathed the poisonous fumes of web development, server and client side. I have no wish of going back. It would be like going back to prison.
    There's pretty robust front-end frameworks that can help mitigate a lot of the front-end toxicity. Ampersand is a pretty good one. It's object-oriented and declarative. Its implementation of types isn't half-bad either and really plays well to a C++ developer's natural thinking.

    But there are times that I've found myself completely eschewing the framework and just doing some jQuery stuff myself so I guess that means about as much as that does lol.

  6. #6
    Registered User
    Join Date
    May 2003
    Posts
    1,619
    I dunno. I use it extensively for web dev.

    On the plus side, I do like being able to make object and array literals. Prototype-based inheritance at first was a tricky paradigm to wrap my head around but it's grown on me.

    On the down side, I don't like the weak typing and I don't like some of the downstream effects of this structure, though - mainly, how spotty IntelliSense and such tools are. I tend to spend a lot more time reading API documentation because my development environment can't always present this information to me inline as I need it. This is certainly not new; I learned development in the days before IntelliSense existed, but it's a great time-saver that I really find I miss when it's not working reliably.
    You ever try a pink golf ball, Wally? Why, the wind shear on a pink ball alone can take the head clean off a 90 pound midget at 300 yards.

  7. #7
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158

  8. #8
    Make Fortran great again
    Join Date
    Sep 2009
    Posts
    1,413
    Quote Originally Posted by Yarin View Post
    Awesome.

  9. #9
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    I need a like button for that.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  10. #10
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    Yeah, that was some of the nonsensical stuff I was alluding too earlier. It's not actually all that funny when it's a real problem in your codebase.

    Okay, that's a lie. It's still funny.

  11. #11
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    Why are we doing web asm again? Are we certain we don't hate the world? The Birth & Death of JavaScript —
    Destroy All Software Talks
    Last edited by whiteflags; 06-13-2016 at 11:12 PM.

  12. #12
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    My favorite talk of his is "A(n) Brave New World". He captures perfectly the current software development culture that has been plaguing us for 20 years or so. The tremendous lack of innovation, the false memes that have been corrupting our thinking and eroding our computer quality of life, the constant vertical growing of a software development ecosystem dependency tree that can't shave off its legacy root nodes and replace them altogether with something entirely new.

    It goes to the core of why I no longer find pleasure in programming. A culture that I can no longer respect or feel I want to be a part of. Software development is a victim of its own success. As it became increasingly widespread, it became a culture of the masses; and with this, absorbed all the trappings of popular culture.

    A month ago we were introduced here on CBoard to a new code editor. I immediately criticized for its lack of anything even resembling innovation. It is just another executable file no one really needs, that doesn't bring anything that we haven't already. And what we have already is nothing like we have been asking. In a few minutes Gary describes an editor that would be a dream to any developer. But it won't be made (that talk is 4 years old). It can't be made because not only it lacks the software infrastructure to support it, despite computers being more than able to render and execute all of its functionality and modern CPUs capable of handling its complexity and performance demands, but also because even if we ignored the terminal requirements and developed it for a GUI, no one is interested in making it as they keep distracting themselves with making code editors with mind numbing keyboard combos and cute syntax highlighting.

    This is really a Seth Godin's world. Spending 1 or 2 years not writing a single line of code (because innovation takes thinking), just hammering your brain down coming up with a code editor that _really_ solves software development problems is just not how we do software anymore. Keyboard combos, syntax highlighting and cool dark themes is what allows us to ship our software fast and ship often. Such is the sorry state of our pop culture of software development. And so we elevate to the status of divinity, such repugnant things as the Sublime Editor. And with it, we create and worship a pantheon of false gods.

    And I'm sure Seth's proud also of programming languages development over the years. We haven't improved. We have done _nothing_ to facilitate the engineering task that is software development. We ship software languages fast and ship often. They are born like mushrooms resembling all others that already exist and pretending they are better and solve our problems. But our _real_ problems stay unsolved. Because we surround ourselves precisely with all sorts of principles, building huge and complex rules on best practices and code correctness and good paradigms, forgetting that is precisely the _real_ problem of software development that we are begging to be solved. And it can only be the language that can implementing and enforce these rules. But no way that will happen. A programming language that acts responsibly towards the computer but also towards the programmer isn't going to be developed in this culture. And so programming is an absurdly difficult task and a miserable activity of constant peer checking and the consequent humiliation of public exposure to ridicule, because no one can possibly adopt all the rules.

    ---

    I am probably not intelligent enough to have come up with those things I wish in this post. But I will never know. Now it is too late. I went too fast through academia (big mistake) and straight into the job market, where for all my sins I spent too much time strapped to poor languages and no time for sitting under a tree and thinking about what I really wanted and why what I was doing was utter nonsense. Maybe, if my early choices hadn't been so bad and I had thought more carefully about my career, I would have been discussing things like Gary's editor in the first person.

    But I see myself in every fresh graduate in this day and age. Graduates completely blind to the neon lights of modern computer programming, lacking any incentive or even the realization there is a need to change the landscape of software development and that things are bad, very bad. Not great and shiny as the pop community will want them to believe.
    Last edited by Mario F.; 06-14-2016 at 04:14 AM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  13. #13
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    Quote Originally Posted by Mario F. View Post
    In a few minutes Gary describes an editor that would be a dream to any developer.
    Link? I can't find this talk.


    Quote Originally Posted by Mario F. View Post
    And so we elevate to the status of divinity, such repugnant things as the Sublime Editor.
    Indeed. People need to accept Vim as the one true editor.

  14. #14
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by Yarin View Post
    Link? I can't find this talk.
    I couldn't find it either. I watched it a long time ago and turns out I only thought I knew its title. It's called "A(n) Whole New World": A Whole New World —
    Destroy All Software Talks


    Quote Originally Posted by Yarin View Post
    Indeed. People need to accept Vim as the one true editor.
    Another piece of useless crap. Yes, you can type fast in it. Great! That will not solve many coding problems, but you can write cheap lousy novels in it faster than Stephen King can publish them. *two thumbs up*
    Note: I know you was being sarcastic

    @Mutant: Will reply later, mate.
    Last edited by Mario F.; 06-14-2016 at 11:31 AM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  15. #15
    Registered User
    Join Date
    May 2003
    Posts
    1,619
    Quote Originally Posted by Mario F. View Post
    I couldn't find it either. I watched it a long time ago and turns out I only thought I knew its title. It's called "A(n) Whole New World": A Whole New World —
    Destroy All Software Talks


    I dunno, I disagree with quite a bit of this. Sure, there are some cool ideas there, but I think he's as guilty as anyone of doing exactly what he preaches against. Making this hypothetical editor a terminal rather than an IDE is a choice that would seem to be driven more by doing things 'the way he always does it' rather than because it's the right tool for the job. I think it's a great example of the very legacy burden he wants to get rid of.

    Some of his ideas are interesting, but many of them are already commonplace in modern IDEs (support for diff visualization, dependency mapping, etc.) and some of this seems like he's pushing for niche features at the expense of day-to-day. For example, although I can get a dependency map in my IDE with a few clicks, the number of times I really have a need for one is trivially small compared to the number of times I have a need for a breakpoint in a debugger. I can't imagine using a tool that made dependency mapping slightly easier at the expense of not having an integrated debugger.

    The error overlay is a genuinely cool concept. I think the even better focus is on tools to help proactively avoid errors versus making them easier to troubleshoot later, but since the latter will never catch everything for everybody, there will always need to be recourse to the former.

    On shipping, I think there's often too little emphasis on it. Sure, some people push shoddy stuff out the door, but I see more projects get mired down in development hell, scope creep, or woefully overarchitected solutions (inner platform effect, etc.) because people weren't given the right level of constraints. Having target ship dates that it is expected you must meet can, in my experience, often lead to better code, not worse. Clearly there is a balance to be struck, and in the face of some kinds of issues shipping dates genuinely should be delayed, but I think not shipping fast enough is at least as common as shipping things too fast.

    And, of course, you're designing a product for people to meet a need. Every day you go without shipping your product is one day when that need is not being met by you. It might also mean the need becomes met by a competitor first.
    You ever try a pink golf ball, Wally? Why, the wind shear on a pink ball alone can take the head clean off a 90 pound midget at 300 yards.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. ajax response javascript=>c#=>javascript
    By xddxogm3 in forum C# Programming
    Replies: 1
    Last Post: 03-14-2012, 01:22 PM
  2. Replies: 2
    Last Post: 03-10-2009, 08:36 PM
  3. javascript
    By Redseal in forum Tech Board
    Replies: 8
    Last Post: 06-16-2007, 07:36 AM
  4. javascript
    By xddxogm3 in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 12-07-2003, 10:50 AM
  5. javascript
    By bluehead in forum Game Programming
    Replies: 4
    Last Post: 12-04-2001, 09:13 PM

Tags for this Thread