DEV Community

Daniel Mayovsky
Daniel Mayovsky

Posted on

I am a JavaScript's biggest fan, Ask Me Anything!

I am not an expert, but I love this language and anything that is about it. I also love doing some HTML5 Canvas experiments! Ask me anything!

Top comments (19)

Collapse
 
layzee profile image
Lars Gyrup Brink Nielsen • Edited

How will WebAssembly affect the future of JavaScript?

Collapse
 
weirdmayo profile image
Daniel Mayovsky

To my knowledge, WebAssembly is mostly used to enable teams to write applications in languages other than JavaScript. JavaScript does not need a compiler to get started in it. That being said, as long as large libraries like React or Angular are alive and have huge support from the community and teams that produce apps, JavaScript will not disappear.

FAQ on their GitHub answers the "replacement" question pretty well:

No! WebAssembly is designed to be a complement to, not replacement of, JavaScript. While WebAssembly will, over time, allow many languages to be compiled to the Web, JavaScript has an incredible amount of momentum and will remain the single, privileged (as described above) dynamic language of the Web.

WebAssembly is designed for Web to execute code as fast as native machine code, and that is where the name is from (Assembly language). It might affect very distant future of JavaScript, but it will not make a significant impact soon, unless there will be a necessity in its speed, which is not happening, because phones, computers, and browsers are only getting better.

Collapse
 
layzee profile image
Lars Gyrup Brink Nielsen • Edited

I think that - for now - the main use case of WebAssembly is game engines, graphics rendering and similar computationally heavy applications.

Maybe it will add to the performance of Machine Learning or other AI in a JavaScript environment as well.

Collapse
 
tux0r profile image
tux0r

because phones, computers, and browsers are only getting better.

If your software is inefficient, throwing more hardware at it will only help up to a certain point.

However, the one big thing missing from WebAssembly (yet?) is native support for DOM manipulations. As long as it's not there, WebAssembly is out for most people.

Thread Thread
 
layzee profile image
Lars Gyrup Brink Nielsen • Edited

For now we rely on JavaScript-based companion libraries to make DOM manipulations. I imagine this is how Blazor does it.

Thread Thread
 
kip13 profile image
kip

Check this

Thread Thread
 
tux0r profile image
tux0r

native support

But yes, thank you!

Collapse
 
ben profile image
Ben Halpern

What is your response to JS "haters"? There is no shortage of mud throwers at this language.

Collapse
 
weirdmayo profile image
Daniel Mayovsky • Edited

My response to mud throwers depends on who the mud throwers are. I am 18, and I don't count myself as knowledgeable in this large community. So when I get approached by some 35-year old 10+ years of experience guy from Google, giving me claims why JavaScript is bad, has bad design, etc., I only listen.

But when people from outside the Web Development community approach me with claims that JavaScript is slow and has really bad design, I point them right at the fact that most of the recent work applications (not games) on the phones were developed with React Native (JavaScript) and the number of Desktop applications is only rising (Discord, Nylas mail, Atom). Some haters reuse points that were valid 4 years ago, some haters are just jealous that JS is taking over their field (Mobile Apps, Desktop application, CLI applications).

Collapse
 
ben profile image
Ben Halpern

Some haters reuse points that were valid 4 years ago

I definitely see this.

Even more than four years ago. That's sort of a problem with software. Something that has radically changed has the same name. It's never apples-to-apples.

Collapse
 
aswathm78 profile image
Aswath KNM

Have you ever used PDFJS.

Is there a chance to make responsive using pdfjs???

Collapse
 
drewknab profile image
Drew Knab • Edited

Kind of? Not really? I worked with it a couple of years ago.

You can write pdf.js views to shrink/grow with the web client's view height/width. But as far as I know the text size and margins will be rendered proportional to what is stored in the pdf so it isn't stretched or squeezed.

Because of that, it's pretty reliant on the original pdf.

Collapse
 
weirdmayo profile image
Daniel Mayovsky

Never used it. Don't really know what you meant by responsive. Looked up their documentation and have read a few examples, just now. The whole piece is controlled through JavaScript. If you have any ideas of changing the content/manipulating the content according to the screen size (responsive design), you can implmeent those ideas within JavaScript. Initiation of viewPort on canvas and so on, all happens in JS code. You will have to figure out your ideas with what you have on your own then :)

Collapse
 
aswathm78 profile image
Aswath KNM

What I meant is that is a PDF viewer entirely written in JS, but only works for bigger screens.

Collapse
 
donita profile image
Donita • Edited

How long did it take you to feel comfortable or knowledgeable with Javascript?

Collapse
 
weirdmayo profile image
Daniel Mayovsky • Edited

I loved the language right from the first glance, because of how naive I was :). I am comfortable with the language at this moment. I have been interested in WebDev for 2 years now, I am 18 and I started when I was 16. Just like any kid, I would learn languages that everyone suggested as "programming languages", like C++, C#, Java. But I would never get them. Their syntax was so complicated, that I was learning the syntax most of the time, not the actual programming logic.

JavaScript invited me with programming logic being right in your face. You have all you need right there: loops, objects, arrays, type-fluid variables, all available without any pre-initiation (Classes in Java, and imports of libraries). You didn't have to import anything and just write code that you want to be executed. That is how I got stuck in JavaScript. I was watching 1 tutorial and writing 5 experiments with this language, and by a year I got pretty comfortable with JavaScript and I started Loving this language a bit later when I discovered Mithril.js, a very good interface-building framework.
So yeah, about a year of experimenting, and I got myself to be comfortable with JavaScript, to the point that if I want something to be done, I won't be scared of taking on that task. Hope that answers the question :)

Collapse
 
donita profile image
Donita

It does, thank you so much for the in-depth answer. I'm 6 months in my Javascript journey and I recently started to love it. I am now on the quest to learn more of the backend side. Often times, I do feel there is a hierarchy in programming languages like C++ AND Java, but I think Javascript is such a wonderful language as well.

Collapse
 
evanoman profile image
Evan Oman

Alright I will throw it out there: why JavaScript? What features set it apart from other languages in your mind?

(coming from someone who has used JS in the past and was happy to move on)

Collapse
 
weirdmayo profile image
Daniel Mayovsky

There must be a big difference between you and me. I am 18 and started learning programming 2 years ago. JavaScript was set up apart by the fact that it was straight forward with you with the programming logic. Every language has loops, arrays, value types, variables, and so on, but have different syntax and optimization approach. When I started learning programming, I was learning languages that everyone has acknowledged as real and popular like Java, C++, C#. And none of them actually teached me any programming, I was just learning their syntax all along. While JavaScript book I was reading also took on explaining everything about programming and JavaScript being very open with how you use it. You don't have to learn Classes and Functions, before you can run loops. While in Java, you create a class, then create a function, and then run a loop within that function. W3C, and Mozilla Docs were bread and water to me all along.

I have been learning the language literally most of the week for a year or so, I got very comfortable with it. With release of Electron, React Native, and other engines to run JS on other platforms, I just find no significant reason to move on to other languages. I am stuck :).

So the answer would be, that I don't find features that set it apart to stay in JS train, I just can't find significant reasons to leave the language, so I am stuck here :)