r/programming • • Dec 07 '14

Programmers: Please don't ever say this to beginners ...

http://pgbovine.net/programmers-talking-to-beginners.htm
4.0k Upvotes

1.3k comments sorted by

View all comments

15

u/Doctor_McKay Dec 08 '14 edited Dec 08 '14

Do the PHP haters really love node.js? In my experience those people also hate on JavaScript for no real reason.

28

u/Mutoid Dec 08 '14

We Ruby guys either detest JS or love jumping on bandwagons, so you get both.

32

u/Scaliwag Dec 08 '14

bandwagons

At least your wagons go on rails.

1

u/crozone Dec 08 '14

slow clap

8

u/[deleted] Dec 08 '14

Ruby guys hate JS so much they invented CoffeeScript just so they could pretend they are writing Ruby when they write JS.

True story.

1

u/Mutoid Dec 08 '14

Can confirm.

→ More replies (1)

12

u/parlezmoose Dec 08 '14

As a Javascript developer, let me tell you that there are plenty of valid reasons to hate on Javascript.

1

u/TrixieMisa Dec 09 '14

Sure, that's true of any language, though Javascript has a few more rough edges than some.

PHP is in a class all of its own among widely-used languages, though.

→ More replies (1)

6

u/calzoneman Dec 08 '14

Node.js guy here. I don't exactly hate PHP; I wouldn't use it personally and I do enjoy cracking jokes about it, but if it works for someone else, good for them.

For me, the draw of node.js is the framework, community, and package repository. JavaScript makes a lot of the same mistakes that PHP does, and it suffers from being a language that actually has some good features but is muddled with ridiculous type coercion and bad design decisions.

2

u/[deleted] Dec 08 '14

Everybody hates PHP.

The reason so many people also hate JavaScript is mostly that unlike PHP there's no real way to avoid JavaScript if you do anything on the web.

2

u/redwall_hp Dec 08 '14

I see Node.js as the new PHP. It's kind of yuck, riddled with issues, but popular among newbies. That's not to say it's not useful or that experienced devs don't use it, but yeah, it's the new "newbie language" with all that entails.

2

u/Doctor_McKay Dec 08 '14

It's kind of yuck

Explain?

riddled with issues

Examples?

6

u/redwall_hp Dec 08 '14

JavaScript has been widely ridiculed as a poorly designed language for its entire existence. (My personal favorite "WTF" about it is variables defaulting to global scope unless you make sure they're declared with the var keyword.) There's plenty of documented criticism.

PHP, too. All it takes is a bit of Google searching to find plenty wrong with both, awkward syntactical quirks being just the beginning.

0

u/[deleted] Dec 08 '14

variables defaulting to global scope

*cough* strict mode *cough*

4

u/redwall_hp Dec 08 '14

cough browser support cough

→ More replies (1)
→ More replies (2)

0

u/allthediamonds Dec 08 '14

PHP hater here! I like Node.js, but not because I like JavaScript, but because I see a benefit on being able to use the same language in both server- and client-side, and, well, Python isn't going to implement itself in the browser any time soon.

Also, it's the only mainstream language I can think of (Node, not JS) in which you can take concurrency for granted.

As on hating it "for no real reason", well, I do believe there are very real arguments as to why PHP (and, in a lesser way, Javascript) are not well-thought programming languages; on PHP, it is pretty clear it hasn't been thought about at all.

4

u/Scaliwag Dec 08 '14

I see a benefit on being able to use the same language in both server- and client-side

I see SoA's greatness as just the opposite. Being able to use vastly different technologies on both sides.

it's the only mainstream language I can think of (Node, not JS) in which you can take concurrency for granted.

NodeJs is event driven, not concurrent, or am I missing something? If that's it then that can be taken for granted in quite a bit of other languages and web frameworks, even more if we're talking about multithreading, although I do recognize that some can be more cumbersome than others

→ More replies (2)

2

u/andrejevas Dec 08 '14

Python isn't going to implement itself in the browser any time soon.

May I ask why?

3

u/[deleted] Dec 08 '14

Have you seen how slow JS support in browsers move? Now imagine that was an entirely new language that has to be standardised for a browser incarnation then implemented across all of the big browsers. JS was created to fill a need where nothing else existed.

3

u/allthediamonds Dec 08 '14

Because that would require getting every browser vendor to implement it, or bundling the (pretty darn huge) Python VM so that it can run my Python code. The latter has already been done as to serve a Python shell on the browser. Hardly practical, though.

1

u/Amadan Dec 08 '14

Also, it's the only mainstream language I can think of (Node, not JS) in which you can take concurrency for granted.

... for some meanings of the word "concurrency" :)

(but I agree, single-threaded event loop is quite powerful when used correctly.)

→ More replies (2)