Refactoring towards functional Java

Track: Java
Skill Level: Intermediate
Room: Ballroom C
Time Slot: Mon 2/24, 1:00 PM
Tags: java , functional programming , refactoring
Presentation Link
Abstract

Have you been wanting to try out some functional techniques in your codebase but don’t know how to implement them in Java? Or has the challenge of refactoring from an imperative design to a more functional design proven too daunting of a task until now? Is it difficult to even know where to start?

This talk intends to address these challenges both by contrasting canonical imperative programming approaches with functional ones, and by demonstrating refactoring techniques that can aid in transmuting imperative code into functionally-inspired code.

Some things to expect in this talk:

  • a very brief overview of some key driving motivators behind FP
  • some Ideas around leveraging the strengths of OOP and FP in the same codebase
  • a foray into functional iteration patterns and a way to implement them in Java (folds, filters, transforms)
  • live demonstrations of refactoring towards those functional representations of imperative designs
  • notable performance implications of demonstrated functional approaches
  • audience participation in whatever form that naturally takes (questions, suggestions, example problems, collaborative coding)

Some things not to expect in this talk:

  • protracted academic conversations about why to use Clojure over Scala over Java over C over paper and pen
  • nazis
  • death rays
  • other things that cause us pain and/or death

In the interest of objectivity (and self-preservation), I will attempt to avoid making dogmatic statements like “of course chocolate is better than vanilla! Communist!” and other peripheral problematic faux pas. (In case I fail and do it anyway…well, my bad.)

John Napier

John is a technical lead and serial conversationalist at ThoughtWorks who spends entirely too much time engulfed in problem domains he knows nothing about and has no earthly business trying to learn. He can occasionally be found at your local coffee shop writing algorithms and trying to think deep thoughts.