[VDBUH2024] - Victor Rentea - Code Smells - Hall of Fame

Поділитися
Вставка
  • Опубліковано 16 кві 2024
  • Clean Code principles have become a cornerstone of professional developer teams worldwide. Languages and frameworks have evolved, code analysis tools and IDEs have matured, so it’s time to raise the bar for code quality to increase our agility to rapidly incorporate changes and new features. Join this tour of the most common Code Smells as of 2024 and fill your toolbox with many techniques you can immediately apply in your practice, via an entertaining show spiced with live-coding moments.
  • Наука та технологія

КОМЕНТАРІ • 11

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

    It is always great to see Victor Rentea presenting 👏Thanks!

  • @rodelias9378
    @rodelias9378 25 днів тому +3

    Love Victor’s talks! So much energy! Thanks a lot!

  • @climentescu
    @climentescu 23 дні тому +3

    Tip: If you delete all the codebase.. there is nothing to refactor ;)

  • @Nellak2011
    @Nellak2011 21 день тому +2

    Java is a Code Smell.

  • @qaerkyr9197
    @qaerkyr9197 20 днів тому

    Victor was so were so fast in dismissing FOR over stream, saying of course stream.
    Have you ever heard this saying "Those that fails to learn the lessons of the past are doomed to repeat them!"
    Why would you want a non performant alternative, lack of identation, hardy readable alternative over FOR?
    So what is that boiler plate so troublesome that we need having 1 line of code instead of 5? Is that FOR so annoying that we are willing to sacrifice performance and clarity over it?
    What about using fewer objects across multiple classe instead of multiple objects in a single class? Do you want multiple entities in database too? What about performance (who cares, as long as it is OOP and it looks nice we don't care about performance right?) ?
    What about erasing the middle man? If you are so keen in erasing the middle man, why don't you call the repository directly from the controller? Why use the middle man "Service" ?

    • @A3A3adamsan
      @A3A3adamsan 2 дні тому

      "Streams are hardly readable" - because you are not used to them. Coming from functional programming, I find java streams very easy to read. In most cases they are much easier to read, than loops.
      Where do you get this idea, that streams have poor performance? They are very efficiently implemented in java. Did you make measurements?

    • @qaerkyr9197
      @qaerkyr9197 2 дні тому

      @@A3A3adamsan Do you even know how streams are implemented vs FOR? Take a wild guess how I found that streams have poor performance. How does one finds if some code has poor performance when comparing to other code? It's not rocket science. Use your brain!

    • @qaerkyr9197
      @qaerkyr9197 2 дні тому

      ​@@A3A3adamsan Do you even know why identation was invented? And why we don't write code on a single line?
      Do you have the brains to understand that streams forces you to write the code on a single line?
      I can watch a code for 0.5 seconds and understand what it does. Can you do the same with streams when all you got is:
      bla().bla().bla().bla().bla() a never ending row of stream. When you can have
      FOR () {
      IF() {
      }
      }
      Yes it's less readable than a FOR. Yes there are more rows written with FOR, but being a obsessed with "reducing the boiler plate" and "having a single line instead of many" comes at 2 major sacrifices: Performance - 50% less performant than a FOR. and Clarity, as the code no longer respects "one instruction / row" when using streams.
      The code written on a single line is less readable than the code written on multiple lines.
      The proof that code on multiple lines is more readable is the fact that we don't write code on a single line. Each instruction has its own line. We write the code in this manner so it is more easy to debug, and check results for each instruction.
      If you're so stream purist, and love having everything on a line because it's clearer for you, why not write the whole classes like stream on a single row?

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

      ​@@qaerkyr9197 hey man easy, take a break, your co-workers would appreciate it.

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

      @@tonino_nelveneto there are too many idiots out there asking stupid questions such as "Did you make measurements?"...