Functional Programming Anti-Patterns

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ก.ย. 2024
  • Many teams struggle with new challenges for code maintainability: Functional Programming misuse (by newbies) or abuse (by seasoned FP enthusiasts). Join this entertaining presentation spiced with live coding to learn about new code smells emerging in FP-enabled languages:
    - Fragmented Immutables
    - Tangled Tuples
    - Reduce Rodeo
    - Mutant Pipeline
    - Double-Edged Return
    - Function Factor Frenzy
    - Optional Obsession (Java) and more.
    Even though the code samples are in Java, speakers of most programming languages would benefit from the discussion.
    Speaker: Victor Rentea
    With two decades of experience, Victor is a Java Champion with extensive experience in training mid-senior developer groups (5000+ developers of 100+ companies). During these intense workshops, Victor got to debate with many bright engineers about the challenges faced by their projects. In return, he summarizes the lessons learned in conference talks and online meetups for the European Software Crafters, the world’s largest community around architecture, refactoring, and testing. Discover how Victor can help you at victorrentea.ro : training, consultancy, and TH-cam videos.

ความคิดเห็น • 8

  • @i-am-the-slime
    @i-am-the-slime 4 หลายเดือนก่อน +2

    What a backwards way to look at this. Java is the weird one that requires an object everywhere instead of having functions like every other PL in the world. God Java is so bad.

  • @moonbiscuit8742
    @moonbiscuit8742 4 หลายเดือนก่อน +2

    I'm working on a project which has banned throwing exceptions and abuses the Optional/Result pattern in a bad way. We're not even using it in a very functional way - there is no .Map() on it. Every method call is followed by the same mindless if() checking of the result and bubbling up the error to the top level - it's not that callers can even handle the optionality. Introduces a huge amount of useless code surface serving as distraction. Honestly don't understand why nobody questions this. I tried to bring it up, I get my favorite reply - "let's keep it consistent".

    • @i-am-the-slime
      @i-am-the-slime 4 หลายเดือนก่อน

      Why don't you use a monad transformer?

  • @aoeu256
    @aoeu256 4 หลายเดือนก่อน

    Pretty awesome, I wish we could upgrade code from one language to another when we figure out better ways of developing stuff. Julia also looks pretty awesome, its a LISP but with infix syntax. You can use Clojure in a Java project by telling people that S-expressions are XML 3.0, and sometimes you can try using a cross-compiler to change your clojure to Java if they get suspicious.
    Its awesome you talk about the Either problem (checked Exceptions) in Haskell, its a problem in Haskell with *ALL* containers including Maybe and all other Monads, however, Haskell is more consistant so I maybe there is a solution to it (Algebraic effects somewhat fix it), while Java lacks referential transparency everywhere so maybe that may change things.

  • @i-am-the-slime
    @i-am-the-slime 4 หลายเดือนก่อน +1

    referential is the word

  • @bbravoo
    @bbravoo 4 หลายเดือนก่อน

    Happy to see that Victor is stating to love Kotlin ♥

  • @vturcan
    @vturcan 4 หลายเดือนก่อน

    Thanks for ctrl+shift+i !

  • @self-aware986
    @self-aware986 4 หลายเดือนก่อน

    Interesting and entertaining talk!