Functional Programming in Java 8 (with Lambdas and Streams)

Java says hello to functional programming with its support for lambdas in Java 8. This talk cover syntax and semantics of lambda functions, moving from external iteration to internal iteration, and how lambda functions can result in shorter and more readable code. If you are new to functional programming and want productivity gains from using Java’s lambda functions, this talk is certainly for you. 

Using completely hands-on approach (extensive set of sample programs will be shared to all participants), this session covers Java 8's functional programming features for regular work and improve productivity. Special feature: Live demo of solving a programming problem in iterative approach (Java 7 and earlier) versus using Java 8 streams (Java 8).  

 
 

Outline/Structure of the Workshop

* Productive programming with Java 8's lambdas (10 minutes) 

* Hands-on: Lambdas (25 minutes) 

* Overview of stream API (10 minutes) 

* Hands-on: Enter the rapids with streams API (25 minutes) 

* Demo: Processing contents of large files - iterative approach vs. functional approach (15 minutes) 

* Wrap-up and Q & A (5 minutes)  

Learning Outcome

* Java Lambdas (syntax and semantics) 

* How to use Stream API 

* How to apply functional programming in practice for regular work 

Target Audience

Developers, leads, architects

schedule Submitted 4 years ago

Public Feedback


    • Liked Bartosz Bąbol
      keyboard_arrow_down

      Bartosz Bąbol - Magic at compile time. Metaprogramming in Scala

      Bartosz Bąbol
      Bartosz Bąbol
      Backend engineer
      --
      schedule 3 years ago
      Sold Out!
      45 Mins
      Talk
      Intermediate

      Don't use metaprogramming! Don't use macros! You will often hear those statements. But metaprogramming or speaking more specific macros are heavily used in scala ecosystem. Almost every big project in functional or "reactive" technology stack uses them somewhere under the hood. What are macros? Why they are so controversial? What macros can offer to an engineer? Why they are useful? How they can minimize amount of boilerplate code? After answering those questions by showing small examples, we will start to develop library(or maybe better term will be DSL) for parsing XML.

      But there is something more I didn't mention. If you are familiar with Scala ecosystem and up to date with roadmap of new Scala versions, you should be aware that...MACROS ARE DEAD. So why bother? Because there is new, bright future of metaprogramming in Scala called Scala Meta. We will see that knowledge gained after learning macros will be helpful when we will learn new approach presented in Scala Meta.

    • Liked Debasish Ghosh
      keyboard_arrow_down

      Debasish Ghosh - An algebraic approach to functional domain modeling

      45 Mins
      Talk
      Intermediate

      Domain modeling is usually implemented using OO design. In this approach of "nouns-first" we design object hierarchies using subtyping to model the various elements of the domain. In this talk we will take a different approach using Scala:

      1. Start with focus on verbs first
      2. Think how we can model domain behaviors using pure functions grouped within extensible modules
      3. Use an algebraic approach towards evolution of modules,the algebra being composed of functions,types & laws
      4. See how the domain algebra can be constructed from categorical structures like monoids, functors & monads
      5. Discuss how the functional patterns lead to compositionality - an extremely important quality that scales your domain model.

    • Liked Tamizhvendan S
      keyboard_arrow_down

      Tamizhvendan S - Rethinking "State Management."

      Tamizhvendan S
      Tamizhvendan S
      Lead Consultant
      Ajira
      schedule 4 years ago
      Sold Out!
      45 Mins
      Demonstration
      Beginner

      Persisting the State is an integral part of any application, and it profoundly influences how we architect the application. But do we need to store the state in the first place? Is there any alternative?

      Together, let's experience a difference perspective of State Management.

    • Liked Roger Hui
      keyboard_arrow_down

      Roger Hui - A Tour (de Force) of APL in 16 Expressions

      Roger Hui
      Roger Hui
      programmer
      Dyalog Ltd.
      schedule 4 years ago
      Sold Out!
      90 Mins
      Workshop
      Beginner

      APL will be 50 years old in November 2016 (50 years from 1966-11-27 15.53.58, to be exact), and it remains unsurpassed in manifesting Kenneth E. Iverson’s five important characteristics of notation

      • ease of expression
      • suggestivity
      • subordination of detail
      • economy
      • amenability to proof

      These characteristics are demonstrated by working through 16 APL expressions. The material is approachable for beginners and yet thought-provoking for experts.

      One of the 16 expressions is a fast computation of the partition function without use of the Hardy-Ramanujan (1918) results.

       

    • Liked Monika Kumar Jethani
      keyboard_arrow_down

      Monika Kumar Jethani - "Kotlin is the secret of my functional power", says Android

      45 Mins
      Demonstration
      Beginner

      Kotlin is a statically-typed programming language released by JetBrains. With the arrival of Kotlin, Android's functional power has enhanced as Kotlin brings a bouquet of features such as type inference,higher-order functions, lambda expressions, operator overloading, lazy evaluation,immutability,recursive functions and lots of useful methods to work with collections. Kotlin comes up with essential functional facilities such as filter,take & drop, first & last, fold & foldRight, forEach, reduce,etc making it a perfect match for Android .This talk will focus on leveraging Kotlin's functional constructs for Android App development.

       

    • Liked S G Ganesh
      keyboard_arrow_down

      S G Ganesh - Refactoring to Functional Programming (with Java 8)

      90 Mins
      Tutorial
      Intermediate

      With Java 8’s lambda functions, Java now supports functional programming. Moving to functional programming can result in significantly better code and productivity gains. However, it requires a paradigm shift: you need to move away from imperative and object-oriented thinking to start thinking functionally. That’s what this session will help you achieve: it will help you make your shift towards functional programming. Bring-in your laptops and you can get your hands dirty refactoring imperative/OO code to functional code in Java 8! 

      Attraction: Illustration of how you can perform automatic refactoring to lambdas using your favourite IDE. Special feature: Live demo of refactoring open source legacy code base to show how lambdas and streams can result in shorter and effective code. 

    • Liked Siddharth Kulkarni
      keyboard_arrow_down

      Siddharth Kulkarni - Functional Programming Basics

      45 Mins
      Talk
      Beginner

      You must have heard people talk about Functional programming whilst your nod apprehensively, and how cool people do functional programming. You must have heard people talk about functional purity and imperative blasphemy. But what exactly does functional programming entail? Why is it making a comeback? This talk is aimed at providing an objective and practical view of what FP can and cannot do, and how it's nothing to be scared of, what languages support functional style and how it can help alleviate some common programming problems.