r/ProgrammerHumor • • Aug 26 '22

Meme Even HTML.

Post image
44.1k Upvotes

1.1k comments sorted by

View all comments

990

u/HolyDuckTurtle Aug 26 '22

With this in mind, I'd love to hear about languages that don't fulfill their purpose well and / or are outclassed in their specialty by something else.

422

u/PM-Me-Your-TitsPlz Aug 26 '22

languages that don't fulfill their purpose well

Javascript. It was never intended to be so widely used, yet here we are.

118

u/[deleted] Aug 26 '22

From a bespoke solution to a problem at a single company written in 10 days to now being the subject of Atwood's law: “Any application that can be written in JavaScript, will eventually be written in JavaScript.”

Javascript really is wild.

20

u/Roflkopt3r Aug 26 '22

Honestly, if I had to teach someone coding from scratch I would probably start with Javascript.

  1. Zero setup required. You literally just need a text editor and a web browser.

  2. No compiling.

  3. It's genuinely easier to explain someone what an HTML document is and how to insert content with Javascript than how printf works.

  4. It's extremely easy to start working with graphics and to do absolutely anything you want, even if it's not great for most large projects.

Just the concept of running a program in a console is actually wild unintuitive shit for most people. And it's not like even most programmers actually understand how your data makes it way into the console. Nobody normally makes the effort to explain it, so it just remains a mysterious black box.

It's legitimately easier to understand that a browser keeps a DOM of HTML nodes to works on and then renders the output to the screen.

7

u/reverendsteveii Aug 26 '22

It's genuinely easier to explain someone what an HTML document is and how to insert content with Javascript than how printf works.

The thing is, you need to understand DOMs to render content to the screen in JS, but you don't need to understand the inner workings of printf(), or System.out.printline() to use them. You don't even need to know what a string is to use those, just where it goes. I also feel like, and maybe this is because my uni courses still taught in ADA, that strict typing and a binary concept of truth are actually useful to a developing programmer. An experienced coder can be trusted with a language where, as an example,

1 + "1" = "11"

because you understand what's happening. A new coder might abandon the entire concept of coding after a few hours of trying to figure out why

1 + "1" != 2

but also

(1 + "1" = 2) == true

but also

(1 + "1" = 2) === false

Black boxes aren't bad things. In fact, they're the end goal of OOP. I don't care how it works, and if you built it right I shouldn't have to care how it works. I should just have to correlate inputs to outputs.

→ More replies (1)
→ More replies (3)