Is clean code a LIE? Primeagen x Casey Muratori say so

Поділитися
Вставка
  • Опубліковано 26 вер 2024
  • Swyx and Ben react to hot takes on clean code. -- Watch live at / bholmesdev

КОМЕНТАРІ • 8

  • @nexovec
    @nexovec 8 місяців тому +1

    Unless you think of code in terms of structs and memory with strong static guarantees, this has limited usefulness to you. You'll think Casey is arguing for hacking in code by breaking the type schema because it's faster or something, which isn't even possible.

    • @ViolentFury1
      @ViolentFury1 8 місяців тому +17

      0 information in your comment.

    • @nexovec
      @nexovec 8 місяців тому

      ​@@ViolentFury1 maybe you mapped it incorrectly? EDIT: cool nickname btw.

    • @llothar68
      @llothar68 6 місяців тому +1

      The type schema is like religion and it is slowing things down, a lot, from developer speed to execution speed.
      I still do type erasure (in the good old casting to void*).

    • @nexovec
      @nexovec 6 місяців тому +1

      ​@@llothar68 You actually think type schema is slowing down execution speed... that's kind of morbid.
      How would that even be possible?

    • @llothar68
      @llothar68 6 місяців тому +1

      @@nexovec Because the "cleaner" your code the sooner you have to invent other intermediate types to make all the types fit together to do the tasks. This involves more abstraction layers, function calls, memory allocations, L1 and L2 cache misses, branch prediction misses, And for the programmer productivity.
      Abstraction is one of the worst now to understand what it actually does. Debugging is a hell when you can't see what is called, even you little artifical restricted unit test runs fine. We have the problem of too much abstraction for too little things. I recommend John Ousterhouse talk here .