• 0 Posts
  • 180 Comments
Joined 2 years ago
cake
Cake day: July 2nd, 2023

help-circle





  • The REAL problem is that the industry collectively uses JS almost exclusively for shit it was never meant to do. Like you say, it’s intended for it to not throw errors and kill your whole web page, because it was only ever intended to be used for minor scripts inside mostly-static HTML and CSS web pages. Then we all turned it into the most-popular language in the world for building GUI applications.



  • Honestly, if you’re having trouble finding stuff for vanilla JS, I’d recommend looking at jQuery. Not that you should USE jQuery, necessarily, but the library is basically a giant wrapper around all the native JS APIs, so the approach to building stuff is essentially the same: it all focuses on tracking and manipulation of DOM elements.

    I do vanilla JS (actually TypeScript) dev at work, daily, and that was my big takeaway from spearheding our team’s migration from jQuery to vanilla TypeScript: I honestly don’t know what benefit jQuery provides, over vanilla, because all the most-common jQuery APIs that we were using have a 1:1 native equivalent.

    We do also use 2 third-party libraries alongside vanilla, so I’l mention those: require.js and rx.js. Require you probably don’t need, with modern JS having bundling and module support built-in but we still use it for legacy reasons. But rx.js is a huge recommend, for me. Reactive programming is the IDEAL way to build GUIs, in my opinion.


  • If you’ve only ever been exposed to the depiction of non-verbal, extremely sensitive-to-stimuli, routine-oriented, potentially-violent, autistic kids, that you see on TV, you could be forgiven for thinking this.

    But, no, that’s only an exceptionally small window of what autism is. Most cases of autism aren’t so severe, and most people learn coping strategies as they grow up that let them live relatively-normal lives. Even severe cases can do this, but it tends to take more time, and more focused, expert care.

    You probably know autistic adults, and aren’t even aware. Or, potentially, you just write them off as being loners or not good with people or having some other character flaw, that ultimately stems from their coping mechanisms.


  • My big reason would be “it hurts readability”. That is, when writing code, readibility for others who aren’t familiar with it (including future me) is my top-priority, and that means indentation and alignment are HIGHLY important, and if I spend the time to write code with specific indentation and alignment, to make it readable at a glance, I want to be certain that it’s always going to display exactly that way. Tabs specifically break that guarantee, because they’re subject to editor settings, which means shit like the below example can occur:

    I write the following code with an editor that uses a tab size of 4.

    myObject.DoSomething(
        someParameter:      "A",
        someOtherParameter: "B",
        value:              "C");
    

    If someone pulls this up in an editor that uses a tab size of 8, they get…

    myObject.DoSomething(
        someParameter:          "A",
        someOtherParameter:     "B",
        value:                          "C");
    

    Not really a big deal, in this simple case, but it illustrates the point.

    My second reason would be that it makes code more difficult to WRITE, I.E. it’s not that hard to insert spaces when you mean to insert tabs, considering that you’re not LITERALLY using only tabs just only tabs for indentation and alignment. And if you do accidentally have spaces mixed in, you’re not going to be able to tell. The guy on another machine with different editor settings will, though.

    I’m aware there are fonts that can make spaces and tabs visible and distinct, but that sounds like a NIGHTMARE to write and read code with. I mentioned above, my top priority is easy readability, and introducing more visual noise to make tabs and spaces distinct can only hurt readability.




  • There’s the guy who urges the captain to increase the ship’s speed, so they can arrive a day early and impress everyone that the “unsinkable” ship is also super fast. And then sneaks his way onto a lifeboat at the end, when they’re only supposed to be taking women and children. Arguably a parallel to Musk in that he’s partly responsible for the sinking of the ship.

    Much more prominent is Rose’s (Kate Winslet) rich scumbag fiance who refers to Jack (Leo DiCaprio) as a “gutter rat”, responds to “half the people on this ship are going to die” with “not the better half”, tries to bribe with cash one of the men loading boats in order to secure himself a slot, and ultimately manages to get on a boat by picking up a random crying child and claiming it as his own. Much more like Musk himself, but not really a parallel in having resposibility for the ship sinking.