How to fix an untestable system - Uncle Bob

Поділитися
Вставка
  • Опубліковано 15 гру 2024

КОМЕНТАРІ • 28

  • @genechristiansomoza4931
    @genechristiansomoza4931 День тому +9

    That's applicable to devs that cares. There are too many devs that do not care.

    • @jinto_reedwine
      @jinto_reedwine День тому

      I agree, there are too many who show up just enough to collect the paycheck! Those of us who care don't have to play by their rules, though. I have worked in an environment where I was even made fun of for trying to improve the code, after a year or two of slowly picking away at it, I at least succeeded in convincing the haters that what I was doing had value, even though they were still not willing to participate. The code did get better in the end, it just took much longer than if everyone had done their part. At the end of the day, I'm the one who needs to sleep at night knowing I was making things better for the next guy, and not worse.

  • @chrisf5418
    @chrisf5418 День тому +2

    Uncle Bob is right. I've done it that way. It works.

  • @ChrisVisserDev
    @ChrisVisserDev День тому +9

    Toxic comments here. This is sound advice. People that dont do this should take more responsibility for the quality of their own work. You are the one deciding how to build new features, you are the one deciding how much time that new feature takes.

    • @alxk3995
      @alxk3995 День тому

      Some people really comment negatively any video from uncle Bob. As soon as you have somewhat of a fan base there will be haters. 🤷‍♂️
      I'm not agreeing with everything he says (that would be weird), but especially on this video I have to agree, because we do it the same way and it works.

  • @marcotroster8247
    @marcotroster8247 День тому +4

    Yeah sure. Design patterns help to replace legacy code slowly. Adapters make the new code compatible with the old code. Strategy patterns switch between old and new implementations. Factories with feature flags hide the new implementations until they're ready to deploy. Once everything is migrated, drop the adapters and factories and rewire the calling cope. As said, it'll take some time to pull that off.

    • @blucyk
      @blucyk День тому

      What alternative do you suggest?

    • @marcotroster8247
      @marcotroster8247 День тому

      @blucyk I mean it depends on the context of your product. There's no silver bullet. In the end that product needs to make money, so ultimately it's a business decision.
      If the project is small, you might get away with a big bang rewrite. If that's not possible, you can do a slow refactoring to keep the product alive or you can do a big rewrite in favor of a new product. Even for rewrites there are lots of ways like shutting down the entire thing or just partially shutting down some features. It really depends on the situation.

  • @PurpleSheeep
    @PurpleSheeep День тому +1

    What mr uncle is forgetting here is, that you only need to prove your code changes work with tests if you cant test in production.

    • @Ratstail91
      @Ratstail91 День тому

      I hate hpw right this 8s.

  • @personalaccount1515
    @personalaccount1515 2 дні тому +1

    First

  • @jacekjacenty
    @jacekjacenty День тому

    OK, Uncle Bob. Now try to give advice for an untestable system that is modified at such a pace that you do not have the chance to introduce the improvements you suggest. Also, what's the point if they are looking for ways to replace it with a proper system written by an IT company? The changes you suggest add unnecessary noise, making the code review harder.

    • @funkdefied1
      @funkdefied1 День тому +6

      He answers that here. Every time you modify code (to add new features, etc), make it a little more decoupled, too. It’s a nightmare to refactor an entire code base, but it’s trivial to refactor a function or two.

    • @jacekjacenty
      @jacekjacenty День тому

      @@funkdefied1 You did not see the code I am talking about. While at time I succeed at decoupling and other improvements, it's not a trend but occasional one step forward with two steps back.

    • @leandrowitzke6405
      @leandrowitzke6405 День тому +4

      Why are you so mad? Is just a general advice for a general example. There are always exceptions and you should be able to validate this approach to your current situation

    • @jacekjacenty
      @jacekjacenty День тому

      @@leandrowitzke6405 You are correct; there are always exceptions. Why I am so mad? Maybe you should first explain to me why people live in a dogmatic world and only admit the existence of the exceptions only when a mad man like me comes along and starts asking inconvenient questions.

    • @leerothman2715
      @leerothman2715 День тому

      @@jacekjacenty At what point has anybody been dogmatic? It’s just helpful advice from fellow devs. Feel free not to follow it, the code police will not lock you up. If the code is going to be replaced with ‘a proper system’ then that would indicate the feelings of the stakeholders. I’d personally challenge the statement that changes add unnecessary noise making the code review harder. Having smaller code reviews should help resolve that issue & pair/mob programming would make that step unnecessary or very quick. That’s just advice though, we’re just trying to help our community of fellow developers.

  • @BestHKisDLM
    @BestHKisDLM День тому +1

    omg this snake oil seller come on.

    • @leerothman2715
      @leerothman2715 День тому +2

      @@BestHKisDLM It must be my lucky day, because I didn’t pay anything to the seller for this 🙄