This kind of rant, culminating in a hackneyed "created in a week" insult, usually comes from backend developers who jumped into frontend work thinking it was a silly little thing that could be mastered in under an hour, discovered that it was a whole separate field, and still failed to adjust their priors. This time it comes from a "former Delphi product manager" turned clickbait writer. I just hope that my visit wit…
Just Say No to JavaScript
71–80 of 86 posts
Re: Just Say No to JavaScript
#72Re: Just Say No to JavaScript
#73But Javascript is the language of choice for programs (scripts) that I do not care to run. By default, these undesired Javascripts are executed automatically with no user input when one uses a so-called "modern" web browser.
As such, I do not run Javascript. As it happens, the language is closely associated with the so-called "modern" browser, a program that I consider too big, too complex and too dificult to control. It takes far too long to compile, assuming the source code is even available.
I am submitting this comment without using a "modern" web browser.
Re: Just Say No to JavaScript
#74Earlier quoted context omitted.
> the console tells me immediately and the exactly line to fix. Uh, yeah, that's a runtime error. Type safety tells you the error before you even hit save, let alone run and test. It's a wildly faster loop.
I'm still going to run it every change and those errors are rare and quick to fix.
Re: Just Say No to JavaScript
#75The author seems to ignore the fact that type hints are a thing even with plain JS. Serious question: does the author "just say no to Python" as well? If lack of explicit typing is the issue, then his rant would apply to most scripting languages and to single out JS seems odd to me...
Python actually has a good typed ecosystem these days, and unlike JS -> TS you don't have to add a compilation step to benefit from it: you just have to enable type checking in your IDE. JS is in a different spot where to benefit from type checking you have to add a build step or reconfigure your build tool, switch files to another extension, add some "type stubs" dependencies, and make significant changes to the cod…
It's similar for JS, believe it or not. Type hints via jsdoc can be just as easily configured for type-checking in our IDE of choice.
Python type hints aren't mandatory either, so they're strictly opt-in and nothing stops users from ignoring them.
Re: Just Say No to JavaScript
#76I have said no to Javascript for over 20 years for reasons having nothing to do with the language. I actually like the way Javascript looks because it looks much like C. I have no problem with the Javascript language. But Javascript is the language of choice for programs (scripts) that I do not care to run. By default, these undesired Javascripts are executed automatically with no user input when one uses a so-called…
There are a lot of sites out there dependent on javascript of course - but you can evaluate these as you find them and either move on, give them temporary permission, or permanent permissions.
I'm not convinced it actually makes the web any safer to browse given modern browser security controls, but it certainly feels safer to browse, and generally it's a much nicer experince with less crap happening on the page as you go (pop overs etc)
Re: Just Say No to JavaScript
#77Earlier quoted context omitted.
Hi Liam, What about dynamic websites? For example, a platform-independent chat app. Javascript has a place, although that place would be better filled by another language. PHP... yes, PHP can be completely replaced by other server side frameworks.
> What about dynamic websites? An exact example of the kind of thing I'd like to get rid of. The UK PC vendor Elonex had the first ever webmail system I saw, called HTMail. It was impressive but it was a private in-house tool to give remote workers email access without needing their own machine with an email client. Wrong sales model. It the was followed by the indie HoTMaiL, based on NetBSD servers I think, which ha…
There is room for programs that do not need to be installed. Examples are Flash, Java applets, and Javascript. Personally, I think some sort of UI thing based on WASM might be the way to go, but that's just my opinion. Can you think of any other way to run programs from the internet without installing them? Yes, SSH, telnet, remote access, remote X11, but with all of them, the programs are running on a different computer, whereas with web apps, they're running on your own computer, without costing them money, other than hosting costs.
I never thought I'd be speaking for web apps, but I guess I'm not, not really. What I'm saying, is there is a niche, and that is currently filled by web apps.
Re: Just Say No to JavaScript
#78I was disappointed to read this is just a "Use TypeScript" instead. Look, you can hot glue and tape all the types you want, but it is still JavaScript. No amount of compiler-enforced comments is changing that.
> it is still JavaScript Yes, it's still one of the most performant languages around, so that's a good thing right?
Re: Just Say No to JavaScript
#79Earlier quoted context omitted.
Python actually has a good typed ecosystem these days, and unlike JS -> TS you don't have to add a compilation step to benefit from it: you just have to enable type checking in your IDE. JS is in a different spot where to benefit from type checking you have to add a build step or reconfigure your build tool, switch files to another extension, add some "type stubs" dependencies, and make significant changes to the cod…
> you don't have to add a compilation step to benefit from it: you just have to enable type checking in your IDE. It's similar for JS, believe it or not. Type hints via jsdoc can be just as easily configured for type-checking in our IDE of choice. Python type hints aren't mandatory either, so they're strictly opt-in and nothing stops users from ignoring them.
Re: Just Say No to JavaScript
#80I have said no to Javascript for over 20 years for reasons having nothing to do with the language. I actually like the way Javascript looks because it looks much like C. I have no problem with the Javascript language. But Javascript is the language of choice for programs (scripts) that I do not care to run. By default, these undesired Javascripts are executed automatically with no user input when one uses a so-called…
Whilst not going to quite the same "extremes", I completely agree. I use a combination of plugins (primarily uMatrix on firefox), so stop all javascript execution by default. There are a lot of sites out there dependent on javascript of course - but you can evaluate these as you find them and either move on, give them temporary permission, or permanent permissions. I'm not convinced it actually makes the web any safe…
Default settings matter. In popular browsers, Javascript is "on by default". From the evidence produced in Google's antitrust litigation, we know that companies or organisations that control these browsers choose default settings strategically to increase surveillance, data collection and ultimately online ad services revenue.
I rarely find websites that are truly dependant on Javascript, meaning the web developer had no choice other than to use it. Instead, what I find is (a) gratuitous use of Javascript to do something, e.g., make an HTTP request, etc., that can also be achieved without it and/or (b) use of Javascript to make HTTP requests I never intended to make, e.g., requests for ads or tracking. Javascript is effectively used to transfer control over web browsing from the web user to the web developer. Through the use of Javascript, a single request for a page becomes a trigger for dozens of additional requests the web user never intended to send, and usually to domains the web user has never heard of, that serve no useful purpose to the web user.
1. Extensions/add-ons like uBlock will show numbers of requests to be triggered with Javascript. Insanely high numbers are common. For example, something like fifty-seven for Github. Meanwhile I am able to use Github to search, read and download source code just fine with a relatively small TCP client (not git) that does not run Javascript, only sends a single HTTP request and generally uses only two github domains, i.e., github.com and githubusercontent.com.
In sum, I am not sure that many websites are truly dependant on Javascript to offer what they purport to offer to web users, e.g., information, files, etc. What I am more inclined to believe is that websites are dependant on Javascript to perform surveillance and data collection, not to mention serving ads and tracking.