Why is javascript so disliked
-
See title
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
Javascript is great!..but I've been using it for 24+ years, so I'm used to it. Combined with CSS and AJAX, and there's not a lot you can't do. My gripe is that after all this time, it's still a PITA to debug in Visual Studio. (probly cause I use master pages) I still rely on the tried and true alert(whatami); debugging method. :laugh:
"Go forth into the source" - Neal Morse "Hope is contagious"
-
OriginalGriff wrote:
to differentiate it
One thing I disliked about Pascal is that it has Function and Procedure distinguished by keyword -- I prefer that C and its ilk don't, and have no keywords for those concepts. I can understand why SQL does things more differentlier, and that's OK.
-
See title
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
I like JavaScript because it is so forgiving. Error messages like
NaN
,undefined
, are much gentler compared to a bunch of Error messages which come in C# projects on Visual Studio. -
Javascript is great!..but I've been using it for 24+ years, so I'm used to it. Combined with CSS and AJAX, and there's not a lot you can't do. My gripe is that after all this time, it's still a PITA to debug in Visual Studio. (probly cause I use master pages) I still rely on the tried and true alert(whatami); debugging method. :laugh:
"Go forth into the source" - Neal Morse "Hope is contagious"
kmoorevs wrote:
Javascript is great!..but I've been using it for 24+ years, so I'm used to it. Combined with CSS and AJAX, and there's not a lot you can't do. My gripe is that after all this time, it's still a PITA to debug in Visual Studio. (probly cause I use master pages) I still rely on the tried and true alert(whatami); debugging method. :laugh:
I still use alert boxes for testing in JavaScript as well! I've been writing Javascript since about 1996 or so. In the beginning, there was no logging console available, so you really had to use alert boxes to test your code. I love writing JavaScript. It's become so versatile over time that your imagination is the limit. It does have its strange quirks, but they present no problems if you know how to work with them. Why is it that in JavaScript, null is an object? In terms of conditional statements, that's when it gets really weird. If you compare null to undefined, the condition returns true. When you compare undefined to null, the condition returns false. If I remember correctly, that's how it goes, but I learned this so long ago that my memory is faint and vague. It's something along those lines, but either way, it goes to show how ridiculous JavaScript can be. Either way, I really like it!
-
See title
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
Mainly because it sucks. Have you noticed that the likeableness of javascript is inversely proportional to a person's age? CQ de W5ALT
Walt Fair, Jr.PhD P. E. Comport Computing Specializing in Technical Engineering Software
-
See title
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
One of the things I say to people worried about learning new languages is once you learn the concepts behind one language, you already know most of the concepts behind most other languages. Learning the new language is mostly a matter of semantics and syntax after that. Javascript, for someone who's always been exposed to strong types, doesn't really lend itself to all of the concepts of our normal languages. It's strongly NOT typed, allowing all kinds of values and free-form stuff assigned to it, including entire functions. It doesn't follow a lot of the concepts you learned in other languages. I think it's this "bucking of the norms" that really throws people off and gives everyone a bad taste. IMHO, Javascript being a no-typed language really makes the code-writing and debugging experience a pain in the ass. That and the lack of proper debugging tools in browsers. If you really need Typescript to make the experience that much better, the language and execution environment should have been designed with this in mind. Typescript should not have been an external bolt-on. Once you get used to it, and that's a steep learning curve for noobs, it's not too bad. I just use the tried-and-true old-school techniques of alerts and peppering the code with console.log everywhere.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles. Dave Kreskowiak
-
This is almost exactly the same question I asked here in the Lounge about 7 years ago. I was struggling with something and it wasn't working as I expected it to and hence the frustration. @JeremyFalcon gave a really good response to that question and 7 years later I fully agree with him. Most of the hate JS gets is from people who are new to it, and probably have an expectation of how it would/should work. When it does not (and not always due to a straight forward reason) it gets frustrating. Historically JS has been riddled with issues. It still is. But over the years most of the major issues with JS are now avoidable when we use it a certain way. For example, the global namespace pollution has been a major issue causing countless production bugs which can be avoided with the use of JS modules or IFFEs. The callback hell can be avoided with the use of asynchronous programming. As people get more experienced with JS they become more accepting of it's quirks and manage to avoid it's pitfalls while being able to produce robust production ready code.
GKP1992 wrote:
with JS are now avoidable when we use it a certain way.
Which of course works in a day zero startup with two programmers that have been working together for years. With a 20 year old code base which has been worked on by more than 100 developers, each with their own preferences, it doesn't work out too well.
-
This is almost exactly the same question I asked here in the Lounge about 7 years ago. I was struggling with something and it wasn't working as I expected it to and hence the frustration. @JeremyFalcon gave a really good response to that question and 7 years later I fully agree with him. Most of the hate JS gets is from people who are new to it, and probably have an expectation of how it would/should work. When it does not (and not always due to a straight forward reason) it gets frustrating. Historically JS has been riddled with issues. It still is. But over the years most of the major issues with JS are now avoidable when we use it a certain way. For example, the global namespace pollution has been a major issue causing countless production bugs which can be avoided with the use of JS modules or IFFEs. The callback hell can be avoided with the use of asynchronous programming. As people get more experienced with JS they become more accepting of it's quirks and manage to avoid it's pitfalls while being able to produce robust production ready code.
GKP1992 wrote:
7 years later I fully agree with him.
Amen brother. IMO the biggest issue with JS is its popularity. You take any language on the planet and make it extremely popular and you're bound to have some people writing stupid code in it. That's not the fault of the language itself though; it's the fault of the "average" coder.
GKP1992 wrote:
The callback hell can be avoided with the use of asynchronous programming.
The whole reason callback hell even started (then went onto promise hell) was due to one of JavaScript's strengths. As you mentioned, most people just didn't know about JS's execution model and would rather insult than learn. But, because of the execution model, it's always been extremely hard to lock JS. Granted, people needed to learn how to deal with that or else they'd suffer race conditions, but peeps only had to take the time to learn the language. The same could be said of any language though. I'm not gonna learn Rust overnight.
GKP1992 wrote:
As people get more experienced with JS they become more accepting of it's quirks and manage to avoid it's pitfalls while being able to produce robust production ready code.
100%. It's a language that's been evolving and will continue to evolve as it grows up, so to speak. As it stands now, it's literally the fastest scripting language on the planet. It runs so fast it deserves its own category of scripting language. Sure, compared to C/C++ or Rust it's slower, but compared to Python, etc. none of them hold a candle to JS. And it has to be that way, it's the dynamic language of the Internet so a lot of time has been spent optimizing its execution engines. Haters gonna hate though. :laugh: :laugh: :laugh:
Jeremy Falcon
-
See title
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
Haters gonna hate buddy. Everyone who claims to be an expert at JS that hates is lying. It's more ego where they're fooling themselves than them actually being experts. Programmers aren't known for being mature and all.
Jeremy Falcon
-
Javascript is great!..but I've been using it for 24+ years, so I'm used to it. Combined with CSS and AJAX, and there's not a lot you can't do. My gripe is that after all this time, it's still a PITA to debug in Visual Studio. (probly cause I use master pages) I still rely on the tried and true alert(whatami); debugging method. :laugh:
"Go forth into the source" - Neal Morse "Hope is contagious"
kmoorevs wrote:
My gripe is that after all this time, it's still a PITA to debug in Visual Studio. (probly cause I use master pages)
Preach brother. :laugh: :laugh: :laugh: Not sure about VS, but Node and VS Code makes debugging much easier these days though. Just guessing you doing ASP.NET because of saying "master pages"? Dunno how well it is on that side of things, but there's a little hope. A little. :laugh:
Jeremy Falcon
-
One of the things I say to people worried about learning new languages is once you learn the concepts behind one language, you already know most of the concepts behind most other languages. Learning the new language is mostly a matter of semantics and syntax after that. Javascript, for someone who's always been exposed to strong types, doesn't really lend itself to all of the concepts of our normal languages. It's strongly NOT typed, allowing all kinds of values and free-form stuff assigned to it, including entire functions. It doesn't follow a lot of the concepts you learned in other languages. I think it's this "bucking of the norms" that really throws people off and gives everyone a bad taste. IMHO, Javascript being a no-typed language really makes the code-writing and debugging experience a pain in the ass. That and the lack of proper debugging tools in browsers. If you really need Typescript to make the experience that much better, the language and execution environment should have been designed with this in mind. Typescript should not have been an external bolt-on. Once you get used to it, and that's a steep learning curve for noobs, it's not too bad. I just use the tried-and-true old-school techniques of alerts and peppering the code with console.log everywhere.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles. Dave Kreskowiak
I'd upvote your post twice if I could. :thumbsup: I think another reason it got a bad rep is for years it was strictly functional back in the day... not procedural like C but functional more like F#. Technically you could do procedural in JS, but a lot the solutions to common problems used a functional paradigm. Functional languages and concepts just aren't as popular. So peeps would rather insult than learn. These days that's all changed though as you can do both OOP or functional. For the types... totes get it. Personally I see value in using a loosely typed language. However, I also see the value in a strongly typed one. Fortunately these days, when you need strong types we have TypeScript and Flow.
Jeremy Falcon
-
See title
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
I'm absent minded, but I often spend hours debugging stupid things that C# would flag instantly. Also, the VSCode Intellisense and code navigation in JavaScript projects tend to be sub-par when compared to C# projects on Visual Studio.
-
Haters gonna hate buddy. Everyone who claims to be an expert at JS that hates is lying. It's more ego where they're fooling themselves than them actually being experts. Programmers aren't known for being mature and all.
Jeremy Falcon
Bah. I've been good enough at it to spot obvious idiocy from 'experts'. It's a bad tech founded on bad principle with more bad practitioners than pretty much any other language you want to pick. It will die. It may take a bit, but it will be an archaic relic in the dust bin of history and it will be consigned there inside half a decade once the right bits come along.
-
See title
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
A good, but old and oft repeated question about JavaScript (JS). Most of those who make their living in the HTML/CSS/JS world span the spectrum of loving it to putting up with it in order to make a living. Like generations of developers before them, change is often resisted. There is nothing wrong with liking JS and wanting to stick with it. In past generations, FORTRAN, COBOL, QuickBasic, Visual Basic, Delphi/Pascal, etc. developers were in their "comfort zone", and did not want to learn new languages, frameworks, and newer ways to design software. What I write is not a criticism of those who like or want to stick with JS. It is an explanation of why many software engineers would like to move past JS to newer, better, technology. To answer the question, there are several reasons some software engineers do not want to use JS unless they absolutely have to. It is not so much a dislike, but a growing realization that JS is not as suited for 21st century software development as newer, OO, compiled, languages that are designed for broader functionality or extensible to take on new functionality. Many software engineers don't want to be locked into older, less flexible, languages like JS when they can choose from multiple newer, better suited languages. Here are a few of those reasons. - JS is not object oriented (OO). OO design and programming has a lot of advantages over procedural languages like JS. Tools like TypeScript try to overlay some OO techniques over JS, but in the end, what is emitted from TypeScript is still non-OO JS. - JS is a script language. It is not compiled but run by an interpreter. There are some tools that try to approach the benefits of compiling to machine code, or at least byte code for an intermediate just-in-time interpreter/compiler, but the execution speed of JS is slower than compiled languages, especially ahead-of-time compiled (to machine code) languages. - While JS is supported well in the browser (with inconsistencies between browsers), running JS as a server-side language is slow and not designed for that. Compiled, OO languages work much better server-side. - JS tends towards being cryptic, not as developer-friendly as modern compiled OO languages. - JS was never intended to do a lot of what it does. In 1995, the beginning of the dot-com boom, Netscape assigned a programmer, Brendon Eich, to create a language for the Netscape browser to allow dynamic behavior that had Java-like syntax (which is mostly C/C++ syntax), but not derived from Java. Brendan Eic
-
See title
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
I never had much against it until, out of the blue, it was considered a serious programming language. I mean I like to stick close to the metal as much as sanely possible (I constantly remind people C is a high-level language). That said, I know I'll have to relearn JS at some point in order to load WASM modules (written in whatever: LISP, C, RUST)
-
A good, but old and oft repeated question about JavaScript (JS). Most of those who make their living in the HTML/CSS/JS world span the spectrum of loving it to putting up with it in order to make a living. Like generations of developers before them, change is often resisted. There is nothing wrong with liking JS and wanting to stick with it. In past generations, FORTRAN, COBOL, QuickBasic, Visual Basic, Delphi/Pascal, etc. developers were in their "comfort zone", and did not want to learn new languages, frameworks, and newer ways to design software. What I write is not a criticism of those who like or want to stick with JS. It is an explanation of why many software engineers would like to move past JS to newer, better, technology. To answer the question, there are several reasons some software engineers do not want to use JS unless they absolutely have to. It is not so much a dislike, but a growing realization that JS is not as suited for 21st century software development as newer, OO, compiled, languages that are designed for broader functionality or extensible to take on new functionality. Many software engineers don't want to be locked into older, less flexible, languages like JS when they can choose from multiple newer, better suited languages. Here are a few of those reasons. - JS is not object oriented (OO). OO design and programming has a lot of advantages over procedural languages like JS. Tools like TypeScript try to overlay some OO techniques over JS, but in the end, what is emitted from TypeScript is still non-OO JS. - JS is a script language. It is not compiled but run by an interpreter. There are some tools that try to approach the benefits of compiling to machine code, or at least byte code for an intermediate just-in-time interpreter/compiler, but the execution speed of JS is slower than compiled languages, especially ahead-of-time compiled (to machine code) languages. - While JS is supported well in the browser (with inconsistencies between browsers), running JS as a server-side language is slow and not designed for that. Compiled, OO languages work much better server-side. - JS tends towards being cryptic, not as developer-friendly as modern compiled OO languages. - JS was never intended to do a lot of what it does. In 1995, the beginning of the dot-com boom, Netscape assigned a programmer, Brendon Eich, to create a language for the Netscape browser to allow dynamic behavior that had Java-like syntax (which is mostly C/C++ syntax), but not derived from Java. Brendan Eic
I agree with most of this with the exception of "Not OO". JS is not OO in the Data/Procedure or Data/Procedure/Relational (C++, C#, Java) sense. But it is OO in the Process/Message model. Though none of these are "Object Languages" that confirm to Classical Object Theory. Thus "Object-Oriented" and not "Object".
-
See title
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP