• 0 Posts
  • 23 Comments
Joined 1 year ago
cake
Cake day: July 5th, 2023

help-circle
  • It’s true that you can easily fall into analysis paralysis when you start learning JS, but honestly things have somewhat stabilized in recent years. 10 years ago everybody was switching frameworks every 6 months, but these days we’re going on 8+ years of absolute React dominance. So I guess that’s it for the view layer.

    The data layer has seen some movement in more recent years with Flux then GraphQL / Relay, but I think most people have settled on either Apollo or react-query now (depending on your backend).

    On the backend there was basically only express.js, and I think it’s still the king if you only want to write a backend.

    Static websites came back in fashion with Jekyll and Github Pages so Gatsby solved that problem in js-land for a while, but nowadays Next also fulfills that niche, along with the more fullstack-oriented apps.

    Svelte, Vue, Aurelia and Mithril are mostly niche frameworks. They have a dedicated, vocal fanbase (see the Svelte guy as sibling to your comment) but most of the industry has settled along the lines I’ve mentioned.


  • ebc@lemmy.catoProgrammer Humor@lemmy.mlJust getting into JS
    link
    fedilink
    arrow-up
    6
    arrow-down
    1
    ·
    edit-2
    2 months ago

    Honestly I think the main thing that the JS ecosystem does well is dependency / package management (npm). The standard library is very small so everything has to be added as a dependency in package.json, but it mostly works without any of the issues you often see in other languages.

    Yeah, it’s not perfect, but it’s better than anything else I’ve tried:

    • Python’s approach is pretty terrible (pip, easy_install, etc.) and global vs local packages
    • Ruby has its own hell with bundler and where stuff goes
    • PHP has had a few phases like python (composer and whatnot) and left everyone confused
    • Java needs things somewhere in its $PATH but it’s never clear where (altough it’s better with Gradle and Maven)
    • C needs root access because the only form of dependency management is apt-get

    In contrast, NPM is pretty simple: it creates a node_modules and puts everything there. No conflicts because project A uses left-pad 1.5 and project B uses left-pad 2.1. They can both have their own versions, thank you very much.

    The only people who managed to mess this up are Linux distributions, who insist on putting things in folders owned by root.



  • ebc@lemmy.catoProgrammer Humor@lemmy.mlJust getting into JS
    link
    fedilink
    arrow-up
    39
    arrow-down
    2
    ·
    2 months ago

    To any non-js dev taking this too seriously: A good half of the technologies mentioned in this meme are redundant, you only need to learn one of them (in addition to the language). It’s like complaining that there are too many Linux distributions to learn: you don’t, you just pick one and go with it.




  • shove some text into stdout

    That’s not what this operator does normally, and if you try to “shove” something into anything else (an int into a variable? a function into an object?) you’ll get surprises… Basically it’s “special” and nothing else in the language behaves like it. Learning hello world in C++ teaches you absolutely nothing useful about the language, because it doesn’t generalize.

    C, in contrast, has many instances of complex functions like printf (another commenter mentioned variable arguments), and learning to call a function is something very useful that generalizes well to the rest of the language. You also learn early enough that each different function has its own “user manual” of how to use it, but it’s still just a function call.


  • this std::cout << "hello world" bullshit is in no way intuitive. You’re using the bit-shift operator to output stuff to the console? WTF? Why 2 colons? What is cout? And then these guys go on to complain about JS being weird…

    No, C is where it’s at: printf("hello world"); is just a function call, like all the other things you do in C.



  • I use Canadian Multilingual on a ISO-style keyboard, mostly because my main language is French and typing accents on a US keyboard is horrible.

    Coding makes a hefty use of Alt (“option” on mac), but they’re relatively well-placed (see the labels on the bottom-right of the keys in the pic)

    My main annoyance with it is that the ANSI-style keyboard puts “ù” to the left of “1”, instead of the “/” you get on that key on a ISO keyboard (where ù is between the left shift and z). You can see how annoying this would be when programming or using the command-line. And of course, Apple stores only stock MacBooks with ANSI keyboards…







  • For baseboard heaters, I have the Sinopé line of ZigBee thermostats, with home-assistant on my home server. Baseboards are kind of particular in that you have one thermostat per room, so at 350+ for a Nest, it’d be cost-prohibitive as I have like 15 thermostats in the house. Also, they’re line voltage, meaning that they directly switch the full power of the heaters, so they need to be well made.

    I’ve had my Sinopé thermostats for 2+ years now, and I’m very happy with them. No clouds involved here.



  • ebc@lemmy.catoProgrammer Humor@lemmy.mlMy poor RAM...
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    10 months ago

    As a freelance fronted dev, I really love Docker. I don’t need to mess up my system installing ancient Java versions or whatever Python wants to easy_install, pip or whatever, I can just run the backend Docker image and go on with my life. Especially when project A’s backend has incompatible Java/Ruby/Python dependencies with project B.

    You can shit on npm all you want (yes, I was there for left_pad), but at least they got the dependency issues between projects solved.


  • This last part sounds nice in theory, but it’s way outside the scope of what Typescript is intended to accomplish. I’ve been pursuing a similar goal on and off for 10+ years at this point, I even wrote an ORM for Backbone.js so I could use it on the server as well. Back then we called it Isomorphic Javascript, later on it got renamed to “universal javascript”, nowadays I’m not sure.

    But yeah, the problem is similar with any code, really… What you’re often writing in software dev is just functions, but the infrastructure required to actually call said function is often not trivial. I agree it’d be nice to be able to have different “wrapper types” easily, but I’m afraid their usefulness would be limited beyond toy projects.


  • Lexical (rich text editor by Facebook) recently “migrated” their Github discussions to Discord… I have a question that I can see was asked on the discussion, as it appears in my search results on DDG, but I get a 404 when I try to open it. The fuckers deleted the discussions!

    Of course, Discord only has poor-quality answers to that questions as it gets asked every week and maybe gets answered in a different way every time. Quality of discussion is much lower.