• 0 Posts
  • 75 Comments
Joined 11 months ago
cake
Cake day: August 19th, 2023

help-circle








  • severien@lemmy.worldtoAsklemmy@lemmy.ml*Permanently Deleted*
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    edit-2
    10 months ago

    Looking at your other comments it’s clear you are taking comments like boomers personally against your parents. You shouldn’t.

    They were boomers, and boomers are all these negative stereotypes, so how not to take it personally?

    You say something like “women can’t drive, but don’t take it personally if you’re a good female driver”. Honestly I can’t fathom how people can’t see that it might be wrong to negatively stereotype groups of the population by something they did not choose. We’ve grown to recognise sexism, racism etc. but apparently we’re still in the 1950s of ageism.

    She’s a huge proponent of these systems being continued for the next generation.

    Too bad she’s a boomer, though.




  • Your code reads like it’s from 1992 mainly

    Lol. You write a lot of text to mask the fact there’s no good reason why getElementById should be bad. It’s the same groupthink as with the jQuery, you’re told it’s bad, so you just follow the crowd.

    jQuery was created as a way to account for browser support challenges

    That was one of the reasons. The other was that DOM API was and still is crap. There were many such libraries to abstract away browser differences back in late 00s (Dojo, script.aculo.us, Prototype.js, MooTools), and the main reason jQuery “won” was that it provided the nicest API.

    Which is why I think it’s opinionated in a bad way to arbitrarily pick one of them as the defacto.

    You’re missing the fact that jQuery does not prevent you from hiding the element in other ways. It’s just optimizing for the most common case, which is one of the principles of good API.

    What you’re missing is that the hidden class can contain anything you want. Animations or whatever else.

    Sure, and when I just want to … hide it, without any animations? Then this hidden class is boilerplate only.


  • severien@lemmy.worldtoAsklemmy@lemmy.ml*Permanently Deleted*
    link
    fedilink
    arrow-up
    3
    arrow-down
    2
    ·
    edit-2
    10 months ago

    If no, they aren’t the problem and shouldn’t feel it’s directed to them.

    “boomers” is a name of a generation, not of political affiliation or attitude to youngsters. People don’t choose their year of birth.

    It’s not much different from e.g. gender or racial stereotyping and what you’re saying is pretty similar to “if you’re not lazy, don’t feel offended, you can think of yourself as honorary white”.



  • severien@lemmy.worldtoAsklemmy@lemmy.ml*Permanently Deleted*
    link
    fedilink
    arrow-up
    6
    arrow-down
    2
    ·
    edit-2
    10 months ago

    They grew up with the countries best safety net and support and then proceeded to pull up the ladder after them.

    Well, my parents didn’t have any such benefits (and generally had much harder life than my generation), and didn’t pull any ladder, yet they are “guilty” by the virtue of being born in the wrong years.

    Doesn’t seem right to me.

    And it’s only when they complain about younger people when it really comes up.

    Nah, it comes up all the time on social media on its own.




  • severien@lemmy.worldtoAsklemmy@lemmy.ml*Permanently Deleted*
    link
    fedilink
    arrow-up
    27
    arrow-down
    1
    ·
    edit-2
    10 months ago
    • generation hate, ageism, collective guilt - it’s getting normal to blame a whole generation (typically boomers) for all the wrong things in this world.
    • websites requiring login to see content which isn’t anything privacy related - twitter, quora, instagram …
    • services which require a smartphone app and don’t provide a website version.
    • it’s been more than ten years now, but the fragmentation among messaging services. I mean, before that, everybody used ICQ which was a proprietary platform as well, but you had all these different clients and the platform was therefore quite open. Not anymore. I dislike RCS as a possible solution, because it’s carrier based and tied to your phone number.

  • Why would you not want to be using a rendering library?

    Because it’s just not very useful in some contexts. I’ve seen web extensions which mostly query the current page, and it doesn’t render much or even anything.

    Not all pages are SPAs either. Many apps are the old request-response with some dynamic behavior sprinkled on top. jQuery covers that well.

    This model is also quite compatible with the rising HTMX where the state/rendering is driven from backend and you just insert few dynamic pieces with JS.

    document.querySelector(“#element”).classList.toggle(“hidden”)

    There’s no difference between document.querySelector("#element") and document.getElementById("element"), they’re both same level clunky.

    Also, what you wrote is not functionally identical. $el.show() is idempotent, the el.toggle("hidden") is not (as the name suggests, it toggles a class). It also needs an extra boilerplate class.

    I could see not wanting to use a rendering library if you’re building a simple site on top of basic static HTML, but that’s not a serious discussion for industry professionals

    There are plenty of non-professionals doing web stuff and I think it’s great!

    jQuery is such a heavy dependency for saving some characters

    jQuery is 24 KiBs (minified, gzipped), that’s a good price for the egonomics it provides. If you’re constrained, there are API-compatible alternatives like cash which go down to 6KiBs.


  • There are multiple ways to hide an element yet they standardized on one that often wouldn’t work.

    It’s the most common one. And it’s not like you can’t hide the element with some other mechanism with jQuery.

    Also you’re using an ancient method getElementById…

    And? What’s the difference from document.querySelector() when querying for ID?

    So what is the right way to do that in modern js?

    What is the right way is context dependent. I don’t see how having extra .hidden { display: none; } boilerplate is somehow modern or superior.