all 24 comments

sorted by: hot top controversial new old
[–] 55 points 1 year ago

That's the thought I always had: When I develop in Node, I stand on the shoulders of ten thousand microbes.

  • source
  • [–] 49 points 1 year ago (3 children)
  • [–] 53 points 1 year ago* (1 child)

    "Why not write Assembly then?"

    Oh, here comes the genius motherfucker with the big-brain counterargument: "Well, if HTML's so great, why not just write everything in Assembly, huh?". Wow, look at you, you clever little prick. Did you come up with that all by yourself? Writing web pages in Assembly is like using a fucking scalpel to slice your overcooked steak: sure, it'll get the job done, but you're gonna look like a complete asshole while you're at it. HTML just works, you absolute tool. It's been the backbone of the web since Al Gore flipped the switch, and it'll still be here long after your trendy framework is rotting in a GitHub graveyard. So take your smartass logic and shove it. HTML's king, and you're just a peasant with a keyboard.

    🤣

  • source
  • parent
  • hideshow 1 child comment
  • [–] 33 points 1 year ago (5 children)

    I'd like full stack developers to try something. Next time you have an itch for a personal project, see if you can make it with no frontend JavaScript. Just some CSS and HTML forms. All templating handled on the backend. Just try it and see how far you get. Don't worry if it looks like a GeoCities page.

    Then try finding places where JavaScript would make it more responsive or better UX in some way. Does the back button still work? Is it actually faster? Does it provide any benefit at all?

    Maybe it does, but just try.

  • source
  • hideshow 5 child comments
  • [–] 22 points 1 year ago (3 children)

    I'm a JavaScript developer. But it is fully possible to create a site with no frontend JavaScript

    Like many things, you should use JavaScript if you need it. If you don't need remote data sources or live refreshes, pure html and css work perfectly fine and, I would go so far as to say, may even be necessary for resistance web pages.

    This is especially true if you're using tor. JavaScript can leak your IP address and sites will work more reliability if you have static content that's refreshed on the back end than using a bloated next.js app taking up RAM.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 1 point 1 year ago* (2 children)

    The vast majority of those are useless animations. Some are even a much worse implementation of something done much simpler with JS and requires significantly more code weighing down the page speed. Some examples of this are the cursor tracking examples which use hundreds of divs in a grid.

    While there are some useful examples, it seems like this repo is more of a list of to show off advanced CSS, fancy animations, and designs.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 4 points 1 year ago (1 child)

    Yeah, those are mostly showing off. They're not really what I'm getting at, either. I more want to challenge people to make useful things simply.

    And yes, there are ways that JavaScript can be used to give users a faster and more streamlined experience. The web as it stands is so far past that justification. I swear there's lots of "full stack" devs that haven't a clue how to make a site without React.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 7 points 1 year ago

    Thank the programming gods for tree shaking.

    Shake dat thicc tree for me, bb.

  • source
  • [–] 5 points 1 year ago

    We need to bring back system development! Not everything needs to be an electron app!

  • source
  • [–] 5 points 1 year ago

    Node =/= JavaScript

  • source
  • [–] 4 points 1 year ago

    Me working on basic js:

    Well JS, you are an odd fellow, but you run in a browser.

    HELP! HEEELP!

  • source
  • [–] 4 points 1 year ago

    me with rust. I like rust, but this is like I feel it XD

  • source
  • [–] 3 points 1 year ago (4 children)

    This can be fixed by switching from npm to pnpm or bun. They use hard links and a package cache.

  • source
  • hideshow 4 child comments
  • [–] 33 points 1 year ago (3 children)

    This does not fix anything. Your final packaged code is the same.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 2 points 1 year ago

    and I thought my little python exe weighting 33MB was a bit much

  • source
  • [–] 1 point 1 year ago

    This is why you add node_modules to your .gitignore

  • source
  • [+] -7 points 1 year ago

    I'm here still using jQuery and php+sockets for nearly all my needs. Only once in my life I actually needed node

  • source
  • 13 comments in c/programmerhumor@lemmy.ml view that post
    [–] 29 points 1 year ago (3 children)

    found 7745962577 vulnerabilities (7653345675 low, 91726393 medium, 817263 high, 73246 critical)

  • source
  • hideshow 3 child comments
  • [–] 3 points 1 year ago (2 children)
  • [–] 9 points 1 year ago (1 child)

    Vulnerabilities are flaws in software that may allow an attacker to gain control of or eavesdrop a system.

    They are categorized into low, medium, and high severities based on how easy it is to exploit the vulnerability and how much damage a successful attack utilizing that vulnerability would do.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 4 points 1 year ago* (last edited 1 year ago) (8 children)

    Which is of very little importance in most cases, because modern bundlers incorporate treeshaking in order to filter out all the unused code when you're building a production application

    Edit: okay well appearently that's controversial for some reason

  • source
  • hideshow 8 child comments
  • [–] 6 points 1 year ago (5 children)

    I didn't know about treeshaking (still unsure what it is exactly since I'm not a js Dev), but I'm guessing it still takes up Gigs of space in the project folder of every Devs PC, duplicated for each project.

  • source
  • parent
  • hideshow 5 child comments
  • [–] 6 points 1 year ago (2 children)

    It does take a lot of space for devs, but personally I find that absolutely irrelevant, because it's your end user's experience that really matters, and - as a dev - you are most likely to have a much better rig and internet connection than your average Joe.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 4 points 1 year ago* (1 child)

    Sure, in many cases the dev's computer is powerful enough to handle that.

    However:

    • The more the dependencies, the more likely it is to pull-off a supply chain attack. Any of those thousands modules can be compromised and infect either the user or the developer.
    • Not all computers are optimized for working with so many tiny files. Have you ever worked in a company that uses McAfee Antivirus? Even Defender can be a massive performance hit in some cases.
  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 1 year ago

    I have to say that I may be a bit ignorant, because I'm mostly engaged in greenfield projects with very tiny devteams and I always keep my dependencies count low as possible

    Thank you for pointing this out, that's very valuable to keep in mind

  • source
  • parent
  • [–] 3 points 1 year ago

    Tree shaking is essentially reducing the amount of included code to only the stuff being used.

    Let’s say you have a JAR, DLL, or whatever with 5 functions.

    Your application calls function A which also calls function B of the DLL/jar.

    Tree shaking says “hmm, if I follow the code execution path, I only need 2/5 functions from the DLL/jar” and discards the remaining 3/5 functions.

    This significantly reduces the bundle size (the bundle is what is sent to the browser).

  • source
  • parent
  • [–] 3 points 1 year ago

    Some use 'pnpm' package manager, alternative to default, where the packages are downloaded once to a central location, and per project directory, it links to the original location so files aren't duplicated saving space

  • source
  • parent