Mine is that the useState hook is an actual plague on the entire React ecosystem. Regardless of your opinions of React, if you wanna use something then use it right.

  • Chloé 🥕@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    50
    arrow-down
    1
    ·
    16 days ago

    if you’re making a user-facing program, you should always design with the possibility that it will be run on some truly dogshit hardware and you should make sure that they still have a good experience. good computer hardware is a luxury on the world scale, even before the rampocalypse

    related, but the answer to the question “who still uses {x} these days?” is almost always way, wayyyy more people than you think

    • ChogChog@lemmy.world
      link
      fedilink
      arrow-up
      8
      ·
      16 days ago

      That’s so why a lot of artists I know of when mixing, like to test their songs on stock/sub-par monitors. Not everyone has reference quality equipment and you want to make sure your song works just as well thumping with the windows down as with your hi-fi system.

    • ArsonButCute@programming.dev
      link
      fedilink
      arrow-up
      7
      ·
      16 days ago

      I do my web development on a 2005 era windows XP machine without the unofficial SP4 because if it will run there (without silverlight) I know for damn sure it will run well on anything made today.

  • philipp_@discuss.tchncs.de
    link
    fedilink
    arrow-up
    46
    arrow-down
    4
    ·
    16 days ago

    systemd does a lot of things very right and a mayor reason that linux is in a way better place than 15 years ago. 27 unmaintained tools are not better than one that is professionally developed.

    • marcos@lemmy.world
      link
      fedilink
      arrow-up
      12
      arrow-down
      1
      ·
      16 days ago

      Systemd solves a very important problem that was defined extremely well.

      It also solves it badly, and solved a whole lot of other badly defined problems that it shouldn’t.

      • kalpol@lemmy.ca
        link
        fedilink
        arrow-up
        7
        arrow-down
        1
        ·
        16 days ago

        This is my argument. Do init. Don’t pull in literally everything else because you think you know better, like system logging.

        • philipp_@discuss.tchncs.de
          link
          fedilink
          arrow-up
          9
          ·
          16 days ago

          Init needs to do system logging when you want to collect it from the daemons stdout, which is the logical place to collect it from. Havin apps handle their own log files is a bad time at best and dangerous at worst.

          • kalpol@lemmy.ca
            link
            fedilink
            arrow-up
            2
            ·
            15 days ago

            You are correct ,but again you can just send it to syslog. Just one example of the overwhelming scope creep of systemd.

    • sudoer777@lemmy.ml
      link
      fedilink
      English
      arrow-up
      2
      ·
      15 days ago

      Recently I’ve been doing scripts on top of systemd to do hacky things with my system and so far I really like it

    • unglueclass23@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      ·
      16 days ago

      It really doesn’t. The time you spend learning it and setting your config will never pay off and even after you do these things the time it saves you is negligible. I can use Zed and have 90% what Neovim offers me, it even has really good vim motions. Picking them up for productivity is a bad reason to do it.

      I really liked a talk by TJ titled (Neo)Vim Made Me a Better Software Developer. The reason he uses it - is because it was basically a playground where he could play around with his code and get instant feedback as he’s the “customer”.

      I can relate to this. Neovim is really extensible and minimal by default. This encourages 2 things:

      1. To live close to your code. You really get an understanding of all of the underlying tools related to your development environment and it gives you control to make it as minimal as you want it. There’s wayy less abstractions on top to simplify stuff for you. When I was a beginner using Webstorm or whatever I had no clue what a LSP was. Git? Just use built in GUI why bother learning commands? Terminal? Why would I need that? Ripgrep? Treesitter?
      2. To play around, customize, build stuff. There’s lots of API’s and you can change a lot in the editor. I made Neovim my main markdown editor with a few tweaks in my config. It’s minimal and I like it. Wayyy better than Obsidian.

      And at the end of the day it’s kinda fun. It makes writing code more more enjoyable as you always end up learning how to navigate your code base more efficiently. Like a game almost :)

    • OddMinus1@sh.itjust.works
      link
      fedilink
      arrow-up
      1
      ·
      15 days ago

      I use VIM keybindings in intellij, and have done so for 10 years. There is no reason for me to be quicker or more productive than anyone without VIM. It’s just a preference.

  • mlg@lemmy.world
    link
    fedilink
    English
    arrow-up
    27
    ·
    15 days ago

    The entire modern web tech stack should be thrown in a dumpster, ignited with gasoline, and blown up with a nuke for good measure.

      • teolan@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        5 days ago

        I’m not fully sure, but it looks very much the type of image that would be AI generated. On the bottom right the people look like they have faces in the back.

        No signature (might have been cropped), but generally Artists sign their art. The poster has a slop profile picture, and this is a very low-effort post.

        • The Ramen Dutchman@ttrpg.network
          link
          fedilink
          arrow-up
          0
          ·
          4 days ago

          I thought the image looked quickly-drawn, which is understandable for such a Wally-sized picture, but now that you mention the backwards faces in the bottom-right… And I should be on the lookout for signatures, indeed. That’s a good tip, thanks!

          • teolan@lemmy.world
            link
            fedilink
            arrow-up
            0
            ·
            4 days ago

            Generally one thing that gives AI slop away is that it looks from first look to be high-effort, but the main content itself (here the meme text), is extremely low-effort.

            Since this is a repost of a repost, and I remember seeing this image in the past I did a bit more digging, Google reverse image search cannot find an original source, all all images found date from after 2024, so GenAI images were there.

            If this was from a real artist I’d expect to be able to find some original source and not just Reddit/Instagram posts from clickfarms with it.

  • SapphironZA@sh.itjust.works
    link
    fedilink
    arrow-up
    38
    arrow-down
    13
    ·
    16 days ago

    Current AI tools are excellent productivity and quality enhancers, but only for people who are willing to adjust their workflows and guide it to give good quality output.

    The damage is done by Capitalism running the AI industry and the over financialization of the market.

    Don’t be anti AI, be anti unregulated Capitalism.

    • Axolotl.cpp@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      21
      arrow-down
      2
      ·
      16 days ago

      I am anti commercial capitalistic LLMs which, coincidentally is ALL of them.
      “B-But Axo the open weigh—!” They are NOT open, it’s the equivalent of giving you the executable of M$ Edge or a Windows ISO and calling it open, fuck this shit

    • Avicenna@programming.dev
      link
      fedilink
      arrow-up
      13
      ·
      edit-2
      16 days ago

      I agree on their usefulness but as long as you don’t use local and open LLMs you are unfortunately part of the ecosystem that does the damage. Luckily open models are catching on and hopefully some reliable companies take up on this business model.

        • Orygin@sh.itjust.works
          link
          fedilink
          arrow-up
          1
          ·
          16 days ago

          Won’t happen unfortunately. Unless you want to run a 1U with 6 GPU, requiring a custom water-cooling system, and which sips like 10kW/h of electricity while idle. It’s all integrated hardware born to be trash. The ram, cpu and GPU won’t be usable on consumer hardware without hard modifications.

          • SapphironZA@sh.itjust.works
            link
            fedilink
            arrow-up
            1
            ·
            15 days ago

            1 of those GPUs can probably run 90% of what a small team would need, so you don’t need the full thing.

            That’s about 600w of draw and 150w idle. Or about the same as a 5090. You don’t need exotic power or cooling for that.

          • mindbleach@sh.itjust.works
            link
            fedilink
            arrow-up
            1
            ·
            15 days ago

            Local models are only months behind. The primary utility of comically large networks is a wider search space for the tiny fraction of weights that really matter.

            • Orygin@sh.itjust.works
              link
              fedilink
              arrow-up
              1
              ·
              15 days ago

              I agree with you but that doesn’t change the fact datacentre hardware is not consumer friendly like it was in the past

              • mindbleach@sh.itjust.works
                link
                fedilink
                arrow-up
                2
                ·
                15 days ago

                Was it?

                Not the point - this isn’t about secondhand servers, it’s about RAM being artificially scarce. Possibly as a deliberate measure to make cloud services sound less wasteful. If a 3090 with 32 GB was only a thousand bucks then OpenAI’s revenue would be even worse.

                • Orygin@sh.itjust.works
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  15 days ago

                  I have an old server with lots of DDR4 which I can for the most part just plug into my PC. The CPU can be put into another motherboard, and the GPU are discrete cards. Most of that hardware can be re used by consumers.

                  Most new AI datacentre deployment won’t be like that. An Nvidia Blackwell server has everything soldered. Good luck desoldering the CPU or GPU, the ram is either LPDDR5X which I never saw consumer motherboard use, the GPU is HBM3e and not a discrete card anymore. Whole package is unpractical for even a enthusiast to run.

                  The original point was that once the AI bubble bursts, we’ll have hardware to use for local inference. My claim is that no, it’ll probably be too specialized. Unless some maniac in China figures out a way to make new consumer hardware for it, but they probably won’t since Nvidia hardware is technically illegal (both export and import at this point). Even then, I don’t see Nvidia or others go back to making consumer hardware at a level where we can do serious inference locally.

          • SapphironZA@sh.itjust.works
            link
            fedilink
            arrow-up
            1
            ·
            15 days ago

            We also don’t need frontier models. The type of models that run on $5000 Mac studios can do today what the frontier models did 1 year ago.

            We just need the Mac studio class hardware to come back to $2000 where it used to be.

            Also, do not underestimate the ability of Chinese BGA rework shops from being able to salvage AI chips and install them on board that will fit in standard hardware. They proved they could do it with the Crypto only chips, they will figure it out for the AI chips if the supply is there.

            The main reason these units use water cooling is for deployment density.

        • gwl [he/him]@lemmy.blahaj.zone
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          1
          ·
          16 days ago

          Bad comparison, it’s like refusing to use a calculator because it uses 200 times the amount of energy of existing calculators, was trained on stolen data, and despite all that gets the answer wrong

          • SapphironZA@sh.itjust.works
            link
            fedilink
            arrow-up
            1
            ·
            15 days ago

            Calculators are also known to get some answers wrong.

            Stolen data is not a tech problem, it’s a legal problem.

            And it’s not 200 times more power. Maybe 5 years ago it was. But it is being wastefully used by burning capital.

            That’s why the bubble needs to pop. So the true cost/value equation comes into play. It should probably cost 5 times what it currently costs from the big providers. It will cut down on the waste significantly.

            The problems with AI is not the tech. It’s unregulated Capitalism that has hijacked it.

    • snugglesthefalse@sh.itjust.works
      link
      fedilink
      arrow-up
      2
      arrow-down
      1
      ·
      16 days ago

      Yeah on one hand the field of evolutionary algorithms is fascinating and I can see potential. But on the other hand it’s being run into the ground by people forcing it into everything. It’s also not human-readable so people might think they know what they’re getting but really don’t because of the black box nature of it.

  • randombullet@programming.dev
    link
    fedilink
    arrow-up
    21
    ·
    16 days ago

    I remember on Reddit several years ago I said that automatic bitlocker is the curse of installing W11 on a laptop.

    I got down voted so hard. One comment even said you should be thankful because encrypting by default should be the norm.

    But yet if I add any thunderbolt device to my windows before I boot it, it requires me to input my 25 character bitlocker key… that’s hosted online within my Microsoft account.

    Bitlocker enabling by default without user input is horrible. Hosting the keys online is also horrible. It could be so easy to socal engineer into your Microsoft account.

    • Bazoogle@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      15 days ago

      Bitlocker enabling by default without user input is horrible.

      I disagree

      Hosting the keys online is also horrible.

      I agree

      It shouldn’t require a loophole to use Windows without a Microsoft account. Cloud hosting the bitlocker key does remove a lot of the security benefit in the first place. But I also recognize if you’re going to enable it by default, you have to automatically store it somewhere since most people will not save it themselves. But Microsoft should not be able to access the keys either, they should be fully encrypted without the users password.

    • marcos@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      16 days ago

      There’s nothing in Functional Programming that stops you from writing in an Object Oriented idiom…

      • PortNull@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        2
        ·
        16 days ago

        There are no objects in a pure functional language. No mutable types. Could you give an example of what you mean please?

        • marcos@lemmy.world
          link
          fedilink
          arrow-up
          3
          ·
          16 days ago

          Oh, right, there is no mutability. There is just some context you chain from one function to another, that gets abstracting exactly as changes into some existing state.

          Oh, and all that running in a mutability place-oriented imperative machine.

    • NoLemurs@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      16 days ago

      100% agreed, though I’m in the “neither is ideal” camp. My favorite language, by a long way at this point is Rust.

      It’s not functional, but borrows a lot of functional idioms while avoiding the pain points functional language usually hit in exchange for losing the purity of functional languages.

      • PortNull@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        2
        ·
        16 days ago

        Nah, no language is “perfect” once you’ve used it enough I write python for money and elixir in my own time. I borrow implementation approaches from functional when it’s appropriate. Avoid using complex classes, especially if the encapsulate state. But they have their uses and people should chose which works best for their use case

        I wouldn’t write cli tools in elixir for example.

  • ColdWater@lemmy.ca
    link
    fedilink
    arrow-up
    16
    ·
    15 days ago

    Not a programmer, but I hate softwares that use python, why the fuck it requires 10 million dependencies to function?

      • ColdWater@lemmy.ca
        link
        fedilink
        arrow-up
        3
        arrow-down
        3
        ·
        15 days ago

        I know, most normal softwares requires 3 or 15 on some bloated softwares, but the simplest python softwares requires at least 10 or 20 on the bigger one and I’ve seen some go up to 40 (maybe perl too but no one use it nowadays so I don’t count it)

        • capital5@discuss.tchncs.de
          link
          fedilink
          arrow-up
          4
          ·
          15 days ago

          Yeah, I reflected on your comment for a bit and I can see what you’re saying. All software uses dependencies, but how they are shipped is different for a lot of languages. If we take an extreme example, Go has a lot of the same microdependencies that Python, JS, etc. have, (probably a lot more than Python even), but since programs are usually compiled into a standalone binary, you never think about them as a user. Interpreted languages on the other hand tend to not do this because they’re not compiled, and when you’re installing a dependency, you’re often installing the source code itself, rather than a shared library or .jar like you would in C++ or Java.

          A lot of people do complain about virtual environments though, and while I don’t personally have a problem with them, I do wonder why nobody uses bundlers in Python. It seems that something like this already exists, but it doesn’t seem to be widely adopted or used for all the complaints I hear about virtual environments and such.

          • Tlaloc_Temporal@lemmy.ca
            link
            fedilink
            arrow-up
            2
            ·
            14 days ago

            I think the incredible instability of python environments also leads to people being much more aware of python’s dependencies. Similar with NPM, but with a bigger focus on vulnerabilities there.

  • AeonFelis@lemmy.world
    link
    fedilink
    arrow-up
    17
    arrow-down
    2
    ·
    15 days ago

    Unit tests are overrated to the point of being harmful. They have their place, but that place is certainly not “the base of the testing pyramid”. They are useful for a very specific type of “units” - and using them anywhere else just messes things up.

    • nik9000@programming.dev
      link
      fedilink
      arrow-up
      5
      ·
      15 days ago

      I’ve come around to this position after seeing the mess people make.

      I just got a new job where I contribute to a fancy open source database. They do have unit tests. Barely. Most things are tested in SQL though. You have to build/link the whole thing to run the tests. But lots of things are plugins so it’s fast enough.

      If you can get away with it, this is better.

    • Windex007@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      15 days ago

      Curious how bad they’d have to be to land you at that position.

      If they’re hard to write, it’s kinda a red flag about the overall code itself. Forcing people to write them tends to force people to use better patterns just so the associated tests aren’t a bitch.

      And they pin behavior more than strict correctness, in my experience, but that’s a valuable signal. Canaries in the mine.

      You can be much more bold when you’ve got strong coverage.

      So I do admit some of the benefits might feel intangible… But boy howdy you’ll miss them if you move to a shop that never bothered. You’ll see the dumbest fucking patterns and be kinda handcuffed to do anything good.

      • AeonFelis@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        15 days ago

        And they pin behavior more than strict correctness, in my experience, but that’s a valuable signal. Canaries in the mine.

        The problem is that the behavior they pin is not the official API-exposed behavior. The behavior they pin is mostly implementation details. If diffuse(bomb) is supposed to diffuse the bomb, I need to test that given a legal instance of a Bomb it’d end up diffused. A unit test cannot test that - if diffuse is the unit being tested, then bomb is not allowed to be an actual bomb - it has to be a mock. And thus diffuse(bomb) does not test that diffuse diffuses a bomb - it tests that diffuse cuts very specific set of wires in a very specific order.

        • If the bomb change, the unit test is till green because the mock is still replaying the old behavior.
        • If I fix diffuse to handle the new bomb, the unit test becomes red.

        Once the bomb change, the unit test shows the opposite of what a test is supposed to show - and now you have to fix the test itself. Because that’s what unit tests test - they test themselves. They don’t test the system.

        An integration test that would bring in an actual bomb, diffuse it, and check if it’s diffused in a controlled environment where it can’t do damage by blowing up - is going to be more expensive to run, yes, but at least you will be getting a meaningful signal out of it. It’d be testing something of value. The unit test is cheap to run (although writing it was probably more expensive), but it gives you nothing. It’s completely pointless.

        • Windex007@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          edit-2
          14 days ago

          Awesome and well articulated response. Love it.

          There are a few threads to pull here:

          Is an integration test the best way to test the full e2e behavior of an api call? Yep.

          Now, depending on the size (and architecture) of your system, the full test suite of into tests could take like, 10 hours.

          And even then, you’re STILL probably mocking something (direct seeding bombs into the db). Full setup of all life cycles of all your entities using their associated entities (bombs, wires, wire clippers, bomb diffusers, their rank, their bosses, their diffusion history, etc…)

          So they’re expensive, and if you really look you’re probably still cheating some steps anyways.

          Another thread to pull on is what are you mocking in your tests to begin with, and if they’re not resulting in valuable test results then that goes back to one of my original points being that you might have suboptimal patterns in your production code.

          Like, what logic governs bomb diffusion and where does it live? Are you mocking the right thing? If you have to mock the wrong thing… WHY? The ritual of writing those tests give you the first whiff of a potential smell.

          I tell my guys not to test implementation: test behaviour. Test contract adherence. If that’s hard, no problem, message me let’s review it. Maybe a behavior they’re trying to test legitimately should be an int test. More often than not, their design is demanding to mock something that should be decomposed further, and then composed with dependency injections that are where the units that should ACTUALLY be mocked are the things that get mocked and injected, so the unit tests are actually testing the BEHAVIORS we want to pin rather than implementations. Composition and single responsibility principal are what enable unit tests to pull their weight.

          Edit: I’m so passionate on the subject that if you scribbled up a scratch example and pinged me a github link I’d genuinely review it.

          • AeonFelis@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            10 days ago

            Now, depending on the size (and architecture) of your system, the full test suite of into tests could take like, 10 hours.

            You’ll eventually have to run these 10 hours no matter what. If you only run the unit tests you won’t be able to tell if your code actually works, and if your full e2e suite passes then you won’t learn anything of value from running the unit tests - if one of them fails you can be fairly certain that it is that unit test itself that is broken, not the product.

            During development, you don’t need to run the full test suite. It’s usually quite trivial to identify a single integration test that checks the parts you are touching, and then you only have to run it to see the effects of your changes.

            And even then, you’re STILL probably mocking something (direct seeding bombs into the db). Full setup of all life cycles of all your entities using their associated entities (bombs, wires, wire clippers, bomb diffusers, their rank, their bosses, their diffusion history, etc…)

            Integration tests rarely (if ever) need mocks. If they need Test Doubles at all, they’d typically be _Fake_s rather than _Mock_s. But even that is not always needed - an integration test can often just use non-production versions of the real dependencies.

            So - if your real software typically runs against a database that sits on a powerful server and has tables with billions of rows, the e2e tests can use the same database engine but run it locally and only put a few dozens of rows in these tables. This setup is quick and cheap to set up and tear down while still being faithful to the production setup - maybe not 100%, but orders or magnitude more faithful than a unit test’s mock that just compares the SQL commands given to it with the ones preprogrammed into it.

            Another thread to pull on is what are you mocking in your tests to begin with, and if they’re not resulting in valuable test results then that goes back to one of my original points being that you might have suboptimal patterns in your production code.

            Like, what logic governs bomb diffusion and where does it live? Are you mocking the right thing? If you have to mock the wrong thing… WHY? The ritual of writing those tests give you the first whiff of a potential smell.

            My argument is that this is more about the “problem domain” than about the “solution domain”. Some field of software work very neatly with unit tests - general libraries are a good example. Other fields are a very poor fit, and trying to shoehorn them into using unit tests - even worse, shoehorning them into using mostly unit tests - will inevitable result in a nightmare of mock maintenance.

            I tell my guys not to test implementation: test behaviour. Test contract adherence. If that’s hard, no problem, message me let’s review it. Maybe a behavior they’re trying to test legitimately should be an int test. More often than not, their design is demanding to mock something that should be decomposed further, and then composed with dependency injections that are where the units that should ACTUALLY be mocked are the things that get mocked and injected, so the unit tests are actually testing the BEHAVIORS we want to pin rather than implementations. Composition and single responsibility principal are what enable unit tests to pull their weight.

            The problem is that unit tests “promote” aspects of implementation into behavior. Classic example - the exact syntax of the SQL query a function uses to obtain the data it needs is by all rights an implementation detail, but a unit test is forbidden from using a real database so it passes a mock that expects a very specific query - now it became a behavior.

            • Windex007@lemmy.world
              link
              fedilink
              arrow-up
              1
              ·
              edit-2
              9 days ago

              That’s a lot, so I’ll be forthright that I’ll probably be giving a relatively terse and gappy response, but that’s more because of my own limitations as a mobile user.

              Fundamentally every test unit, integration, ui, manual is still the same thing:

              Given X do Y expect Z.

              Mocks, fakes, whatever you want to call them, they’re fundamentally the same concept too: “given some idealized version of P”

              All you’ve done is pushed where that line sits. If I update my company writer to prospend all my company names with “corp.”, and my company read API test seeds without it and something at your read service layer strips “.”, if I forget to update the “given” in my read test seed data, that bug stays invisible.

              It’s the same class of issue. We just kicked the can down the road.

              You could do writes and reads in the same test, but even then you’re still kicking the can down the road that your front end is calling the API correctly at all. Maybe that the buttons even render to an end user given their authority.

              One might then conclude, then, that everything should be an automated UI test.

              But would it catch a bug where the bottom collapsed to 1PX? Is that part of the test too? Maybe manual testing is the real way to go.

              A further step back why do we even test anything at all? To provide some ultimate guarantee that everything works perfectly at all times? Is that the gate for a PR? A deployment to prod?

              There are various gates, at different levels of certainty, and there is an economic scaling for the different levels of assurances. AND they scale with the overall complexity of the system.

              And that isn’t a bug, that’s a feature.

              It’s ALL behavioral contracts, up and down the pyramid.

              There is a bang, there is a buck. Get the most bang for your buck. The distribution will vary by complexity and structure of your project.

              That being said, I’ve said it before and I’ll say it again: int and UI tests make it very very easy to write fucking garbage code, the VALUABLE architectural pushbacks on poorly patterned code that unit tests avail is AT LEAST as much value to the overall tech debt accumulation of a project as the results themselves.

              Please don’t read this as me shitting on int tests. It’s me trying to impress that unit tests are worth writing, and justifications for forgoing them usually are fundamentally driven by an underlying code smell. Sometimes the smell is “our architecture is already so fucked that writing a meaningful unit test would involve re architecting large swathes of our system”.

              And in that case I’d say “it is what it is”, recalibrate the testing posture towards int tests, and accept that is the reality.

              But I would NOT conclude on the blanket statement that unit tests SHOULDN’T be at the bottom of the testing period generally. Just that I’d inherited or failed to maintain a strong system design, and take the opportunity to reflect on how things came to that state for the purposes of becoming wiser.

              Addendum:

              Even int tests can reveal insane system architecture, just at a different layer and scale. I worked on a system at a fortune 500 company where the architecture was too far gone to even have meaningful integration tests. They were too far gone to even have automated front end tests. All material testing had to be done by hand. They had engineered their system with that staggering level of incompetetence. At the risk of making a slippery slope argument… It’s a slippery slope.

    • danhab99@programming.devOP
      link
      fedilink
      arrow-up
      4
      ·
      15 days ago

      I’m so heartbroken by the idea of unit tests. My first job was at a home automation startup and our primary product was a device that we would send ota firmware updates to. The device was based on an esp32, and because it received software updates from the app it had to be 100% robust and had full test coverage and the mono repo that would compile the firmware was gorgeous.

      I’m a web developer and I’ve been wanting to replicate that exact experience ever since but I just can’t get any team on board. It’s gone to the point where if the llm writes a unit test I’ll just commit it so I don’t care.

    • porous_grey_matter@lemmy.ml
      link
      fedilink
      arrow-up
      3
      ·
      15 days ago

      The point of unit tests isn’t that the tests are important, it’s that using them makes you write your code in testable units.

    • capital5@discuss.tchncs.de
      link
      fedilink
      arrow-up
      2
      ·
      15 days ago

      Unit tests are good IMO, but integration tests are also important. Unit tests are too discrete and don’t expose system wide issues that cross the boundaries of what you’re testing at the unit level. Examples: performance, stability, memory leaks, bugs that are caused by how multiple components interact with each other, etc.

      The other thing is that I think people use tests to give a false sense of security. Tests cannot expose issues that aren’t explicitly covered by testing. Design validation is still important and people tend to overlook that because of the false sense of security they get from seeing a test suite pass.

    • ragas@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      14 days ago

      Gosh I totally aggree! The amount of discussions I had about this is staggering.

      From both sides. Devs who didn’t understand what a unit-test actually is and devs who thought if they have unittests that they must have perfect functionality.