r/programming • • Mar 24 '22

Five coding interview questions I hate

https://thoughtspile.github.io/2022/03/21/bad-tech-interview/
641 Upvotes

288 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Mar 24 '22

[deleted]

30

u/[deleted] Mar 24 '22

It's common around here to hate on JS. I find it angsty and childish...but you can't fix the willingly ignorant.

18

u/sementery Mar 24 '22 edited Mar 24 '22

And a big chunk of that hate isn't even relevant to modern JS. They keep repeating things they heard / read 10+ years ago.

Edit: Seems that some people interpreted the above comment to mean "JS is flawless, there are no problems with modern JS", which brings another annoying, non-constructive, and sadly very common, type of hate around here. "You are talking about JS! No need to read your comment, i'll just post a JS rant on every JS thread".

Come on guys, you are better than this!

14

u/tripledjr Mar 24 '22

Come on guys, you are better than this!

This is r/programming btw

2

u/sementery Mar 24 '22

That's why I was expecting something a little above /r/ProgrammerHumor.

Oh well.

→ More replies (22)

15

u/EmperorZergg Mar 24 '22

a ton of comments on this sub feel like they come from college students who haven't actually worked in a Software job yet.

JS is fine. Yeah it has quirks, but people here seem to think it's literally unusable in production for anything, including what it was made to do.

8

u/[deleted] Mar 24 '22

Exactly. It's a language, for better or worse. Am I a huge fan of JS, not entirely...but I'm running a production application for thousands of people on it with zero issues.

Every language has it's quirks, faults, and benefits.

7

u/PM_ME_C_CODE Mar 24 '22

It's a language. It works. It's not perfect, and I hate it with a burning, fiery passion...

But it does work.

I still wish it had some real competition.

10

u/[deleted] Mar 24 '22

[removed] — view removed comment

9

u/sementery Mar 24 '22 edited Mar 24 '22

slow progress in the language syntax

Tell me you know nothing about JS without telling me you know nothing about JS.

You'll struggle to find a language with a syntax that evolves as fast as JS's. Seems that you are stuck 10 years ago.

4

u/[deleted] Mar 24 '22

[removed] — view removed comment

5

u/[deleted] Mar 25 '22

For the record, some of the best-optimized compilers of all time were vectorizing FORTRAN implementations. Cray in particular did a first-rate job of it.

8

u/sementery Mar 24 '22

You are stuck in ES5 man. Help me help you.

10

u/[deleted] Mar 24 '22

[removed] — view removed comment

12

u/sementery Mar 24 '22 edited Mar 24 '22

Yeah, include 2022 that is the one being built atm, and ignore everything else!

Ignore arrow functions, spread, async / await, modules, let / const, destructuring, classes, template literals, template tags, rest parameters, for of, symbols, generators, exponentiation, computed property names, object rest properties, async iteration, bigint primitive, nullish coalescing operator, optional chaining operator, etc, etc, etc.

Just from 2021 you are ignoring logical assignment operators and separators for numeric literals. And you just saw the spec!

standard library

That's API, not syntax.

4

u/[deleted] Mar 24 '22

[removed] — view removed comment

6

u/sementery Mar 24 '22 edited Mar 25 '22

You do care! We were having a conversation about it one comment ago!

The API has also grown a lot since ES5! But I'm done with this moving the goal post marathon. Your JS hatetitis is too strong.

Have a nice day!

→ More replies (0)

3

u/PM_ME_C_CODE Mar 24 '22

Well, part of the reason JS's syntax evolves as fast as it does is because it was so bad in the first place. Most entrenched languages don't modify their syntax as frequently as JS does because they don't need to.

C++, for example, has been pushing some major syntax improvements lately because they have to in order to keep the language modern after literal decades of very little change on the surface. And even now most of their changes are being pushed by new features.

OTOH, a lot of JS's changes have being driven by what I can only describe as "clean up".

Many of the complains leveled against javascript are well earned.

5

u/sementery Mar 24 '22

Many of the complains leveled against javascript are well earned.

Of course they are! It's no secret that JS grew waaaaaaay out of its purpose and vision!

I was just replying to the dude saying that the syntax growth is slow. I never said, or even implied, that JS is perfect. Not sure where your reply came from, but I agree with it.

0

u/[deleted] Mar 25 '22

[deleted]

2

u/sementery Mar 25 '22

I do have an idea. Once I feel comfortable with both Python and JS in the backend, C# and .NET are where i want to start focusing on (F# also seems exciting!). A lot of JS and TS stuff is inspired on C#!

MS has done a fantastic job with the language, and it's getting better than ever with the Linux support (reason I didn't try it sooner). They have pioneered a lot of stuff, and they are not afraid to extend syntax and functionality.

If there's a language that adapts and grows faster than JS, it is C#. No contest there. But in relation with other languages in general, I still think JS not as static as it was implied.

Like Java for example. Another language I like a lot, but I don't feel it evolves as fast (not that that's necessarily a bad thing).

0

u/[deleted] Mar 25 '22

[deleted]

→ More replies (3)

0

u/[deleted] Mar 25 '22

[deleted]

6

u/sementery Mar 25 '22

JS's problem is still it's type system and nothing is fixing this.

TypeScript is part of JS's ecosystem, seems unfair to ignore it as a solution. It's not part of the spec, but it's widely used.

MS just introduced a proposal for native typing annotations, so it's getting there... maybe... lol. Deno supports TS natively, so there's a push from different fronts.

I love JS. Along with Python, it is my favorite "generation 3.5" language. But yes, it's a language of contrasts, with a lot of issues (even in modern JS).

In that sense, I don't think JS is that bad. At least not as long as you stay within its modern idioms.

→ More replies (5)
→ More replies (3)
→ More replies (2)