Live data from Hacker News

Programming blogs

danluu.com

31–40 of 64 posts

Re: Programming blogs

#31
post #6

Earlier quoted context omitted.

I love that video. There is nothing offensive in the video, I think he does a pretty good job explaining how bat shit ridiculous javascript is. If you are writing js professionally and haven't already come to terms with that and the existential crisis it entails... you're gonna have a bad time.

I know I shouldn't be turned off by this, but I so am. And I'm starting to dislike the dev-community more and more for each day I try to learn programming myself. Elitism at its worst. I guess it started a few years back when I started an introductory programming-class at university where I was supposed to learn Java. I had already tried some light-weight languages like HTML and CSS and felt comfortable modding Wordp…

I write A LOT of javascript.

I would not discourage you from learning it at all, in fact I highly encourage it if you are starting out.

HOWEVER...

You really need to understand the limitations of the language.

It is poorly designed. It is infuriating to work with.

As far as the js ecosystem is concerned:

The community is fragmented and largely unreliable. The workplace is becoming increasingly saturated.

At the end of the day you should just learn what you want to learn, and like you said "fuck the haters". That's why I started learning Haskell a few months back and I'm really enjoying it.

The longer you blame ridicule and others opinions for your procrastination, the longer you will regret not learning to code.

Re: Programming blogs

#32
post #15

Earlier quoted context omitted.

Realistically, if you decide you are going to design a language where types are always coerced to perform operations instead of stopping execution when mismatched types are encountered, the choices JavaScript makes are pretty sensible.

Or you could do the much more sane Perl/Tcl thing and just have different pairs of operators for strings and numbers. Then the type of the variable is determined by what you're doing to it, not by what you last did to it somewhere else and god knows whether or not your == will be transitive this time around. $str1 . $str2 will always be treated as strings, even if both are numbers (I'll get "53" not 8, if $str1 eq 5…

Except for + and == isn't that true of most operators in JS?

Re: Programming blogs

#33
post #6

Earlier quoted context omitted.

I love that video. There is nothing offensive in the video, I think he does a pretty good job explaining how bat shit ridiculous javascript is. If you are writing js professionally and haven't already come to terms with that and the existential crisis it entails... you're gonna have a bad time.

I know I shouldn't be turned off by this, but I so am. And I'm starting to dislike the dev-community more and more for each day I try to learn programming myself. Elitism at its worst. I guess it started a few years back when I started an introductory programming-class at university where I was supposed to learn Java. I had already tried some light-weight languages like HTML and CSS and felt comfortable modding Wordp…

You seem to be taking this personally, as if someone criticising a language you've chosen to learn is criticising you.

That seems like an odd reaction. It's perfectly possible to say "JavaScript is crap" without also implying "And everyone who learns it is an idiot. Including you."

It's actually useful - really, really useful - to understand where these strong opinions come from. As a beginner/outsider you may not understand a lot of the criticism, and when you do understand if you may not agree with it.

But the standard criticisms of all the popular languages are directly linked to how well programmers at all levels can work with them.

So if someone has an opinion about Java, they're really saying "I think Java is a bad language because..."

They may also be saying - and often are saying - "I know a lot about programming because I have a strong opinion about this."

What they're not saying is "You're an idiot" - because most often if you ask someone, they actually have no opinion about your competence, probably don't know enough about you to assess it (unless they've worked with you for a while) and realistically aren't all that interested in a random stranger anyway (unless they have a good professional reason to be.)

So the next time someone criticises a language, ask them why they don't like it, and ask them what they'd recommend instead and why they'd recommend it.

You don't have to agree with them or take their advice, but their reasons may help you understand why we have so many different languages, why no one is really happy with any of them, and why secretly pretty much everyone wishes the whole scene was simpler, better, and less frustrating and imperfect.

Re: Programming blogs

#34
post #2

I love Gary Bernhardt's writings, screencasts and lightning talks and his sense of humor, especially this one[1]. But unfortunately, some JavaScript developers might feel it offensive. [1] https://www.destroyallsoftware.com/talks/wat

From the same person:

- The unix chainsaw, how to use tiny tools[1] as lever upon themselves. No absurd wit as in wat. Simply brilliant. https://youtu.be/sCZJblyT_XM

- Also listed above the wat page, https://www.destroyallsoftware.com/talks: boundaries, a whole new world. More abstract wishful thinking. Still brilliant.

Re: Programming blogs

#36
post #15

Earlier quoted context omitted.

Or you could do the much more sane Perl/Tcl thing and just have different pairs of operators for strings and numbers. Then the type of the variable is determined by what you're doing to it, not by what you last did to it somewhere else and god knows whether or not your == will be transitive this time around. $str1 . $str2 will always be treated as strings, even if both are numbers (I'll get "53" not 8, if $str1 eq 5…

Except for + and == isn't that true of most operators in JS?

Yeah that's kind of the problem, those happen to be the two most commonly used operators.

All the other arithmetic operators try to convert too ('5' - 3 === 2), but at least produce NaN if the arguments can't coerce to numbers (an exception would be better IMO, but whatever). Bitwise operators consider non-numeric strings to be 0, not NaN, presumably because JavaScript bitwise operands are always considered to be signed 32-bit ints. Apparently ~'js' isn't a TypeError. ¯\_(·ω·)_/¯

Re: Programming blogs

#37
post #9

> a hacker who will stay up till 4:00 AM rather than go to bed leaving code with a bug in it. Question for other folks here: In your experience, does staying up until 4:00AM tend to lead to you being more or less productive in the long term?

If you've been working on a bug for an hour+ and it's 2AM it usually means it's time to put the keyboard down.

For me, what usually happens is I go to sleep, wake up, and have it fixed in 5 minutes.

Post reply on HN